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 Lazy": { | |
"scope": "dart", | |
"prefix": "lazy", | |
"body": [ | |
"class $1 {", | |
"static $1 _instace;", | |
"static $1 get instance {", | |
"if (_instace == null) _instace = $1._init();", | |
"return _instace;", |
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 NetworkService { | |
static NetworkService _instace; | |
static NetworkService get instance { | |
if (_instace == null) _instace = NetworkService._init(); | |
return _instace; | |
} | |
NetworkService._init(); | |
} |
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 NavigationService { | |
static NavigationService _instace = NavigationService._init(); | |
static NavigationService get instance => _instace; | |
NavigationService._init(); | |
} |