This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Singleton logic | |
class Singleton { | |
// This makes sure Singleton() always returns the same instance | |
static final Singleton _instance = Singleton._(); | |
Singleton._(); | |
factory Singleton() { | |
return _instance; | |
} | |
// define any props, methods you want |