Android App Development
iOS App Development
Cross Platform App Development
Hire on-demand project developers and turn your idea into working reality.
Big thanks to Webkul and his team for helping get Opencart 3.0.3.7 release ready!
Deniel Kerr
Owner and Founder. Opencart
Top Partners
AdMob in Flutter, the Ads are being used to monetize the applications.
The Google Mobile Ads SDK for Flutter currently supports loading and displaying banner, interstitial (full-screen), native ads, and rewarded video ads.
Firstly, we will have to create an account on AdMob Console.
Secondly, add the App on the Console for which you want to enable Ads.
Click on “Add Ad Unit”, to create an Ad Unit for our app.
Select the type of Ad Format you require for your app.
Once we have selected the Ad Format type, we will redirect to the Configure AdUnit settings screen.
Here, we will have to enter the Ad Unit Name and click on “Create ad unit”.
Once the Ad unit is created, AppID and Ad Unit ID are generated for further use.
In order to integrate Ads in Flutter App, we have to follow some steps-
Step – 1 –> Add the google_mobile_ads: ^0.11.0+1 dependency in the pubspec.yaml file.
In order to check the updated version of the dependency click here.
Step -2 –> After that , run ‘pub get’ command and the dependency will be added in the project.
Step -3 –> Now, we will have to add the “APP ID” which was generated from AdMob Console.
For Android, we will have to add the AppID in AndroidManifest.xml file
For iOS, we will have to add the AppID in Info.plist file
The AppID used here is the test AppID. We can add the AppID which has been generated through AdMob Console.
Step -4 –> Once we have added the App ID ,most importantly we need to make sure that the minimumSdkVersion should be atleast 19.
We can find the version in build.gradle file
Step -5 –> The most important step is to initialize the Google Mobile Ads SDK. We can initialize it within the main() function.
Step -6 –> After initalizing the SDK, now we can create the Ad as per the format we have chosen.
Here, we have chosen Banner Ad so we will be creating the same over here.
Within the BannerAd, there are various properties such as size,adUnitId,listener etc.
In the same way, we can add different types of Ads in our apps as per our requirement.
In this blog, we have discussed AdMob Flutter.
I hope it will help you out in understanding and getting a brief idea about it.
Thank you for reading!!
https://codelabs.developers.google.com/codelabs/admob-ads-in-flutter#2
https://www.freecodecamp.org/news/how-to-add-google-admob-to-flutter/
Your email address will not be published. Required fields are marked*
Name*
Email*
Save my name email and website in this browser for the next time I comment.
Be the first to comment.
We use cookies to personalize your experience. By continuing to visit this website you agree to our use of cookies. Learn more about privacy policy
Great Product, Great Team, and Great Support Service. And if you want to add more features to the product, they can submit any idea that comes to your mind. They really care about their clients and we are really happy and honored to deal with Webkul.
Osama
USA
India
Global
Name
Email
Enquiry or Requirement
If you have more details or questions, you can reply to the received confirmation email.