getNativeAdLoadingWidget function
Returns a loading widget for native ads based on the provided ad size.
If adSize
is FastAdSize.medium, returns a loading widget for medium ads.
If adSize
is FastAdSize.large, returns a loading widget for large ads.
For any other adSize
, returns a loading widget for small ads.
Implementation
Widget getNativeAdLoadingWidget(FastAdSize adSize) {
if (adSize == FastAdSize.medium) {
return const FastLoadingNativeAd();
} else if (adSize == FastAdSize.large) {
return const FastLoadingNativeAd(adSize: FastAdSize.large);
}
return const FastLoadingNativeAd(adSize: FastAdSize.small);
}