NativeAd class
A NativeAd for the FirebaseAdMobPlugin
.
Native ads are ad assets that are presented to users via UI components that are native to the platform. (e.g. A View on Android or a UIView on iOS). Using Flutter widgets to create native ads is NOT supported by this.
Using platform specific UI components, these ads can be formatted to match the visual design of the user experience in which they live. In coding terms, this means that when a native ad loads, your app receives a NativeAd object that contains its assets, and the app (rather than the Google Mobile Ads SDK) is then responsible for displaying them.
See the README for more details on using Native Ads.
Constructors
-
NativeAd({@required String? adUnitId, @required String? factoryId, MobileAdTargetingInfo? targetingInfo, MobileAdListener? listener, Map<
String?, dynamic> ? customOptions})
Properties
- adUnitId → String?
-
Identifies the source of ads for your application.
finalinherited
-
customOptions
→ Map<
String?, dynamic> ? -
Optional options used to create the NativeAd.
final
- factoryId → String?
-
An identifier for the factory that creates the Platform view.
final
- hashCode → int?
-
The hash code for this object.
no setterinherited
- id → int?
-
An internal id that identifies this mobile ad to the native AdMob plugin.
no setterinherited
- listener ↔ MobileAdListener?
-
Called when the status of the ad changes.
getter/setter pairinherited
- runtimeType → Type?
-
A representation of the runtime type of the object.
no setterinherited
- targetingInfo → MobileAdTargetingInfo?
-
Optional targeting info per the native AdMob API.
no setterinherited
Methods
-
dispose(
) → Future< bool?> ? -
Free the plugin resources associated with this ad.
inherited
-
isLoaded(
) → Future< bool?> ? -
inherited
-
load(
) → Future< bool?> ? -
Start loading this ad.
override
-
noSuchMethod(
Invocation? invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
show(
{double? anchorOffset = 0.0, double? horizontalCenterOffset = 0.0, AnchorType? anchorType = AnchorType.bottom}) → Future< bool?> ? -
Show this ad.
inherited
-
toString(
) → String? -
A string representation of this object.
inherited
Operators
-
operator ==(
Object? other) → bool? -
The equality operator.
inherited
Static Properties
- testAdUnitId → String?
-
A platform-specific AdMob test ad unit ID. This ad unit
has been specially configured to always return test ads, and developers
are encouraged to use it while building and testing their apps.
final