diff --git a/lib/util/advertising_util.dart b/lib/util/advertising_util.dart new file mode 100644 index 0000000..2ce7e03 --- /dev/null +++ b/lib/util/advertising_util.dart @@ -0,0 +1,15 @@ +import 'package:flutter/cupertino.dart'; + +import 'application.dart'; + +class AdvertisingUtils { + static Future init() async { + await Application.doStringParamsMethod("init_advertising", data: {}); + //await Application.doStringParamsMethod("init_advertising", data: {"androidAppId": "5173995", "iosAppId": "5167929", "appName": "智莺生活"}); + } + + static Future openSplashAd() async { + await Application.doStringParamsMethod("advertising_splash", data: {'androidCodeId': "887478896", 'iosCodeId': "887478962"}, callback: (value) {}); + } +} + diff --git a/lib/zhiying_comm.dart b/lib/zhiying_comm.dart index 8fa93f6..9691e09 100644 --- a/lib/zhiying_comm.dart +++ b/lib/zhiying_comm.dart @@ -54,3 +54,4 @@ export 'package:zhiying_comm/util/shared_prefe_util.dart'; export 'package:fluttertoast/fluttertoast.dart'; export 'package:zhiying_comm/util/launcher_wx_mini_program.dart'; export 'package:zhiying_comm/util/application.dart'; +export 'util/advertising_util.dart';