| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 |
- import 'dart:io';
- class AdHelper {
- ////////////////// applovin //////////////////
- // applovin ad sdk 初始化需要的sdkkey
- static String applovinSdkKey = 'mycRUJHDmgMv3i2NFQ5L5rB_T2y4HBOIIFR7_gpPd3bDCLep4Bb_KfWTsdWTrafiKMQMOyuAGFDOTTmagsk4LM';
- static String get applovinBannerAdUnitId {
- if (Platform.isAndroid) {
- return '0c6a650f98d3832e';
- } else if (Platform.isIOS) {
- return '';
- } else {
- return '';
- }
- }
- static String get applovinInterstitialAdUnitId {
- if (Platform.isAndroid) {
- return 'd072aec9f9a9b4a4';
- } else if (Platform.isIOS) {
- return '';
- } else {
- return '';
- }
- }
- static String get applovinRewardedAdUnitId {
- if (Platform.isAndroid) {
- return '4e4bf93a3a0314d8';
- } else if (Platform.isIOS) {
- return '';
- } else {
- return '';
- }
- }
- }
- // 定义插屏和激励广告的状态
- enum AdState {
- // 初始状态,广告未加载
- initial,
- // 广告已经ready
- ready,
- // 广告正常显示
- showing,
- // 广告显示异常
- error,
- // 广告视窗关闭
- dismissed,
- }
|