create static method
Future<RewardedAdLoader>
create({
- void onAdLoaded(
- RewardedAd rewardedAd
- void onAdFailedToLoad(
- AdRequestError error
Implementation
static Future<RewardedAdLoader> create({
void Function(RewardedAd rewardedAd)? onAdLoaded,
void Function(AdRequestError error)? onAdFailedToLoad,
}) async {
int? id = await _FullscreenAdLoader._createChannel
.invokeMethod('rewardedAdLoader');
if (id == null) {
throw ArgumentError(
'something went wrong while creating rewarded ad loader');
}
return RewardedAdLoader._(
id: id,
onAdLoaded: onAdLoaded,
onAdFailedToLoad: onAdFailedToLoad,
);
}