fix misc
This commit is contained in:
parent
77397e0f92
commit
9eadcd7ea0
|
@ -20,7 +20,6 @@ class LocalProfileComponentModel extends FlutterFlowModel<LocalProfileComponentW
|
||||||
Future<void> getData() async {
|
Future<void> getData() async {
|
||||||
cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
|
cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? '';
|
||||||
cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? '';
|
||||||
;
|
|
||||||
setStateCallback?.call();
|
setStateCallback?.call();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,12 +38,12 @@ class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidge
|
||||||
_model.setStateCallback = () => safeSetState(() {});
|
_model.setStateCallback = () => safeSetState(() {});
|
||||||
|
|
||||||
WidgetsBinding.instance.addPostFrameCallback((_) async{
|
WidgetsBinding.instance.addPostFrameCallback((_) async{
|
||||||
final String? cliUUID = await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage);
|
|
||||||
bool initialized = false;
|
bool initialized = false;
|
||||||
if(cliUUID == null || cliUUID.isEmpty && !initialized)
|
bool isDevLinked = _model.cliUUID.isNotEmpty;
|
||||||
|
if(!isDevLinked && !initialized) {
|
||||||
initialized = true;
|
initialized = true;
|
||||||
await LocalizationService.processLocals(context).then((value) => value == true ? onUpdate() : null);
|
await LocalizationService.processLocals(context).then((value) => value == true ? onUpdate() : null);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue