class ExamineInstance{ factory ExamineInstance() => _getInstance(); static ExamineInstance get instance => _getInstance(); static ExamineInstance _instance; bool _isExamine = true; bool get isExamine => _isExamine; set isExamine(bool value) { this._isExamine = value; } ExamineInstance._internal(){ //单例初始化 } static ExamineInstance _getInstance(){ if(_instance == null){ _instance = ExamineInstance._internal(); } return _instance; } }