PopOverlay class

Main API for the pop overlay system

This class provides static methods and properties for:

  • Displaying pop overlays (addPop)
  • Dismissing overlays (removePop)
  • Checking overlay state (isActive)
  • Auto-installing the overlay system (internal)

Usage:

// Show a simple overlay
PopOverlay.addPop(PopOverlayContent(
  id: "notification_1",
  widget: MyNotificationWidget(),
));

// Dismiss a specific overlay
PopOverlay.removePop("notification_1");

Constructors

PopOverlay()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

controller Injected<List<PopOverlayContent>>
Access to the underlying overlay controller
no setter
hiddenPopsController Injected<List<String>>
no setter
invisibleController Injected<List<String>>
Access to the invisible overlays controller for reactive updates
no setter
isActive bool
Indicates whether any pop overlay is currently being shown
no setter
isActiveAndVisible bool
Indicates whether any pop overlay is currently being shown and visible
no setter
performanceMetrics Map<String, dynamic>
Performance monitoring - returns metrics about current overlays
no setter
template Widget
Returns a default frame design pop overlay for testing
no setter

Static Methods

addPop(PopOverlayContent popContent, {BuildContext? context}) → void
Displays a pop overlay on screen
clearAll() → void
Clear all overlays efficiently
closeButton(String popoverlayName) Widget
dismissPop(String id) → void
Dismisses a popup respecting its shouldMakeInvisibleOnDismiss setting
getActiveById(String id) PopOverlayContent?
infoButton({required String popContentId, required String info}) Widget
isActiveById(String id) bool
removeMultiplePops(List<String> ids) → void
Batch removal of multiple overlays for better performance
removePop(String id) → void
Dismisses a specific pop overlay by ID