singleton classes in dart example
class Singleton {
static Singleton _instance;
Singleton._internal();
static Singleton getInstance() {
if (_instance == null) {
_instance = Singleton._internal();
}
return _instance;
}
}