navigatorKey property

GlobalKey<NavigatorState> get navigatorKey

Attach to MaterialApp.navigatorKey or GoRouter.navigatorKey.

When MoleConfig.navigatorKey is set at install, that key is returned so Mole uses your app's navigator (typical with GoRouter).

Implementation

static GlobalKey<NavigatorState> get navigatorKey =>
    _config.navigatorKey ?? _defaultNavigatorKey;