display_ads 0.0.5 copy "display_ads: ^0.0.5" to clipboard
display_ads: ^0.0.5 copied to clipboard

PlatformAndroidiOS
outdated

The Display Ads package is a wrapper for the Google Mobile Ads Flutter plugin, which helps developers display Google Mobile Ads in the easiest way.

Pub Points Static Badge Static Badge

Easy way to display google ads #

The Display Ads package is a wrapper for the Google Mobile Ads Flutter plugin, which helps developers display Google Mobile Ads in the easiest way.

Features #

  • Display banner ads
  • Display interstitial ads

Getting started #

Set up on iOS and Android by following this Platform specific setup

Usage #

Initialize plugin

import 'package:display_ads/display_ads.dart';

void main() async {
    WidgetsFlutterBinding.ensureInitialized();
    DisplayAds.instance.initialize(
        isShowAds: true,
        interstitialAdUnitIdIOS: "Put your interstitial AdUnitId for iOS here",
        interstitialAdUnitIdAndroid:"Put your interstitial AdUnitId for Android here",
        bannerAdUnitIdIOS: "Put your banner AdUnitId for iOS here",
        bannerAdUnitIdAndroid:"Put your banner AdUnitId for Android here",
    );
}

Display banner ads

The method below returns a widget, so you can use it in a Flutter widget.

DisplayAds.instance.bannerAd()

Display interstitial ads

The method below will open interstitial ads, so you can call it whenever you want to display interstitial ads.

DisplayAds.instance.loadInterstitialAds()

Additional information #

This package use google_mobile_ads as dependency.

5
likes
140
points
71
downloads

Publisher

unverified uploader

Weekly Downloads

The Display Ads package is a wrapper for the Google Mobile Ads Flutter plugin, which helps developers display Google Mobile Ads in the easiest way.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter, google_mobile_ads

More

Packages that depend on display_ads