WIP
This commit is contained in:
parent
5b1a122f62
commit
41b3a02027
|
@ -58,55 +58,59 @@ class _HomePageWidgetState extends State<HomePageWidget> {
|
|||
drawerEnableOpenDragGesture: true,
|
||||
drawerDragStartBehavior: DragStartBehavior.start,
|
||||
drawer: CustomDrawer(model: _model),
|
||||
appBar: AppBar(
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
automaticallyImplyLeading: false,
|
||||
leading: FlutterFlowIconButton(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 40.0,
|
||||
fillColor: FlutterFlowTheme.of(context).primary,
|
||||
icon: const Icon(
|
||||
Icons.menu_rounded,
|
||||
color: Colors.white,
|
||||
size: 28.0,
|
||||
),
|
||||
onPressed: () async {
|
||||
scaffoldKey.currentState!.openDrawer();
|
||||
},
|
||||
),
|
||||
title: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 15.0,
|
||||
height: 15.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'FRE ACCESS',
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(width: 8.0)),
|
||||
),
|
||||
actions: const [],
|
||||
centerTitle: true,
|
||||
elevation: 0.0,
|
||||
),
|
||||
appBar: buildAppBar(context),
|
||||
body: buildPage(context),
|
||||
);
|
||||
}
|
||||
|
||||
AppBar buildAppBar(BuildContext context) {
|
||||
return AppBar(
|
||||
backgroundColor: FlutterFlowTheme.of(context).primary,
|
||||
automaticallyImplyLeading: false,
|
||||
leading: FlutterFlowIconButton(
|
||||
borderRadius: 20.0,
|
||||
borderWidth: 1.0,
|
||||
buttonSize: 40.0,
|
||||
fillColor: FlutterFlowTheme.of(context).primary,
|
||||
icon: const Icon(
|
||||
Icons.menu_rounded,
|
||||
color: Colors.white,
|
||||
size: 28.0,
|
||||
),
|
||||
onPressed: () async {
|
||||
scaffoldKey.currentState!.openDrawer();
|
||||
},
|
||||
),
|
||||
title: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
ClipRRect(
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
child: Image.asset(
|
||||
'assets/images/logo.png',
|
||||
width: 15.0,
|
||||
height: 15.0,
|
||||
fit: BoxFit.cover,
|
||||
),
|
||||
),
|
||||
Text(
|
||||
'FRE ACCESS',
|
||||
style: FlutterFlowTheme.of(context).bodyMedium.override(
|
||||
fontFamily: FlutterFlowTheme.of(context).bodyMediumFamily,
|
||||
color: FlutterFlowTheme.of(context).info,
|
||||
letterSpacing: 0.0,
|
||||
useGoogleFonts: GoogleFonts.asMap().containsKey(FlutterFlowTheme.of(context).bodyMediumFamily),
|
||||
),
|
||||
),
|
||||
].divide(const SizedBox(width: 8.0)),
|
||||
),
|
||||
actions: const [],
|
||||
centerTitle: true,
|
||||
elevation: 0.0,
|
||||
);
|
||||
}
|
||||
|
||||
Container buildPage(BuildContext context) {
|
||||
return Container(
|
||||
decoration: BoxDecoration(
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue