FacebookBannerAd constructor

FacebookBannerAd({
  1. Key? key,
  2. String placementId = "YOUR_PLACEMENT_ID",
  3. BannerSize bannerSize = BannerSize.STANDARD,
  4. void listener(
    1. BannerAdResult,
    2. dynamic
    )?,
  5. 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

FacebookBannerAd({
  this.key,
  this.placementId = "YOUR_PLACEMENT_ID",
  this.bannerSize = BannerSize.STANDARD,
  this.listener,
  this.keepAlive = false,
}) : super(key: key);