RewardedAd class
An Ad where a user has the option of interacting with in exchange for in-app rewards.
Because the video assets are so large, it's a good idea to start loading an ad well in advance of when it's likely to be needed.
- Inheritance
-
- Object
- Ad
- AdWithoutView
- RewardedAd
Constructors
- RewardedAd({required String adUnitId, required AdListener listener, required AdRequest? request, ServerSideVerificationOptions? serverSideVerificationOptions})
- Creates a RewardedAd with an AdRequest.
- RewardedAd.fromPublisherRequest({required String adUnitId, required AdListener listener, required PublisherAdRequest? publisherRequest, ServerSideVerificationOptions? serverSideVerificationOptions})
- Creates a RewardedAd with a PublisherAdRequest.
Properties
- adUnitId → String
-
Identifies the source of Ads for your application.
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- listener → AdListener
-
Receive callbacks from Ad lifecycle events.
finalinherited
- publisherRequest → PublisherAdRequest?
-
Targeting information used to fetch an Ad using Ad Manager.
final
- request → AdRequest?
-
Targeting information used to fetch an Ad.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serverSideVerificationOptions → ServerSideVerificationOptions?
-
Optional ServerSideVerificationOptions.
final
Methods
-
dispose(
) → Future< void> -
Free the plugin resources associated with this ad.
inherited
-
isLoaded(
) → Future< bool> -
Whether this Ad.load has been called for this Ad and AdListener.onAdLoaded callback has been called.
inherited
-
load(
) → Future< void> -
Start loading this ad.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
show(
) → Future< void> -
Display this on top of the application.
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.
final