fix: seleção de local após login
This commit is contained in:
parent
892c26273e
commit
942fd253c7
|
@ -3,6 +3,8 @@ import 'dart:developer';
|
|||
import 'package:cached_network_image/cached_network_image.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:google_fonts/google_fonts.dart';
|
||||
import 'package:hub/shared/helpers/base_storage.dart';
|
||||
import 'package:hub/shared/helpers/storage_helper.dart';
|
||||
|
||||
import '/flutter_flow/custom_functions.dart' as functions;
|
||||
import '/flutter_flow/flutter_flow_theme.dart';
|
||||
|
@ -34,10 +36,14 @@ class _LocalProfileComponentWidgetState extends State<LocalProfileComponentWidge
|
|||
_model = createModel(context, () => LocalProfileComponentModel());
|
||||
_model.setOnUpdate(onUpdate: () => setState(() {}));
|
||||
_model.setStateCallback = () => safeSetState(() {});
|
||||
//
|
||||
// WidgetsBinding.instance
|
||||
// .addPostFrameCallback((_) async => await LocalizationService.processLocals(context).then((value) => value == true ? onUpdate() : null));
|
||||
// LocalizationService.processLocals(context).then((value) => value == true ? onUpdate() : null);
|
||||
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) async{
|
||||
final String? cliUUID = await StorageHelper().get(SQLiteStorageKey.clientUUID.value, Storage.SQLiteStorage);
|
||||
if(cliUUID == null || cliUUID.isEmpty) {
|
||||
await LocalizationService.processLocals(context).then((value) => value == true ? onUpdate() : null);
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
Loading…
Reference in New Issue