isActiveAndVisible property

bool get isActiveAndVisible

Indicates whether any pop overlay is currently being shown and visible

Returns true if at least one overlay is active and visible (not all overlays are invisible), Returns false if no overlays are active OR if all active overlays are invisible

Implementation

static bool get isActiveAndVisible {
  if (_controller.state.isEmpty) return false;

  // Check if all active overlays are invisible
  final allActiveIds = _controller.state.map((overlay) => overlay.id).toSet();
  final invisibleIds = _invisibleController.state.toSet();

  // Return true if at least one active overlay is not in the invisible list
  return !allActiveIds.every((id) => invisibleIds.contains(id));
}