diff --git a/android/app/agconnect-services.json b/android/app/agconnect-services.json index 9c3955cc..0385b35e 100644 --- a/android/app/agconnect-services.json +++ b/android/app/agconnect-services.json @@ -27,7 +27,7 @@ "project_id":"388421841222408054", "app_id":"111820283", "api_key":"DQEDACmCXaRhehJz6Col9ZoLjfEmJCZn2/FIsIDJccmzQmq61gFYr7msISoMMgprtwaxo5vZ4Gyn2TIj6Y7v+sd1IGqforIJaKyaPA==", - "package_name":"com.hmg.atoms" + "package_name":"com.cloudsolutions.rsgatoms" }, "oauth_client":{ "client_id":"111820283", @@ -35,17 +35,17 @@ }, "app_info":{ "app_id":"111820283", - "package_name":"com.hmg.atoms" + "package_name":"com.cloudsolutions.rsgatoms" }, "configuration_version":"3.0", "appInfos":[ { - "package_name":"com.hmg.atoms", + "package_name":"com.cloudsolutions.rsgatoms", "client":{ "app_id":"111820283" }, "app_info":{ - "package_name":"com.hmg.atoms", + "package_name":"com.cloudsolutions.rsgatoms", "app_id":"111820283" }, "oauth_client":{ diff --git a/lib/main.dart b/lib/main.dart index c10bc2c1..20ba4a41 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -163,10 +163,10 @@ void main() async { if (Platform.isIOS) { await Firebase.initializeApp( options: const FirebaseOptions( - apiKey: "AIzaSyACQkSleNwU1jzEKR5ho1uSfZERokwwAbc", - appId: "1:973582662416:ios:bc4a8061444c6a08fbc395", - messagingSenderId: "973582662416", - projectId: "atoms-fb912", + apiKey: "AIzaSyDp8yKlAni0SnHbf2V7G-TG1DyKzAeNhQw", + appId: "1:187000537087:ios:ec99ad6f5226b5083df1ca", + messagingSenderId: "187000537087", + projectId: "rsg-atoms", ), ); } else { diff --git a/lib/new_views/pages/login_page.dart b/lib/new_views/pages/login_page.dart index 1bddb16f..9e9d64a9 100644 --- a/lib/new_views/pages/login_page.dart +++ b/lib/new_views/pages/login_page.dart @@ -92,7 +92,7 @@ class _LoginPageState extends State { height: 100.toScreenHeight, ), "RSG_logo".toSvgAsset(width: 110), - 25.height, + 16.height, context.translation.signInToYour.customHeadingText(context).custom(color: Colors.white, fontSize: 27, fontWeight: FontWeight.w500), context.translation.account.customHeadingText(context).custom(color: Colors.white, fontSize: 27, fontWeight: FontWeight.w500), 15.height, diff --git a/lib/new_views/pages/splash_page.dart b/lib/new_views/pages/splash_page.dart index d06dc9c3..5c3c97a9 100644 --- a/lib/new_views/pages/splash_page.dart +++ b/lib/new_views/pages/splash_page.dart @@ -62,6 +62,26 @@ class _SplashPageState extends State { // // }, (id, title, body, payload) async {}); super.initState(); + initApp(); + } + + void initApp() { + // Start splash logic after a delay + Future.delayed(const Duration(seconds: 1), () async { + if (!mounted) return; + + bool isSafe = await checkDeviceSafety(); + + if (!isSafe) { + Navigator.pushNamedAndRemoveUntil(context, UnsafeDeviceScreen.routeName, (_) => false); + } else { + if (_settingProvider.isLoaded && (_settingProvider.user != null)) { + checkTokenValidity(_settingProvider.user!.token!); + } else { + Navigator.of(context).pushNamedAndRemoveUntil(LoginPage.routeName, (routes) => true); + } + } + }); } void checkTokenValidity(String token) async { @@ -185,23 +205,6 @@ class _SplashPageState extends State { _settingProvider = Provider.of(context, listen: false); _userProvider = Provider.of(context, listen: false); - // Start splash logic after a delay - Future.delayed(const Duration(seconds: 2), () async { - if (!mounted) return; - - bool isSafe = await checkDeviceSafety(); - - if (!isSafe) { - Navigator.pushNamedAndRemoveUntil(context, UnsafeDeviceScreen.routeName, (_) => false); - } else { - if (_settingProvider.isLoaded && (_settingProvider.user != null)) { - checkTokenValidity(_settingProvider.user!.token!); - } else { - Navigator.of(context).pushNamedAndRemoveUntil(LoginPage.routeName, (routes) => true); - } - } - }); - return Scaffold( body: Stack( alignment: Alignment.center,