loadRewardedAd static method
Load a placement to make it available to show. Ads generally take a few seconds to finish loading before they can be shown.
adUnitId
- The ID of the rewarded ad unit.onComplete
- callback triggered when a load request has successfully filled the specified adUnitId with an ad that is ready to show.onFailed
- called when load request has failed to load an ad for a requested placement.
Implementation
static Future<void> loadRewardedAd({
required String adUnitId,
Function(String adUnitId)? onComplete,
Function(String adUnitId, LoadError error, String errorMessage)? onFailed,
}) async {
await _loadAd(
methodName: loadRewardedAdMethod,
adUnitId: adUnitId,
onComplete: onComplete,
onFailed: onFailed,
);
}