@@ -1,6 +1,18 @@ | |||||
{ | { | ||||
"configVersion": 2, | "configVersion": 2, | ||||
"packages": [ | "packages": [ | ||||
{ | |||||
"name": "_fe_analyzer_shared", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/_fe_analyzer_shared-6.0.0", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.2" | |||||
}, | |||||
{ | |||||
"name": "analyzer", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/analyzer-0.39.14", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.6" | |||||
}, | |||||
{ | { | ||||
"name": "archive", | "name": "archive", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/archive-2.0.11", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/archive-2.0.11", | ||||
@@ -19,12 +31,66 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.0" | "languageVersion": "2.0" | ||||
}, | }, | ||||
{ | |||||
"name": "bloc", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/bloc-4.0.0", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.6" | |||||
}, | |||||
{ | { | ||||
"name": "boolean_selector", | "name": "boolean_selector", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.5", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/boolean_selector-1.0.5", | ||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.0" | "languageVersion": "2.0" | ||||
}, | }, | ||||
{ | |||||
"name": "build", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/build-1.3.0", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.7" | |||||
}, | |||||
{ | |||||
"name": "build_config", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/build_config-0.4.2", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.6" | |||||
}, | |||||
{ | |||||
"name": "build_daemon", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/build_daemon-2.1.4", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.6" | |||||
}, | |||||
{ | |||||
"name": "build_resolvers", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/build_resolvers-1.3.11", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.7" | |||||
}, | |||||
{ | |||||
"name": "build_runner", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/build_runner-1.10.1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.6" | |||||
}, | |||||
{ | |||||
"name": "build_runner_core", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/build_runner_core-6.0.1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.7" | |||||
}, | |||||
{ | |||||
"name": "built_collection", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/built_collection-4.3.2", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.6" | |||||
}, | |||||
{ | |||||
"name": "built_value", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/built_value-7.1.0", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.3" | |||||
}, | |||||
{ | { | ||||
"name": "cached_network_image", | "name": "cached_network_image", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/cached_network_image-2.2.0+1", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/cached_network_image-2.2.0+1", | ||||
@@ -37,12 +103,30 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "1.0" | "languageVersion": "1.0" | ||||
}, | }, | ||||
{ | |||||
"name": "checked_yaml", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/checked_yaml-1.0.2", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.3" | |||||
}, | |||||
{ | |||||
"name": "cli_util", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/cli_util-0.1.4", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | { | ||||
"name": "clock", | "name": "clock", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/clock-1.0.1", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/clock-1.0.1", | ||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.0" | "languageVersion": "2.0" | ||||
}, | }, | ||||
{ | |||||
"name": "code_builder", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/code_builder-3.4.1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.7" | |||||
}, | |||||
{ | { | ||||
"name": "collection", | "name": "collection", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.11", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/collection-1.14.11", | ||||
@@ -61,6 +145,18 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.1" | "languageVersion": "2.1" | ||||
}, | }, | ||||
{ | |||||
"name": "csslib", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/csslib-0.16.2", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.2" | |||||
}, | |||||
{ | |||||
"name": "dart_style", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/dart_style-1.3.6", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.7" | |||||
}, | |||||
{ | { | ||||
"name": "device_info", | "name": "device_info", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.2+7", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/device_info-0.4.2+7", | ||||
@@ -79,18 +175,36 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.4" | "languageVersion": "2.4" | ||||
}, | }, | ||||
{ | |||||
"name": "equatable", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/equatable-1.2.4", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | { | ||||
"name": "file", | "name": "file", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/file-5.2.1", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/file-5.2.1", | ||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.2" | "languageVersion": "2.2" | ||||
}, | }, | ||||
{ | |||||
"name": "fixnum", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/fixnum-0.10.11", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.1" | |||||
}, | |||||
{ | { | ||||
"name": "flutter", | "name": "flutter", | ||||
"rootUri": "file:///Users/fnuser/Documents/flutter-sdk/packages/flutter", | "rootUri": "file:///Users/fnuser/Documents/flutter-sdk/packages/flutter", | ||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.2" | "languageVersion": "2.2" | ||||
}, | }, | ||||
{ | |||||
"name": "flutter_bloc", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/flutter_bloc-4.0.1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.6" | |||||
}, | |||||
{ | { | ||||
"name": "flutter_cache_manager", | "name": "flutter_cache_manager", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/flutter_cache_manager-1.4.1", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/flutter_cache_manager-1.4.1", | ||||
@@ -109,6 +223,12 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.0" | "languageVersion": "2.0" | ||||
}, | }, | ||||
{ | |||||
"name": "flutter_screenutil", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/flutter_screenutil-1.1.0", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.6" | |||||
}, | |||||
{ | { | ||||
"name": "flutter_swiper", | "name": "flutter_swiper", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/flutter_swiper-1.1.6", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/flutter_swiper-1.1.6", | ||||
@@ -133,12 +253,36 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.7" | "languageVersion": "2.7" | ||||
}, | }, | ||||
{ | |||||
"name": "glob", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/glob-1.2.0", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.1" | |||||
}, | |||||
{ | |||||
"name": "graphs", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/graphs-0.2.0", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | |||||
"name": "html", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/html-0.14.0+3", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.3" | |||||
}, | |||||
{ | { | ||||
"name": "http", | "name": "http", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/http-0.12.2", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/http-0.12.2", | ||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.4" | "languageVersion": "2.4" | ||||
}, | }, | ||||
{ | |||||
"name": "http_multi_server", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/http_multi_server-2.2.0", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.1" | |||||
}, | |||||
{ | { | ||||
"name": "http_parser", | "name": "http_parser", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.4", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/http_parser-3.1.4", | ||||
@@ -157,6 +301,36 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.5" | "languageVersion": "2.5" | ||||
}, | }, | ||||
{ | |||||
"name": "io", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/io-0.3.4", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | |||||
"name": "js", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/js-0.6.2", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | |||||
"name": "json_annotation", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/json_annotation-3.0.1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.6" | |||||
}, | |||||
{ | |||||
"name": "json_serializable", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/json_serializable-3.4.1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.7" | |||||
}, | |||||
{ | |||||
"name": "logging", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/logging-0.11.4", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | { | ||||
"name": "matcher", | "name": "matcher", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.6", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/matcher-0.12.6", | ||||
@@ -169,12 +343,36 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "1.12" | "languageVersion": "1.12" | ||||
}, | }, | ||||
{ | |||||
"name": "mime", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/mime-0.9.7", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | { | ||||
"name": "nested", | "name": "nested", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/nested-0.0.4", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/nested-0.0.4", | ||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.2" | "languageVersion": "2.2" | ||||
}, | }, | ||||
{ | |||||
"name": "node_interop", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/node_interop-1.1.1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | |||||
"name": "node_io", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/node_io-1.1.1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.2" | |||||
}, | |||||
{ | |||||
"name": "package_config", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/package_config-1.9.3", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.7" | |||||
}, | |||||
{ | { | ||||
"name": "package_info", | "name": "package_info", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.3", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/package_info-0.4.3", | ||||
@@ -235,6 +433,12 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.1" | "languageVersion": "2.1" | ||||
}, | }, | ||||
{ | |||||
"name": "pool", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/pool-1.4.0", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | { | ||||
"name": "process", | "name": "process", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/process-3.0.13", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/process-3.0.13", | ||||
@@ -247,6 +451,18 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.2" | "languageVersion": "2.2" | ||||
}, | }, | ||||
{ | |||||
"name": "pub_semver", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/pub_semver-1.4.4", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | |||||
"name": "pubspec_parse", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/pubspec_parse-0.1.5", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.2" | |||||
}, | |||||
{ | { | ||||
"name": "quiver", | "name": "quiver", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.0.5", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/quiver-2.0.5", | ||||
@@ -259,6 +475,48 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.6" | "languageVersion": "2.6" | ||||
}, | }, | ||||
{ | |||||
"name": "shared_preferences", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences-0.5.10", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.1" | |||||
}, | |||||
{ | |||||
"name": "shared_preferences_linux", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_linux-0.0.2+2", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.1" | |||||
}, | |||||
{ | |||||
"name": "shared_preferences_macos", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_macos-0.0.1+10", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.1" | |||||
}, | |||||
{ | |||||
"name": "shared_preferences_platform_interface", | |||||
"rootUri": "file:///Users/fnuser/.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:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shared_preferences_web-0.1.2+7", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.1" | |||||
}, | |||||
{ | |||||
"name": "shelf", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shelf-0.7.9", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.1" | |||||
}, | |||||
{ | |||||
"name": "shelf_web_socket", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shelf_web_socket-0.2.3", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | { | ||||
"name": "shimmer", | "name": "shimmer", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shimmer-1.1.1", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shimmer-1.1.1", | ||||
@@ -271,6 +529,12 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "1.11" | "languageVersion": "1.11" | ||||
}, | }, | ||||
{ | |||||
"name": "source_gen", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/source_gen-0.9.6", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.7" | |||||
}, | |||||
{ | { | ||||
"name": "source_span", | "name": "source_span", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.5.5", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/source_span-1.5.5", | ||||
@@ -301,6 +565,12 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.0" | "languageVersion": "2.0" | ||||
}, | }, | ||||
{ | |||||
"name": "stream_transform", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/stream_transform-1.2.0", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.6" | |||||
}, | |||||
{ | { | ||||
"name": "string_scanner", | "name": "string_scanner", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.5", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/string_scanner-1.0.5", | ||||
@@ -325,6 +595,12 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.2" | "languageVersion": "2.2" | ||||
}, | }, | ||||
{ | |||||
"name": "timing", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/timing-0.1.1+2", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.2" | |||||
}, | |||||
{ | { | ||||
"name": "transformer_page_view", | "name": "transformer_page_view", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.1.6", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.1.6", | ||||
@@ -349,6 +625,18 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.0" | "languageVersion": "2.0" | ||||
}, | }, | ||||
{ | |||||
"name": "watcher", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/watcher-0.9.7+15", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.2" | |||||
}, | |||||
{ | |||||
"name": "web_socket_channel", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/web_socket_channel-1.1.0", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | { | ||||
"name": "xdg_directories", | "name": "xdg_directories", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/xdg_directories-0.1.0", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/xdg_directories-0.1.0", | ||||
@@ -361,6 +649,12 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.3" | "languageVersion": "2.3" | ||||
}, | }, | ||||
{ | |||||
"name": "yaml", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/yaml-2.2.1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.4" | |||||
}, | |||||
{ | { | ||||
"name": "zhiying_comm", | "name": "zhiying_comm", | ||||
"rootUri": "../../zhiying_comm", | "rootUri": "../../zhiying_comm", | ||||
@@ -374,7 +668,7 @@ | |||||
"languageVersion": "2.1" | "languageVersion": "2.1" | ||||
} | } | ||||
], | ], | ||||
"generated": "2020-09-03T11:25:12.333713Z", | |||||
"generated": "2020-09-04T06:52:20.100476Z", | |||||
"generator": "pub", | "generator": "pub", | ||||
"generatorVersion": "2.7.2" | "generatorVersion": "2.7.2" | ||||
} | } |
@@ -17,6 +17,14 @@ PODS: | |||||
- Flutter | - Flutter | ||||
- path_provider_macos (0.0.1): | - path_provider_macos (0.0.1): | ||||
- Flutter | - Flutter | ||||
- shared_preferences (0.0.1): | |||||
- Flutter | |||||
- shared_preferences_linux (0.0.1): | |||||
- Flutter | |||||
- shared_preferences_macos (0.0.1): | |||||
- Flutter | |||||
- shared_preferences_web (0.0.1): | |||||
- Flutter | |||||
- sqflite (0.0.1): | - sqflite (0.0.1): | ||||
- Flutter | - Flutter | ||||
- FMDB (~> 2.7.2) | - FMDB (~> 2.7.2) | ||||
@@ -34,6 +42,10 @@ DEPENDENCIES: | |||||
- path_provider (from `.symlinks/plugins/path_provider/ios`) | - path_provider (from `.symlinks/plugins/path_provider/ios`) | ||||
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`) | - path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`) | ||||
- path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`) | - path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`) | ||||
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) | |||||
- shared_preferences_linux (from `.symlinks/plugins/shared_preferences_linux/ios`) | |||||
- shared_preferences_macos (from `.symlinks/plugins/shared_preferences_macos/ios`) | |||||
- shared_preferences_web (from `.symlinks/plugins/shared_preferences_web/ios`) | |||||
- sqflite (from `.symlinks/plugins/sqflite/ios`) | - sqflite (from `.symlinks/plugins/sqflite/ios`) | ||||
- zhiying_base_widget (from `.symlinks/plugins/zhiying_base_widget/ios`) | - zhiying_base_widget (from `.symlinks/plugins/zhiying_base_widget/ios`) | ||||
- zhiying_comm (from `.symlinks/plugins/zhiying_comm/ios`) | - zhiying_comm (from `.symlinks/plugins/zhiying_comm/ios`) | ||||
@@ -59,6 +71,14 @@ EXTERNAL SOURCES: | |||||
:path: ".symlinks/plugins/path_provider_linux/ios" | :path: ".symlinks/plugins/path_provider_linux/ios" | ||||
path_provider_macos: | path_provider_macos: | ||||
:path: ".symlinks/plugins/path_provider_macos/ios" | :path: ".symlinks/plugins/path_provider_macos/ios" | ||||
shared_preferences: | |||||
:path: ".symlinks/plugins/shared_preferences/ios" | |||||
shared_preferences_linux: | |||||
:path: ".symlinks/plugins/shared_preferences_linux/ios" | |||||
shared_preferences_macos: | |||||
:path: ".symlinks/plugins/shared_preferences_macos/ios" | |||||
shared_preferences_web: | |||||
:path: ".symlinks/plugins/shared_preferences_web/ios" | |||||
sqflite: | sqflite: | ||||
:path: ".symlinks/plugins/sqflite/ios" | :path: ".symlinks/plugins/sqflite/ios" | ||||
zhiying_base_widget: | zhiying_base_widget: | ||||
@@ -76,6 +96,10 @@ SPEC CHECKSUMS: | |||||
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c | path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c | ||||
path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4 | path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4 | ||||
path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0 | path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0 | ||||
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d | |||||
shared_preferences_linux: afefbfe8d921e207f01ede8b60373d9e3b566b78 | |||||
shared_preferences_macos: f3f29b71ccbb56bf40c9dd6396c9acf15e214087 | |||||
shared_preferences_web: 141cce0c3ed1a1c5bf2a0e44f52d31eeb66e5ea9 | |||||
sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0 | sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0 | ||||
zhiying_base_widget: 00868c0d2723a3a425c18b27204fbc67e3f7e59d | zhiying_base_widget: 00868c0d2723a3a425c18b27204fbc67e3f7e59d | ||||
zhiying_comm: 0daef4a480f4f4dbea3e11b615f3264aafea924b | zhiying_comm: 0daef4a480f4f4dbea3e11b615f3264aafea924b | ||||
@@ -1,5 +1,6 @@ | |||||
#import "AppDelegate.h" | #import "AppDelegate.h" | ||||
#import "GeneratedPluginRegistrant.h" | #import "GeneratedPluginRegistrant.h" | ||||
#import <zhiying_comm/ZhiyingCommNative.h> | |||||
@implementation AppDelegate | @implementation AppDelegate | ||||
@@ -7,7 +8,28 @@ | |||||
didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { | ||||
[GeneratedPluginRegistrant registerWithRegistry:self]; | [GeneratedPluginRegistrant registerWithRegistry:self]; | ||||
// Override point for customization after application launch. | // Override point for customization after application launch. | ||||
[ZhiyingCommNative regist: self]; | |||||
return [super application:application didFinishLaunchingWithOptions:launchOptions]; | return [super application:application didFinishLaunchingWithOptions:launchOptions]; | ||||
} | } | ||||
// 公共跳转方法 | |||||
- (void)openPage: (NSDictionary*)params { | |||||
} | |||||
- (void)openNativePage: (NSDictionary*)params { | |||||
NSString *method = [params valueForKey:@"method"]; | |||||
if ([method isEqualToString: @""]) { | |||||
} | |||||
} | |||||
// 获取设置 | |||||
- (NSDictionary*)getSetting { | |||||
return @{ | |||||
// @"domain": @"http://120.76.175.204:8989" | |||||
@"domain": @"http://192.168.0.113:5000" | |||||
}; | |||||
} | |||||
@end | @end |
@@ -1,7 +1,9 @@ | |||||
import 'package:flutter/cupertino.dart'; | import 'package:flutter/cupertino.dart'; | ||||
import 'package:flutter/material.dart'; | import 'package:flutter/material.dart'; | ||||
import 'package:cached_network_image/cached_network_image.dart'; | import 'package:cached_network_image/cached_network_image.dart'; | ||||
import 'package:zhiying_base_widget/pages/home_page/home_page_bloc.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | import 'package:zhiying_comm/zhiying_comm.dart'; | ||||
import 'package:zhiying_comm/util/base_bloc.dart'; | |||||
class HomePage extends StatefulWidget { | class HomePage extends StatefulWidget { | ||||
HomePage({Key key}) : super(key: key); | HomePage({Key key}) : super(key: key); | ||||
@@ -11,48 +13,85 @@ class HomePage extends StatefulWidget { | |||||
} | } | ||||
class _HomePageState extends State<HomePage> { | class _HomePageState extends State<HomePage> { | ||||
@override | |||||
Widget build(BuildContext context) { | |||||
print('home_page build'); | |||||
return BlocProvider<HomePageBloc>( | |||||
bloc: HomePageBloc(), | |||||
child: _HomePageContainer(), | |||||
); | |||||
} | |||||
} | |||||
class _HomePageContainer extends StatefulWidget { | |||||
_HomePageContainer({Key key}) : super(key: key); | |||||
@override | |||||
_HomePageContainerState createState() => _HomePageContainerState(); | |||||
} | |||||
class _HomePageContainerState extends State<_HomePageContainer> { | |||||
HomePageBloc _tabBloc; | |||||
int _currentIndex = 0; | int _currentIndex = 0; | ||||
List<String> _tab = List(); | |||||
List<Widget> _contentWidgets = List(); | |||||
@override | @override | ||||
void initState() { | void initState() { | ||||
_tab.add('首页'); | |||||
_tab.add('个人中心'); | |||||
_contentWidgets = _tab.map((item) { | |||||
return PageFactory.create('mainPage', Map()); | |||||
}).toList(); | |||||
_tabBloc = BlocProvider.of<HomePageBloc>(context); | |||||
_tabBloc.refresh(); | |||||
super.initState(); | super.initState(); | ||||
} | } | ||||
@override | @override | ||||
Widget build(BuildContext context) { | Widget build(BuildContext context) { | ||||
print('home_page build'); | print('home_page build'); | ||||
return Scaffold( | |||||
body: IndexedStack( | |||||
index: _currentIndex, | |||||
children: _contentWidgets, | |||||
), | |||||
//底部导航栏 | |||||
bottomNavigationBar: createBottomNavigationBar()); | |||||
return StreamBuilder<List<Map<String, dynamic>>>( | |||||
stream: _tabBloc.outData, | |||||
builder: (BuildContext context, AsyncSnapshot snapshot) { | |||||
List<Map<String, dynamic>> tabs = snapshot.data; | |||||
if (tabs == null || tabs.length == 0) { | |||||
return Scaffold(); | |||||
} | |||||
List<Widget> contentWidgets = tabs.map((item) { | |||||
WidgetModel model = WidgetModel.fromJson(item); | |||||
return PageFactory.create(model.modName, item); | |||||
}).toList(); | |||||
if (_currentIndex >= contentWidgets.length) { | |||||
_currentIndex = 0; | |||||
} | |||||
return Scaffold( | |||||
body: IndexedStack( | |||||
index: _currentIndex, | |||||
children: contentWidgets, | |||||
), | |||||
//底部导航栏 | |||||
bottomNavigationBar: createBottomNavigationBar(tabs), | |||||
); | |||||
}, | |||||
); | |||||
} | } | ||||
Widget createBottomNavigationBar() { | |||||
Widget createBottomNavigationBar(List<Map<String, dynamic>> tabs) { | |||||
List<BottomNavigationBarItem> items = List<BottomNavigationBarItem>(); | List<BottomNavigationBarItem> items = List<BottomNavigationBarItem>(); | ||||
for (int i = 0; i < _tab.length; i++) { | |||||
for (int i = 0; i < tabs.length; i++) { | |||||
WidgetModel model = WidgetModel.fromJson(tabs[i]); | |||||
items.add(BottomNavigationBarItem( | items.add(BottomNavigationBarItem( | ||||
icon: Container( | icon: Container( | ||||
width: 24, | width: 24, | ||||
height: 24, | height: 24, | ||||
margin: EdgeInsets.only(bottom: 4), | margin: EdgeInsets.only(bottom: 4), | ||||
child: CachedNetworkImage( | child: CachedNetworkImage( | ||||
imageUrl: | |||||
"http://www.hairuyi.com/Upload/slide/1594279903_1_0.png", | |||||
imageUrl: model.icon, | |||||
fit: BoxFit.fitWidth, | fit: BoxFit.fitWidth, | ||||
), | ), | ||||
), | ), | ||||
title: Text('tab2'))); | |||||
title: Text( | |||||
model.title, | |||||
style: TextStyle(fontSize: 11), | |||||
))); | |||||
} | } | ||||
if (items.length < 2) { | if (items.length < 2) { | ||||
@@ -0,0 +1,28 @@ | |||||
import 'dart:async'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
import 'package:zhiying_comm/util/base_bloc.dart'; | |||||
class HomePageBloc extends BlocBase { | |||||
List<Map<String, dynamic>> _tabs = List(); | |||||
StreamController<List<Map<String, dynamic>>> _tabController = | |||||
StreamController<List<Map<String, dynamic>>>(); | |||||
Stream<List<Map<String, dynamic>>> get outData => _tabController.stream; | |||||
@override | |||||
void dispose() { | |||||
_tabController.close(); | |||||
_tabController = null; | |||||
} | |||||
void refresh() { | |||||
NetUtil.request('/api/v1/config.json', onSuccess: (data) { | |||||
List list = data; | |||||
_tabs = list.map((item) { | |||||
return Map<String, dynamic>.from(item); | |||||
}).toList(); | |||||
_tabController.add(_tabs); | |||||
}); | |||||
} | |||||
} |
@@ -36,6 +36,12 @@ class _MainPageContainerState extends State<MainPageContainer> { | |||||
bool _isEnded = false; | bool _isEnded = false; | ||||
ScrollController _controller = ScrollController(); | ScrollController _controller = ScrollController(); | ||||
@override | |||||
void dispose() { | |||||
_controller.dispose(); | |||||
super.dispose(); | |||||
} | |||||
@override | @override | ||||
void initState() { | void initState() { | ||||
_reload(); | _reload(); | ||||
@@ -77,14 +83,12 @@ class _MainPageContainerState extends State<MainPageContainer> { | |||||
child: Text('重置'), | child: Text('重置'), | ||||
), | ), | ||||
)); | )); | ||||
list.addAll( | |||||
WidgetFactory.create('home_banner', type: _type, isSliver: true)); | |||||
list.addAll( | |||||
WidgetFactory.create('home_goods', type: _type, isSliver: true)); | |||||
// list.addAll( | |||||
// WidgetFactory.create('home_goods', type: _type, isSliver: true)); | |||||
// list.addAll( | |||||
// WidgetFactory.create('home_goods', type: _type, isSliver: true)); | |||||
list.addAll(WidgetFactory.create('index_carousel', | |||||
type: _type, | |||||
isSliver: true, | |||||
model: Map<String, dynamic>.from({'aaaaa': 'bbbb'}))); | |||||
list.addAll(WidgetFactory.create('index_recommend_list', | |||||
type: _type, isSliver: true)); | |||||
return list; | return list; | ||||
} | } | ||||
@@ -14,12 +14,12 @@ class BaseWidgetRegister { | |||||
// 注册页面 | // 注册页面 | ||||
static void registPage() { | static void registPage() { | ||||
PageFactory.regist('homePage', (model) => HomePage()); | PageFactory.regist('homePage', (model) => HomePage()); | ||||
PageFactory.regist('mainPage', (model) => MainPage()); | |||||
PageFactory.regist('index', (model) => MainPage()); | |||||
} | } | ||||
// 注册控件 | // 注册控件 | ||||
static void registWidgets() { | static void registWidgets() { | ||||
WidgetFactory.regist('home_banner', HomeBannerCreater()); | |||||
WidgetFactory.regist('home_goods', GoodsListCreater()); | |||||
WidgetFactory.regist('index_carousel', HomeBannerCreater()); | |||||
WidgetFactory.regist('index_recommend_list', GoodsListCreater()); | |||||
} | } | ||||
} | } |
@@ -3,6 +3,10 @@ import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
import 'package:flutter_swiper/flutter_swiper.dart'; | import 'package:flutter_swiper/flutter_swiper.dart'; | ||||
class HomeBanner extends StatelessWidget { | class HomeBanner extends StatelessWidget { | ||||
final Map<String, dynamic> model; | |||||
const HomeBanner(this.model, {Key key}) : super(key: key); | |||||
@override | @override | ||||
Widget build(BuildContext context) { | Widget build(BuildContext context) { | ||||
return Container( | return Container( | ||||
@@ -20,9 +24,7 @@ class HomeBanner extends StatelessWidget { | |||||
pagination: new SwiperPagination(), | pagination: new SwiperPagination(), | ||||
control: new SwiperControl(), | control: new SwiperControl(), | ||||
onTap: (index) { | onTap: (index) { | ||||
Map<String, dynamic> model = Map(); | |||||
model['name'] = '123'; | |||||
RouterUtil.route(model, context); | |||||
print(model.toString()); | |||||
}, | }, | ||||
), | ), | ||||
); | ); | ||||
@@ -11,6 +11,6 @@ class HomeBannerCreater extends WidgetCreater { | |||||
@override | @override | ||||
List<Widget> createWidgets(Map<String, dynamic> model) { | List<Widget> createWidgets(Map<String, dynamic> model) { | ||||
return [HomeBanner()]; | |||||
return [HomeBanner(model)]; | |||||
} | } | ||||
} | } |
@@ -7,6 +7,7 @@ class HomeBannerSkeleton extends StatelessWidget { | |||||
return Container( | return Container( | ||||
width: double.infinity, | width: double.infinity, | ||||
height: 200, | height: 200, | ||||
color: Colors.white, | |||||
child: Shimmer.fromColors( | child: Shimmer.fromColors( | ||||
baseColor: Colors.grey[300], | baseColor: Colors.grey[300], | ||||
highlightColor: Colors.grey[100], | highlightColor: Colors.grey[100], | ||||
@@ -1,5 +1,8 @@ | |||||
import 'package:flutter/material.dart'; | import 'package:flutter/material.dart'; | ||||
import 'package:zhiying_base_widget/widgets/home_goods/home_goods.dart'; | import 'package:zhiying_base_widget/widgets/home_goods/home_goods.dart'; | ||||
import 'package:zhiying_base_widget/widgets/home_goods/home_goods_header.dart'; | |||||
import 'package:zhiying_base_widget/widgets/home_goods/skeleton/home_goods_header_sk.dart'; | |||||
import 'package:zhiying_base_widget/widgets/home_goods/skeleton/home_goods_sk.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | import 'package:zhiying_comm/zhiying_comm.dart'; | ||||
class GoodsListCreater extends WidgetCreater { | class GoodsListCreater extends WidgetCreater { | ||||
@@ -15,89 +18,42 @@ class GoodsListCreater extends WidgetCreater { | |||||
@override | @override | ||||
List<Widget> createSkeleton(Map<String, dynamic> model) { | List<Widget> createSkeleton(Map<String, dynamic> model) { | ||||
return []; | |||||
return [ | |||||
_createHeaderSkeleton(), | |||||
_createBodySkeleton(), | |||||
]; | |||||
} | } | ||||
Widget _createHeader(TabController controller) { | Widget _createHeader(TabController controller) { | ||||
return SliverPersistentHeader( | return SliverPersistentHeader( | ||||
pinned: true, | pinned: true, | ||||
floating: false, | floating: false, | ||||
delegate: GoodsHeaderDelegate(controller), | |||||
delegate: HomeGoodsDelegate(controller), | |||||
); | |||||
} | |||||
Widget _createHeaderSkeleton() { | |||||
return SliverPersistentHeader( | |||||
pinned: true, | |||||
floating: false, | |||||
delegate: HomeGoodsHeaderSkeletonDelegate(), | |||||
); | ); | ||||
} | } | ||||
Widget _createBody(TabController controller) { | Widget _createBody(TabController controller) { | ||||
// return SliverToBoxAdapter( | |||||
// child: Container( | |||||
// width: double.infinity, | |||||
// height: 200, | |||||
// // child: Expanded(child: Container()), | |||||
// child: TabBarView( | |||||
// controller: controller, | |||||
// children: <Widget>[ | |||||
// Icon(Icons.directions_bike, size: 128.0, color: Colors.black12), | |||||
// ListView.builder( | |||||
// itemCount: 20, | |||||
// itemBuilder: (context, index) { | |||||
// return Container( | |||||
// width: double.infinity, | |||||
// height: 70, | |||||
// color: Colors.primaries[index % Colors.primaries.length], | |||||
// ); | |||||
// }), | |||||
// Icon(Icons.directions_bike, size: 128.0, color: Colors.black12), | |||||
// Icon(Icons.local_florist, size: 128.0, color: Colors.black12), | |||||
// Icon(Icons.change_history, size: 128.0, color: Colors.black12), | |||||
// Icon(Icons.directions_bike, size: 128.0, color: Colors.black12), | |||||
// ], | |||||
// ), | |||||
// ), | |||||
// ); | |||||
return SliverToBoxAdapter( | return SliverToBoxAdapter( | ||||
child: HomeGoods(), | child: HomeGoods(), | ||||
); | ); | ||||
} | } | ||||
@override | |||||
bool isSliverChild() { | |||||
return true; | |||||
} | |||||
} | |||||
class GoodsHeaderDelegate extends SliverPersistentHeaderDelegate { | |||||
final TabController controller; | |||||
GoodsHeaderDelegate(this.controller); | |||||
@override | |||||
Widget build( | |||||
BuildContext context, double shrinkOffset, bool overlapsContent) { | |||||
// print(shrinkOffset.toString()); | |||||
return Container( | |||||
color: Colors.red, | |||||
alignment: Alignment.center, | |||||
child: TabBar( | |||||
controller: controller, | |||||
isScrollable: true, | |||||
tabs: <Widget>[ | |||||
Tab(icon: Icon(Icons.local_florist)), | |||||
Tab(icon: Icon(Icons.change_history)), | |||||
Tab(icon: Icon(Icons.directions_bike)), | |||||
Tab(icon: Icon(Icons.local_florist)), | |||||
Tab(icon: Icon(Icons.change_history)), | |||||
Tab(icon: Icon(Icons.directions_bike)), | |||||
], | |||||
), | |||||
Widget _createBodySkeleton() { | |||||
return SliverToBoxAdapter( | |||||
child: HomeGoodsSkeleton(), | |||||
); | ); | ||||
} | } | ||||
@override | @override | ||||
double get maxExtent => 60.0; | |||||
@override | |||||
double get minExtent => 60.0; | |||||
@override | |||||
bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) => | |||||
false; // 如果内容需要更新,设置为true | |||||
bool isSliverChild() { | |||||
return true; | |||||
} | |||||
} | } |
@@ -0,0 +1,39 @@ | |||||
import 'package:flutter/material.dart'; | |||||
class HomeGoodsDelegate extends SliverPersistentHeaderDelegate { | |||||
final TabController controller; | |||||
HomeGoodsDelegate(this.controller); | |||||
@override | |||||
Widget build( | |||||
BuildContext context, double shrinkOffset, bool overlapsContent) { | |||||
// print(shrinkOffset.toString()); | |||||
return Container( | |||||
color: Colors.red, | |||||
alignment: Alignment.center, | |||||
child: TabBar( | |||||
controller: controller, | |||||
isScrollable: true, | |||||
tabs: <Widget>[ | |||||
Tab(icon: Icon(Icons.local_florist)), | |||||
Tab(icon: Icon(Icons.change_history)), | |||||
Tab(icon: Icon(Icons.directions_bike)), | |||||
Tab(icon: Icon(Icons.local_florist)), | |||||
Tab(icon: Icon(Icons.change_history)), | |||||
Tab(icon: Icon(Icons.directions_bike)), | |||||
], | |||||
), | |||||
); | |||||
} | |||||
@override | |||||
double get maxExtent => 60.0; | |||||
@override | |||||
double get minExtent => 60.0; | |||||
@override | |||||
bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) => | |||||
false; // 如果内容需要更新,设置为true | |||||
} |
@@ -0,0 +1,15 @@ | |||||
import 'package:flutter/material.dart'; | |||||
class HomeGoodsItem extends StatelessWidget { | |||||
const HomeGoodsItem({Key key}) : super(key: key); | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Container( | |||||
margin: EdgeInsets.only(left: 12.5, right: 12.5, top: 4, bottom: 4), | |||||
decoration: BoxDecoration( | |||||
color: Colors.white, | |||||
borderRadius: BorderRadius.all(Radius.circular(7.5))), | |||||
); | |||||
} | |||||
} |
@@ -0,0 +1,61 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:shimmer/shimmer.dart'; | |||||
import 'package:zhiying_base_widget/widgets/home_banner/home_banner_sk.dart'; | |||||
class HomeGoodsHeaderSkeletonDelegate extends SliverPersistentHeaderDelegate { | |||||
HomeGoodsHeaderSkeletonDelegate(); | |||||
@override | |||||
Widget build( | |||||
BuildContext context, double shrinkOffset, bool overlapsContent) { | |||||
return Container( | |||||
width: double.infinity, | |||||
height: double.infinity, | |||||
color: Colors.white, | |||||
child: Shimmer.fromColors( | |||||
baseColor: Colors.grey[300], | |||||
highlightColor: Colors.grey[100], | |||||
child: Center( | |||||
child: Row( | |||||
mainAxisAlignment: MainAxisAlignment.center, | |||||
crossAxisAlignment: CrossAxisAlignment.center, | |||||
children: List.generate(5, (index) { | |||||
return Expanded( | |||||
flex: 1, | |||||
child: Center( | |||||
child: Column( | |||||
mainAxisAlignment: MainAxisAlignment.center, | |||||
children: <Widget>[ | |||||
Container( | |||||
width: double.infinity, | |||||
height: 20, | |||||
margin: EdgeInsets.only(left: 10, right: 10, bottom: 4), | |||||
color: Colors.white, | |||||
), | |||||
Container( | |||||
width: double.infinity, | |||||
height: 10, | |||||
margin: EdgeInsets.only(left: 20, right: 20), | |||||
color: Colors.white, | |||||
), | |||||
], | |||||
), | |||||
), | |||||
); | |||||
}), | |||||
), | |||||
), | |||||
), | |||||
); | |||||
} | |||||
@override | |||||
double get maxExtent => 64.0; | |||||
@override | |||||
double get minExtent => 64.0; | |||||
@override | |||||
bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) => | |||||
false; // 如果内容需要更新,设置为true | |||||
} |
@@ -0,0 +1,57 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:shimmer/shimmer.dart'; | |||||
class HomeGoodsItemSkeleton extends StatelessWidget { | |||||
const HomeGoodsItemSkeleton({Key key}) : super(key: key); | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Container( | |||||
margin: EdgeInsets.only(left: 12.5, right: 12.5, top: 4, bottom: 4), | |||||
padding: EdgeInsets.all(7.5), | |||||
decoration: BoxDecoration( | |||||
color: Colors.white, | |||||
borderRadius: BorderRadius.all(Radius.circular(7.5))), | |||||
child: Shimmer.fromColors( | |||||
baseColor: Colors.grey[300], | |||||
highlightColor: Colors.grey[100], | |||||
child: Row( | |||||
crossAxisAlignment: CrossAxisAlignment.start, | |||||
children: <Widget>[ | |||||
Container( | |||||
width: 126, | |||||
height: 126, | |||||
margin: EdgeInsets.only(right: 10), | |||||
decoration: BoxDecoration( | |||||
color: Colors.white, | |||||
borderRadius: BorderRadius.all(Radius.circular(7.5))), | |||||
), | |||||
Expanded( | |||||
child: Column( | |||||
crossAxisAlignment: CrossAxisAlignment.start, | |||||
children: <Widget>[ | |||||
Container( | |||||
width: double.infinity, | |||||
height: 35, | |||||
color: Colors.white, | |||||
), | |||||
Container( | |||||
margin: EdgeInsets.only(top: 6), | |||||
width: double.infinity, | |||||
height: 12, | |||||
color: Colors.white, | |||||
), | |||||
Container( | |||||
margin: EdgeInsets.only(top: 6), | |||||
width: 80, | |||||
height: 12, | |||||
color: Colors.white, | |||||
) | |||||
], | |||||
)) | |||||
], | |||||
), | |||||
), | |||||
); | |||||
} | |||||
} |
@@ -0,0 +1,20 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_base_widget/widgets/home_goods/skeleton/home_goods_item_sk.dart'; | |||||
class HomeGoodsSkeleton extends StatelessWidget { | |||||
const HomeGoodsSkeleton({Key key}) : super(key: key); | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Container( | |||||
width: double.infinity, | |||||
child: ListView.builder( | |||||
shrinkWrap: true, | |||||
physics: NeverScrollableScrollPhysics(), | |||||
itemCount: 6, | |||||
itemBuilder: (context, index) { | |||||
return HomeGoodsItemSkeleton(); | |||||
}), | |||||
); | |||||
} | |||||
} |
@@ -14,6 +14,8 @@ dependencies: | |||||
shimmer: ^1.1.1 | shimmer: ^1.1.1 | ||||
flutter_swiper : ^1.1.6 | flutter_swiper : ^1.1.6 | ||||
provider: ^4.0.0 | provider: ^4.0.0 | ||||
bloc: ^4.0.0 | |||||
flutter_bloc: ^4.0.1 | |||||
dev_dependencies: | dev_dependencies: | ||||
flutter_test: | flutter_test: | ||||