maybeOf static method

OverlayState? maybeOf(
  1. BuildContext context
)

Returns the OverlayState from the closest Overlay ancestor, or null if no Overlay ancestor exists.

Implementation

static OverlayState? maybeOf(BuildContext context) {
  return context.findAncestorStateOfType<OverlayState>();
}