AdropBanner constructor
- @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.
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;