step 22 : no_login -> login dan list riwayat pake JWT done, masih belum done di refreshToken karena check waktu expired salah
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import '../screen/no-login-home/no_login_home_screen.dart';
|
||||
import '../screen/no-login-splash/no_login_splash_screen.dart';
|
||||
import '../screen/no-login/no_login_screen.dart';
|
||||
|
||||
import '../screen/home/home_screen.dart';
|
||||
import '../screen/login/login_screen.dart';
|
||||
@@ -12,6 +15,12 @@ const homeRoute = "/homeRoute";
|
||||
const scanRoute = "/scanRoute";
|
||||
const editScanRoute = "/editScanRoute";
|
||||
|
||||
const noLoginSplashRoute = "/noLoginSplashRoute";
|
||||
const noLoginRoute = "/noLoginRoute";
|
||||
const noLoginHomeRoute = "/noLoginHomeRoute";
|
||||
const noLoginScanRoute = "/noLoginScanRoute";
|
||||
const noLoginEditScanRoute = "/noLoginEditScanRoute";
|
||||
|
||||
class AppRoute {
|
||||
static Route<dynamic> generateRoute(RouteSettings settings) {
|
||||
// splash screen
|
||||
@@ -25,6 +34,16 @@ class AppRoute {
|
||||
});
|
||||
}
|
||||
|
||||
if (settings.name == noLoginSplashRoute) {
|
||||
return MaterialPageRoute(builder: (context) {
|
||||
return MediaQuery(
|
||||
data: MediaQuery.of(context).copyWith(
|
||||
textScaler: TextScaler.linear(1.0), padding: EdgeInsets.all(0)),
|
||||
child: NoLoginSplashScreen(),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// login screen
|
||||
if (settings.name == loginRoute) {
|
||||
return MaterialPageRoute(builder: (context) {
|
||||
@@ -36,6 +55,16 @@ class AppRoute {
|
||||
});
|
||||
}
|
||||
|
||||
if (settings.name == noLoginRoute) {
|
||||
return MaterialPageRoute(builder: (context) {
|
||||
return MediaQuery(
|
||||
data: MediaQuery.of(context).copyWith(
|
||||
textScaler: TextScaler.linear(1.0), padding: EdgeInsets.all(0)),
|
||||
child: NoLoginScreen(),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// home screen
|
||||
if (settings.name == homeRoute) {
|
||||
return MaterialPageRoute(builder: (context) {
|
||||
@@ -47,6 +76,16 @@ class AppRoute {
|
||||
});
|
||||
}
|
||||
|
||||
if (settings.name == noLoginHomeRoute) {
|
||||
return MaterialPageRoute(builder: (context) {
|
||||
return MediaQuery(
|
||||
data: MediaQuery.of(context).copyWith(
|
||||
textScaler: TextScaler.linear(1.0), padding: EdgeInsets.all(0)),
|
||||
child: NoLoginHomeScreen(),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// scan screen
|
||||
if (settings.name == scanRoute) {
|
||||
return MaterialPageRoute(builder: (context) {
|
||||
@@ -74,7 +113,7 @@ class AppRoute {
|
||||
data: MediaQuery.of(context).copyWith(
|
||||
padding: const EdgeInsets.all(0),
|
||||
textScaler: TextScaler.linear(1.0)),
|
||||
child: SplashScreen(),
|
||||
child: NoLoginSplashScreen(),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user