cas_ad_manager 0.0.2 copy "cas_ad_manager: ^0.0.2" to clipboard
cas_ad_manager: ^0.0.2 copied to clipboard

A simple Flutter wrapper for Clever Ads Solutions (CAS) to manage interstitial and rewarded ads.

example/main.dart

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

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await CasAdManager().initialize(
    const CasConfig(casId: "your_cas_id", testMode: true, debugMode: true),
  );

  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(title: const Text('CAS Ad Manager Example')),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              ElevatedButton(
                onPressed: () {
                  CasAdManager().showInterstitial(
                    onFinished: () {
                      print("Interstitial finished");
                    },
                  );
                },
                child: const Text('Show Interstitial'),
              ),
              ElevatedButton(
                onPressed: () {
                  CasAdManager().showRewardedAd(
                    onCompleted: () => print("Rewarded completed"),
                    onFailed: () => print("Rewarded failed"),
                  );
                },
                child: const Text('Show Rewarded'),
              ),
            ],
          ),
        ),
      ),
    );
  }
}
0
likes
150
points
20
downloads

Publisher

verified publisherbhai4you.com

Weekly Downloads

A simple Flutter wrapper for Clever Ads Solutions (CAS) to manage interstitial and rewarded ads.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

clever_ads_solutions, flutter

More

Packages that depend on cas_ad_manager