Modified Devices Pages

This commit is contained in:
Mohammad Salameh
2024-03-11 12:04:26 +03:00
parent f11b6d8d32
commit d3bd10730c
16 changed files with 136 additions and 131 deletions
+9
View File
@@ -2,9 +2,11 @@ import 'dart:async';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
import 'package:syncrow_app/services/locator.dart';
import 'package:syncrow_app/utils/bloc_observer.dart';
import 'package:syncrow_app/utils/helpers/localization_helpers.dart';
import 'package:syncrow_app/utils/resource_manager/constants.dart';
import 'my_app.dart';
@@ -32,6 +34,13 @@ void main() {
//to initialize the locator
initialSetup();
//final SharedPreferences prefs = await SharedPreferences.getInstance();
// var isLoggedIn = (prefs.getBool('isLoggedIn') == null) ? false : prefs.getBool('isLoggedIn');
//
var storage = const FlutterSecureStorage();
bool isLoggedIn =
await (storage.read(key: Constants.tokenAccessKey)) != null;
//to save the locale in the shared preferences
await LocalizationService.saveLocale(const Locale("en", "AE"));
final savedLocale = await LocalizationService.savedLocale();