CASNativeContent class
A Native Ad Content.
Native ads are ad assets that are presented to users via UI components that are native to the platform.
To display this ad, instantiate an CASWidget with this as a parameter after calling onAdLoaded.
- Inheritance
-
- Object
- AdInstance
- AdViewInstance
- CASNativeContent
Properties
-
customOptions
↔ Map<
String, Object> ? -
Optional options used to create the CASNativeContent.
getter/setter pair
- factoryId → String?
-
An identifier for the factory that creates the Platform view.
final
- 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 setterinherited
- 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 pairinherited
- 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
Static Methods
-
load(
{String? casId, String? factoryId, String? placement, AdChoicesPlacement adChoicesPlacement = AdChoicesPlacement.topRightCorner, bool startVideoMuted = true, NativeTemplateStyle? templateStyle, Map< String, Object> ? customOptions, required OnAdViewCallback onAdLoaded, OnAdFailedCallback? onAdFailedToLoad, OnAdContentCallback? onAdImpression, OnAdCallback? onAdClicked}) → void - Create CASNativeContent and load ad content.