adsunity 1.0.3 copy "adsunity: ^1.0.3" to clipboard
adsunity: ^1.0.3 copied to clipboard

discontinued

Ad Network for unity ads

example/lib/main.dart

import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'dart:async';

import 'package:adsunity/adsunity.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();
    UnityAds.initialize('3270261', '3270260', this, testMode: !kReleaseMode);
    Future.delayed(Duration(seconds: 5), () {
      UnityAds.show('video');
    });
  }

  @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 onUnityAdsError(UnityAdsError error, String message) {}

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

  @override
  void onUnityAdsReady(dynamic placementId) {}

  @override
  void onUnityAdsStart(dynamic placementId) {}
}
6
likes
30
pub points
0%
popularity

Publisher

unverified uploader

Ad Network for unity ads

Repository (GitHub)
View/report issues

License

Apache-2.0 (license)

Dependencies

flutter

More

Packages that depend on adsunity