FlutterNativeAd class

Represents a loaded Native Ad from AdMob with all available metadata.

Constructors

FlutterNativeAd({required String id, String? headline, String? body, String? advertiser, FlutterNativeAdImage? icon, List<FlutterNativeAdImage> images = const [], String? cta, double? starRating, String? store, String? price, String? adChoicesUrl, String? adChoicesText, double? aspectRatio})
FlutterNativeAd.fromMap(Map<String, dynamic> map)
Creates a FlutterNativeAd instance from a map received from the native platform.
factory

Properties

adChoicesText → String?
The text to accompany the AdChoices icon (if provided by the SDK).
final
adChoicesUrl → String?
The URL for the "Why this ad?" (AdChoices) information page.
final
advertiser → String?
The name of the advertiser (e.g., "Google" or the app developer name).
final
aspectRatio → double?
The aspect ratio of the primary media content (width/height).
final
body → String?
The main descriptive text of the ad.
final
cover → String?
Backward-compatible getter that returns the URL of the first image.
no setter
cta → String?
The text for the call-to-action button (e.g., "Install", "Open", "Learn More").
final
hashCode → int
The hash code for this object.
no setterinherited
headline → String?
The headline of the ad (e.g., "Install App").
final
icon → FlutterNativeAdImage?
Metadata for the square icon image.
final
id → String
Unique identifier generated by the plugin for this specific ad instance.
final
images → List<FlutterNativeAdImage>
A list of images associated with the ad.
final
price → String?
The price of the advertised product (e.g., "Free" or "$0.99").
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
starRating → double?
The star rating of the advertised product (0.0 to 5.0).
final
store → String?
The store name where the app is available (e.g., "Google Play", "App Store").
final

Methods

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