瀏覽代碼

更新广告加载位置

tags/0.0.18+3
Weller 3 年之前
父節點
當前提交
9342e7f72c
共有 2 個檔案被更改,包括 6 行新增3 行删除
  1. +3
    -3
      lib/pages/home_page/home_page.dart
  2. +3
    -0
      lib/pages/launch_page/launch_page.dart

+ 3
- 3
lib/pages/home_page/home_page.dart 查看文件

@@ -94,9 +94,9 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
///初始化各种监听
initAsync() async {
try {
Future.delayed(Duration(milliseconds: 10), () async {
await AdvertisingUtils.openSplashAd();
});
// Future.delayed(Duration(milliseconds: 10), () async {
// await AdvertisingUtils.openSplashAd();
// });

WidgetsBinding.instance.addObserver(this);



+ 3
- 0
lib/pages/launch_page/launch_page.dart 查看文件

@@ -79,6 +79,9 @@ class _LaunchPageState extends State<LaunchPage> with TickerProviderStateMixin {
if (versionNumber == null || versionNumber == '' || versionNumber != currentVersionCode) {
await _showGuideImage();
SharedPreferencesUtil.setStringValue(Constants.versionNumber, currentVersionCode);
} else {
bool result = await AdvertisingUtils.openSplashAd();
print("广告加载" + result.toString());
}

if (widget.builder != null) {


Loading…
取消
儲存