AdViewInstance class abstract
The base class for ads displayed in a CASWidget.
- Inheritance
-
- Object
- AdInstance
- AdViewInstance
- Implementers
Constructors
- AdViewInstance({required AdFormat format, String? placement, OnAdViewCallback? onAdLoaded, OnAdFailedCallback? onAdFailedToLoad, OnAdCallback? onAdClicked, OnAdContentCallback? onAdImpression})
- Default constructor, used by subclasses.
Properties
- format → AdFormat
-
The ad format of this instance.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isMounted → bool
-
Returns true if the ad Id is already mounted in a WidgetAd managed
by the instanceManager.
no setter
- onAdClicked ↔ OnAdCallback?
-
Called when the ad content is clicked by the user.
getter/setter pairinherited
- onAdFailedToLoad ↔ OnAdFailedCallback?
-
Called when the ad content fails to load.
getter/setter pairinherited
- onAdImpression ↔ OnAdContentCallback?
-
Callback to be invoked when an ad is estimated to have earned money.
Available for allowlisted accounts only.
getter/setter pairinherited
- onAdLoaded ↔ OnAdViewCallback?
-
Called when the ad content has been successfully loaded.
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 -
Frees the plugin resources associated with this ad.
inherited
-
getContentInfo(
) → Future< AdContentInfo?> -
Contains information about the loaded request.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited