-
Notifications
You must be signed in to change notification settings - Fork 215
error occured Navigator.pushNamed(context, '/') in initState() of State class #93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hey there -- sorry about the delay, was on vacay for a bit. Unfortunately, you cannot directly push to the navigator during Two solutions:
Hope that helps! |
Hi ,
|
Hey all: it looks like you're attempting to Navigate while Flutter is building the Widget tree, which isn't allowed. @shyandsy -- Please do not call @Rajakalla You've actually got a small syntax error which is causing your app to navigate during the build. The code should look like this:
|
Thank you @brianegan it worked with flutter redux navigation |
I was trying to do login state check when user jump to login page.
In the initState method, I checked the login state and jumped back to home if the use has logged in.
but the error occured when I try to use navigator method in initState()
"I/flutter ( 4757): setState() or markNeedsBuild() called during build."
error information
The text was updated successfully, but these errors were encountered: