This commit is contained in:
J. A. Messias 2024-10-31 08:15:01 -03:00
parent 5b1a122f62
commit 41b3a02027
2 changed files with 55 additions and 48 deletions

View File

@ -58,7 +58,13 @@ class _HomePageWidgetState extends State<HomePageWidget> {
drawerEnableOpenDragGesture: true,
drawerDragStartBehavior: DragStartBehavior.start,
drawer: CustomDrawer(model: _model),
appBar: AppBar(
appBar: buildAppBar(context),
body: buildPage(context),
);
}
AppBar buildAppBar(BuildContext context) {
return AppBar(
backgroundColor: FlutterFlowTheme.of(context).primary,
automaticallyImplyLeading: false,
leading: FlutterFlowIconButton(
@ -102,8 +108,6 @@ class _HomePageWidgetState extends State<HomePageWidget> {
actions: const [],
centerTitle: true,
elevation: 0.0,
),
body: buildPage(context),
);
}

View File

@ -33,9 +33,9 @@ class StorageUtil {
StorageUtil._internal();
late final SQLiteStorageHelper _sqliteStorage;
late final SecureStorageHelper _secureStorage;
late final SharedPreferencesStorageHelper _sharedPreferences;
late SQLiteStorageHelper _sqliteStorage;
late SecureStorageHelper _secureStorage;
late SharedPreferencesStorageHelper _sharedPreferences;
bool _initialized = true;
static Future<void> set(StorageData data) async {
@ -122,6 +122,9 @@ class StorageUtil {
log('StorageUtil: Starting initialization');
if (!_initialized) return true;
if (_initialized) await SharedPreferencesStorageHelper().initialize();
if (_initialized) _secureStorage = SecureStorageHelper();
if (_initialized) _sqliteStorage = SQLiteStorageHelper();
if (_initialized) _sqliteStorage = SQLiteStorageHelper();
await initSecureStorage();
await initSharedPreferences();
await initSQLiteStorage();