The purpose of the go_router for Flutter is to use declarative routes to reduce complexity, regardless of the platform you're targeting (mobile, web, desktop), handling deep linking from Android, iOS and the web while still allowing an easy-to-use developer experience.
So here, first MaterialApp will be from Loading Widget
But its not possible for MyApplication to add GoRouter in Loading Widget
I tried setting url strategy explicitly but then go router don't understand paths correctly
I have a suggestion
There should be following 2 properties in GoRouter
1) setUrlStrategy
2) useUrlStrategy
If setUrlStrategy is not null then set and use specified url strategy
else useUrlStrategy will only be used to resolve path
I've similar issue [issue] in my case I'm using firebase as backend my
main.dart
file looks like:So here, first
MaterialApp
will be fromLoading
Widget But its not possible for MyApplication to addGoRouter
in Loading Widget I tried setting url strategy explicitly but then go router don't understand paths correctlyI have a suggestion
There should be following 2 properties in
GoRouter
1) setUrlStrategy
2) useUrlStrategy
If
setUrlStrategy
isnot null
then set and use specified url strategy elseuseUrlStrategy
will only be used to resolvepath