Skip to content

Commit 5d23067

Browse files
[go_router] chore(docs): update redirection example in readme (#2686)
1 parent 37f5ecb commit 5d23067

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/go_router/README.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ GoRouter(
125125
...
126126
redirect: (context, state) async {
127127
if (await LoginService.of(context).isLoggedIn) {
128-
return state.location;
128+
// No redirect is required if the user is already logged in.
129+
return null;
129130
}
130131
return '/login';
131132
},

0 commit comments

Comments
 (0)