AdropBanner constructor

  1. @Deprecated("use AdropBannerView, AdropManager")
const AdropBanner({
  1. Key? key,
  2. required String unitId,
  3. required void onAdropBannerCreated(
    1. AdropBannerController
    ),
  4. void onAdReceived(
    1. AdropBanner
    )?,
  5. void onAdClicked(
    1. AdropBanner
    )?,
  6. void onAdFailedToReceive(
    1. AdropBanner,
    2. AdropErrorCode
    )?,
})

Banner view class responsible for displaying banner ads to the user.

unitId required Ad unit ID onAdropBannerCreated required callback controller onAdReceived optional invoked when the banner receives an ad. onAdClicked optional invoked when the AdropBanner is clicked. onAdFailedToReceive optional invoked when the banner fails to receive an ad.

Implementation

@Deprecated("use AdropBannerView, AdropManager")

/// Banner view class responsible for displaying banner ads to the user.
///
/// [unitId] required Ad unit ID
/// [onAdropBannerCreated] required callback controller
/// [onAdReceived] optional invoked when the banner receives an ad.
/// [onAdClicked] optional invoked when the AdropBanner is clicked.
/// [onAdFailedToReceive] optional invoked when the banner fails to receive an ad.
const AdropBanner({
  super.key,
  required this.unitId,
  required void Function(AdropBannerController) onAdropBannerCreated,
  void Function(AdropBanner)? onAdReceived,
  void Function(AdropBanner)? onAdClicked,
  void Function(AdropBanner, AdropErrorCode)? onAdFailedToReceive,
})  : _onAdropBannerCreated = onAdropBannerCreated,
      _onAdFailedToReceive = onAdFailedToReceive,
      _onAdClicked = onAdClicked,
      _onAdReceived = onAdReceived;