resolve static method
Resolves the overlay for context when one is supplied, falling back to
the remembered root overlay.
Implementation
static OverlayState? resolve(BuildContext? context) {
if (context != null) {
final OverlayState? fromContext = Overlay.maybeOf(
context,
rootOverlay: true,
);
if (fromContext != null) return fromContext;
}
return overlay;
}