diff --git a/example/lib/ads_config.dart b/example/lib/ads_config.dart index 79c5c11..8b61523 100644 --- a/example/lib/ads_config.dart +++ b/example/lib/ads_config.dart @@ -50,22 +50,6 @@ class AdsConfig { /// 获取 Banner 广告位id 02 static String get bannerId02 => '949641736'; - /// 获取 Feed 信息流列表 - static List get feedIdList => - [feedId01, feedId02, feedId03, feedId04, feedId05]; - /// 获取 Feed 信息流广告位id(左右图文 2.4) - static String get feedId01 => '949641744'; - - /// 获取 Feed 信息流广告位id(上下文图0.9) - static String get feedId02 => '949641747'; - - /// 获取 Feed 信息流广告位id(三图2) - static String get feedId03 => '949641752'; - - /// 获取 Feed 信息流广告位id(文字悬浮1) - static String get feedId04 => '949641755'; - - /// 获取 Feed 信息流广告位id(竖版0.5) - static String get feedId05 => '949641756'; + static String get feedId => '949641744'; } diff --git a/example/lib/pages/feed_page.dart b/example/lib/pages/feed_page.dart index 274978e..344561d 100644 --- a/example/lib/pages/feed_page.dart +++ b/example/lib/pages/feed_page.dart @@ -45,9 +45,8 @@ class _FeedPageState extends State { SliverList( delegate: SliverChildBuilderDelegate( (BuildContext context, int index) { - if (index % 10 == 4) { - int adIndex = index ~/ 10; - print('adIndex:$adIndex'); + if (index % 5 == 4) { + int adIndex = index ~/ 5; if (adIndex >= feedAdList.length) { return Container( height: 80, @@ -92,10 +91,8 @@ class _FeedPageState extends State { // 加载信息流广告 Future getFeedAdList() async { try { - int feedIdIndex = feedAdList.length ~/ 3 % AdsConfig.feedIdList.length; - print('feedIdIndex:$feedIdIndex'); List adResultList = await FlutterPangleAds.loadFeedAd( - AdsConfig.feedIdList[feedIdIndex], + AdsConfig.feedId, count: 3, ); feedAdList.addAll(adResultList); diff --git a/example/lib/pages/fullscreen_video_page.dart b/example/lib/pages/fullscreen_video_page.dart index 562b9c8..2144c9d 100644 --- a/example/lib/pages/fullscreen_video_page.dart +++ b/example/lib/pages/fullscreen_video_page.dart @@ -21,13 +21,13 @@ class _FullScreenVideoPageState extends State { body: Column( children: [ ListTile( - title: Text('新插屏-全屏'), - onTap: () => showFullScreenVideoAd(AdsConfig.newInterstitialId), + title: Text('新插屏-半屏'), + onTap: () => showFullScreenVideoAd(AdsConfig.newInterstitialId2), ), kDivider, ListTile( - title: Text('新插屏-半屏'), - onTap: () => showFullScreenVideoAd(AdsConfig.newInterstitialId2), + title: Text('新插屏-全屏'), + onTap: () => showFullScreenVideoAd(AdsConfig.newInterstitialId), ), kDivider, ],