flutter_good_ads 0.0.1 copy "flutter_good_ads: ^0.0.1" to clipboard
flutter_good_ads: ^0.0.1 copied to clipboard

A package help you use google_mobile_ads with safety and easy..

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

and

import 'package:flutter_good_ads/flutter_good_ads.dart';

Config main function like this #

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  MobileAds.instance.initialize();

  runApp(MyApp());
}

Usage #

Put this block everywhere you want

GoodBanner(
  adUnitId: 'ca-app-pub-3940256099942544/6300978111',
  adRequest: AdRequest(),
  interval: 60000,
  adSize: AdSize.banner,
)

Interstitial #

  1. Declare a GoodInterstitial
  final interstitialAd = const GoodInterstitial(
    adUnitId: 'ca-app-pub-3940256099942544/8691691433',
    adRequest: AdRequest(),
    interval: 60000,
  );
  1. Call load() at somewhere (ex: initState)
  @override
  void initState() {
    super.initState();
    interstitialAd.load();
  }
  1. Call show() when you want
  if (_counter % 5 == 0) {
    interstitialAd.show(reloadAfterShow: true);
  }
3
likes
120
pub points
22%
popularity

Publisher

verified publishertbm98.dev

A package help you use google_mobile_ads with safety and easy..

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

andesgroup_common, flutter, google_mobile_ads

More

Packages that depend on flutter_good_ads