WIP
This commit is contained in:
parent
fd5e68469b
commit
6055ba0cc9
|
@ -18,8 +18,8 @@ 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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,9 +56,7 @@ class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidge
|
||||||
|
|
||||||
void onUpdate() {
|
void onUpdate() {
|
||||||
log('() => onUpdate()');
|
log('() => onUpdate()');
|
||||||
safeSetState(() {
|
safeSetState(() async => await _model.getData());
|
||||||
_model.getData();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
|
@ -98,8 +96,7 @@ class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidge
|
||||||
highlightColor: Colors.transparent,
|
highlightColor: Colors.transparent,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
await StorageHelper().set(SQLiteStorageKey.clientUUID.value, '', Storage.SQLiteStorage);
|
await StorageHelper().set(SQLiteStorageKey.clientUUID.value, '', Storage.SQLiteStorage);
|
||||||
await LocalizationService.processLocals(context)
|
await LocalizationService.processLocals(context).whenComplete(() => onUpdate());
|
||||||
.then((value) => value == true ? onUpdate() : null);
|
|
||||||
},
|
},
|
||||||
child: ClipRRect(
|
child: ClipRRect(
|
||||||
borderRadius: BorderRadius.circular(200.0),
|
borderRadius: BorderRadius.circular(200.0),
|
||||||
|
|
Loading…
Reference in New Issue