AdScreenInstance class abstract
The base class for all full screen ads.
The AdScreenInstance is displayed as an Overlay on top of all app content and is positioned statically; therefore, it cannot be added to the Flutter widget tree.
- Inheritance
-
- Object
- AdInstance
- AdScreenInstance
- Implementers
Constructors
- AdScreenInstance({required AdFormat format, String? placement, OnScreenAdCallback? onAdLoaded, OnAdFailedCallback? onAdFailedToLoad, OnAdFailedCallback? onAdFailedToShow, OnScreenAdCallback? onAdShowed, OnAdContentCallback? onAdImpression, OnAdCallback? onAdClicked, OnScreenAdCallback? onAdDismissed})
- Default constructor, used by subclasses.
Properties
- contentCallback ↔ ScreenAdContentCallback?
-
Gets or sets the callback for handling ad content events.
getter/setter pair
- format → AdFormat
-
The ad format of this instance.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- impressionListener ↔ OnAdImpressionListener?
-
Listener to be invoked when an ad is estimated to have earned money.
Available for allowlisted accounts only.
getter/setter pair
- onAdClicked ↔ OnAdCallback?
-
Called when the ad content is clicked by the user.
getter/setter pairinherited
- onAdDismissed ↔ OnScreenAdCallback?
-
Called when the ad content is dismissed.
getter/setter pair
- onAdFailedToLoad ↔ OnAdFailedCallback?
-
Called when the ad content fails to load.
getter/setter pairinherited
- onAdFailedToShow ↔ OnAdFailedCallback?
-
Called when the ad content fails to show.
getter/setter pair
- onAdImpression ↔ OnAdContentCallback?
-
Callback to be invoked when an ad is estimated to have earned money.
Available for allowlisted accounts only.
getter/setter pairinherited
- onAdLoaded ↔ OnScreenAdCallback?
-
Called when the ad content has been successfully loaded.
getter/setter pair
- onAdShowed ↔ OnScreenAdCallback?
-
Called when the ad content is successfully shown.
getter/setter pair
- placement → String?
-
An optional placement name for the ad instance that helps categorize
and track statistics across different ad placements.
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void -
The dispose function should be called from onAdFailedToShow and onAdDismissed
to free up resources if you do not expect automatic loading
and will not load this instance again.
override
-
getContentInfo(
) → Future< AdContentInfo?> -
Contains information about the loaded request.
inherited
-
isAutoloadEnabled(
) → Future< bool> - Indicates whether the auto reload ad is currently enabled.
-
isLoaded(
) → Future< bool> - Indicates whether the ad is currently loaded and ready to be shown.
-
load(
) → Future< void> - Manual retry to load the ad.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
setAutoloadEnabled(
bool isEnabled) → Future< void> - Gets or sets whether auto loading of ads is enabled.
-
show(
) → Future< void> - Display this on top of the application.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited