Add Ads to your App in a Snap!

Greg Perry
Jun 21 · 20 min read

Install the package, Ads, and you’re on your way to monetizing your Flutter app with Google’s AdMob ads. It’s merely a ‘wrapper’ for the plugin made by Google called, firebase_admob. It’s to quickly and easily implement Google’s AdMob ads into your Flutter app.

The Only Game In Town

admob_flutter

Sign Up and Get Your ID’s

Google AdMob

It’s A Test. Not For Real

For Android. Modify AndroidManifest.xml

failed to load ad : 3

failed to load ad : 3

A Walkthrough

Screenshots! Not Gists!

Other Stories by Greg Perry

The First Parameter is a Biggy

Ads class *

You Need Your ID’s

FirebaseAdMob class ^

The Others

Ads class *

The Key Is Words

The Website’s Content

Directed To Children

Test Certain Devices

The Ads Listener

CASE #1: Init Your Ads

main.dart *

Rewarded Watching Videos

Set Your Listener

main.dart *
main.dart *

Loop Through Listeners

Ads class *

Get With Getters

Ads class *

Get The Ads

Ads class *

The Three Types of Ads

Three types of ads currently offered by the firebase_admob plugin.

Dispose of it All

Ads class *

Case #2: Set Your Ads

main.dart *

Show the Banner

Ads class *

Set the Banner Ad

Ads class *
AdSize const class variables

Show the Full Screen Ad

Ads class *

Set the Full Screen Ad

Ads class *

Show the Video Ad

Ads class *
Ads class *

Case#3: Setting Your Show

Target the Ad Info

Ads class *

It’s All An Event!

Ads class *

Tyedef’s

typedefs in this class.

The Type of Events

The Event Types in the Plugin, firebase_admob

Listening for the Ads

_AdListener class *

Video Ad Event Listener

_VidListener class *

RewardAd to MobileAd

_toMobileAdEvent class *

A Follow Up

My Code’s No Good! Here’s Why.

TL;DR

main.dart *
main.dart *
main.dart *
main.dart *
main.dart *

Made For Public Consumption

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade