revert nullability change with navigation in authentication state change [skip_ci]
OmarHatem committed
Dec 3, 2022 at 23:36 UTC
98da1c221d2bd5f9162c950406e64b22366d10e6
1 file changed
+2
-2
lib/reactions/on_authentication_state_change.dart
+2
-2
@@ -23,12 +23,12 @@ void startAuthenticationStateChange(AuthenticationStore authenticationStore,
23
}
24
25
if (state == AuthenticationState.allowed) {
26
- await navigatorKey.currentState?.pushNamedAndRemoveUntil(Routes.dashboard, (route) => false);
26
+ await navigatorKey.currentState!.pushNamedAndRemoveUntil(Routes.dashboard, (route) => false);
27
return;
28
}
29
30
if (state == AuthenticationState.denied) {
31
- await navigatorKey.currentState?.pushNamedAndRemoveUntil(Routes.welcome, (_) => false);
31
+ await navigatorKey.currentState!.pushNamedAndRemoveUntil(Routes.welcome, (_) => false);
32
return;
33
}
34
});