Closed whollacsek closed 2 years ago
This is the expected behavior, since you've explicitly chosen to add content about the go_router-provided Navigator
instance. If you'd like to provide you own Navigator
for this kind of thing, you can do so as shown in the shared scaffold sample.
Hi @csells, according to the docs https://gorouter.dev/navigator-builder
However I ran into an issue where I provided a wrapper widget to
navigatorBuilder
while defining my go_router instance, but this wrapper widget does not have access to the MaterialApp context. In this widget I'm callingshowModalBottomSheet
which throws:My go_router instance is defined as:
And the
MyWrapperWidget
displays on all routes a button that when clicked should show a bottom sheet modal.How can I have a wrapper around all pages that can access the Navigator from MaterialApp?