bannerView static method
Implementation
static Widget bannerView(BannerHolder bannerHolder) {
return ValueListenableBuilder<Banner>(
valueListenable: bannerHolder.adsBannerController,
builder: (context, snapshot, child) {
if (snapshot.bannerAd != null) {
return (snapshot.bannerAd!.responseInfo != null)
? SizedBox(
width: snapshot.bannerAd!.size.width.toDouble(),
height: snapshot.bannerAd!.size.height.toDouble(),
child: AdWidget(ad: snapshot.bannerAd!),
)
: const SizedBox(
height: 0,
);
} else {
return (snapshot.msg == "no internet" || snapshot.msg == "error")
? const SizedBox(
height: 0,
)
: const BannerShimmer();
}
});
}