pangle_flutter 0.6.5 copy "pangle_flutter: ^0.6.5" to clipboard
pangle_flutter: ^0.6.5 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 'package:pangle_flutter_example/page/native/custom_splash_page.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: CustomSplashPage(),
      theme: kThemeData,
    );
  }
}

Future<Null> initPangle() async {
  await pangle.init(
    iOS: IOSConfig(
      appId: kAppId,
      logLevel: PangleLogLevel.error,
    ),
    android: AndroidConfig(
        appId: kAppId,
        debug: false,
        allowShowNotify: true,
        allowShowPageWhenScreenLock: false,
        directDownloadNetworkType: [
          AndroidDirectDownloadNetworkType.k2G,
        ]),
  );

  /// 原生加载开屏
  // 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