bwt_ad_flutter 0.1.7 copy "bwt_ad_flutter: ^0.1.7" to clipboard
bwt_ad_flutter: ^0.1.7 copied to clipboard

BWT广告SDK的Flutter插件,该插件可以帮助您更加简单、便捷、快速的集成BWT的安卓、iOS原生广告SDK。

example/lib/main.dart

import 'dart:io';

import 'package:bwt_ad_flutter/et/BwtAdLogType.dart';
import 'package:bwt_ad_flutter_example/page/SplashAdLauncherPage.dart';
import 'package:bwt_ad_flutter_example/util/DisplayUtil.dart';
import 'package:flutter/material.dart';
import 'package:bwt_ad_flutter/BwtAdCore.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();

  /// 初始化广告插件
  await BwtAdCore.init(
    appId: Platform.isAndroid ? '400805' : '465533',
    // iOS请求广告前是否先申请IDFA,默认true
    isRequestIdfa: true,
    // 广告内部日志打印设置,默认为NONE(不打印),正式包建议设置为NONE
    logType: BwtAdLogType.DEBUG,
  );

  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {
  @override
  Widget build(BuildContext context) {
    DisplayUtil.init(context);

    return const MaterialApp(
      home: Scaffold(
        body: SplashAdLauncherPage(),
      ),
    );
  }
}
1
likes
130
points
59
downloads

Publisher

unverified uploader

Weekly Downloads

BWT广告SDK的Flutter插件,该插件可以帮助您更加简单、便捷、快速的集成BWT的安卓、iOS原生广告SDK。

Homepage

Documentation

API reference

License

MIT (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on bwt_ad_flutter