YandexAdsBannerComponent constructor

YandexAdsBannerComponent({
  1. Key? key,
  2. Function? onAdLoaded,
  3. Function? onAdFailedToLoad,
  4. Function? onImpression,
  5. Function? onAdClicked,
  6. Function? onLeftApplication,
  7. Function? onReturnedToApplication,
  8. required String id,
  9. required int width,
  10. required int height,
})

Implementation

YandexAdsBannerComponent({
  Key? key,
  Function? onAdLoaded,
  Function? onAdFailedToLoad,
  Function? onImpression,
  Function? onAdClicked,
  Function? onLeftApplication,
  Function? onReturnedToApplication,
  required this.id,
  required this.width,
  required this.height,
}) {
  banner = YandexAdsBanner();

  banner.make(id, width, height);

  if (onAdLoaded != null) {
    _onAdLoaded(id, onAdLoaded);
  }

  if (onAdFailedToLoad != null) {
    _onAdFailedToLoad(id, onAdFailedToLoad);
  }

  if (onImpression != null) {
    _onImpression(id, onImpression);
  }

  if (onAdClicked != null) {
    _onAdClicked(id, onAdClicked);
  }

  if (onLeftApplication != null) {
    _onLeftApplication(id, onLeftApplication);
  }

  if (onReturnedToApplication != null) {
    _onReturnedToApplication(id, onReturnedToApplication);
  }
}