routeOf static method

ModalRoute? routeOf(
  1. BuildContext context, {
  2. bool listen = false,
})

The ModalRoute currently bound to the nearest LRouteScope.

Implementation

static ModalRoute<dynamic>? routeOf(BuildContext context,
        {bool listen = false}) =>
    _RouteScopeProvider.of(context, listen: listen)?.route;