5/20/1
This commit is contained in:
@@ -8,6 +8,8 @@ import '../../constant/box_name.dart';
|
||||
import '../../main.dart';
|
||||
import '../../onbording_page.dart';
|
||||
import '../../views/home/map_page_passenger.dart';
|
||||
import '../auth/google_sign.dart';
|
||||
import '../auth/login_controller.dart';
|
||||
|
||||
class SplashScreenController extends GetxController
|
||||
with SingleGetTickerProviderMixin {
|
||||
@@ -42,12 +44,18 @@ class SplashScreenController extends GetxController
|
||||
startTimer();
|
||||
}
|
||||
|
||||
void startTimer() {
|
||||
Timer(const Duration(seconds: 5), () {
|
||||
void startTimer() async {
|
||||
Timer(const Duration(seconds: 5), () async {
|
||||
box.read(BoxName.onBoarding) == null
|
||||
? Get.off(() => OnBoardingPage())
|
||||
: box.read(BoxName.email) != null
|
||||
? Get.off(() => const MapPagePassenger())
|
||||
: box.read(BoxName.email) != null &&
|
||||
box.read(BoxName.phone) != null &&
|
||||
box.read(BoxName.isVerified) != 'true'
|
||||
// ? Get.off(() => const MapPagePassenger())
|
||||
? await Get.put(LoginController()).loginFromSignInGoogle(
|
||||
box.read(BoxName.passengerID).toString(),
|
||||
box.read(BoxName.email).toString(),
|
||||
)
|
||||
: Get.off(() => LoginPage());
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user