maybeOf static method
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>();
}