mirror of
https://github.com/alibaba/flutter-go.git
synced 2025-07-04 07:18:11 +08:00
两个地方同时调用导致_spf为null而取不到值
This commit is contained in:
@ -24,8 +24,9 @@ class SpUtil {
|
|||||||
static Future<SpUtil> getInstance() async {
|
static Future<SpUtil> getInstance() async {
|
||||||
if (_instance == null) {
|
if (_instance == null) {
|
||||||
_instance = new SpUtil._();
|
_instance = new SpUtil._();
|
||||||
|
}
|
||||||
|
if (_spf == null) {
|
||||||
await _instance._init();
|
await _instance._init();
|
||||||
|
|
||||||
}
|
}
|
||||||
return _instance;
|
return _instance;
|
||||||
}
|
}
|
||||||
@ -117,4 +118,4 @@ class SpUtil {
|
|||||||
if (_beforeCheck()) return null;
|
if (_beforeCheck()) return null;
|
||||||
return _spf.clear();
|
return _spf.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user