showCustomOverlay method
void
showCustomOverlay(
{ - bool forceOverlay = false,
- required Widget child,
})
Implementation
void showCustomOverlay({
bool forceOverlay = false,
required Widget child,
}) {
if (forceOverlay) closeOverlay();
if (_haveOverlay) return;
OverlayState? overlayState = Get.key.currentState?.overlay;
if (overlayState == null) return;
final myoverlayEntry = OverlayEntry(
builder: (BuildContext context) {
return child;
},
);
_overlayEntry.value = myoverlayEntry;
overlayState.insert(_overlayEntry.value!);
_haveOverlay = true;
}