hasCustomAdForFallback static method

bool hasCustomAdForFallback({
  1. CustomAdModel? customAd,
  2. dynamic customOfflineWidget,
  3. bool showOfflineFallback = true,
})

Determines if an ad format has any custom fallback ad available.

Returns true if a customOfflineWidget is provided, or a customAd is provided, or showOfflineFallback is true AND hasCustomAds is true.

Implementation

static bool hasCustomAdForFallback({
  CustomAdModel? customAd,
  dynamic customOfflineWidget,
  bool showOfflineFallback = true,
}) {
  return customOfflineWidget != null ||
      customAd != null ||
      (showOfflineFallback && hasCustomAds);
}