Closed ProgrammingLife closed 4 years ago
Please explain me the example. Why we have to set two listeners for RewardedAds in two different places? https://github.com/AndriousSolutions/ads/blob/master/example/main.dart#L274 https://github.com/AndriousSolutions/ads/blob/master/example/main.dart#L106
I looked at https://github.com/flutter/plugins/blob/master/packages/firebase_admob/example/lib/main.dart example:
RaisedButton(
child: const Text('LOAD INTERSTITIAL'),
onPressed: () {
_interstitialAd?.dispose();
_interstitialAd = createInterstitialAd()..load();
},
),
RaisedButton(
child: const Text('SHOW INTERSTITIAL'),
onPressed: () {
_interstitialAd?.show();
},
),
Should we actually create new instance any time we want to show new ad or we can just store one instance that we get from createInterstitialAd() and then just call load() only without creating new instance with: createInterstitialAd()..load();?
Hello there, Life.
Let's see if I can't get you on the right track.
"I've just added firebase_admob dependency and when I try to do: Ads ads;...."
"Why we have to set two listeners for RewardedAds in two different places?..."
"Should we actually create new instance any time we want to show new ad..."
The Ads package is to make life easier. It talks to the plugin, not you.
Cheers.
Greg.
I've just added firebase_admob dependency and when I try to do: Ads ads; - I get that I don't see ads.dart (https://github.com/AndriousSolutions/ads/blob/master/lib/ads.dart). Should I download it and place it to my lib folder manually or I have to import it in some other way? I trying to follow this tutorial at the first page of this repo.