popDispositionOf static method

RoutePopDisposition? popDispositionOf(
  1. BuildContext context
)

Returns ModalRoute.popDisposition for the modal route most closely associated with the given context.

Returns null if the given context is not associated with a modal route.

Calling this method creates a dependency on the ModalRoute associated with the given context. As a result, the widget corresponding to context will be rebuilt whenever the route's ModalRoute.popDisposition changes.

Implementation

static RoutePopDisposition? popDispositionOf(BuildContext context) =>
    _of(context, _ModalRouteAspect.popDisposition)?.popDisposition;