I have seen an example in flutter where you can navigate routes without having access to a BuildContext.
final GlobalKey<NavigatorState> _navKey = new GlobalKey<NavigatorState>();
navigatorKey.currentState.pushNamed('/');
Are there any drawbacks to doing all of my apps navigation with this method?
No. There is no downside.
The performance concern is negligible in regards to screen switches.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With