@@ -25,12 +25,24 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.0" | "languageVersion": "2.0" | ||||
}, | }, | ||||
{ | |||||
"name": "cached_network_image", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/cached_network_image-2.2.0+1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.1" | |||||
}, | |||||
{ | { | ||||
"name": "charcode", | "name": "charcode", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.2", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/charcode-1.1.2", | ||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "1.0" | "languageVersion": "1.0" | ||||
}, | }, | ||||
{ | |||||
"name": "clock", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/clock-1.0.1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | { | ||||
"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", | ||||
@@ -67,18 +79,42 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.4" | "languageVersion": "2.4" | ||||
}, | }, | ||||
{ | |||||
"name": "file", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/file-5.2.1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.2" | |||||
}, | |||||
{ | { | ||||
"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_cache_manager", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/flutter_cache_manager-1.4.1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.6" | |||||
}, | |||||
{ | { | ||||
"name": "flutter_native_image", | "name": "flutter_native_image", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/flutter_native_image-0.0.5+2", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/flutter_native_image-0.0.5+2", | ||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "1.19" | "languageVersion": "1.19" | ||||
}, | }, | ||||
{ | |||||
"name": "flutter_page_indicator", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/flutter_page_indicator-0.0.3", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | |||||
"name": "flutter_swiper", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/flutter_swiper-1.1.6", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | { | ||||
"name": "flutter_test", | "name": "flutter_test", | ||||
"rootUri": "file:///Users/fnuser/Documents/flutter-sdk/packages/flutter_test", | "rootUri": "file:///Users/fnuser/Documents/flutter-sdk/packages/flutter_test", | ||||
@@ -97,6 +133,12 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.7" | "languageVersion": "2.7" | ||||
}, | }, | ||||
{ | |||||
"name": "http", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/http-0.12.2", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.4" | |||||
}, | |||||
{ | { | ||||
"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", | ||||
@@ -109,6 +151,12 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.0" | "languageVersion": "2.0" | ||||
}, | }, | ||||
{ | |||||
"name": "intl", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/intl-0.16.1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.5" | |||||
}, | |||||
{ | { | ||||
"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", | ||||
@@ -133,6 +181,30 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.0" | "languageVersion": "2.0" | ||||
}, | }, | ||||
{ | |||||
"name": "path_provider", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/path_provider-1.6.14", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.1" | |||||
}, | |||||
{ | |||||
"name": "path_provider_linux", | |||||
"rootUri": "file:///Users/fnuser/.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:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/path_provider_macos-0.0.4+3", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.1" | |||||
}, | |||||
{ | |||||
"name": "path_provider_platform_interface", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/path_provider_platform_interface-1.0.3", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.1" | |||||
}, | |||||
{ | { | ||||
"name": "pedantic", | "name": "pedantic", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.8.0+1", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/pedantic-1.8.0+1", | ||||
@@ -145,18 +217,42 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.4" | "languageVersion": "2.4" | ||||
}, | }, | ||||
{ | |||||
"name": "platform", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/platform-2.2.1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "1.24" | |||||
}, | |||||
{ | { | ||||
"name": "plugin_platform_interface", | "name": "plugin_platform_interface", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/plugin_platform_interface-1.0.2", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/plugin_platform_interface-1.0.2", | ||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.1" | "languageVersion": "2.1" | ||||
}, | }, | ||||
{ | |||||
"name": "process", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/process-3.0.13", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | { | ||||
"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", | ||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.0" | "languageVersion": "2.0" | ||||
}, | }, | ||||
{ | |||||
"name": "rxdart", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/rxdart-0.24.1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.6" | |||||
}, | |||||
{ | |||||
"name": "shimmer", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/shimmer-1.1.1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "1.20" | |||||
}, | |||||
{ | { | ||||
"name": "sky_engine", | "name": "sky_engine", | ||||
"rootUri": "file:///Users/fnuser/Documents/flutter-sdk/bin/cache/pkg/sky_engine", | "rootUri": "file:///Users/fnuser/Documents/flutter-sdk/bin/cache/pkg/sky_engine", | ||||
@@ -169,6 +265,18 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "1.8" | "languageVersion": "1.8" | ||||
}, | }, | ||||
{ | |||||
"name": "sqflite", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/sqflite-1.3.1+1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.7" | |||||
}, | |||||
{ | |||||
"name": "sqflite_common", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/sqflite_common-1.0.2+1", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.7" | |||||
}, | |||||
{ | { | ||||
"name": "stack_trace", | "name": "stack_trace", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/stack_trace-1.9.3", | ||||
@@ -187,6 +295,12 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.0" | "languageVersion": "2.0" | ||||
}, | }, | ||||
{ | |||||
"name": "synchronized", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/synchronized-2.2.0", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.6" | |||||
}, | |||||
{ | { | ||||
"name": "term_glyph", | "name": "term_glyph", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.1.0", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/term_glyph-1.1.0", | ||||
@@ -199,18 +313,36 @@ | |||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.2" | "languageVersion": "2.2" | ||||
}, | }, | ||||
{ | |||||
"name": "transformer_page_view", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/transformer_page_view-0.1.6", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.0" | |||||
}, | |||||
{ | { | ||||
"name": "typed_data", | "name": "typed_data", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/typed_data-1.1.6", | ||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.0" | "languageVersion": "2.0" | ||||
}, | }, | ||||
{ | |||||
"name": "uuid", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/uuid-2.2.2", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.2" | |||||
}, | |||||
{ | { | ||||
"name": "vector_math", | "name": "vector_math", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.8", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/vector_math-2.0.8", | ||||
"packageUri": "lib/", | "packageUri": "lib/", | ||||
"languageVersion": "2.0" | "languageVersion": "2.0" | ||||
}, | }, | ||||
{ | |||||
"name": "xdg_directories", | |||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/xdg_directories-0.1.0", | |||||
"packageUri": "lib/", | |||||
"languageVersion": "2.3" | |||||
}, | |||||
{ | { | ||||
"name": "xml", | "name": "xml", | ||||
"rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/xml-3.5.0", | "rootUri": "file:///Users/fnuser/.pub-cache/hosted/pub.flutter-io.cn/xml-3.5.0", | ||||
@@ -230,7 +362,7 @@ | |||||
"languageVersion": "2.1" | "languageVersion": "2.1" | ||||
} | } | ||||
], | ], | ||||
"generated": "2020-09-02T07:15:29.704979Z", | "generated": "2020-09-03T03:05:08.224004Z", | ||||
"generator": "pub", | "generator": "pub", | ||||
"generatorVersion": "2.7.2" | "generatorVersion": "2.7.2" | ||||
} | } |
@@ -34,7 +34,7 @@ android { | |||||
defaultConfig { | defaultConfig { | ||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). | ||||
applicationId "cn.zhios.zhiying_base_widget_example" | applicationId "cn.zhios.zhiying_base_widget_example" | ||||
minSdkVersion 16 | minSdkVersion 19 | ||||
targetSdkVersion 28 | targetSdkVersion 28 | ||||
versionCode flutterVersionCode.toInteger() | versionCode flutterVersionCode.toInteger() | ||||
versionName flutterVersionName | versionName flutterVersionName | ||||
@@ -0,0 +1,85 @@ | |||||
PODS: | |||||
- device_info (0.0.1): | |||||
- Flutter | |||||
- Flutter (1.0.0) | |||||
- flutter_native_image (0.0.1): | |||||
- Flutter | |||||
- fluttertoast (0.0.2): | |||||
- Flutter | |||||
- FMDB (2.7.5): | |||||
- FMDB/standard (= 2.7.5) | |||||
- FMDB/standard (2.7.5) | |||||
- package_info (0.0.1): | |||||
- Flutter | |||||
- path_provider (0.0.1): | |||||
- Flutter | |||||
- path_provider_linux (0.0.1): | |||||
- Flutter | |||||
- path_provider_macos (0.0.1): | |||||
- Flutter | |||||
- sqflite (0.0.1): | |||||
- Flutter | |||||
- FMDB (~> 2.7.2) | |||||
- zhiying_base_widget (0.0.1): | |||||
- Flutter | |||||
- zhiying_comm (0.0.1): | |||||
- Flutter | |||||
DEPENDENCIES: | |||||
- device_info (from `.symlinks/plugins/device_info/ios`) | |||||
- Flutter (from `Flutter`) | |||||
- flutter_native_image (from `.symlinks/plugins/flutter_native_image/ios`) | |||||
- fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) | |||||
- package_info (from `.symlinks/plugins/package_info/ios`) | |||||
- path_provider (from `.symlinks/plugins/path_provider/ios`) | |||||
- path_provider_linux (from `.symlinks/plugins/path_provider_linux/ios`) | |||||
- path_provider_macos (from `.symlinks/plugins/path_provider_macos/ios`) | |||||
- sqflite (from `.symlinks/plugins/sqflite/ios`) | |||||
- zhiying_base_widget (from `.symlinks/plugins/zhiying_base_widget/ios`) | |||||
- zhiying_comm (from `.symlinks/plugins/zhiying_comm/ios`) | |||||
SPEC REPOS: | |||||
trunk: | |||||
- FMDB | |||||
EXTERNAL SOURCES: | |||||
device_info: | |||||
:path: ".symlinks/plugins/device_info/ios" | |||||
Flutter: | |||||
:path: Flutter | |||||
flutter_native_image: | |||||
:path: ".symlinks/plugins/flutter_native_image/ios" | |||||
fluttertoast: | |||||
:path: ".symlinks/plugins/fluttertoast/ios" | |||||
package_info: | |||||
:path: ".symlinks/plugins/package_info/ios" | |||||
path_provider: | |||||
:path: ".symlinks/plugins/path_provider/ios" | |||||
path_provider_linux: | |||||
:path: ".symlinks/plugins/path_provider_linux/ios" | |||||
path_provider_macos: | |||||
:path: ".symlinks/plugins/path_provider_macos/ios" | |||||
sqflite: | |||||
:path: ".symlinks/plugins/sqflite/ios" | |||||
zhiying_base_widget: | |||||
:path: ".symlinks/plugins/zhiying_base_widget/ios" | |||||
zhiying_comm: | |||||
:path: ".symlinks/plugins/zhiying_comm/ios" | |||||
SPEC CHECKSUMS: | |||||
device_info: d7d233b645a32c40dfdc212de5cf646ca482f175 | |||||
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec | |||||
flutter_native_image: 9c0b7451838484458e5b0fae007b86a4c2d4bdfe | |||||
fluttertoast: b644586ef3b16f67fae9a1f8754cef6b2d6b634b | |||||
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a | |||||
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 | |||||
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c | |||||
path_provider_linux: 4d630dc393e1f20364f3e3b4a2ff41d9674a84e4 | |||||
path_provider_macos: f760a3c5b04357c380e2fddb6f9db6f3015897e0 | |||||
sqflite: 4001a31ff81d210346b500c55b17f4d6c7589dd0 | |||||
zhiying_base_widget: 00868c0d2723a3a425c18b27204fbc67e3f7e59d | |||||
zhiying_comm: 0daef4a480f4f4dbea3e11b615f3264aafea924b | |||||
PODFILE CHECKSUM: 3dbe063e9c90a5d7c9e4e76e70a821b9e2c1d271 | |||||
COCOAPODS: 1.9.3 |
@@ -7,6 +7,7 @@ | |||||
objects = { | objects = { | ||||
/* Begin PBXBuildFile section */ | /* Begin PBXBuildFile section */ | ||||
0AE1282E2855C01A7663C354 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = A860D105A09AEA74261219D2 /* libPods-Runner.a */; }; | |||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; | ||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; | ||||
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; | ||||
@@ -40,6 +41,8 @@ | |||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; }; | ||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; }; | ||||
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; }; | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; }; | ||||
3CF5E07C1CDF5F802B057127 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = "<group>"; }; | |||||
5F28AF46041AA2464EF2701A /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = "<group>"; }; | |||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; }; | ||||
7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; }; | ||||
7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; }; | ||||
@@ -52,6 +55,8 @@ | |||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; }; | ||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; }; | ||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; }; | ||||
A860D105A09AEA74261219D2 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; | |||||
E03B6CB558D0A26B049E0718 /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = "<group>"; }; | |||||
/* End PBXFileReference section */ | /* End PBXFileReference section */ | ||||
/* Begin PBXFrameworksBuildPhase section */ | /* Begin PBXFrameworksBuildPhase section */ | ||||
@@ -61,12 +66,24 @@ | |||||
files = ( | files = ( | ||||
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, | ||||
3B80C3941E831B6300D905FE /* App.framework in Frameworks */, | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, | ||||
0AE1282E2855C01A7663C354 /* libPods-Runner.a in Frameworks */, | |||||
); | ); | ||||
runOnlyForDeploymentPostprocessing = 0; | runOnlyForDeploymentPostprocessing = 0; | ||||
}; | }; | ||||
/* End PBXFrameworksBuildPhase section */ | /* End PBXFrameworksBuildPhase section */ | ||||
/* Begin PBXGroup section */ | /* Begin PBXGroup section */ | ||||
54EAFBD2C34CEC37432C9A9A /* Pods */ = { | |||||
isa = PBXGroup; | |||||
children = ( | |||||
5F28AF46041AA2464EF2701A /* Pods-Runner.debug.xcconfig */, | |||||
3CF5E07C1CDF5F802B057127 /* Pods-Runner.release.xcconfig */, | |||||
E03B6CB558D0A26B049E0718 /* Pods-Runner.profile.xcconfig */, | |||||
); | |||||
name = Pods; | |||||
path = Pods; | |||||
sourceTree = "<group>"; | |||||
}; | |||||
9740EEB11CF90186004384FC /* Flutter */ = { | 9740EEB11CF90186004384FC /* Flutter */ = { | ||||
isa = PBXGroup; | isa = PBXGroup; | ||||
children = ( | children = ( | ||||
@@ -86,7 +103,8 @@ | |||||
9740EEB11CF90186004384FC /* Flutter */, | 9740EEB11CF90186004384FC /* Flutter */, | ||||
97C146F01CF9000F007C117D /* Runner */, | 97C146F01CF9000F007C117D /* Runner */, | ||||
97C146EF1CF9000F007C117D /* Products */, | 97C146EF1CF9000F007C117D /* Products */, | ||||
CF3B75C9A7D2FA2A4C99F110 /* Frameworks */, | 54EAFBD2C34CEC37432C9A9A /* Pods */, | ||||
EE1370F94952C6405CCA440D /* Frameworks */, | |||||
); | ); | ||||
sourceTree = "<group>"; | sourceTree = "<group>"; | ||||
}; | }; | ||||
@@ -122,6 +140,14 @@ | |||||
name = "Supporting Files"; | name = "Supporting Files"; | ||||
sourceTree = "<group>"; | sourceTree = "<group>"; | ||||
}; | }; | ||||
EE1370F94952C6405CCA440D /* Frameworks */ = { | |||||
isa = PBXGroup; | |||||
children = ( | |||||
A860D105A09AEA74261219D2 /* libPods-Runner.a */, | |||||
); | |||||
name = Frameworks; | |||||
sourceTree = "<group>"; | |||||
}; | |||||
/* End PBXGroup section */ | /* End PBXGroup section */ | ||||
/* Begin PBXNativeTarget section */ | /* Begin PBXNativeTarget section */ | ||||
@@ -129,12 +155,14 @@ | |||||
isa = PBXNativeTarget; | isa = PBXNativeTarget; | ||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; | ||||
buildPhases = ( | buildPhases = ( | ||||
1C1B5D3A7790D16656F17FFE /* [CP] Check Pods Manifest.lock */, | |||||
9740EEB61CF901F6004384FC /* Run Script */, | 9740EEB61CF901F6004384FC /* Run Script */, | ||||
97C146EA1CF9000F007C117D /* Sources */, | 97C146EA1CF9000F007C117D /* Sources */, | ||||
97C146EB1CF9000F007C117D /* Frameworks */, | 97C146EB1CF9000F007C117D /* Frameworks */, | ||||
97C146EC1CF9000F007C117D /* Resources */, | 97C146EC1CF9000F007C117D /* Resources */, | ||||
9705A1C41CF9048500538489 /* Embed Frameworks */, | 9705A1C41CF9048500538489 /* Embed Frameworks */, | ||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */, | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, | ||||
3DD5E1C6552F1CEFD4C31B18 /* [CP] Embed Pods Frameworks */, | |||||
); | ); | ||||
buildRules = ( | buildRules = ( | ||||
); | ); | ||||
@@ -156,6 +184,8 @@ | |||||
TargetAttributes = { | TargetAttributes = { | ||||
97C146ED1CF9000F007C117D = { | 97C146ED1CF9000F007C117D = { | ||||
CreatedOnToolsVersion = 7.3.1; | CreatedOnToolsVersion = 7.3.1; | ||||
DevelopmentTeam = 3EC5G67BTK; | |||||
ProvisioningStyle = Manual; | |||||
}; | }; | ||||
}; | }; | ||||
}; | }; | ||||
@@ -192,6 +222,28 @@ | |||||
/* End PBXResourcesBuildPhase section */ | /* End PBXResourcesBuildPhase section */ | ||||
/* Begin PBXShellScriptBuildPhase section */ | /* Begin PBXShellScriptBuildPhase section */ | ||||
1C1B5D3A7790D16656F17FFE /* [CP] Check Pods Manifest.lock */ = { | |||||
isa = PBXShellScriptBuildPhase; | |||||
buildActionMask = 2147483647; | |||||
files = ( | |||||
); | |||||
inputFileListPaths = ( | |||||
); | |||||
inputPaths = ( | |||||
"${PODS_PODFILE_DIR_PATH}/Podfile.lock", | |||||
"${PODS_ROOT}/Manifest.lock", | |||||
); | |||||
name = "[CP] Check Pods Manifest.lock"; | |||||
outputFileListPaths = ( | |||||
); | |||||
outputPaths = ( | |||||
"$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", | |||||
); | |||||
runOnlyForDeploymentPostprocessing = 0; | |||||
shellPath = /bin/sh; | |||||
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; | |||||
showEnvVarsInLog = 0; | |||||
}; | |||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { | ||||
isa = PBXShellScriptBuildPhase; | isa = PBXShellScriptBuildPhase; | ||||
buildActionMask = 2147483647; | buildActionMask = 2147483647; | ||||
@@ -206,6 +258,21 @@ | |||||
shellPath = /bin/sh; | shellPath = /bin/sh; | ||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; | ||||
}; | }; | ||||
3DD5E1C6552F1CEFD4C31B18 /* [CP] Embed Pods Frameworks */ = { | |||||
isa = PBXShellScriptBuildPhase; | |||||
buildActionMask = 2147483647; | |||||
files = ( | |||||
); | |||||
inputPaths = ( | |||||
); | |||||
name = "[CP] Embed Pods Frameworks"; | |||||
outputPaths = ( | |||||
); | |||||
runOnlyForDeploymentPostprocessing = 0; | |||||
shellPath = /bin/sh; | |||||
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; | |||||
showEnvVarsInLog = 0; | |||||
}; | |||||
9740EEB61CF901F6004384FC /* Run Script */ = { | 9740EEB61CF901F6004384FC /* Run Script */ = { | ||||
isa = PBXShellScriptBuildPhase; | isa = PBXShellScriptBuildPhase; | ||||
buildActionMask = 2147483647; | buildActionMask = 2147483647; | ||||
@@ -311,7 +378,9 @@ | |||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | ||||
buildSettings = { | buildSettings = { | ||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||||
CODE_SIGN_STYLE = Manual; | |||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; | ||||
DEVELOPMENT_TEAM = 3EC5G67BTK; | |||||
ENABLE_BITCODE = NO; | ENABLE_BITCODE = NO; | ||||
FRAMEWORK_SEARCH_PATHS = ( | FRAMEWORK_SEARCH_PATHS = ( | ||||
"$(inherited)", | "$(inherited)", | ||||
@@ -323,8 +392,9 @@ | |||||
"$(inherited)", | "$(inherited)", | ||||
"$(PROJECT_DIR)/Flutter", | "$(PROJECT_DIR)/Flutter", | ||||
); | ); | ||||
PRODUCT_BUNDLE_IDENTIFIER = cn.zhios.zhiyingBaseWidgetExample; | PRODUCT_BUNDLE_IDENTIFIER = cn.shengfen.Fm; | ||||
PRODUCT_NAME = "$(TARGET_NAME)"; | PRODUCT_NAME = "$(TARGET_NAME)"; | ||||
PROVISIONING_PROFILE_SPECIFIER = shengFenFMTest; | |||||
VERSIONING_SYSTEM = "apple-generic"; | VERSIONING_SYSTEM = "apple-generic"; | ||||
}; | }; | ||||
name = Profile; | name = Profile; | ||||
@@ -441,7 +511,9 @@ | |||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; | ||||
buildSettings = { | buildSettings = { | ||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||||
CODE_SIGN_STYLE = Manual; | |||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; | ||||
DEVELOPMENT_TEAM = 3EC5G67BTK; | |||||
ENABLE_BITCODE = NO; | ENABLE_BITCODE = NO; | ||||
FRAMEWORK_SEARCH_PATHS = ( | FRAMEWORK_SEARCH_PATHS = ( | ||||
"$(inherited)", | "$(inherited)", | ||||
@@ -453,8 +525,9 @@ | |||||
"$(inherited)", | "$(inherited)", | ||||
"$(PROJECT_DIR)/Flutter", | "$(PROJECT_DIR)/Flutter", | ||||
); | ); | ||||
PRODUCT_BUNDLE_IDENTIFIER = cn.zhios.zhiyingBaseWidgetExample; | PRODUCT_BUNDLE_IDENTIFIER = cn.shengfen.Fm; | ||||
PRODUCT_NAME = "$(TARGET_NAME)"; | PRODUCT_NAME = "$(TARGET_NAME)"; | ||||
PROVISIONING_PROFILE_SPECIFIER = shengFenFMTest; | |||||
VERSIONING_SYSTEM = "apple-generic"; | VERSIONING_SYSTEM = "apple-generic"; | ||||
}; | }; | ||||
name = Debug; | name = Debug; | ||||
@@ -464,7 +537,9 @@ | |||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; | ||||
buildSettings = { | buildSettings = { | ||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; | ||||
CODE_SIGN_STYLE = Manual; | |||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; | ||||
DEVELOPMENT_TEAM = 3EC5G67BTK; | |||||
ENABLE_BITCODE = NO; | ENABLE_BITCODE = NO; | ||||
FRAMEWORK_SEARCH_PATHS = ( | FRAMEWORK_SEARCH_PATHS = ( | ||||
"$(inherited)", | "$(inherited)", | ||||
@@ -476,8 +551,9 @@ | |||||
"$(inherited)", | "$(inherited)", | ||||
"$(PROJECT_DIR)/Flutter", | "$(PROJECT_DIR)/Flutter", | ||||
); | ); | ||||
PRODUCT_BUNDLE_IDENTIFIER = cn.zhios.zhiyingBaseWidgetExample; | PRODUCT_BUNDLE_IDENTIFIER = cn.shengfen.Fm; | ||||
PRODUCT_NAME = "$(TARGET_NAME)"; | PRODUCT_NAME = "$(TARGET_NAME)"; | ||||
PROVISIONING_PROFILE_SPECIFIER = shengFenFMTest; | |||||
VERSIONING_SYSTEM = "apple-generic"; | VERSIONING_SYSTEM = "apple-generic"; | ||||
}; | }; | ||||
name = Release; | name = Release; | ||||
@@ -4,4 +4,7 @@ | |||||
<FileRef | <FileRef | ||||
location = "group:Runner.xcodeproj"> | location = "group:Runner.xcodeproj"> | ||||
</FileRef> | </FileRef> | ||||
<FileRef | |||||
location = "group:Pods/Pods.xcodeproj"> | |||||
</FileRef> | |||||
</Workspace> | </Workspace> |
@@ -0,0 +1,8 @@ | |||||
<?xml version="1.0" encoding="UTF-8"?> | |||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |||||
<plist version="1.0"> | |||||
<dict> | |||||
<key>IDEDidComputeMac32BitWarning</key> | |||||
<true/> | |||||
</dict> | |||||
</plist> |
@@ -1,8 +1,7 @@ | |||||
import 'package:flutter/material.dart'; | import 'package:flutter/material.dart'; | ||||
import 'dart:async'; | |||||
import 'package:flutter/services.dart'; | import 'package:zhiying_base_widget/pages/home_page.dart'; | ||||
import 'package:zhiying_base_widget/zhiying_base_widget.dart'; | import 'package:zhiying_base_widget/register.dart'; | ||||
void main() => runApp(MyApp()); | void main() => runApp(MyApp()); | ||||
@@ -12,45 +11,16 @@ class MyApp extends StatefulWidget { | |||||
} | } | ||||
class _MyAppState extends State<MyApp> { | class _MyAppState extends State<MyApp> { | ||||
String _platformVersion = 'Unknown'; | |||||
@override | @override | ||||
void initState() { | void initState() { | ||||
super.initState(); | super.initState(); | ||||
initPlatformState(); | BaseWidgetRegister.init(); | ||||
} | |||||
// Platform messages are asynchronous, so we initialize in an async method. | |||||
Future<void> initPlatformState() async { | |||||
String platformVersion; | |||||
// Platform messages may fail, so we use a try/catch PlatformException. | |||||
try { | |||||
platformVersion = await ZhiyingBaseWidget.platformVersion; | |||||
} on PlatformException { | |||||
platformVersion = 'Failed to get platform version.'; | |||||
} | |||||
// If the widget was removed from the tree while the asynchronous platform | |||||
// message was in flight, we want to discard the reply rather than calling | |||||
// setState to update our non-existent appearance. | |||||
if (!mounted) return; | |||||
setState(() { | |||||
_platformVersion = platformVersion; | |||||
}); | |||||
} | } | ||||
@override | @override | ||||
Widget build(BuildContext context) { | Widget build(BuildContext context) { | ||||
return MaterialApp( | return MaterialApp( | ||||
home: Scaffold( | home: HomePage(), | ||||
appBar: AppBar( | |||||
title: const Text('Plugin example app'), | |||||
), | |||||
body: Center( | |||||
child: Text('Running on: $_platformVersion\n'), | |||||
), | |||||
), | |||||
); | ); | ||||
} | } | ||||
} | } |
@@ -20,6 +20,9 @@ dev_dependencies: | |||||
zhiying_base_widget: | zhiying_base_widget: | ||||
path: ../ | path: ../ | ||||
zhiying_comm: | |||||
path: ../../zhiying_comm | |||||
# For information on the generic Dart part of this file, see the | # For information on the generic Dart part of this file, see the | ||||
# following page: https://dart.dev/tools/pub/pubspec | # following page: https://dart.dev/tools/pub/pubspec | ||||
@@ -1,4 +1,7 @@ | |||||
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:zhiying_base_widget/pages/main_page.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | import 'package:zhiying_comm/zhiying_comm.dart'; | ||||
class HomePage extends StatefulWidget { | class HomePage extends StatefulWidget { | ||||
@@ -9,21 +12,66 @@ class HomePage extends StatefulWidget { | |||||
} | } | ||||
class _HomePageState extends State<HomePage> { | class _HomePageState extends State<HomePage> { | ||||
int _currentIndex = 0; | |||||
List<String> _tab = List(); | |||||
List<Widget> _contentWidgets = List(); | |||||
@override | |||||
void initState() { | |||||
_tab.add('首页'); | |||||
_tab.add('个人中心'); | |||||
_contentWidgets = _tab.map((item) { | |||||
return PageFactory.create('mainPage', Map()); | |||||
}).toList(); | |||||
super.initState(); | |||||
} | |||||
@override | @override | ||||
Widget build(BuildContext context) { | Widget build(BuildContext context) { | ||||
print('home_page build'); | |||||
return Scaffold( | return Scaffold( | ||||
appBar: AppBar( | body: IndexedStack( | ||||
title: Text('首页'), | index: _currentIndex, | ||||
), | children: _contentWidgets, | ||||
body: Container( | |||||
width: double.infinity, | |||||
height: double.infinity, | |||||
child: Column( | |||||
children: <Widget>[ | |||||
WidgetFactory.create('home_banner', Map<String, dynamic>()) | |||||
], | |||||
), | ), | ||||
), | //底部导航栏 | ||||
); | bottomNavigationBar: createBottomNavigationBar()); | ||||
} | |||||
Widget createBottomNavigationBar() { | |||||
List<BottomNavigationBarItem> items = List<BottomNavigationBarItem>(); | |||||
for (int i = 0; i < _tab.length; i++) { | |||||
items.add(BottomNavigationBarItem( | |||||
icon: Container( | |||||
width: 24, | |||||
height: 24, | |||||
margin: EdgeInsets.only(bottom: 4), | |||||
child: CachedNetworkImage( | |||||
imageUrl: | |||||
"http://www.hairuyi.com/Upload/slide/1594279903_1_0.png", | |||||
fit: BoxFit.fitWidth, | |||||
), | |||||
), | |||||
title: Text('tab2'))); | |||||
} | |||||
if (items.length < 2) { | |||||
return Container(); | |||||
} | |||||
return BottomNavigationBar( | |||||
backgroundColor: Colors.white, | |||||
type: BottomNavigationBarType.fixed, | |||||
selectedFontSize: 11, | |||||
unselectedFontSize: 11, | |||||
currentIndex: _currentIndex, | |||||
elevation: 0, | |||||
onTap: ((index) { | |||||
setState(() { | |||||
_currentIndex = index; | |||||
}); | |||||
}), | |||||
//底部导航栏 | |||||
items: items); | |||||
} | } | ||||
} | } |
@@ -0,0 +1,63 @@ | |||||
import 'package:flutter/cupertino.dart'; | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
class MainPage extends StatefulWidget { | |||||
MainPage({Key key}) : super(key: key); | |||||
@override | |||||
_MainPageState createState() => _MainPageState(); | |||||
} | |||||
class _MainPageState extends State<MainPage> { | |||||
WidgetType _type = WidgetType.skeleton; | |||||
@override | |||||
void initState() { | |||||
_reload(); | |||||
super.initState(); | |||||
} | |||||
void _reload() { | |||||
setState(() { | |||||
_type = WidgetType.skeleton; | |||||
}); | |||||
Future.delayed(Duration(seconds: 3), () { | |||||
setState(() { | |||||
_type = WidgetType.normal; | |||||
}); | |||||
}); | |||||
} | |||||
List<Widget> _createContent() { | |||||
List<Widget> list = List(); | |||||
list.add(SliverToBoxAdapter( | |||||
child: RaisedButton( | |||||
onPressed: _reload, | |||||
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)); | |||||
return list; | |||||
} | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
print('build'); | |||||
return Scaffold( | |||||
backgroundColor: Color(0xfff9f9f9), | |||||
body: SafeArea( | |||||
child: Container( | |||||
child: CustomScrollView( | |||||
slivers: _createContent(), | |||||
))), | |||||
); | |||||
} | |||||
} |
@@ -1,4 +1,6 @@ | |||||
import 'package:zhiying_base_widget/widgets/home_banner.dart'; | import 'package:zhiying_base_widget/pages/main_page.dart'; | ||||
import 'package:zhiying_base_widget/widgets/goods_list/goods_list_creater.dart'; | |||||
import 'package:zhiying_base_widget/widgets/home_banner/home_banner_creater.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | import 'package:zhiying_comm/zhiying_comm.dart'; | ||||
import 'package:zhiying_base_widget/pages/home_page.dart'; | import 'package:zhiying_base_widget/pages/home_page.dart'; | ||||
@@ -12,10 +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()); | |||||
} | } | ||||
// 注册控件 | // 注册控件 | ||||
static void registWidgets() { | static void registWidgets() { | ||||
WidgetFactory.regist('home_banner', (model) => HomeBanner()); | WidgetFactory.regist('home_banner', HomeBannerCreater()); | ||||
WidgetFactory.regist('home_goods', GoodsListCreater()); | |||||
} | } | ||||
} | } |
@@ -0,0 +1,16 @@ | |||||
import 'package:flutter/cupertino.dart'; | |||||
import 'package:flutter/material.dart'; | |||||
class GoodsList extends StatefulWidget { | |||||
GoodsList({Key key}) : super(key: key); | |||||
@override | |||||
_GoodsListState createState() => _GoodsListState(); | |||||
} | |||||
class _GoodsListState extends State<GoodsList> { | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Container(); | |||||
} | |||||
} |
@@ -0,0 +1,72 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
class GoodsListCreater extends WidgetCreater { | |||||
@override | |||||
List<Widget> createWidgets(Map<String, dynamic> model) { | |||||
return [ | |||||
_createHeader(), | |||||
_createBody(), | |||||
]; | |||||
} | |||||
@override | |||||
List<Widget> createSkeleton(Map<String, dynamic> model) { | |||||
return []; | |||||
} | |||||
Widget _createHeader() { | |||||
return SliverPersistentHeader( | |||||
pinned: true, | |||||
floating: false, | |||||
delegate: MySliverPersistentHeaderDelegate(), | |||||
); | |||||
} | |||||
Widget _createBody() { | |||||
// return SliverGrid( | |||||
// gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( | |||||
// crossAxisCount: 3, crossAxisSpacing: 5, mainAxisSpacing: 3), | |||||
// delegate: SliverChildBuilderDelegate((BuildContext context, int index) { | |||||
// return Container( | |||||
// color: Colors.primaries[index % Colors.primaries.length], | |||||
// ); | |||||
// }, childCount: 20), | |||||
// ); | |||||
return SliverList( | |||||
delegate: SliverChildListDelegate(List<Widget>.generate(30, (index) { | |||||
return Container( | |||||
width: double.infinity, | |||||
height: 60, | |||||
color: Colors.primaries[index % Colors.primaries.length], | |||||
); | |||||
}))); | |||||
} | |||||
@override | |||||
bool isSliverChild() { | |||||
return true; | |||||
} | |||||
} | |||||
class MySliverPersistentHeaderDelegate extends SliverPersistentHeaderDelegate { | |||||
@override | |||||
Widget build( | |||||
BuildContext context, double shrinkOffset, bool overlapsContent) { | |||||
return Container( | |||||
color: Colors.red, | |||||
alignment: Alignment.center, | |||||
child: Text('222222', style: TextStyle(color: Colors.white))); | |||||
} | |||||
@override | |||||
double get maxExtent => 100.0; | |||||
@override | |||||
double get minExtent => 100.0; | |||||
@override | |||||
bool shouldRebuild(SliverPersistentHeaderDelegate oldDelegate) => | |||||
false; // 如果内容需要更新,设置为true | |||||
} |
@@ -1,14 +0,0 @@ | |||||
import 'package:flutter/material.dart'; | |||||
class HomeBanner extends StatelessWidget { | |||||
const HomeBanner({Key key}) : super(key: key); | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Container( | |||||
width: double.infinity, | |||||
height: 200, | |||||
color: Colors.redAccent, | |||||
); | |||||
} | |||||
} |
@@ -0,0 +1,30 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
import 'package:flutter_swiper/flutter_swiper.dart'; | |||||
class HomeBanner extends StatelessWidget { | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Container( | |||||
width: double.infinity, | |||||
height: 200, | |||||
child: Swiper( | |||||
itemBuilder: (BuildContext context, int index) { | |||||
// return new Image.network( | |||||
// "http://via.placeholder.com/350x150", | |||||
// fit: BoxFit.fill, | |||||
// ); | |||||
return Container(); | |||||
}, | |||||
itemCount: 3, | |||||
pagination: new SwiperPagination(), | |||||
control: new SwiperControl(), | |||||
onTap: (index) { | |||||
Map<String, dynamic> model = Map(); | |||||
model['name'] = '123'; | |||||
RouterUtil.route(model, context); | |||||
}, | |||||
), | |||||
); | |||||
} | |||||
} |
@@ -0,0 +1,16 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:zhiying_base_widget/widgets/home_banner/home_banner.dart'; | |||||
import 'package:zhiying_base_widget/widgets/home_banner/home_banner_sk.dart'; | |||||
import 'package:zhiying_comm/zhiying_comm.dart'; | |||||
class HomeBannerCreater extends WidgetCreater { | |||||
@override | |||||
List<Widget> createSkeleton(Map<String, dynamic> model) { | |||||
return [HomeBannerSkeleton()]; | |||||
} | |||||
@override | |||||
List<Widget> createWidgets(Map<String, dynamic> model) { | |||||
return [HomeBanner()]; | |||||
} | |||||
} |
@@ -0,0 +1,22 @@ | |||||
import 'package:flutter/material.dart'; | |||||
import 'package:shimmer/shimmer.dart'; | |||||
class HomeBannerSkeleton extends StatelessWidget { | |||||
@override | |||||
Widget build(BuildContext context) { | |||||
return Container( | |||||
width: double.infinity, | |||||
height: 200, | |||||
child: Shimmer.fromColors( | |||||
baseColor: Colors.grey[300], | |||||
highlightColor: Colors.grey[100], | |||||
child: Container( | |||||
margin: EdgeInsets.all(10), | |||||
decoration: BoxDecoration( | |||||
color: Colors.white, | |||||
borderRadius: BorderRadius.all(Radius.circular(10))), | |||||
), | |||||
), | |||||
); | |||||
} | |||||
} |
@@ -1,13 +0,0 @@ | |||||
import 'dart:async'; | |||||
import 'package:flutter/services.dart'; | |||||
class ZhiyingBaseWidget { | |||||
static const MethodChannel _channel = | |||||
const MethodChannel('zhiying_base_widget'); | |||||
static Future<String> get platformVersion async { | |||||
final String version = await _channel.invokeMethod('getPlatformVersion'); | |||||
return version; | |||||
} | |||||
} |
@@ -11,6 +11,9 @@ dependencies: | |||||
flutter: | flutter: | ||||
sdk: flutter | sdk: flutter | ||||
shimmer: ^1.1.1 | |||||
flutter_swiper : ^1.1.6 | |||||
dev_dependencies: | dev_dependencies: | ||||
flutter_test: | flutter_test: | ||||
sdk: flutter | sdk: flutter | ||||
@@ -1,6 +1,5 @@ | |||||
import 'package:flutter/services.dart'; | import 'package:flutter/services.dart'; | ||||
import 'package:flutter_test/flutter_test.dart'; | import 'package:flutter_test/flutter_test.dart'; | ||||
import 'package:zhiying_base_widget/zhiying_base_widget.dart'; | |||||
void main() { | void main() { | ||||
const MethodChannel channel = MethodChannel('zhiying_base_widget'); | const MethodChannel channel = MethodChannel('zhiying_base_widget'); | ||||
@@ -17,7 +16,5 @@ void main() { | |||||
channel.setMockMethodCallHandler(null); | channel.setMockMethodCallHandler(null); | ||||
}); | }); | ||||
test('getPlatformVersion', () async { | test('getPlatformVersion', () async {}); | ||||
expect(await ZhiyingBaseWidget.platformVersion, '42'); | |||||
}); | |||||
} | } |