class A { static A _instance; A._internal(); factory A() { if (_instance == null) { _instance = A._internal(); } return _instance; } }
本文标题:Dart单例模式
本文链接:https://www.haomeiwen.com/subject/xdtogktx.html
网友评论