RewardedAdPreloader class

Google Mobile Ads Next-Gen SDK Preloader for RewardedAd.

Inheritance

Properties

adType → AdType
finalinherited
cacheTtl → Duration
finalinherited
format → AdFormat
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
retryPolicy → AdRetryPolicy
finalinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
useNativeBridge → bool
Whether to delegate preloading to the native *AdPreloader bridge instead of the Dart-managed preloader buffer. Defaults to false so ads are buffered once in Dart (supporting synchronous 0.0ms pollAd and Databuckets telemetry without double-loading).
finalinherited

Methods

createPreloadedAd({required PreloadConfiguration config, ResponseInfo? responseInfo}) → RewardedAd
Subclasses instantiate a preloaded T wrapper when useNativeBridge is active.
override
destroy(String preloadId) → Future<void>
Destroys the preloader and disposes all buffered ads for preloadId.
inherited
destroyAll() → Future<void>
Destroys all active preloaders and disposes all buffered ads for this ad format.
inherited
getConfiguration(String preloadId) → PreloadConfiguration?
Returns the PreloadConfiguration registered for preloadId, or null if not found.
inherited
getConfigurations() → Map<String, PreloadConfiguration>
Returns an unmodifiable map of all active PreloadConfigurations for this format.
inherited
getNumAdsAvailable(String preloadId) → int
Returns the number of fresh preloaded ads currently buffered for preloadId.
inherited
isAdAvailable(String preloadId) → bool
Returns true if at least one fresh preloaded ad is available for preloadId.
inherited
loadSingleAd({required String preloadId, required PreloadConfiguration config, required void onLoaded(RewardedAd ad), required void onFailed(LoadAdError error)}) → void
Subclasses implement single-ad loading for their specific format.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pollAd(String preloadId) → RewardedAd?
Retrieves and removes the next available preloaded ad for preloadId in 0.0ms.
inherited
pollAdAsync(String preloadId) → Future<RewardedAd?>
Asynchronous variant of pollAd that polls the native Next-Gen Preloader when useNativeBridge is enabled and awaits native binding before returning.
inherited
seedAdForTesting(String preloadId, RewardedAd ad, {PreloadConfiguration? configuration, PreloadCallback? callback}) → void
Visible for unit testing: directly seeds a preloaded ad into the buffer for preloadId.
inherited
start(String preloadId, PreloadConfiguration configuration, [PreloadCallback? callback]) → Future<bool>
Starts preloading ads for preloadId using configuration and optional callback.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance → RewardedAdPreloader
final