flutter_applovin_max 0.1.0 copy "flutter_applovin_max: ^0.1.0" to clipboard
flutter_applovin_max: ^0.1.0 copied to clipboard

outdated

Flutter plugin for showing applovin MAX mediation ads rewardvideo (Android & Ios).MAX is AppLovin's in-app monetization solution.

example/lib/main.dart

import 'package:flutter/material.dart';

import 'package:flutter_applovin_max/flutter_applovin_max.dart';

void main() => runApp(MyApp());

class MyApp extends StatefulWidget {
  @override
  _MyAppState createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  void initState() {
    FlutterApplovinMax.init("YOUR_AD_UNIT_ID");
    super.initState();
  }

  listener(AppLovinAdListener event) {
    print(event);
    if (event == AppLovinAdListener.onUserRewarded) {
      print('👍get reward');
    }
  }

  bool isRewardedVideoAvailable = false;

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: RaisedButton(
            onPressed: () async {
              isRewardedVideoAvailable =
                  await FlutterApplovinMax.isLoaded(listener);
              if (isRewardedVideoAvailable) {
                FlutterApplovinMax.showRewardVideo(
                    (AppLovinAdListener event) => listener(event));
              }
            },
            child: Text('Show Reward Video'),
          ),
        ),
      ),
    );
  }
}
52
likes
40
points
28
downloads

Publisher

verified publisheriori.dev

Weekly Downloads

Flutter plugin for showing applovin MAX mediation ads rewardvideo (Android & Ios).MAX is AppLovin's in-app monetization solution.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

flutter

More

Packages that depend on flutter_applovin_max

Packages that implement flutter_applovin_max