Last updated:
0 purchases
flutter good ads
good_flutter_ads #
Features #
Banner
Auto config and load for you
Load safety with interval
Interstitial
Load and show safety with interval
Getting started (see more in example) #
Import #
flutter pub add flutter_good_ads
copied to clipboard
and
import 'package:flutter_good_ads/flutter_good_ads.dart';
copied to clipboard
Config main function like this #
void main() {
WidgetsFlutterBinding.ensureInitialized();
MobileAds.instance.initialize();
runApp(MyApp());
}
copied to clipboard
Usage #
Banner #
Put this block everywhere you want
GoodBanner(
adUnitId: 'ca-app-pub-3940256099942544/6300978111',
adRequest: AdRequest(),
interval: 60000,
adSize: AdSize.banner,
)
copied to clipboard
Interstitial #
Declare a GoodInterstitial
final interstitialAd = const GoodInterstitial(
adUnitId: 'ca-app-pub-3940256099942544/8691691433',
adRequest: AdRequest(),
interval: 60000,
);
copied to clipboard
Call load() at somewhere (ex: initState)
@override
void initState() {
super.initState();
interstitialAd.load();
}
copied to clipboard
Call show() when you want
if (_counter % 5 == 0) {
interstitialAd.show(reloadAfterShow: true);
}
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.