Dart单例模式最佳实践

/// Created by Capt. Michael @ CaptNotes.com on 02/17/2020.
class Singleton {
  Singleton._();

  static final _instance = Singleton._();

  factory Singleton.getInstance() => _instance;
}
1 1 vote
Article Rating
Subscribe
提醒
guest
0 评论
Inline Feedbacks
View all comments
普人特福的博客cnzz&51la for wordpress,cnzz for wordpress,51la for wordpress
0
Would love your thoughts, please comment.x
()
x