Browse Source

更新广告加载位置

tags/0.0.18+3
Weller 3 years ago
parent
commit
9342e7f72c
2 changed files with 6 additions and 3 deletions
  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 View File

@@ -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 View File

@@ -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…
Cancel
Save