pangle_global_flutter 0.1.2 copy "pangle_global_flutter: ^0.1.2" to clipboard
pangle_global_flutter: ^0.1.2 copied to clipboard

Pangle global for flutter.(Beta)

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:pangle_global_flutter/ad_containers.dart';
import 'package:pangle_global_flutter/ad_listeners.dart';
import 'package:pangle_global_flutter/pangle_global_flutter.dart';

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

class MyApp extends StatefulWidget {
  const MyApp({super.key});

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

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    super.initState();
    PangleGlobalFlutter.instance.initialize("8025677");
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Column(
            mainAxisSize: MainAxisSize.min,
            children: [
              ElevatedButton(
                  onPressed: () {
                    PAGInterstitialAd.load(
                        adUnitId: "980088188",
                        adLoadCallback: PAGInterstitialAdLoadListener(
                            onError: (code, message) {},
                            onAdLoaded: (ad) {
                              ad.show();
                            }));
                  },
                  child: const Text('Run PAGInterstitialAd')),
              ElevatedButton(
                  onPressed: () {
                    PAGAppOpenAd.load(
                        adUnitId: "890000078",
                        adLoadCallback: PAGAppOpenAdLoadListener(
                            onError: (code, message) {},
                            onAdLoaded: (ad) {
                              ad.show();
                            }));
                  },
                  child: const Text('Run PAGAppOpenAd')),
            ],
          ),
        ),
      ),
    );
  }
}
1
likes
130
points
23
downloads

Publisher

unverified uploader

Weekly Downloads

Pangle global for flutter.(Beta)

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on pangle_global_flutter