Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
ToyZ-95 authored Oct 9, 2023
1 parent 680be47 commit 6827730
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,20 +125,18 @@ FlutterSplashScreen.scale(
```dart
FlutterSplashScreen.gif(
...
// go_router example
asyncNavigationCallback: () async {
var response = await userRepository.getUserData();
if(response.status == 200 && response.data.isAuthenticated){
context.replace('/home');
// GoRouter.of(context).goNamed("home");
// context.goNamed('home');
GoRouter.of(context).goNamed("home");
}
else{
context.replace('/');
// GoRouter.of(context).goNamed("/");
// context.goNamed('/');
}
},
OR
// Named routing example
asyncNavigationCallback: () async {
await Future.delayed(const Duration(seconds: 3));
if (context.mounted) {
Expand Down

0 comments on commit 6827730

Please sign in to comment.