浏览代码

1.把协议页迁移到引导页之前显示

2.修复配置读取缓存的问题
3.修复商品列表加载缓存问题
tags/0.0.4+4
“yanghuaxuan” 3 年前
父节点
当前提交
d183d7290f
共有 6 个文件被更改,包括 198 次插入199 次删除
  1. +115
    -115
      .dart_tool/package_config.json
  2. +1
    -1
      lib/models/app_config_model.dart
  3. +2
    -11
      lib/pages/home_page/home_page.dart
  4. +58
    -48
      lib/pages/launch_page/launch_page.dart
  5. +10
    -8
      lib/widgets/home/home_goods/bloc/home_goods_bloc.dart
  6. +12
    -16
      lib/widgets/hot_ranking/hot_ranking_list/hot_ranking_bloc.dart

+ 115
- 115
.dart_tool/package_config.json 查看文件

@@ -3,685 +3,685 @@
"packages": [
{
"name": "ali_auth_wbq",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/git/zhiying_ali_auth_wbq-f6421fe5735eab13738946da8fa7405e7aa952c6/",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/git/zhiying_ali_auth_wbq-f6421fe5735eab13738946da8fa7405e7aa952c6/",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "archive",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/archive-2.0.13",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/archive-2.0.13",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "args",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/args-1.6.0",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/args-1.6.0",
"packageUri": "lib/",
"languageVersion": "2.3"
},
{
"name": "async",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.4.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/async-2.4.1",
"packageUri": "lib/",
"languageVersion": "2.2"
},
{
"name": "bloc",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/bloc-4.0.0",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/bloc-4.0.0",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "boolean_selector",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-2.0.0",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-2.0.0",
"packageUri": "lib/",
"languageVersion": "2.4"
},
{
"name": "cached_network_image",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/cached_network_image-2.2.0+1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/cached_network_image-2.2.0+1",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "charcode",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.3",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.3",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "clock",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/clock-1.0.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/clock-1.0.1",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "collection",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.12",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.12",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "connectivity",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/connectivity-0.4.9+5",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/connectivity-0.4.9+5",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "connectivity_for_web",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/connectivity_for_web-0.3.1+4",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/connectivity_for_web-0.3.1+4",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "connectivity_macos",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/connectivity_macos-0.1.0+7",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/connectivity_macos-0.1.0+7",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "connectivity_platform_interface",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/connectivity_platform_interface-1.0.6",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/connectivity_platform_interface-1.0.6",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "convert",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-2.1.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/convert-2.1.1",
"packageUri": "lib/",
"languageVersion": "1.17"
},
{
"name": "cookie_jar",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/cookie_jar-1.0.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/cookie_jar-1.0.1",
"packageUri": "lib/",
"languageVersion": "1.20"
},
{
"name": "crypto",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.1.4",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/crypto-2.1.4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "device_info",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.2+10",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.2+10",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "device_info_platform_interface",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/device_info_platform_interface-1.0.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/device_info_platform_interface-1.0.1",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "dio",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/dio-3.0.10",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/dio-3.0.10",
"packageUri": "lib/",
"languageVersion": "2.4"
},
{
"name": "dio_cookie_manager",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/dio_cookie_manager-1.0.0",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/dio_cookie_manager-1.0.0",
"packageUri": "lib/",
"languageVersion": "2.4"
},
{
"name": "equatable",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/equatable-1.2.5",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/equatable-1.2.5",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "event_bus",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/event_bus-1.1.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/event_bus-1.1.1",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "ffi",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/ffi-0.1.3",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/ffi-0.1.3",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "file",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/file-5.2.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/file-5.2.1",
"packageUri": "lib/",
"languageVersion": "2.2"
},
{
"name": "flutter",
"rootUri": "file:///D:/flutter/flutter/packages/flutter",
"rootUri": "file:///Users/fnuser02/flutter/packages/flutter",
"packageUri": "lib/",
"languageVersion": "2.2"
},
{
"name": "flutter_alibc",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/git/zhiying_flutter_alibc-ba413f84090cd58b8b769ca43ff3ef65a0e53274/",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/git/zhiying_flutter_alibc-ba413f84090cd58b8b769ca43ff3ef65a0e53274/",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "flutter_bloc",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_bloc-4.0.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_bloc-4.0.1",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "flutter_cache_manager",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_cache_manager-1.4.2",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_cache_manager-1.4.2",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "flutter_cupertino_date_picker",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_cupertino_date_picker-1.0.26+2",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_cupertino_date_picker-1.0.26+2",
"packageUri": "lib/",
"languageVersion": "1.19"
},
{
"name": "flutter_native_image",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_native_image-0.0.5+3",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_native_image-0.0.5+3",
"packageUri": "lib/",
"languageVersion": "1.19"
},
{
"name": "flutter_page_indicator",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_page_indicator-0.0.3",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_page_indicator-0.0.3",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "flutter_plugin_android_lifecycle",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_plugin_android_lifecycle-1.0.11",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_plugin_android_lifecycle-1.0.11",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "flutter_screenutil",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_screenutil-1.1.0",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_screenutil-1.1.0",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "flutter_slidable",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_slidable-0.5.7",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_slidable-0.5.7",
"packageUri": "lib/",
"languageVersion": "1.19"
},
{
"name": "flutter_swiper",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_swiper-1.1.6",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_swiper-1.1.6",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "flutter_test",
"rootUri": "file:///D:/flutter/flutter/packages/flutter_test",
"rootUri": "file:///Users/fnuser02/flutter/packages/flutter_test",
"packageUri": "lib/",
"languageVersion": "2.2"
},
{
"name": "flutter_update_dialog",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_update_dialog-1.0.0",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/flutter_update_dialog-1.0.0",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "flutter_web_plugins",
"rootUri": "file:///D:/flutter/flutter/packages/flutter_web_plugins",
"rootUri": "file:///Users/fnuser02/flutter/packages/flutter_web_plugins",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "flutter_xupdate",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/git/flutter_xupdate-d17c695461ee4588dec990533d7467c11884cd0f/",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/git/flutter_xupdate-d17c695461ee4588dec990533d7467c11884cd0f/",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "fluttertoast",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/fluttertoast-4.0.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/fluttertoast-4.0.1",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "http",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/http-0.12.2",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/http-0.12.2",
"packageUri": "lib/",
"languageVersion": "2.4"
},
{
"name": "http_parser",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.4",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.4",
"packageUri": "lib/",
"languageVersion": "2.3"
},
{
"name": "image",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/image-2.1.12",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/image-2.1.12",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "image_cropper",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/git/Image_Cropper-e32f2264f86a27a2f5d7a7a5e26c6154eaf5798e/",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/git/Image_Cropper-e32f2264f86a27a2f5d7a7a5e26c6154eaf5798e/",
"packageUri": "lib/",
"languageVersion": "1.20"
},
{
"name": "image_picker",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.7+17",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker-0.6.7+21",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "image_picker_platform_interface",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker_platform_interface-1.1.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/image_picker_platform_interface-1.1.1",
"packageUri": "lib/",
"languageVersion": "2.5"
},
{
"name": "imei_plugin",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/imei_plugin-1.2.0",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/imei_plugin-1.2.0",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "intl",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/intl-0.16.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/intl-0.16.1",
"packageUri": "lib/",
"languageVersion": "2.5"
},
{
"name": "jdsdk",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/jdsdk-0.0.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/jdsdk-0.0.1",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "loading_indicator",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/loading_indicator-1.2.0",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/loading_indicator-1.2.0",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "matcher",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.6",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.6",
"packageUri": "lib/",
"languageVersion": "2.2"
},
{
"name": "meta",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.8",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/meta-1.1.8",
"packageUri": "lib/",
"languageVersion": "1.12"
},
{
"name": "moblink",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/git/moblink-5472bb698d70e336cf55febb9b0a209411466632/",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/git/moblink-5472bb698d70e336cf55febb9b0a209411466632/",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "mobpush_plugin",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/mobpush_plugin-1.1.6",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/mobpush_plugin-1.1.6",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "mobsms",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/mobsms-1.1.3",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/mobsms-1.1.3",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "nested",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/nested-0.0.4",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/nested-0.0.4",
"packageUri": "lib/",
"languageVersion": "2.2"
},
{
"name": "package_info",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.3+2",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.3+2",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "path",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.4",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/path-1.6.4",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "path_provider",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.24",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.27",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "path_provider_linux",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-0.0.1+2",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_linux-0.0.1+2",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "path_provider_macos",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+6",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+8",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "path_provider_platform_interface",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_platform_interface-1.0.4",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_platform_interface-1.0.4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "path_provider_windows",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_windows-0.0.4+3",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/path_provider_windows-0.0.4+3",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "pedantic",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.9.0",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.9.0",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "permission_handler",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/git/permission_handler-b8c45c4c20221ac39fe083113fc360cc632f33a4/",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/git/permission_handler-b8c45c4c20221ac39fe083113fc360cc632f33a4/",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "permission_handler_platform_interface",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/permission_handler_platform_interface-2.0.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/permission_handler_platform_interface-2.0.1",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "petitparser",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/petitparser-2.4.0",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/petitparser-2.4.0",
"packageUri": "lib/",
"languageVersion": "2.4"
},
{
"name": "photo_view",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/photo_view-0.10.3",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/photo_view-0.10.3",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "platform",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/platform-2.2.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/platform-2.2.1",
"packageUri": "lib/",
"languageVersion": "1.24"
},
{
"name": "plugin_platform_interface",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/plugin_platform_interface-1.0.3",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/plugin_platform_interface-1.0.3",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "process",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/process-3.0.13",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/process-3.0.13",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "provider",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/provider-4.3.2+2",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/provider-4.3.2+2",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "pull_to_refresh",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.3",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/pull_to_refresh-1.6.3",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "quiver",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.1.3",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.1.3",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "rxdart",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/rxdart-0.24.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/rxdart-0.24.1",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "save_image",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/save_image-1.0.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/save_image-1.0.1",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "secverify",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/secverify-1.0.2",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/secverify-1.0.2",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "share_extend",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/share_extend-1.1.9",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/share_extend-1.1.9",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "shared_preferences",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.12+4",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.12+4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "shared_preferences_linux",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-0.0.2+4",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-0.0.2+4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "shared_preferences_macos",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+11",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+11",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "shared_preferences_platform_interface",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_platform_interface-1.0.4",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_platform_interface-1.0.4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "shared_preferences_web",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+7",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+7",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "shared_preferences_windows",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_windows-0.0.1+3",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_windows-0.0.1+3",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "sharesdk_plugin",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/sharesdk_plugin-1.2.9",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/sharesdk_plugin-1.2.9",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "shimmer",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/shimmer-1.1.2",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/shimmer-1.1.2",
"packageUri": "lib/",
"languageVersion": "1.20"
},
{
"name": "sky_engine",
"rootUri": "file:///D:/flutter/flutter/bin/cache/pkg/sky_engine",
"rootUri": "file:///Users/fnuser02/flutter/bin/cache/pkg/sky_engine",
"packageUri": "lib/",
"languageVersion": "1.11"
},
{
"name": "source_span",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.7.0",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.7.0",
"packageUri": "lib/",
"languageVersion": "2.6"
},
{
"name": "sqflite",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1+2",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1+2",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "sqflite_common",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite_common-1.0.2+1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/sqflite_common-1.0.3",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "stack_trace",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3",
"packageUri": "lib/",
"languageVersion": "1.23"
},
{
"name": "stream_channel",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-2.0.0",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/stream_channel-2.0.0",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "string_scanner",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.5",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.5",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "string_validator",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_validator-0.1.4",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/string_validator-0.1.4",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "synchronized",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/synchronized-2.2.0+2",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/synchronized-2.2.0+2",
"packageUri": "lib/",
"languageVersion": "2.8"
},
{
"name": "tab_indicator_styler",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/tab_indicator_styler-1.0.0",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/tab_indicator_styler-1.0.0",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "term_glyph",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.1.0",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.1.0",
"packageUri": "lib/",
"languageVersion": "1.8"
},
{
"name": "test_api",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.2.15",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/test_api-0.2.15",
"packageUri": "lib/",
"languageVersion": "2.4"
},
{
"name": "tobias",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/git/tobias-cbd12d0ea1df08062fbd06e3a04986f86c7cf1ef/",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/git/tobias-cbd12d0ea1df08062fbd06e3a04986f86c7cf1ef/",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "transformer_page_view",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.1.6",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.1.6",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "typed_data",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "url_launcher",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.7.6",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher-5.7.6",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "url_launcher_linux",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_linux-0.0.1+4",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_linux-0.0.1+4",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "url_launcher_macos",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+9",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_macos-0.0.1+9",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "url_launcher_platform_interface",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_platform_interface-1.0.8",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_platform_interface-1.0.8",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "url_launcher_web",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-0.1.4+1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_web-0.1.4+1",
"packageUri": "lib/",
"languageVersion": "2.2"
},
{
"name": "url_launcher_windows",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_windows-0.0.1+3",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/url_launcher_windows-0.0.1+3",
"packageUri": "lib/",
"languageVersion": "2.1"
},
{
"name": "uuid",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/uuid-2.2.2",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/uuid-2.2.2",
"packageUri": "lib/",
"languageVersion": "2.2"
},
{
"name": "vector_math",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.8",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.8",
"packageUri": "lib/",
"languageVersion": "2.0"
},
{
"name": "webview_flutter",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-0.3.24",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/webview_flutter-0.3.24",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "win32",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/win32-1.7.4",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/win32-1.7.4",
"packageUri": "lib/",
"languageVersion": "2.7"
},
{
"name": "xdg_directories",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/xdg_directories-0.1.0",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/xdg_directories-0.1.0",
"packageUri": "lib/",
"languageVersion": "2.3"
},
{
"name": "xml",
"rootUri": "file:///D:/flutter/flutter/.pub-cache/hosted/pub.flutter-io.cn/xml-3.6.1",
"rootUri": "file:///Users/fnuser02/flutter/.pub-cache/hosted/pub.flutter-io.cn/xml-3.6.1",
"packageUri": "lib/",
"languageVersion": "2.6"
},
@@ -698,7 +698,7 @@
"languageVersion": "2.8"
}
],
"generated": "2021-01-12T07:01:53.779982Z",
"generated": "2021-01-19T05:36:16.847647Z",
"generator": "pub",
"generatorVersion": "2.8.2"
}

+ 1
- 1
lib/models/app_config_model.dart 查看文件

@@ -21,7 +21,7 @@ class AppConfigModel {
static Future<AppConfigModel> init({bool isGetCache = false}) async {
try {
String cacheData = await SharedPreferencesUtil.getStringValue(GlobalConfig.MAIN_CONFIG, defaultVal: '1');
String cacheData = await SharedPreferencesUtil.getStringValue(GlobalConfig.GUIDE, defaultVal: '1');
if (isGetCache && cacheData != '1') {
_config = AppConfigModel.fromJson(Map<String, dynamic>.from(json.decode(cacheData)));
Logger.debug('基础设置初始化');


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

@@ -252,21 +252,12 @@ class _HomePageState extends State<HomePage> with WidgetsBindingObserver, Ticker

///
/// 各种弹窗
/// 1、用户协议弹窗
/// 1、用户协议弹窗 搬到启动页之前显示了
/// 2、通知栏开启弹窗
/// 3、活动弹窗
///
Future _showPolicy() async {
// 协议弹窗
String isShowPolicy = await SharedPreferencesUtil.getStringValue(Constants.isShowPolicy);
if (isShowPolicy == null || isShowPolicy != '1') {
bool isAccept = await PolicyDialog.show(context);
if (!isAccept) {
exit(0);
} else {
await SharedPreferencesUtil.setStringValue(Constants.isShowPolicy, "1");
}
}


// 通知弹窗
String isShowNotiPermission = await SharedPreferencesUtil.getStringValue(Constants.isShowNotiPermission);


+ 58
- 48
lib/pages/launch_page/launch_page.dart 查看文件

@@ -1,5 +1,6 @@
import 'dart:convert';
import 'dart:async';
import 'dart:io';
import 'dart:typed_data';

import 'package:connectivity/connectivity.dart';
@@ -10,6 +11,7 @@ import 'package:mobpush_plugin/mobpush_custom_message.dart';
import 'package:mobpush_plugin/mobpush_notify_message.dart';
import 'package:mobpush_plugin/mobpush_plugin.dart';
import 'package:flutter/services.dart';
import 'package:zhiying_base_widget/dialog/global_dialog/policy_dialog/policy_dialog.dart';
import 'package:zhiying_base_widget/dialog/tip_dialog/tip_dialog.dart';
import 'package:mobpush_plugin/mobpush_custom_message.dart';
import 'package:mobpush_plugin/mobpush_notify_message.dart';
@@ -25,7 +27,6 @@ import 'package:zhiying_comm/util/shared_prefe_util.dart';
import 'package:package_info/package_info.dart';
import 'package:fluttertoast/fluttertoast.dart';


// 启动页,页面初始化等操作~跟原生启动页保持一致,防止白屏问题
class LaunchPage extends StatefulWidget {
final WidgetBuilder builder;
@@ -36,14 +37,13 @@ class LaunchPage extends StatefulWidget {
_LaunchPageState createState() => _LaunchPageState();
}


class _LaunchPageState extends State<LaunchPage> with TickerProviderStateMixin {
final GlobalKey navigatorKey = new GlobalKey();

///闪屏动画
AnimationController animationController;

int showTime=0;
int showTime = 0;

@override
void initState() {
@@ -52,50 +52,62 @@ class _LaunchPageState extends State<LaunchPage> with TickerProviderStateMixin {
super.initState();
}



validateInit() async {
// Connectivity().checkConnectivity().then((connectivityResult) async {
// if (connectivityResult == ConnectivityResult.mobile || connectivityResult == ConnectivityResult.wifi) {
// I am connected to a wifi network.
Logger.debug('ConnectivityResult.wifi');
print('ConnectivityResult.wifi');
Application.init().then((_) async {
// I am connected to a wifi network.
Logger.debug('ConnectivityResult.wifi');
print('ConnectivityResult.wifi');
Application.init().then((_) async {
///协议弹窗
String isShowPolicy = await SharedPreferencesUtil.getStringValue(Constants.isShowPolicy);
if (isShowPolicy == null || isShowPolicy != '1') {
NativeUtil.notifyInitSuccess();
bool isAccept = await PolicyDialog.show(context);
if (!isAccept) {
exit(0);
} else {
await SharedPreferencesUtil.setStringValue(Constants.isShowPolicy, "1");
}
}

PackageInfo packageInfo = await PackageInfo.fromPlatform();
String versionNumber = await SharedPreferencesUtil.getStringValue(Constants.versionNumber);
String currentVersionCode = packageInfo.buildNumber?.toString() ?? '';
if (versionNumber == null || versionNumber == '' || versionNumber != currentVersionCode) {
await _showGuideImage();
SharedPreferencesUtil.setStringValue(Constants.versionNumber, currentVersionCode);
}
///引导页
PackageInfo packageInfo = await PackageInfo.fromPlatform();
String versionNumber = await SharedPreferencesUtil.getStringValue(Constants.versionNumber);
String currentVersionCode = packageInfo.buildNumber?.toString() ?? '';
if (versionNumber == null || versionNumber == '' || versionNumber != currentVersionCode) {
await _showGuideImage();
SharedPreferencesUtil.setStringValue(Constants.versionNumber, currentVersionCode);
}

if (widget.builder != null) {
Navigator.of(context).pushReplacement(CupertinoPageRoute(builder: widget.builder));
} else {
// Navigator.of(context).pushReplacement(
// CupertinoPageRoute(builder: (context) => HomePage()));
Navigator.of(context).pushReplacementNamed('/homePage');
}
}).catchError((err) async {
// if (err.toString().contains("BaseSettingModel")) {
// await showDialog(
// context: context,
// child: TipDialog(
// content: "基本配置加载失败!请检查网络是否可用后再启动应用!",
// ));
// SystemNavigator.pop();
// }
if(showTime<3){
showTime++;
Fluttertoast.showToast(msg: "配置基础数据失败!请检查网络是否可用");
}
if (widget.builder != null) {
Navigator.of(context).pushReplacement(CupertinoPageRoute(builder: widget.builder));
} else {
// Navigator.of(context).pushReplacement(
// CupertinoPageRoute(builder: (context) => HomePage()));
Navigator.of(context).pushReplacementNamed('/homePage');
}
}).catchError((err) async {
// if (err.toString().contains("BaseSettingModel")) {
// await showDialog(
// context: context,
// child: TipDialog(
// content: "基本配置加载失败!请检查网络是否可用后再启动应用!",
// ));
// SystemNavigator.pop();
// }
if (showTime < 3) {
showTime++;
Fluttertoast.showToast(msg: "配置基础数据失败!请检查网络是否可用");
}

Timer(Duration(seconds: 5), () {
validateInit();
});
Logger.error(err);
});
Timer(Duration(seconds: 5), () async {
await SharedPreferencesUtil.setStringValue(GlobalConfig.GUIDE, "1");
await SharedPreferencesUtil.setStringValue(GlobalConfig.MAIN_CONFIG, "1");
validateInit();
});
Logger.error(err);
});
// } else {
// ///在无网络情况下提示用户打开网络
// if(showTime<3){
@@ -129,8 +141,6 @@ class _LaunchPageState extends State<LaunchPage> with TickerProviderStateMixin {
}
NativeUtil.notifyInitSuccess();
await Navigator.of(context).push(CupertinoPageRoute(builder: (context) => GuidePage(guide, guideImages)));


}
} catch (e) {
throw "引导图加载失败";
@@ -141,11 +151,11 @@ class _LaunchPageState extends State<LaunchPage> with TickerProviderStateMixin {
Widget build(BuildContext context) {
return Container(
color: Colors.white,
// child: Image.asset(
// 'assets/images/launch_image/launch_image.png',
// package: 'zhiying_base_widget',
// fit: BoxFit.fill,
// ),
child: Image.asset(
'assets/images/launch_image/launch_image.png',
package: 'zhiying_base_widget',
fit: BoxFit.fill,
),
);
}
}

+ 10
- 8
lib/widgets/home/home_goods/bloc/home_goods_bloc.dart 查看文件

@@ -6,10 +6,11 @@ import 'package:zhiying_base_widget/widgets/home/home_goods/models/home_goods_mo
import 'package:zhiying_comm/util/base_bloc.dart';
import 'package:zhiying_comm/zhiying_comm.dart';

class HomeGoodsBloc extends BlocBase implements CategoryGoodsOnClickCallBack{
class HomeGoodsBloc extends BlocBase implements CategoryGoodsOnClickCallBack {
List<HomeGoodsModel> _goods = List();

dynamic _provider ;
dynamic _provider;

String providerss = '';
int _page = 1;

@@ -39,7 +40,6 @@ class HomeGoodsBloc extends BlocBase implements CategoryGoodsOnClickCallBack{
onCache: _page == 1
? (data) {
if (!EmptyUtil.isEmpty(data)) {

if (data.containsKey('good')) {
try {
List<dynamic> list = data['good'];
@@ -49,12 +49,15 @@ class HomeGoodsBloc extends BlocBase implements CategoryGoodsOnClickCallBack{
Logger.warn('goods list cache data = ${data?.toString()}');
_goodsController.add(goods);
} catch (e, s) {
Logger.warn(e,s);
Logger.warn(e, s);
}
}
}
}
: null, onSuccess: (data) {
if (_provider != provider) {
return;
}
Map<String, dynamic> json = Map<String, dynamic>.from(data);
if (json.containsKey('good')) {
List<dynamic> list = json['good'];
@@ -73,9 +76,8 @@ class HomeGoodsBloc extends BlocBase implements CategoryGoodsOnClickCallBack{

@override
void onTap(int index, String providerType) {
Logger.error('index = $index, providerType = $providerType');
_provider = providerType;
loadMore(providerType);
Logger.error('index = $index, providerType = $providerType');
_provider = providerType;
loadMore(providerType);
}

}

+ 12
- 16
lib/widgets/hot_ranking/hot_ranking_list/hot_ranking_bloc.dart 查看文件

@@ -13,8 +13,7 @@ import 'package:zhiying_comm/zhiying_comm.dart';
class HotRankingListBloc extends BlocBase {
HotRankingListDataModel _pageData;

StreamController<HotRankingListDataModel> _dataController =
StreamController<HotRankingListDataModel>();
StreamController<HotRankingListDataModel> _dataController = StreamController<HotRankingListDataModel>();

Stream<HotRankingListDataModel> get outData => _dataController.stream;

@@ -31,21 +30,23 @@ class HotRankingListBloc extends BlocBase {
}

void loadData(String typeId, int page, Function complete) async {
if (isLoading) {
complete();
return;
}
isLoading = true;
// if (isLoading) {
// complete();
// return;
// }
// isLoading = true;
currentTypeId = typeId;
await NetUtil.request(
'/api/v1/rec?pvd=taobao&category_id=' + typeId + '&page=' + page.toString(),
method: NetMethod.GET, onCache: (data) {
NetUtil.request('/api/v1/rec?pvd=taobao&category_id=' + typeId + '&page=' + page.toString(), method: NetMethod.GET, onCache: (data) {
complete();
Loading.dismiss();
_loadData(data);
}, onSuccess: (data) {
complete();
isLoading = false;

if (currentTypeId != typeId) {
return;
}
_loadData(data);
Loading.dismiss();
}, onError: (e) {
@@ -62,12 +63,7 @@ class HotRankingListBloc extends BlocBase {
}
currentPage++;
isLoading = true;
NetUtil.request(
'/api/v1/rec/taobao?type_id=' +
typeId +
'&page=' +
currentPage.toString(),
method: NetMethod.GET, onSuccess: (data) {
NetUtil.request('/api/v1/rec?pvd=taobao&category_id=' + typeId + '&page=' + currentPage.toString(), method: NetMethod.GET, onSuccess: (data) {
complete();
isLoading = false;
_loadMoreData(data);


正在加载...
取消
保存