Browse Source

1.去除延时撤销启动页

2.把启动页撤销移到HomePage
tags/0.0.3+6
“yanghuaxuan” 3 years ago
parent
commit
90198aad62
3 changed files with 8 additions and 6 deletions
  1. +1
    -1
      example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java
  2. +4
    -0
      lib/pages/home_page/home_page.dart
  3. +3
    -5
      lib/pages/launch_page/launch_page.dart

+ 1
- 1
example/android/app/src/main/java/cn/zhios/zhiying_base_widget_example/MainActivity.java View File

@@ -139,7 +139,7 @@ public class MainActivity extends FlutterActivity implements ZhiyingFlutterCommN
Map map = new HashMap(); Map map = new HashMap();
map.put("domain", "http://inapi.izhyin.cn/"); //"http://120.76.175.204:8989"); map.put("domain", "http://inapi.izhyin.cn/"); //"http://120.76.175.204:8989");
// map.put("domain", "http://192.168.0.113:5000"); // map.put("domain", "http://192.168.0.113:5000");
map.put("master_id", "ios_review");
map.put("master_id", "963258");
map.put("secret_key", "123456"); map.put("secret_key", "123456");
// map.put("token", "123465"); // map.put("token", "123465");
return map; return map;


+ 4
- 0
lib/pages/home_page/home_page.dart View File

@@ -52,6 +52,10 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker
@override @override
void initState() { void initState() {


Timer(Duration(milliseconds: 0), (){
NativeUtil.notifyInitSuccess();
});

///初始化一些数据 ///初始化一些数据
initAsync(); initAsync();




+ 3
- 5
lib/pages/launch_page/launch_page.dart View File

@@ -62,10 +62,6 @@ class _LaunchPageState extends State<LaunchPage> with TickerProviderStateMixin {
print('ConnectivityResult.wifi'); print('ConnectivityResult.wifi');
Application.init().then((_) async { Application.init().then((_) async {


Timer(Duration(milliseconds: 300), (){
NativeUtil.notifyInitSuccess();
});

PackageInfo packageInfo = await PackageInfo.fromPlatform(); PackageInfo packageInfo = await PackageInfo.fromPlatform();
String versionNumber = await SharedPreferencesUtil.getStringValue(Constants.versionNumber); String versionNumber = await SharedPreferencesUtil.getStringValue(Constants.versionNumber);
String currentVersionCode = packageInfo.buildNumber?.toString() ?? ''; String currentVersionCode = packageInfo.buildNumber?.toString() ?? '';
@@ -131,8 +127,10 @@ class _LaunchPageState extends State<LaunchPage> with TickerProviderStateMixin {
guideImages.add(data); guideImages.add(data);
} }
} }
NativeUtil.notifyInitSuccess();
await Navigator.of(context).push(CupertinoPageRoute(builder: (context) => GuidePage(guide, guideImages))); await Navigator.of(context).push(CupertinoPageRoute(builder: (context) => GuidePage(guide, guideImages)));


} }
} catch (e) { } catch (e) {
throw "引导图加载失败"; throw "引导图加载失败";


Loading…
Cancel
Save