AdInstance class abstract

The base class for all ads formats.

Implementers

Constructors

AdInstance({required AdFormat format, String? placement, OnAdFailedCallback? onAdFailedToLoad, OnAdCallback? onAdClicked, OnAdContentCallback? onAdImpression})
Default constructor, used by subclasses.

Properties

format AdFormat
The ad format of this instance.
final
hashCode int
The hash code for this object.
no setterinherited
onAdClicked OnAdCallback?
Called when the ad content is clicked by the user.
getter/setter pair
onAdFailedToLoad OnAdFailedCallback?
Called when the ad content fails to load.
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 pair
placement String?
An optional placement name for the ad instance that helps categorize and track statistics across different ad placements.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Frees the plugin resources associated with this ad.
getContentInfo() Future<AdContentInfo?>
Contains information about the loaded request.
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