Hello! Very good article, a lot better thank the official one. There's a little "bug" though.

You should not instantiate a GlobalKey<NavigatorState>() in the delegate's getter because every time the getter is called a new key is created, forcing the rebuild of the hole navigator (resetting the state and nullifying the transition animations between pages).

A simple solution would be to instantiate a key once in the delegate and then having the getter return it.

Or even better, doing this went quite well for me:

```

@override

final GlobalKey<NavigatorState> navigatorKey = GlobalKey<NavigatorState>();

```

which overrides the getter in a different but effective way!

source: https://pixabay.com/illustrations/board-circuits-control-center-trace-911636/

Every big project can have its flavors, its customizations, for different cases, clients, running environments, etc. Whenever we want to tweak some features, themes, graphics, we are pushed to evaluate conditions, no matter how elegant they can be. But what happens when we exclude those features in our Dart program…

Antonello Galipò

Flutter and Android developer with an enormous love for Yoga and hipster habits.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store