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

Flutter plugin for unity ads.

example/lib/main.dart

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

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

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

class _MyAppState extends State<MyApp> with UnityAdsListener {
  String _platformVersion = 'Unknown';

  @override
  void initState() {
    super.initState();
    FlutterUnityAds.initialize('124124', '18660', this, testMode: true);
    Future.delayed(Duration(seconds: 5), () {
      FlutterUnityAds.show();
    });
  }

  @override
  void onUnityAdsError(UnityAdsError error, String message) {
    error;
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: Text('Running on: $_platformVersion\n'),
        ),
      ),
    );
  }

  @override
  void onUnityAdsFinish(String placementId, FinishState result) {}

  @override
  void onUnityAdsReady(String placementId) {}

  @override
  void onUnityAdsStart(String placementId) {}
}
3
likes
20
pub points
44%
popularity

Publisher

unverified uploader

Flutter plugin for unity ads.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on flutter_unity_ads