BannerAdController class
Global controller to manage banner ad visibility and live height when overlays, dialogs, or drawers open/close.
- Inheritance
-
- Object
- ChangeNotifier
- BannerAdController
Constructors
- BannerAdController()
-
factory
Properties
- activeBannerHeight → double
-
The last reported height of a loaded banner widget, regardless of
whether it is currently hidden by an overlay.
no setter
- effectiveBannerHeight → double
-
The effective banner height currently occupying layout space.
Drops to
0.0immediately while shouldHideBanner istrue.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shouldHideBanner → bool
-
no setter
Methods
-
addBlocker(
Object token) → void -
Hides banners for a specific
token(e.g., a drawer, menu, or sheet). -
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
dispose(
) → void -
Discards any resources used by the object.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
onDialogClosed(
) → void - Call this when a dialog is closed.
-
onDialogOpened(
) → void - Call this when a dialog is opened.
-
onDrawerChanged(
bool isOpened) → void -
Convenience callback for
Scaffold.onDrawerChanged. -
onEndDrawerChanged(
bool isOpened) → void -
Convenience callback for
Scaffold.onEndDrawerChanged. -
removeBlocker(
Object token) → void -
Removes a previously added blocker
token. -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
reset(
) → void - Reset the state (useful for testing).
-
setBannerHeight(
double height) → void - Updates the live rendered height of the active banner ad.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited