nativeViewLoadAndShow static method
Implementation
static Widget nativeViewLoadAndShow(
NativeHolder nativeHolder, NativeAdmobType nativeType) {
return ValueListenableBuilder<Pair>(
valueListenable: adsNativeController,
builder: (context, snapshot, child) {
log("TAG====== ${snapshot.msg}");
if (snapshot.nativeAd != null) {
return (snapshot.nativeAd!.responseInfo != null)
? (nativeType == NativeAdmobType.NATIVE_MEDIUM)
? _viewNativeMedium(context, snapshot.nativeAd!)
: _viewNativeSmall(context, snapshot.nativeAd!)
: const SizedBox(
height: 0,
);
} else {
return (snapshot.msg == "no internet" || snapshot.msg == "error")
? const SizedBox(
height: 0,
)
: (nativeType == NativeAdmobType.NATIVE_MEDIUM)
? const NativeShimmer()
: const BannerShimmer();
}
});
}