loadAnchoredAdaptiveBanner static method
Loads an anchored adaptive banner ad.
Implementation
static BannerAd loadAnchoredAdaptiveBanner(String id, AdSize size, {void Function()? onLoaded}) {
return BannerAd(
adUnitId: id,
size: size,
request: const AdRequest(),
listener: BannerAdListener(
onAdLoaded: (ad) => onLoaded?.call(),
onAdFailedToLoad: (ad, error) {
LoggerUtil.e('Adaptive BannerAd failed to load: $error');
ad.dispose();
},
),
)..load();
}