fix
This commit is contained in:
@@ -62,13 +62,18 @@ final routerProvider = Provider<GoRouter>((ref) {
|
||||
final isLoggedIn = authState.value != null;
|
||||
final isOnSplashPage = state.matchedLocation == RouteNames.splash;
|
||||
final isOnLoginPage = state.matchedLocation == RouteNames.login;
|
||||
final isOnForgotPasswordPage = state.matchedLocation == RouteNames.forgotPassword;
|
||||
final isOnForgotPasswordPage =
|
||||
state.matchedLocation == RouteNames.forgotPassword;
|
||||
final isOnRegisterPage = state.matchedLocation == RouteNames.register;
|
||||
final isOnBusinessUnitPage =
|
||||
state.matchedLocation == RouteNames.businessUnitSelection;
|
||||
final isOnOtpPage = state.matchedLocation == RouteNames.otpVerification;
|
||||
final isOnAuthPage =
|
||||
isOnLoginPage || isOnForgotPasswordPage || isOnRegisterPage || isOnBusinessUnitPage || isOnOtpPage;
|
||||
isOnLoginPage ||
|
||||
isOnForgotPasswordPage ||
|
||||
isOnRegisterPage ||
|
||||
isOnBusinessUnitPage ||
|
||||
isOnOtpPage;
|
||||
|
||||
// While loading auth state, show splash screen
|
||||
if (isLoading) {
|
||||
@@ -367,8 +372,13 @@ final routerProvider = Provider<GoRouter>((ref) {
|
||||
GoRoute(
|
||||
path: RouteNames.addresses,
|
||||
name: RouteNames.addresses,
|
||||
pageBuilder: (context, state) =>
|
||||
MaterialPage(key: state.pageKey, child: const AddressesPage()),
|
||||
pageBuilder: (context, state) {
|
||||
final extra = state.extra as Map<String, dynamic>?;
|
||||
return MaterialPage(
|
||||
key: state.pageKey,
|
||||
child: AddressesPage(extra: extra),
|
||||
);
|
||||
},
|
||||
),
|
||||
|
||||
// Address Form Route (Create/Edit)
|
||||
|
||||
Reference in New Issue
Block a user