OverlayController class

Controls an overlay component (Dialog, Drawer, BottomSheet, Snackbar, Tooltip, Alert), managing its open/closed visibility state and listener notifications.

Constructors

OverlayController({bool isOpen = false})
Creates a new OverlayController.

Properties

hashCode → int
The hash code for this object.
no setterinherited
isOpen → bool
Whether the target overlay is currently open / visible.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addListener(VoidCallback listener) → void
Adds a listener callback triggered on state changes.
close() → void
Closes / hides the target overlay.
dispose() → void
Clears all registered listeners.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notifyListeners() → void
Notifies all registered listeners of a state change.
open() → void
Opens / shows the target overlay.
removeListener(VoidCallback listener) → void
Removes a registered listener callback.
toggle() → void
Toggles the overlay between open and closed states.
toString() → String
A string representation of this object.
inherited

Operators

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