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
class MySingleton { | |
String var1; | |
int var2; | |
static MySingleton _instance; | |
factory MySingleton({String var1, int var2}) { | |
_instance == null | |
? print('New instance!') | |
: print('Old instance!'); |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.