September 2019
Beginner
512 pages
12h 52m
English
After properly configuring the initialization of the AdMob plugin, we can start displaying different kinds of ads, like banners for example. Ads, unlike many Flutter views, are displayed in a different way from widgets. They do not have a node in the tree.
We will be changing our RequestFavorPageState to display ads. We will be displaying a BannerAd at the bottom of the screen and a fullscreen InterstitialAd after saving a request.
We need to keep a reference to ads when we show them to be capable of disposing of them later. So, first we add them as fields in our state with the following code:
// RequestFavorPageState class InterstitialAd _interstitialAd; BannerAd _bannerAd;
In the initState() function, we prepare the ...
Read now
Unlock full access