This section shows the way to configure Admob and Facebook Ads.

This feature requires Firebase to be set. Please skip the steps below if you have set Firebase.

You can do these steps to configure the new App when using any service for Firebase:

  1. Using the Firebase Console, add an Android app to your project: Follow the assistant, download the generated google-services.json file, and place it inside android/app.
  2. Using the Firebase Console, add an iOS app to your project: Follow the assistant, download the generated GoogleService-Info.plist file, open ios/Runner.xcworkspace with Xcode, and within Xcode place the file inside ios/Runner.

Admod and Facebook Ads

Open the lib/common/config.dart to see the setting for Ads features.

const kAdConfig = {
  "type": kAdType.googleReward,
  // ----------------- Facebook Ads  -------------- //

  "hasdedIdTestingDevice": "3f06ede0-3b68-4cdb-a639-1b1007cedd31",
  "bannerPlacementId": "430258564493822_489007588618919",
  "interstitialPlacementId": "430258564493822_489092398610438",
  "nativePlacementId": "430258564493822_489092738610404",
  "nativeBannerPlacementId": "430258564493822_489092925277052",

  // ------------------ Google Admob  -------------- //

  "androidAppId": "ca-app-pub-2101182411274198~7554000316",
  "androidUnitBanner": "ca-app-pub-2101182411274198/2054261627",
  "androidUnitInterstitial": "ca-app-pub-2101182411274198/7197727340",
  "androidUnitReward": "ca-app-pub-2101182411274198/5498660536",
  "iosAppId": "ca-app-pub-2101182411274198~6923444927",
  "iosUnitBanner": "ca-app-pub-2101182411274198/5418791562",
  "iosUnitInterstitial": "ca-app-pub-2101182411274198/9218413691",
  "iosUnitReward": "ca-app-pub-2101182411274198/9026842008",
  "waitingTimeToDisplayInterstitial": 3,
  "waitingTimeToDisplayReward": 3,
};
  • The Ads feature is default config for Product Detail screen as a banner Facebook widget Ads().facebookBanner() or show as Admob widget Ads.showBanner()
  • To refer to another type of banner please check the lib/model/advertisement.dart

For more detail guide about the library please check out:

Admod

Facebook Ads