of static method

OverlayState? of(
  1. BuildContext context
)

Returns the OverlayState of the nearest Overlay ancestor.

Implementation

static OverlayState? of(BuildContext context) {
  return context.dependOnInheritedWidgetOfExactType<_OverlayScope>()?._state;
}