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
invalid member on null: 'key' #257
Comments
Same problem here, the issue seems to occur on all platforms (i tested android and web). The I tested with the provided example code of this package. |
@hauketoenjes I think that the application is not generating the key |
@Milad-Akarie any idea on this? |
I just tested on another channel of flutter than master and the problem is gone. Probably a temporary problem on the flutter side. Seems to be no problem with this package imo. |
Okay cool good to now Sucks because the master has the fix for the URL hash for Flutter web. @hauketoenjes I wonder if there was a breaking change for the newest version of master that is not yet compatible with this. I will close this for now. |
I have to reopen it as I can only use the master channel and the hash URL fix will come to beta but I think the problem might come also for this package down then line. |
@hauketoenjes I found the issue it is with the package. the issue is with line |
having the same problem on beta
|
@mx1up did you try what I did above? |
@rlee1990 yes, commenting out that line does make it work again.. |
Hi, something change in flutter WidgetApp. This way should work. Or just set not null value in Looks like this package problem. |
HI @rlee1990. Do you mean we have to comment the line in the library? I don't have it in my local |
@afermin yes that was how I got it to work. We have to wait until @Milad-Akarie fixes the issue. |
Is there a better workaround? |
That's why I created a pull request, which seems to be ignored. 🤔 |
Hello all, |
Don't want to comment out lines of the package? Try to remove the .builder part of your navigator like below.
@Milad-Akarie I'm happy to write a pull request to update the docs to make them clearer - I just need to understand the main differences and functionality of the builder. Can you please elaborate on what the purpose of the builder is and the difference between the two code samples in the docs? |
@SamuelMTDavies When Flutter inspector is launched (widget select mode) specifically, MaterialApp reloads and the navigator loses state, as a work around I'm using the native nav's key whiches maintained by the MaterialApp to create a global object key to restore ExtendedNavigator state on App reloads |
@SamuelMTDavies I'm really close to launching auto_route 1.0-beta which is based on navigator 2.0. |
@Milad-Akarie How can I use the default ExtendedNavigator constructor with something like a custom transition builder function. I need that, because I want always to wrap my screens with a stack, so I can dynamic add widgets. That's why I currently need the builder factory constructor. |
Hello, actually that you can perform to wait for auto_route 1.0 on navigator 2.0 and if you still got the issue is this trick :
This solve my invalid member on null:key issue. It is temporary. Commenting the navigator.key on the library didn't change anything to the issue only this does. Hope it helps. |
Thanks @Flow2dot0 just adding Container() solve the issue ! |
Same problem after updating to Flutter 2.0 today. |
the problem occured in mine as well. it occred without the flutter update. |
Same here @2shrestha22 @sath26 .. I fixed it by removing the
and change it to
|
where does the right side of this |
@sath26 Ignore it, don't include it. |
i get undefined name 'navigatorKey' error @thenifemi |
Interesting!
and then in your MaterialApp widget:
|
i got the above error. unable figure out the reason behind the error. i have added
in following way
|
Please put the |
Just adding a data point for anyone using Use
|
I am receiving an error
invalid member on null: 'key'
when trying to build the app.[√] Flutter (Channel master, 1.23.0-14.0.pre.84, on Microsoft Windows [Version 10.0.19041.508], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 30.0.1)
[√] Chrome - develop for the web
[√] Android Studio (version 4.0)
[√] VS Code (version 1.50.0)
[√] Connected device (3 available)
• No issues found!
The text was updated successfully, but these errors were encountered: