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

discontinued
PlatformAndroidiOS
outdated

A new Flutter plugin.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:kb_ads/kb_ads.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  KBAdsViews adsViews = KBAdsViews();
  KbAdsModel adsModel= KbAdsModel();
  @override
  void initState() {
    super.initState();
    KBAds.init(
      bannerAdUnitId:'ca-app-pub-3940256099942544/6300978111',
      interstitialAdUnitId: 'ca-app-pub-3940256099942544/1033173712',
      kbAdsModel: adsModel,
    );
    KBAds.initializeBannerAdCount(adsViews,);
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Weetech Ads Plugin'),
        ),
        body: Center(
          child: Column(
            children: [
              Expanded(
                child: Container(
                  child: Column(
                    children: [
                      RaisedButton(
                        child: Text("Interstitial Ad"),
                        onPressed: () {
                          KBAds.addInterstitialAdCountWithNavigation(onDismissClicked: () {

                          },);
                        },
                      ),
                      RaisedButton(
                        child: Text("Banner Ad"),
                        onPressed: () {
                          KBAds.addBannerAdCount(adsViews);
                        },
                      ),
                    ],
                  )
                )
              ),
              adsViews.bannerAd(),
            ],
          ),
        ),
      ),
    );
  }
}
3
likes
90
points
19
downloads

Publisher

unverified uploader

Weekly Downloads

A new Flutter plugin.

Repository (GitHub)
View/report issues

Documentation

API reference

License

unknown (license)

Dependencies

flutter, get_storage, google_mobile_ads

More

Packages that depend on kb_ads

Packages that implement kb_ads