AppOpenAd class

A full-screen app open ad.

App open ads expire four hours after loading per Google's guidance. Use isAvailable before show to confirm the cached ad is still fresh.

Drive presentation from process lifecycle transitions via AppStateEventNotifier, not Flutter's WidgetsBindingObserver, so that showing another full-screen ad is not mistaken for backgrounding.

Properties

adId String
Process-unique identifier used to route native callbacks.
finalinherited
adUnitId String
Ad unit ID used to request this ad (from the native SDK after load).
finalinherited
disposeMethod String
Native method name used to dispose this ad.
no setter
hashCode int
The hash code for this object.
no setterinherited
listener FullScreenAdListener?
Listener for full-screen content events.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
showMethod String
Native method name used to show this ad (for example showInterstitial).
no setter

Methods

dispose() Future<void>
Releases native resources for an ad that was loaded but never shown.
inherited
handleEvent(String method, Map arguments) → void
Handles a native callback. Subclasses may override to add format-specific events (for example reward), and must call super for shared handling.
inherited
isAvailable() Future<bool>
Whether the ad is loaded and has not exceeded maxCacheDuration.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
performShow() Future<void>
Performs the underlying show invocation, guarding against double-show and showing a disposed ad. Subclasses expose their own public show that delegates here.
inherited
show() Future<void>
Shows the app open ad. Consumed on dismiss/fail-to-show.
showArguments() Map<String, dynamic>
Extra arguments merged into the show invocation by subclasses.
inherited
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

load({required String adUnitId, AdRequest request = const AdRequest()}) Future<AppOpenAd>
Loads an app open ad for adUnitId.

Constants

maxCacheDuration → const Duration
Ads are considered expired after this duration.