This commit is contained in:
Hamza-Ayed
2024-05-29 16:09:37 +03:00
parent 058fb67a41
commit 4af52f4392
44 changed files with 9509 additions and 2044 deletions

View File

@@ -42,18 +42,18 @@ class SplashScreenController extends GetxController
startTimer();
}
void startTimer() {
Timer(const Duration(seconds: 5), () {
void startTimer() async {
debugPrint('onBoarding: ${box.read(BoxName.onBoarding)}');
debugPrint('emailDriver: ${box.read(BoxName.emailDriver)}');
debugPrint('phoneDriver: ${box.read(BoxName.phoneDriver)}');
debugPrint('phoneVerified: ${box.read(BoxName.phoneVerified)}');
Timer(const Duration(seconds: 5), () async {
box.read(BoxName.onBoarding) == null
? Get.off(() => OnBoardingPage())
: box.read(BoxName.emailDriver) != null
// todo
&&
: box.read(BoxName.emailDriver) != null &&
box.read(BoxName.phoneDriver) != null &&
box.read(BoxName.phoneVerified) == '1'
// ? Get.off(() => SmsSignupEgypt())
// ? Get.off(() => HomeCaptain())
? Get.put(LoginCaptinController()).loginFromSignInGoogle(
? await Get.put(LoginCaptinController()).loginFromSignInGoogle(
box.read(BoxName.driverID).toString(),
box.read(BoxName.emailDriver))
: Get.off(() => LoginCaptin());