RewardedInterstitialAdService class
Service dedicated to managing the lifecycle of Rewarded Interstitial Ads.
Features:
- AdMob Policy Guard: 4-hour max-age cache invalidation.
- AdMob Policy Guard: Anti-collision full-screen presentation lock.
- Verified user reward callbacks.
- Server-Side Verification (SSV) options support.
- Exponential backoff retry logic with automatic cancellation on disposal.
- Automatic Impression-Level Ad Revenue (ILRD) tracking.
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAdAvailable → bool
-
Whether a rewarded interstitial ad is loaded and ready to be shown.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void - Disposes active ad and cancels state.
-
loadAd(
{String? adUnitId, AdRequest? request, VoidCallback? onLoaded, dynamic onFailedToLoad(LoadAdError error)?}) → void - Loads a Rewarded Interstitial Ad.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
showAd(
{required OnUserEarnedRewardCallback onUserEarnedReward, ServerSideVerificationOptions? serverSideVerificationOptions, VoidCallback? onAdShowedFullScreenContent, VoidCallback? onAdDismissedFullScreenContent, dynamic onAdFailedToShowFullScreenContent(AdError error)?, VoidCallback? onAdClicked, VoidCallback? onAdImpression, OnPaidEventCallback? onPaidEvent}) → void - Displays the loaded Rewarded Interstitial ad and triggers reward callback.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- maxAdAge → const Duration
- Max age before cached ad is considered stale according to AdMob policy (4 hours).
- maxRetryAttempts → const int
- Max retry attempts on load failure.