authentication completed
This commit is contained in:
@@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:grocery_app/src/core/routes/routes.dart';
|
||||
import 'package:grocery_app/src/ui/onboarding/on_boarding_screen.dart';
|
||||
import 'package:grocery_app/utils/constants/assets_constant.dart';
|
||||
import 'package:grocery_app/utils/constants/shared_pref_utils.dart';
|
||||
import 'package:grocery_app/utils/extensions/extensions.dart';
|
||||
import 'package:grocery_app/utils/extensions/uicontext.dart';
|
||||
|
||||
@@ -25,7 +26,20 @@ class _SplashScreenState extends State<SplashScreen> {
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
// couting();
|
||||
Future.delayed(const Duration(seconds: 2), () async {
|
||||
if (await SharedPrefUtils.isFreshInstall()) {
|
||||
context.clearAndPush(routePath: MyRoutes.ONBOARDING);
|
||||
} else
|
||||
{
|
||||
print("kdsbfjhdkjfdfghv ${await SharedPrefUtils.getToken()}");
|
||||
if (await SharedPrefUtils.getToken() == "1" ||
|
||||
await SharedPrefUtils.getToken() == null) {
|
||||
// context.clearAndPush(routePath: MyRoutes.SELECTACCOUNT);
|
||||
} else {
|
||||
context.clearAndPush(routePath: MyRoutes.BOTTOMNAV);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Future.delayed(const Duration(seconds: 2), () async {
|
||||
context.clearAndPush(routePath: MyRoutes.ONBOARDING);
|
||||
|
||||
Reference in New Issue
Block a user