isCurrentOf static method

bool? isCurrentOf(
  1. BuildContext context
)

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

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

Use of this method will cause the given context to rebuild any time that the ModalRoute.isCurrent property of the ancestor _ModalScopeStatus changes.

Implementation

static bool? isCurrentOf(BuildContext context) => _of(context, _ModalRouteAspect.isCurrent)?.isCurrent;