BannerAd constructor
BannerAd({
- Key? key,
- String placementId = BannerAd.testPlacementId,
- BannerSize bannerSize = BannerSize.STANDARD,
- BannerAdListener? listener,
- bool keepAlive = false,
This widget is used to contain Banner Ads. listener
is used to monitor
Banner Ad. BannerAdResult
is passed to the callback function along with
other information based on result such as placement id, error code, error
message, click info etc.
Information will generally be of type Map with details such as:
{
'placement\_id': "YOUR\_PLACEMENT\_ID",
'invalidated': false,
'error\_code': 2,
'error\_message': "No internet connection",
}
Implementation
BannerAd({
this.key,
this.placementId = BannerAd.testPlacementId,
this.bannerSize = BannerSize.STANDARD,
this.listener,
this.keepAlive = false,
}) : super(key: key);