From 6055ba0cc9e7fc8a16a2f9c8ef501f9c9ad911ef Mon Sep 17 00:00:00 2001 From: "J. A. Messias" Date: Tue, 12 Nov 2024 13:59:25 -0300 Subject: [PATCH] WIP --- .../local_profile_component_model.dart | 4 ++-- .../local_profile_component_widget.dart | 7 ++----- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/components/organism_components/local_profile_component/local_profile_component_model.dart b/lib/components/organism_components/local_profile_component/local_profile_component_model.dart index aec1deda..b09a083e 100644 --- a/lib/components/organism_components/local_profile_component/local_profile_component_model.dart +++ b/lib/components/organism_components/local_profile_component/local_profile_component_model.dart @@ -18,8 +18,8 @@ class LocalProfileComponentModel extends FlutterFlowModel getData() async { - cliName = (await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage)) ?? ''; - cliUUID = (await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage)) ?? ''; + cliName = await StorageHelper().get(SQLiteStorageKey.clientName.value, Storage.SQLiteStorage) ?? ''; + cliUUID = await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage) ?? ''; setStateCallback?.call(); } diff --git a/lib/components/organism_components/local_profile_component/local_profile_component_widget.dart b/lib/components/organism_components/local_profile_component/local_profile_component_widget.dart index 0a8bb410..6e8f3b14 100644 --- a/lib/components/organism_components/local_profile_component/local_profile_component_widget.dart +++ b/lib/components/organism_components/local_profile_component/local_profile_component_widget.dart @@ -56,9 +56,7 @@ class _LocalProfileComponentWidgetState extends State onUpdate()'); - safeSetState(() { - _model.getData(); - }); + safeSetState(() async => await _model.getData()); } @override @@ -98,8 +96,7 @@ class _LocalProfileComponentWidgetState extends State value == true ? onUpdate() : null); + await LocalizationService.processLocals(context).whenComplete(() => onUpdate()); }, child: ClipRRect( borderRadius: BorderRadius.circular(200.0),