ads_comman is flutter package for add google advertise to you ap


run this command to your flutter project terminal

flutter pub add ads_comman


Initilize Ads

final _adsCommanPlugin = AdsComman();
  void initState() {
       // Initilize to Advertisment in you project
       await _adsCommanPlugin
        advertisementId: "YOUR_GOOGLE_ADS_APPLICATIONID", // you google Ad mobe Application id
        testDeviceIds: [""], // your device test id
        interstitialAdsTime: 40, // give time in second for display an Interstitial ad after 10 seconds of any event
        appOpenTimer: 40,//give time in second for display app open ad after 10 seconds of any event
          .then((value) {
            interstitialID: "INTERSTITAL_ADS_ID");  //Load Interstitial for first time

Display Banner Ad

    context: context,
    bannerAdID: "BANNER ADS_ID",
    onBannerAdLoaded: () {
         // TODO: after banner Loaded

Display Interstitial Ad

  onPressed: () {
        interstitialID: "INTERSTITAL_ADS_ID"); // it will display full screen Video Ad
  child: const Text("Show Interstitial Ad"),

Display Interstitial Ad after delay which is given in init

  onPressed: () {
        interstitialID: "INTERSTITAL_ADS_ID); //It will show ads after dilay
  child: const Text("Show Interstitial Ad After Some Time"),

Display App open Ads

// Add this line when app is Start it will show app open ad after 40 seconds user can change this time at Initilize time 
    appOpenAdsId: "APPOPEN_ADS_ID");