Flutter/dart/singleton
提供: 初心者エンジニアの簡易メモ
class SingletonHoge { SingletonHoge._privateConstructor(); static final SingletonHoge _instance = SingletonHoge._privateConstructor(); static SingletonHoge get instance { return _instance; } }
SingletonHoge hoge = SingletonHoge.instance;
https://stackoverflow.com/questions/12649573/how-do-you-build-a-singleton-in-dart