maybeOf static method

RouteDefinerRouter? maybeOf(
  1. BuildContext context
)

The nearest router above this context; null outside a managed Navigator.

Implementation

static RouteDefinerRouter? maybeOf(BuildContext context) =>
    context.dependOnInheritedWidgetOfExactType<_RouterScope>()?.router;