listener method
BannerAdListener
listener()
Implementation
BannerAdListener listener() {
return BannerAdListener(onAdLoaded: (Ad ad) {
setState(() {
loadingState = AdLoadingState.loaded;
if (kDebugMode) {
print('called setState in AdLoaded');
}
});
}, onAdFailedToLoad: (Ad ad, AdError error) {
setState(() {
loadingState = AdLoadingState.failedToLoad;
if (kDebugMode) {
print('called setState in AdFailedToLoad for adUnitId');
print(widget.adUnitId);
print(error.message);
}
});
});
}