Closed jlubeck closed 4 years ago
They just made updates to the master with changes to onGenerateRoute that may have an impact on Get, I will take advantage and include this in the tests, thanks for the suggestion.
Nice, I'm on beta by the way, not master
Flutter (Channel beta, v1.17.0-3.4.pre, on Mac OS X 10.15.4 19E287, locale en-US)
Yes, I just commented because I have the Get code open doing tests for the master, and I will include that in the tests as well.
Apparently, at least on the master, the Flutter forces the initial route to be '/'. When using any other named route, such as '/ home'. is displayed in the log [GOING TO ROUTE] /home and then [GOING TO ROUTE] /. Can you confirm that the same is true in the beta? Because if this is a standard behavior, your solution will cause the initial routes to be duplicated. Right after navigating to your route, I also notice that it's current route is replaced by null. If the first behavior is observed in the beta, I believe that there is nothing that can be done besides opening an issue in Flutter (I would have to reconstruct all materialApp to fix this error, and changing the MaterialApp would make the library unstable). In case you have not noticed this, I will downgrade to beta version to apply the patch.
Fix on 2.1.0. Thank you so much for this. I still have things to investigate, but about the Flutter part, and why it clears the initial route on the master. And it forces the use of '/', but this is already about the Flutter.
When I initialized my
GetMaterialApp
like this:And I start the app, I get this error:
I was able to fix it locally by changing this on the file
root_widget.dart
before:
after:
Not making a pull request as I'm not sure this break something else, or what. But I figured I would give you what seems to work for me.
Thank you