This commit is contained in:
jantunesmessias 2024-11-21 14:50:27 -03:00
parent 7535d5c408
commit 9482e1897a
1 changed files with 1 additions and 17 deletions

View File

@ -51,25 +51,9 @@ GoRouter createRouter(AppStateNotifier appStateNotifier) {
initialLocation: '/',
debugLogDiagnostics: true,
redirect: (context, state) {
log('state.allParams: ${state.allParams}');
log('state.path: ${state.path}');
log('state.extra: ${state.extra}');
log('state.transitionInfo: ${state.transitionInfo}');
log('state.pageKey: ${state.pageKey}');
log('state.name: ${state.name}');
log('state.matchedLocation: ${state.matchedLocation}');
log('state.topRoute: ${state.topRoute}');
log('state.uri: ${state.uri}');
log('state.pathParameters: ${state.pathParameters}');
log('Context ${context.toString()}');
log('Context: ${context.describeWidget('context')}');
log('Context: ${context.describeElement('context')}');
if (Platform.isIOS) {
if (state.allParams.toString().contains("email") &&
state.matchedLocation == '/') {
log('Redirecting to forgotPassword');
if (state.uri.toString().contains("freaccess://changepass/")) {
throw Exception('Redirecting to forgotPassword');
// context.go('/signInPage');
}
}
return null;