Implications of inserting a Navigator #182
knaeckeKami
started this conversation in
Ideas
Replies: 2 comments
-
Actually this shouldn't happen anymore as the Navigator isn't inserted above the MaterialApp but rather as a neighbor so to say. Which version are you using? Your solution was once how I've done it, but unfortunately it didn't work out that well. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Using the latest published version. I'm using MateralApp.router, maybe there's a difference between just using MaterialApp. Will try to create a minimal reproducible example. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This package inserts a Naviator near the top of the Tree - this has quite some implications.
For example, dialogs shown by
showDialog()
will now no longer be inserted under theMaterialApp
(unless you setuseRootNavigator: false
).This means the dialogs will not be able to access the correct Theme and localizations (well, you can set the localization delegates in the BetterFeedback widget, so this issue has an easy workaround)
This behavior was surprising to me and it took me quite some time to figure out why my dialogs were broken.
I don't have a solution at the moment - I saw the comments in the code why a Navigator is needed.
Maybe a NavigationKey could be passed instead of using an own navigator?
But anyway - I think many users would appreciate it if this was documented if there is not easy way around that.
Edit: after forking and playing around with the code, I found the library works fine without a navigator - at for my use cases.
Replacing the Navigator which
seems to work fine with bottom sheet and TextFields. Don't know if that would break anything else though.
Beta Was this translation helpful? Give feedback.
All reactions