pangle_flutter 0.6.1 copy "pangle_flutter: ^0.6.1" to clipboard
pangle_flutter: ^0.6.1 copied to clipboard

outdated

A Flutter plugin that supports ByteDance Pangle SDK on Android and iOS. Such as Splash Ads, Rewarded Video Ads, etc.

example/lib/main.dart

import 'dart:async';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:pangle_flutter/pangle_flutter.dart';

import 'common/common.dart';
import 'common/constant.dart';
import 'page/home_page.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  initPangle();
  runApp(PangleApp());
}

class PangleApp extends StatelessWidget {
  const PangleApp({Key key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: HomePage(),
      theme: kThemeData,
    );
  }
}

Future<Null> initPangle() async {
  await pangle.init(
    iOS: IOSConfig(
      appId: kAppId,
      logLevel: PangleLogLevel.debug,
    ),
    android: AndroidConfig(
      appId: kAppId,
      debug: true,
      allowShowNotify: true,
      allowShowPageWhenScreenLock: false,
    ),
  );
  await pangle.loadSplashAd(
    iOS: IOSSplashConfig(
      slotId: kSplashId,
      isExpress: false,
    ),
    android: AndroidSplashConfig(
      slotId: kSplashId,
      isExpress: false,
    ),
  );
}
30
likes
0
pub points
49%
popularity

Publisher

verified publisher2140s.com

A Flutter plugin that supports ByteDance Pangle SDK on Android and iOS. Such as Splash Ads, Rewarded Video Ads, etc.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on pangle_flutter