banner method

Widget banner(
)

Implementation

Widget banner(Function callBack) {
  if (admodel?.isbannerenable ?? false) {
    if (admodel?.issdkads ?? false) {
      if (admodel?.isfacebook ?? false) {
        return Container(
          alignment: const Alignment(0.5, 1),
          child: FacebookBannerAd(
            placementId: admodel?.fBbannerAd ?? '',
            keepAlive: true,
            bannerSize: BannerSize.STANDARD,
            listener: (result, value) {
              switch (result) {
                case BannerAdResult.ERROR:
                  print("Error: $value");
                  break;
                case BannerAdResult.LOADED:
                  print("Loaded: $value");
                  break;
                case BannerAdResult.CLICKED:
                  print("Clicked: $value");
                  break;
                case BannerAdResult.LOGGING_IMPRESSION:
                  print("Logging Impression: $value");
                  break;
              }
            },
          ),
        );
      } else {
        return BannerExample(
          ids: (admodel?.isadmobad ?? false)
              ? (admodel?.admobbannerAd)
              : (admodel?.bannerAd), bannerType: admodel?.bannartype ?? 0,);
      }
    } else {
      return BlurViewBannerWidget(
        viewId: DateTime
            .now()
            .microsecondsSinceEpoch
            .toString(),
        onBlurBannerViewWidgetCreated: (controller) {
          callBack.call();
        },
      );
    }
  }
  return Container();
}