For example, from the BuildContext passed to this method, the Directionality, Localizations, DefaultTextStyle, MediaQuery, etc, are all available. They can also be overridden in a way that impacts all the routes in the Navigator.
This is rarely useful, but can be used in applications that wish to override those defaults, e.g. to force the application into right-to-left mode despite being in English, or to override the MediaQuery metrics (e.g. to leave a gap for advertisements shown by a plugin from OEM code).
If routes are provided using one or more of those properties, then
child is not null, and the returned value should include the
the widget subtree; if it does not, then the application will have no
navigator and the navigatorKey, home, routes, onGenerateRoute,
onUnknownRoute, initialRoute, and navigatorObservers properties will
have no effect.
If builder is null, it is as if a builder was specified that returned
child directly. If it is null, routes must be provided using one of
the other properties listed above.
Unless a Navigator is provided, either implicitly from builder being
null, or by a builder including its
child argument, or by a builder
explicitly providing a Navigator of its own, features such as
showDialog and showMenu, widgets such as Tooltip, PopupMenuButton,
or Hero, and APIs such as Navigator.push and Navigator.pop, will not
final TransitionBuilder builder