routerOrNull property

AppRouter? get routerOrNull

The router from the closest AppRouterProvider instance that encloses this context. May be null if there is no surrounding provider.

Implementation

AppRouter? get routerOrNull => AppRouterProvider.maybeOf(this);