ds_ads 0.5.2 copy "ds_ads: ^0.5.2" to clipboard
ds_ads: ^0.5.2 copied to clipboard

Ads SectDev components for Flutter projects (https://sect.dev/). Supports AdMob and AppLovin mediations

ds_ads #

Ads components for sect.dev (https://sect.dev/)

Supports interstitial and native ads on Android.

Getting started #

Add using it:

Add ds_ads to pubspec.yaml #

dependencies:
  ds_ads: ^0.1.0

Initialize #

    DSAdsManager(
      onPaidEvent: (Ad ad, double valueMicros, PrecisionType precision, String currencyCode, String format) async {
        // Process paid event (e.g. send stat)
      },
      appState: // application state (implementation of DSAppAdsState)
      nativeAdBannerStyle: NativeAdBannerStyle.style1,
      onReportEvent: (eventName, attributes) {
        // send stat
      },
      interstitialUnitId: 'ca-app-pub-3940256099942544/7049598008',
      nativeUnitId: 'ca-app-pub-3940256099942544/2247696110',
    );

NB! You should process exceptions by Fimber. For example:

Fimber.plantTree(DebugTree());

See details at Fimber.

Preload ads #

    DSAdsManager.interstitial.fetchAd(then: () async {
      await DSAdsNativeLoaderMixin.fetchAd();
    });

Show interstitial ad #

await AdsManager.interstitial.showAd();

Show native ad #

class SomePageState extends State<SomePage> with DSAdsNativeLoaderMixin {

  @override
  String? get nativeAdLocation => 'some_page'; // Just for stats purposes

  @override
  Widget build(BuildContext context) {
    return ...
      Padding(
        padding: 
        child: nativeAdWidget(),
      ),
      ...
  }
}
2
likes
0
points
107
downloads

Publisher

verified publisheraltush.pro

Weekly Downloads

Ads SectDev components for Flutter projects (https://sect.dev/). Supports AdMob and AppLovin mediations

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

applovin_max, collection, ds_common, fimber, flutter, freezed_annotation, google_mobile_ads

More

Packages that depend on ds_ads

Packages that implement ds_ads