11/1/1
This commit is contained in:
@@ -19,6 +19,7 @@ import 'controller/local/local_controller.dart';
|
||||
import 'controller/local/translations.dart';
|
||||
import 'firebase_options.dart';
|
||||
import 'models/db_sql.dart';
|
||||
import 'onbording_page.dart';
|
||||
import 'views/home/map_page.dart';
|
||||
|
||||
final box = GetStorage();
|
||||
@@ -42,7 +43,6 @@ void main() async {
|
||||
);
|
||||
await FirebaseMessagesController().requestFirebaseMessagingPermission();
|
||||
|
||||
await FirebaseMessagesController().getToken();
|
||||
FirebaseMessaging.onBackgroundMessage(backgroundMessageHandler);
|
||||
|
||||
List<Future> initializationTasks = [
|
||||
@@ -69,19 +69,22 @@ class MyApp extends StatelessWidget {
|
||||
LocaleController controller = Get.put(LocaleController());
|
||||
|
||||
return GetMaterialApp(
|
||||
title: AppInformation.appName,
|
||||
translations: MyTranslation(),
|
||||
debugShowCheckedModeBanner: false,
|
||||
locale: controller.language,
|
||||
theme: controller.appTheme,
|
||||
key: UniqueKey(),
|
||||
// routes: {'/':const HomePage()},
|
||||
home: box.read(BoxName.email) != null
|
||||
? const MapPage()
|
||||
: box.read(BoxName.emailDriver) == null
|
||||
? LoginPage()
|
||||
: box.read(BoxName.emailDriver) != null
|
||||
? const HomeCaptain()
|
||||
: LoginCaptin());
|
||||
title: AppInformation.appName,
|
||||
translations: MyTranslation(),
|
||||
debugShowCheckedModeBanner: false,
|
||||
locale: controller.language,
|
||||
theme: controller.appTheme,
|
||||
key: UniqueKey(),
|
||||
// routes: {'/':const HomePage()},
|
||||
home: box.read(BoxName.onBoarding) == null
|
||||
? OnBoardingPage()
|
||||
: box.read(BoxName.email) != null
|
||||
? const MapPage()
|
||||
: box.read(BoxName.emailDriver) == null
|
||||
? LoginPage()
|
||||
: box.read(BoxName.emailDriver) != null
|
||||
? const HomeCaptain()
|
||||
: LoginCaptin(),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user