├── .github └── FUNDING.yml ├── .gitignore ├── .metadata ├── AmosERP for Android └── AmosERP_1.2.0.190423_release.apk ├── LICENSE ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ │ └── com │ │ │ │ └── xinwei │ │ │ │ └── flutter_taobao │ │ │ │ └── MainActivity.java │ │ └── res │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── ic_launcher.png │ │ │ ├── mipmap-hdpi │ │ │ ├── ic_launcher.png │ │ │ └── launch_image.png │ │ │ ├── mipmap-ldpi │ │ │ ├── ic_launcher.png │ │ │ └── launch_image.png │ │ │ ├── mipmap-mdpi │ │ │ ├── ic_launcher.png │ │ │ └── launch_image.png │ │ │ ├── mipmap-xhdpi │ │ │ ├── ic_launcher.png │ │ │ └── launch_image.png │ │ │ ├── mipmap-xxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── launch_image.png │ │ │ ├── mipmap-xxxhdpi │ │ │ ├── ic_launcher.png │ │ │ └── launch_image.png │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── key.properties └── settings.gradle ├── images ├── ic_launcher.png ├── ic_launcher.psd ├── icons (3).zip ├── icons (3).zip Folder │ ├── android │ │ ├── ic_launcher.png │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-ldpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ └── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ └── ios │ │ └── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── icon-1024.png │ │ ├── icon-20-ipad.png │ │ ├── icon-20@2x-ipad.png │ │ ├── icon-20@2x.png │ │ ├── icon-20@3x.png │ │ ├── icon-29-ipad.png │ │ ├── icon-29.png │ │ ├── icon-29@2x-ipad.png │ │ ├── icon-29@2x.png │ │ ├── icon-29@3x.png │ │ ├── icon-40.png │ │ ├── icon-40@2x.png │ │ ├── icon-40@3x.png │ │ ├── icon-50.png │ │ ├── icon-50@2x.png │ │ ├── icon-57.png │ │ ├── icon-57@2x.png │ │ ├── icon-60@2x.png │ │ ├── icon-60@3x.png │ │ ├── icon-72.png │ │ ├── icon-72@2x.png │ │ ├── icon-76.png │ │ ├── icon-76@2x.png │ │ └── icon-83.5@2x.png ├── launch_image.png └── launch_image.psd ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Podfile ├── Podfile.lock ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ └── contents.xcworkspacedata │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.h │ ├── AppDelegate.m │ ├── Assets.xcassets │ ├── AppIcon.appiconset │ │ ├── Contents.json │ │ ├── icon-1024.png │ │ ├── icon-20-ipad.png │ │ ├── icon-20@2x-ipad.png │ │ ├── icon-20@2x.png │ │ ├── icon-20@3x.png │ │ ├── icon-29-ipad.png │ │ ├── icon-29.png │ │ ├── icon-29@2x-ipad.png │ │ ├── icon-29@2x.png │ │ ├── icon-29@3x.png │ │ ├── icon-40.png │ │ ├── icon-40@2x.png │ │ ├── icon-40@3x.png │ │ ├── icon-50.png │ │ ├── icon-50@2x.png │ │ ├── icon-57.png │ │ ├── icon-57@2x.png │ │ ├── icon-60@2x.png │ │ ├── icon-60@3x.png │ │ ├── icon-72.png │ │ ├── icon-72@2x.png │ │ ├── icon-76.png │ │ ├── icon-76@2x.png │ │ └── icon-83.5@2x.png │ ├── Contents.json │ ├── IMG_4496.imageset │ │ ├── Contents.json │ │ ├── launch_image@2x.png │ │ └── launch_image@3x.png │ └── launch.imageset │ │ ├── Contents.json │ │ ├── launch_image@2x.png │ │ └── launch_image@3x.png │ ├── Base.lproj │ ├── LaunchScreen.storyboard │ └── Main.storyboard │ ├── Images │ ├── launch_image@2x.png │ └── launch_image@3x.png │ ├── Info.plist │ ├── launch_image@2x.png │ ├── launch_image@3x.png │ └── main.m ├── lib ├── common │ ├── config │ │ └── config.dart │ ├── dao │ │ ├── app_dao.dart │ │ └── dao_result.dart │ ├── data │ │ ├── home.dart │ │ ├── message.dart │ │ ├── my.dart │ │ └── shopping_cart.dart │ ├── model │ │ ├── Release.dart │ │ ├── Release.g.dart │ │ ├── conversation.dart │ │ ├── image.dart │ │ ├── kingkong.dart │ │ ├── order.dart │ │ ├── post.dart │ │ ├── product.dart │ │ ├── search.dart │ │ ├── shopping_cart.dart │ │ └── tab.dart │ ├── services │ │ ├── address.dart │ │ ├── api.dart │ │ ├── code.dart │ │ ├── interceptors │ │ │ ├── error_interceptor.dart │ │ │ ├── header_interceptor.dart │ │ │ ├── log_interceptor.dart │ │ │ └── response_interceptor.dart │ │ ├── meinv.dart │ │ ├── result_data.dart │ │ └── search.dart │ ├── style │ │ └── gzx_style.dart │ └── utils │ │ ├── common_utils.dart │ │ ├── log_util.dart │ │ ├── navigator_utils.dart │ │ ├── provider.dart │ │ ├── screen_util.dart │ │ ├── shared_preferences.dart │ │ └── sql.dart ├── main.dart └── ui │ ├── page │ ├── drawer │ │ └── gzx_filter_goods_page.dart │ ├── gzx_bottom_navigation_bar.dart │ ├── home │ │ ├── home_page.dart │ │ ├── products_page.dart │ │ ├── search_goods_page.dart │ │ ├── search_goods_result_page.dart │ │ ├── search_suggest_page.dart │ │ └── searchlist_page.dart │ ├── message │ │ ├── gzx_chat_page.dart │ │ └── message_page.dart │ ├── my │ │ └── my_page.dart │ ├── shopping_cart │ │ └── shopping_cart_page.dart │ ├── test │ │ ├── AnimateExpanded.dart │ │ ├── ExpansionList.dart │ │ ├── SliverWithTabBar.dart │ │ ├── act_page.dart │ │ ├── demo.dart │ │ ├── gridview_height_page.dart │ │ ├── gzx_dropdown_menu_test_page.dart │ │ ├── my_home_page.dart │ │ ├── scroll_page.dart │ │ ├── scroll_page1.dart │ │ ├── test_page.dart │ │ └── textfield_test_page.dart │ └── weitao │ │ ├── weitao_list_page.dart │ │ └── weitao_page.dart │ ├── tools │ └── arc_clipper.dart │ └── widget │ ├── GZXUserIconWidget.dart │ ├── animation │ └── diff_scale_text.dart │ ├── animation_headlines.dart │ ├── banner.dart │ ├── gzx_card.dart │ ├── gzx_checkbox.dart │ ├── gzx_item_tag.dart │ ├── gzx_quantity_widget.dart │ ├── gzx_search_card.dart │ ├── gzx_searchresult_gridview_widget.dart │ ├── gzx_searchresult_list_widget.dart │ ├── gzx_shopping_cart_item.dart │ ├── gzx_tabbar.dart │ ├── gzx_topbar.dart │ ├── menue.dart │ ├── pull_load │ ├── ListState.dart │ └── PullLoadWidget.dart │ ├── recomend.dart │ └── recommed.dart ├── preview_images ├── thanks.png ├── 微淘.PNG ├── 微淘.gif ├── 微淘1.PNG ├── 我的淘宝.PNG ├── 我的淘宝.gif ├── 我的淘宝1.PNG ├── 搜索.PNG ├── 搜索关键字列表.PNG ├── 搜索宝贝.gif ├── 搜索结果Grid.PNG ├── 搜索结果List.PNG ├── 搜索结果筛选.PNG ├── 搜索结果筛选1.PNG ├── 消息.PNG ├── 消息.gif ├── 聊天.PNG ├── 购物车.PNG ├── 购物车.gif ├── 首页.PNG ├── 首页.gif └── 首页1.PNG ├── pubspec.lock ├── pubspec.yaml ├── static ├── app.db ├── font │ ├── taobao │ │ ├── demo.css │ │ ├── demo_index.html │ │ ├── iconfont.css │ │ ├── iconfont.eot │ │ ├── iconfont.js │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ └── iconfont.woff2 │ └── weixin_font │ │ ├── demo.css │ │ ├── demo_index.html │ │ ├── iconfont.css │ │ ├── iconfont.eot │ │ ├── iconfont.js │ │ ├── iconfont.svg │ │ ├── iconfont.ttf │ │ ├── iconfont.woff │ │ └── iconfont.woff2 └── images │ ├── 3亿红包.png │ ├── 618.png │ ├── 88members.png │ ├── 88vip.png │ ├── apple_home.png │ ├── cainiaoyizhan.png │ ├── card.png │ ├── default_nor_avatar.png │ ├── taobaotoutiao.png │ ├── tmall_easy_buy.png │ ├── 主会场.png │ ├── 主题换肤.png │ ├── 买1享10.png │ ├── 刷脸健康.png │ ├── 可爱猫.jpeg │ ├── 夏装不只5折.png │ ├── 天天红包赛.png │ ├── 客服小蜜.png │ ├── 待付款.png │ ├── 待发货.png │ ├── 待收货.png │ ├── 我的亲情账号.png │ ├── 我的健康.png │ ├── 我的支付宝.png │ ├── 我的淘气值.png │ ├── 我的狂欢.png │ ├── 我的评价.png │ ├── 权益.png │ ├── 每日返现.png │ ├── 花呗.png │ ├── 评价.png │ ├── 退款.png │ ├── 野生小伙伴.png │ ├── 闲置换钱.png │ ├── 阿里宝卡.png │ ├── 领券中心.png │ └── 黄家驹.png └── test └── widget_test.dart /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | github: [GanZhiXiong] 4 | custom: https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/blob/master/preview_images/thanks.png 5 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # Visual Studio Code related 19 | .vscode/ 20 | 21 | # Flutter/Dart/Pub related 22 | **/doc/api/ 23 | .dart_tool/ 24 | .flutter-plugins 25 | .packages 26 | .pub-cache/ 27 | .pub/ 28 | /build/ 29 | 30 | # Android related 31 | **/android/**/gradle-wrapper.jar 32 | **/android/.gradle 33 | **/android/captures/ 34 | **/android/gradlew 35 | **/android/gradlew.bat 36 | **/android/local.properties 37 | **/android/**/GeneratedPluginRegistrant.java 38 | 39 | # iOS/XCode related 40 | **/ios/**/*.mode1v3 41 | **/ios/**/*.mode2v3 42 | **/ios/**/*.moved-aside 43 | **/ios/**/*.pbxuser 44 | **/ios/**/*.perspectivev3 45 | **/ios/**/*sync/ 46 | **/ios/**/.sconsign.dblite 47 | **/ios/**/.tags* 48 | **/ios/**/.vagrant/ 49 | **/ios/**/DerivedData/ 50 | **/ios/**/Icon? 51 | **/ios/**/Pods/ 52 | **/ios/**/.symlinks/ 53 | **/ios/**/profile 54 | **/ios/**/xcuserdata 55 | **/ios/.generated/ 56 | **/ios/Flutter/App.framework 57 | **/ios/Flutter/Flutter.framework 58 | **/ios/Flutter/Generated.xcconfig 59 | **/ios/Flutter/app.flx 60 | **/ios/Flutter/app.zip 61 | **/ios/Flutter/flutter_assets/ 62 | **/ios/ServiceDefinitions.json 63 | **/ios/Runner/GeneratedPluginRegistrant.* 64 | 65 | # Exceptions to above rules. 66 | !**/ios/**/default.mode1v3 67 | !**/ios/**/default.mode2v3 68 | !**/ios/**/default.pbxuser 69 | !**/ios/**/default.perspectivev3 70 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 71 | 72 | android/app/key -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: 8661d8aecd626f7f57ccbcb735553edc05a2e713 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /AmosERP for Android/AmosERP_1.2.0.190423_release.apk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/AmosERP for Android/AmosERP_1.2.0.190423_release.apk -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Flutter淘宝App 2 | > ***让一部分人先看见未来*** 3 | 4 | 前一阵子写了几个基于Flutter开发的App,其中一个已上架到App Store。为了练手和挑战,我利用空闲时间,用Flutter写了一个仿淘宝的App。(仿的是618之前的版本,估计618之后淘宝会恢复原来的版本) 5 | 6 | > 本代码使用更少的第三库,自造轮子可以更深层次的了解Flutter和Dart。 7 | 很多都在问我开发用了多长时间,确切的来说实际开发时间不超过一个星期。 8 | 由于快速开发,且个人也没有太多时间去测试,所以大家运行时如发现问题可以提到Issues,我看看是Flutter的问题还是代码的问题。 9 | 10 | ## 开源不易,麻烦给个Star★吧(☺️右上角点击★Star,轻轻松松,一秒钟🤣)!我会根据大家的关注度和个人时间持续更新代码! 11 | **如你想接收更新消息,你可以Watch下,有问题请提到Issues。** 12 | 13 | **2019-09-06 12:27:27** 14 | 由于最近比较忙,所有对于大家提的Issues不能即使回复,但我有空一定会解决这些Issues的,谢谢🙏🙏🙏! 15 | 16 | ### 相关Repository 17 | [自定义功能强大的下拉筛选菜单flutter package,支持iOS和Android](https://github.com/GanZhiXiong/gzx_dropdown_menu) 18 | ### 相关文章 19 | [掘金](https://juejin.im/user/5cf10106518825189f6fa229/posts) 20 | 21 | # 导航 22 | - [App下载](#app下载) 23 | - [待办事项](#待办事项) 24 | - [Gif效果图](#gif效果图) 25 | - [首页 搜索宝贝](#首页-搜索宝贝) 26 | - [微淘 消息](#微淘-消息) 27 | - [购物车 我的淘宝](#购物车-我的淘宝) 28 | - [示例图片](#示例图片) 29 | - [捐助开发者](#捐助开发者) 30 | 31 | # App下载 32 | Apk二维码,请手机扫描下载安装 33 | 34 | ![](https://www.pgyer.com/app/qrcode/gou_android) 35 | 36 | 没有上架到App Store,这种仿App肯定很难审核通过 37 | # 待办事项 38 | - [ ] 代码整理,性能优化 39 | - [ ] IM 40 | - [ ] 直播 41 | - [ ] .......... 42 | 43 | # Gif效果图 44 | gif图片加载较慢,会有卡顿,而非APP卡顿,可以滑到下面直接看示例图片 45 | ## 首页 搜索宝贝 46 | 47 | 48 | ## 微淘 消息 49 | 50 | 51 | ## 购物车 我的淘宝 52 | 53 | 54 | # 示例图片 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | # 捐助开发者 72 | ![](https://github.com/GanZhiXiong/GZXTaoBaoAppFlutter/blob/master/preview_images/thanks.png) 73 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | *.iml 2 | *.class 3 | .gradle 4 | /local.properties 5 | /.idea/workspace.xml 6 | /.idea/libraries 7 | .DS_Store 8 | /build 9 | /captures 10 | GeneratedPluginRegistrant.java 11 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | def keystorePropertiesFile = rootProject.file("key.properties") 25 | def keystoreProperties = new Properties() 26 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 27 | 28 | apply plugin: 'com.android.application' 29 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 30 | 31 | android { 32 | compileSdkVersion 28 33 | 34 | lintOptions { 35 | disable 'InvalidPackage' 36 | } 37 | 38 | defaultConfig { 39 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 40 | applicationId "com.xinwei.flutter_taobao" 41 | minSdkVersion 16 42 | targetSdkVersion 28 43 | versionCode flutterVersionCode.toInteger() 44 | versionName flutterVersionName 45 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 46 | 47 | //1.解决arm64-v8a引起的闪退,因为没有64位的libflutter.so文件,flutter当前1.0.0版本的问题 48 | ndk { 49 | abiFilters "armeabi", "x86", "armeabi-v7a" 50 | } 51 | } 52 | 53 | signingConfigs { 54 | release { 55 | keyAlias keystoreProperties['keyAlias'] 56 | keyPassword keystoreProperties['keyPassword'] 57 | storeFile file(keystoreProperties['storeFile']) 58 | storePassword keystoreProperties['storePassword'] 59 | } 60 | } 61 | 62 | buildTypes { 63 | debug { 64 | signingConfig signingConfigs.debug 65 | } 66 | release { 67 | // TODO: Add your own signing config for the release build. 68 | // Signing with the debug keys for now, so `flutter run --release` works. 69 | signingConfig signingConfigs.release 70 | } 71 | } 72 | } 73 | 74 | flutter { 75 | source '../..' 76 | } 77 | 78 | dependencies { 79 | testImplementation 'junit:junit:4.12' 80 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 81 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 82 | } 83 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 4 | 8 | 9 | 10 | 11 | 16 | 20 | 27 | 31 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /android/app/src/main/java/com/xinwei/flutter_taobao/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.xinwei.flutter_taobao; 2 | 3 | import android.os.Bundle; 4 | import io.flutter.app.FlutterActivity; 5 | import io.flutter.plugins.GeneratedPluginRegistrant; 6 | 7 | public class MainActivity extends FlutterActivity { 8 | @Override 9 | protected void onCreate(Bundle savedInstanceState) { 10 | super.onCreate(savedInstanceState); 11 | GeneratedPluginRegistrant.registerWith(this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | //这样写可以通过图片铺满整个屏幕,不同屏幕可能会有拉伸 13 | 14 | 15 | -------------------------------------------------------------------------------- /android/app/src/main/res/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/android/app/src/main/res/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/launch_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/android/app/src/main/res/mipmap-hdpi/launch_image.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/android/app/src/main/res/mipmap-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-ldpi/launch_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/android/app/src/main/res/mipmap-ldpi/launch_image.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/launch_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/android/app/src/main/res/mipmap-mdpi/launch_image.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/launch_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/android/app/src/main/res/mipmap-xhdpi/launch_image.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/launch_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/android/app/src/main/res/mipmap-xxhdpi/launch_image.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/launch_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/android/app/src/main/res/mipmap-xxxhdpi/launch_image.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 8 | 9 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | google() 4 | jcenter() 5 | } 6 | 7 | dependencies { 8 | classpath 'com.android.tools.build:gradle:3.2.1' 9 | } 10 | } 11 | 12 | allprojects { 13 | repositories { 14 | google() 15 | jcenter() 16 | } 17 | } 18 | 19 | rootProject.buildDir = '../build' 20 | subprojects { 21 | project.buildDir = "${rootProject.buildDir}/${project.name}" 22 | } 23 | subprojects { 24 | project.evaluationDependsOn(':app') 25 | } 26 | 27 | task clean(type: Delete) { 28 | delete rootProject.buildDir 29 | } 30 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Fri Jun 23 08:50:38 CEST 2017 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip 7 | -------------------------------------------------------------------------------- /android/key.properties: -------------------------------------------------------------------------------- 1 | //输入上一步创建KEY时输入的 密钥库 密码 2 | storePassword=beyond 3 | //输入上一步创建KEY时输入的 密钥 密码 4 | keyPassword=beyond 5 | keyAlias=key 6 | //key.jks的存放路径 7 | storeFile=key/key.jks -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 4 | 5 | def plugins = new Properties() 6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 7 | if (pluginsFile.exists()) { 8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 9 | } 10 | 11 | plugins.each { name, path -> 12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 13 | include ":$name" 14 | project(":$name").projectDir = pluginDirectory 15 | } 16 | -------------------------------------------------------------------------------- /images/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/ic_launcher.png -------------------------------------------------------------------------------- /images/ic_launcher.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/ic_launcher.psd -------------------------------------------------------------------------------- /images/icons (3).zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip -------------------------------------------------------------------------------- /images/icons (3).zip Folder/android/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/android/ic_launcher.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/android/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/android/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/android/mipmap-ldpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/android/mipmap-ldpi/ic_launcher.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/android/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/android/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/android/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/android/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/android/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/android/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/android/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/android/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images": [ 3 | { 4 | "size": "20x20", 5 | "idiom": "iphone", 6 | "filename": "icon-20@2x.png", 7 | "scale": "2x" 8 | }, 9 | { 10 | "size": "20x20", 11 | "idiom": "iphone", 12 | "filename": "icon-20@3x.png", 13 | "scale": "3x" 14 | }, 15 | { 16 | "size": "29x29", 17 | "idiom": "iphone", 18 | "filename": "icon-29.png", 19 | "scale": "1x" 20 | }, 21 | { 22 | "size": "29x29", 23 | "idiom": "iphone", 24 | "filename": "icon-29@2x.png", 25 | "scale": "2x" 26 | }, 27 | { 28 | "size": "29x29", 29 | "idiom": "iphone", 30 | "filename": "icon-29@3x.png", 31 | "scale": "3x" 32 | }, 33 | { 34 | "size": "40x40", 35 | "idiom": "iphone", 36 | "filename": "icon-40@2x.png", 37 | "scale": "2x" 38 | }, 39 | { 40 | "size": "40x40", 41 | "idiom": "iphone", 42 | "filename": "icon-40@3x.png", 43 | "scale": "3x" 44 | }, 45 | { 46 | "size": "57x57", 47 | "idiom": "iphone", 48 | "filename": "icon-57.png", 49 | "scale": "1x" 50 | }, 51 | { 52 | "size": "57x57", 53 | "idiom": "iphone", 54 | "filename": "icon-57@2x.png", 55 | "scale": "2x" 56 | }, 57 | { 58 | "size": "60x60", 59 | "idiom": "iphone", 60 | "filename": "icon-60@2x.png", 61 | "scale": "2x" 62 | }, 63 | { 64 | "size": "60x60", 65 | "idiom": "iphone", 66 | "filename": "icon-60@3x.png", 67 | "scale": "3x" 68 | }, 69 | { 70 | "size": "20x20", 71 | "idiom": "ipad", 72 | "filename": "icon-20-ipad.png", 73 | "scale": "1x" 74 | }, 75 | { 76 | "size": "20x20", 77 | "idiom": "ipad", 78 | "filename": "icon-20@2x-ipad.png", 79 | "scale": "2x" 80 | }, 81 | { 82 | "size": "29x29", 83 | "idiom": "ipad", 84 | "filename": "icon-29-ipad.png", 85 | "scale": "1x" 86 | }, 87 | { 88 | "size": "29x29", 89 | "idiom": "ipad", 90 | "filename": "icon-29@2x-ipad.png", 91 | "scale": "2x" 92 | }, 93 | { 94 | "size": "40x40", 95 | "idiom": "ipad", 96 | "filename": "icon-40.png", 97 | "scale": "1x" 98 | }, 99 | { 100 | "size": "40x40", 101 | "idiom": "ipad", 102 | "filename": "icon-40@2x.png", 103 | "scale": "2x" 104 | }, 105 | { 106 | "size": "50x50", 107 | "idiom": "ipad", 108 | "filename": "icon-50.png", 109 | "scale": "1x" 110 | }, 111 | { 112 | "size": "50x50", 113 | "idiom": "ipad", 114 | "filename": "icon-50@2x.png", 115 | "scale": "2x" 116 | }, 117 | { 118 | "size": "72x72", 119 | "idiom": "ipad", 120 | "filename": "icon-72.png", 121 | "scale": "1x" 122 | }, 123 | { 124 | "size": "72x72", 125 | "idiom": "ipad", 126 | "filename": "icon-72@2x.png", 127 | "scale": "2x" 128 | }, 129 | { 130 | "size": "76x76", 131 | "idiom": "ipad", 132 | "filename": "icon-76.png", 133 | "scale": "1x" 134 | }, 135 | { 136 | "size": "76x76", 137 | "idiom": "ipad", 138 | "filename": "icon-76@2x.png", 139 | "scale": "2x" 140 | }, 141 | { 142 | "size": "83.5x83.5", 143 | "idiom": "ipad", 144 | "filename": "icon-83.5@2x.png", 145 | "scale": "2x" 146 | }, 147 | { 148 | "size": "1024x1024", 149 | "idiom": "ios-marketing", 150 | "filename": "icon-1024.png", 151 | "scale": "1x" 152 | } 153 | ], 154 | "info": { 155 | "version": 1, 156 | "author": "icon.wuruihong.com" 157 | } 158 | } -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-20-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-20-ipad.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-20@2x-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-20@2x-ipad.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-20@2x.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-20@3x.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-29-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-29-ipad.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-29@2x-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-29@2x-ipad.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-50.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-50@2x.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-57.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-57@2x.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-72.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-72@2x.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/icons (3).zip Folder/ios/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /images/launch_image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/launch_image.png -------------------------------------------------------------------------------- /images/launch_image.psd: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/images/launch_image.psd -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | .idea/ 2 | .vagrant/ 3 | .sconsign.dblite 4 | .svn/ 5 | 6 | .DS_Store 7 | *.swp 8 | profile 9 | 10 | DerivedData/ 11 | build/ 12 | GeneratedPluginRegistrant.h 13 | GeneratedPluginRegistrant.m 14 | 15 | .generated/ 16 | 17 | *.pbxuser 18 | *.mode1v3 19 | *.mode2v3 20 | *.perspectivev3 21 | 22 | !default.pbxuser 23 | !default.mode1v3 24 | !default.mode2v3 25 | !default.perspectivev3 26 | 27 | xcuserdata 28 | 29 | *.moved-aside 30 | 31 | *.pyc 32 | *sync/ 33 | Icon? 34 | .tags* 35 | 36 | /Flutter/app.flx 37 | /Flutter/app.zip 38 | /Flutter/flutter_assets/ 39 | /Flutter/App.framework 40 | /Flutter/Flutter.framework 41 | /Flutter/Generated.xcconfig 42 | /ServiceDefinitions.json 43 | 44 | Pods/ 45 | .symlinks/ 46 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '9.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def parse_KV_file(file, separator='=') 14 | file_abs_path = File.expand_path(file) 15 | if !File.exists? file_abs_path 16 | return []; 17 | end 18 | pods_ary = [] 19 | skip_line_start_symbols = ["#", "/"] 20 | File.foreach(file_abs_path) { |line| 21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ } 22 | plugin = line.split(pattern=separator) 23 | if plugin.length == 2 24 | podname = plugin[0].strip() 25 | path = plugin[1].strip() 26 | podpath = File.expand_path("#{path}", file_abs_path) 27 | pods_ary.push({:name => podname, :path => podpath}); 28 | else 29 | puts "Invalid plugin specification: #{line}" 30 | end 31 | } 32 | return pods_ary 33 | end 34 | 35 | target 'Runner' do 36 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock 37 | # referring to absolute paths on developers' machines. 38 | system('rm -rf .symlinks') 39 | system('mkdir -p .symlinks/plugins') 40 | 41 | # Flutter Pods 42 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig') 43 | if generated_xcode_build_settings.empty? 44 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first." 45 | end 46 | generated_xcode_build_settings.map { |p| 47 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR' 48 | symlink = File.join('.symlinks', 'flutter') 49 | File.symlink(File.dirname(p[:path]), symlink) 50 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path])) 51 | end 52 | } 53 | 54 | # Plugin Pods 55 | plugin_pods = parse_KV_file('../.flutter-plugins') 56 | plugin_pods.map { |p| 57 | symlink = File.join('.symlinks', 'plugins', p[:name]) 58 | File.symlink(p[:path], symlink) 59 | pod p[:name], :path => File.join(symlink, 'ios') 60 | } 61 | end 62 | 63 | post_install do |installer| 64 | installer.pods_project.targets.each do |target| 65 | target.build_configurations.each do |config| 66 | config.build_settings['ENABLE_BITCODE'] = 'NO' 67 | end 68 | end 69 | end 70 | -------------------------------------------------------------------------------- /ios/Podfile.lock: -------------------------------------------------------------------------------- 1 | PODS: 2 | - connectivity (0.0.1): 3 | - Flutter 4 | - Reachability 5 | - Flutter (1.0.0) 6 | - flutter_statusbarcolor (0.0.1): 7 | - Flutter 8 | - fluttertoast (0.0.2): 9 | - Flutter 10 | - FMDB (2.7.5): 11 | - FMDB/standard (= 2.7.5) 12 | - FMDB/standard (2.7.5) 13 | - package_info (0.0.1): 14 | - Flutter 15 | - path_provider (0.0.1): 16 | - Flutter 17 | - Reachability (3.2) 18 | - shared_preferences (0.0.1): 19 | - Flutter 20 | - sqflite (0.0.1): 21 | - Flutter 22 | - FMDB (~> 2.7.2) 23 | - url_launcher (0.0.1): 24 | - Flutter 25 | 26 | DEPENDENCIES: 27 | - connectivity (from `.symlinks/plugins/connectivity/ios`) 28 | - Flutter (from `.symlinks/flutter/ios`) 29 | - flutter_statusbarcolor (from `.symlinks/plugins/flutter_statusbarcolor/ios`) 30 | - fluttertoast (from `.symlinks/plugins/fluttertoast/ios`) 31 | - package_info (from `.symlinks/plugins/package_info/ios`) 32 | - path_provider (from `.symlinks/plugins/path_provider/ios`) 33 | - shared_preferences (from `.symlinks/plugins/shared_preferences/ios`) 34 | - sqflite (from `.symlinks/plugins/sqflite/ios`) 35 | - url_launcher (from `.symlinks/plugins/url_launcher/ios`) 36 | 37 | SPEC REPOS: 38 | https://github.com/cocoapods/specs.git: 39 | - FMDB 40 | - Reachability 41 | 42 | EXTERNAL SOURCES: 43 | connectivity: 44 | :path: ".symlinks/plugins/connectivity/ios" 45 | Flutter: 46 | :path: ".symlinks/flutter/ios" 47 | flutter_statusbarcolor: 48 | :path: ".symlinks/plugins/flutter_statusbarcolor/ios" 49 | fluttertoast: 50 | :path: ".symlinks/plugins/fluttertoast/ios" 51 | package_info: 52 | :path: ".symlinks/plugins/package_info/ios" 53 | path_provider: 54 | :path: ".symlinks/plugins/path_provider/ios" 55 | shared_preferences: 56 | :path: ".symlinks/plugins/shared_preferences/ios" 57 | sqflite: 58 | :path: ".symlinks/plugins/sqflite/ios" 59 | url_launcher: 60 | :path: ".symlinks/plugins/url_launcher/ios" 61 | 62 | SPEC CHECKSUMS: 63 | connectivity: d5992e3758d68b1c4b12d6e012fe0813f1aa1645 64 | Flutter: 9d0fac939486c9aba2809b7982dfdbb47a7b0296 65 | flutter_statusbarcolor: ccc8f90efe5e571f817aaed60dac5382d2cec98d 66 | fluttertoast: 0a20dcbbb8ecfd1a61b6285651ff2d5989d033fb 67 | FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a 68 | package_info: d7c98b64f60add4c2908b9d94d82a45d3c8827ad 69 | path_provider: 09407919825bfe3c2deae39453b7a5b44f467873 70 | Reachability: 33e18b67625424e47b6cde6d202dce689ad7af96 71 | shared_preferences: 5a1d487c427ee18fcd3ea1f2a131569481834b53 72 | sqflite: d1612813fa7db7c667bed9f1d1b508deffc56999 73 | url_launcher: 92b89c1029a0373879933c21642958c874539095 74 | 75 | PODFILE CHECKSUM: aff02bfeed411c636180d6812254b2daeea14d09 76 | 77 | COCOAPODS: 1.5.3 78 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | BuildSystemType 6 | Original 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface AppDelegate : FlutterAppDelegate 5 | 6 | @end 7 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.m: -------------------------------------------------------------------------------- 1 | #include "AppDelegate.h" 2 | #include "GeneratedPluginRegistrant.h" 3 | 4 | @implementation AppDelegate 5 | 6 | - (BOOL)application:(UIApplication *)application 7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { 8 | [GeneratedPluginRegistrant registerWithRegistry:self]; 9 | // Override point for customization after application launch. 10 | return [super application:application didFinishLaunchingWithOptions:launchOptions]; 11 | } 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "icon-20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "icon-20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "icon-29.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "icon-29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "icon-29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "icon-40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "icon-40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "57x57", 47 | "idiom" : "iphone", 48 | "filename" : "icon-57.png", 49 | "scale" : "1x" 50 | }, 51 | { 52 | "size" : "57x57", 53 | "idiom" : "iphone", 54 | "filename" : "icon-57@2x.png", 55 | "scale" : "2x" 56 | }, 57 | { 58 | "size" : "60x60", 59 | "idiom" : "iphone", 60 | "filename" : "icon-60@2x.png", 61 | "scale" : "2x" 62 | }, 63 | { 64 | "size" : "60x60", 65 | "idiom" : "iphone", 66 | "filename" : "icon-60@3x.png", 67 | "scale" : "3x" 68 | }, 69 | { 70 | "size" : "20x20", 71 | "idiom" : "ipad", 72 | "filename" : "icon-20-ipad.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "20x20", 77 | "idiom" : "ipad", 78 | "filename" : "icon-20@2x-ipad.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "29x29", 83 | "idiom" : "ipad", 84 | "filename" : "icon-29-ipad.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "29x29", 89 | "idiom" : "ipad", 90 | "filename" : "icon-29@2x-ipad.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "40x40", 95 | "idiom" : "ipad", 96 | "filename" : "icon-40.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "40x40", 101 | "idiom" : "ipad", 102 | "filename" : "icon-40@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "50x50", 107 | "idiom" : "ipad", 108 | "filename" : "icon-50.png", 109 | "scale" : "1x" 110 | }, 111 | { 112 | "size" : "50x50", 113 | "idiom" : "ipad", 114 | "filename" : "icon-50@2x.png", 115 | "scale" : "2x" 116 | }, 117 | { 118 | "size" : "72x72", 119 | "idiom" : "ipad", 120 | "filename" : "icon-72.png", 121 | "scale" : "1x" 122 | }, 123 | { 124 | "size" : "72x72", 125 | "idiom" : "ipad", 126 | "filename" : "icon-72@2x.png", 127 | "scale" : "2x" 128 | }, 129 | { 130 | "size" : "76x76", 131 | "idiom" : "ipad", 132 | "filename" : "icon-76.png", 133 | "scale" : "1x" 134 | }, 135 | { 136 | "size" : "76x76", 137 | "idiom" : "ipad", 138 | "filename" : "icon-76@2x.png", 139 | "scale" : "2x" 140 | }, 141 | { 142 | "size" : "83.5x83.5", 143 | "idiom" : "ipad", 144 | "filename" : "icon-83.5@2x.png", 145 | "scale" : "2x" 146 | }, 147 | { 148 | "size" : "1024x1024", 149 | "idiom" : "ios-marketing", 150 | "filename" : "icon-1024.png", 151 | "scale" : "1x" 152 | } 153 | ], 154 | "info" : { 155 | "version" : 1, 156 | "author" : "xcode" 157 | } 158 | } -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20-ipad.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x-ipad.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-20@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29-ipad.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x-ipad.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-29@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-50.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-50@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-57.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-57@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-72.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-72@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/AppIcon.appiconset/icon-83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "info" : { 3 | "version" : 1, 4 | "author" : "xcode" 5 | } 6 | } -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/IMG_4496.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "iphone", 9 | "filename" : "launch_image@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "iphone", 14 | "filename" : "launch_image@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/IMG_4496.imageset/launch_image@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/IMG_4496.imageset/launch_image@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/IMG_4496.imageset/launch_image@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/IMG_4496.imageset/launch_image@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/launch.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "scale" : "1x" 6 | }, 7 | { 8 | "idiom" : "universal", 9 | "filename" : "launch_image@2x.png", 10 | "scale" : "2x" 11 | }, 12 | { 13 | "idiom" : "universal", 14 | "filename" : "launch_image@3x.png", 15 | "scale" : "3x" 16 | } 17 | ], 18 | "info" : { 19 | "version" : 1, 20 | "author" : "xcode" 21 | } 22 | } -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/launch.imageset/launch_image@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/launch.imageset/launch_image@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/launch.imageset/launch_image@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Assets.xcassets/launch.imageset/launch_image@3x.png -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Images/launch_image@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Images/launch_image@2x.png -------------------------------------------------------------------------------- /ios/Runner/Images/launch_image@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/Images/launch_image@3x.png -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleDisplayName 8 | 购购购 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | 购购购 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | 1.0.1 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /ios/Runner/launch_image@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/launch_image@2x.png -------------------------------------------------------------------------------- /ios/Runner/launch_image@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/ios/Runner/launch_image@3x.png -------------------------------------------------------------------------------- /ios/Runner/main.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "AppDelegate.h" 4 | 5 | int main(int argc, char* argv[]) { 6 | @autoreleasepool { 7 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class])); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/common/config/config.dart: -------------------------------------------------------------------------------- 1 | class Config { 2 | static const PAGE_SIZE = 20; 3 | static const DEBUG = true; 4 | static const USE_NATIVE_WEBVIEW = true; 5 | } 6 | -------------------------------------------------------------------------------- /lib/common/dao/app_dao.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter_taobao/common/config/config.dart'; 4 | import 'package:flutter_taobao/common/model/Release.dart'; 5 | import 'package:flutter_taobao/common/services/address.dart'; 6 | import 'package:flutter_taobao/common/services/api.dart'; 7 | import 'package:flutter_taobao/common/utils/common_utils.dart'; 8 | import 'package:fluttertoast/fluttertoast.dart'; 9 | import 'package:pub_semver/pub_semver.dart'; 10 | import 'package:package_info/package_info.dart'; 11 | import 'dao_result.dart'; 12 | 13 | class AppDao { 14 | /** 15 | * 获取仓库的release列表 16 | */ 17 | static getRepositoryReleaseDao(userName, reposName, page, {needHtml = true, release = true}) async { 18 | String url = release 19 | ? Address.getReposRelease(userName, reposName) + Address.getPageParams("?", page) 20 | : Address.getReposTag(userName, reposName) + Address.getPageParams("?", page); 21 | 22 | var res = await httpManager.netFetch(url, null, 23 | {"Accept": (needHtml ? 'application/vnd.github.html,application/vnd.github.VERSION.raw' : "")}, null); 24 | if (res != null && res.result && res.data.length > 0) { 25 | List list = new List(); 26 | var dataList = res.data; 27 | if (dataList == null || dataList.length == 0) { 28 | return new DataResult(null, false); 29 | } 30 | for (int i = 0; i < dataList.length; i++) { 31 | var data = dataList[i]; 32 | list.add(Release.fromJson(data)); 33 | } 34 | return new DataResult(list, true); 35 | } else { 36 | return new DataResult(null, false); 37 | } 38 | } 39 | 40 | /** 41 | * 版本更新 42 | */ 43 | static getNewsVersion(context, showTip) async { 44 | //ios不检查更新 45 | // if (Platform.isIOS) { 46 | // return; 47 | // } 48 | var res = await getRepositoryReleaseDao("GanZhiXiong", 'GZXTaoBaoAppFlutter', 1, needHtml: false); 49 | if (res != null && res.result && res.data.length > 0) { 50 | Release release = res.data[0]; 51 | String versionName = release.name; 52 | if (versionName != null) { 53 | if (Config.DEBUG) { 54 | print("versionName " + versionName); 55 | } 56 | 57 | PackageInfo packageInfo = await PackageInfo.fromPlatform(); 58 | var appVersion = packageInfo.version; 59 | 60 | if (Config.DEBUG) { 61 | print("appVersion " + appVersion); 62 | } 63 | Version versionNameNum = Version.parse(versionName); 64 | Version currentNum = Version.parse(appVersion); 65 | int result = versionNameNum.compareTo(currentNum); 66 | if (Config.DEBUG) { 67 | print("versionNameNum " + versionNameNum.toString() + " currentNum " + currentNum.toString()); 68 | } 69 | if (Config.DEBUG) { 70 | print("newsHad " + result.toString()); 71 | } 72 | if (result > 0) { 73 | CommonUtils.showUpdateDialog(context, 'V' + release.name + "\n" + release.body); 74 | } else { 75 | if (showTip) Fluttertoast.showToast(msg: '当前没有新版本'); 76 | } 77 | } 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /lib/common/dao/dao_result.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | class DataResult { 4 | var data; 5 | bool result; 6 | Future next; 7 | 8 | DataResult(this.data, this.result, {this.next}); 9 | } 10 | -------------------------------------------------------------------------------- /lib/common/data/message.dart: -------------------------------------------------------------------------------- 1 | List chatRecommendedOperatings = ['客服专线', '优惠券', '猜你喜欢', '订单查询', '店铺上新', '店铺精选']; 2 | -------------------------------------------------------------------------------- /lib/common/data/my.dart: -------------------------------------------------------------------------------- 1 | List myData = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]; 2 | -------------------------------------------------------------------------------- /lib/common/data/shopping_cart.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter_taobao/common/model/order.dart'; 2 | import 'package:flutter_taobao/common/model/shopping_cart.dart'; 3 | 4 | List shoppingCartModels = [ 5 | ShoppingCartModel('华为官方旗舰店', false,true, ShopType.tianMao, [ 6 | OrderModel('https://img.alicdn.com/bao/uploaded/i5/TB1trAMNQPoK1RjSZKb.LB1IXXa_101123.jpg_80x80.jpg', 7 | '【旗舰新品 稀缺货源】Huawei/华为 P30全面屏超感光徕卡三摄变焦', '4G全网通;天空之境;官方标配;8+64GB', 2, 3988, 1), 8 | OrderModel('https://img.alicdn.com/bao/uploaded/i8/TB1uiAYNMHqK1RjSZFkXfd.WFXa_112352.jpg_80x80.jpg', 9 | '【旗舰新品 稀缺货源】Huawei/华为P30 Pro曲面屏超感光徕卡四摄变', '4G全网通;极光色;官方标配;8+512GB', 1, 6788, 1), 10 | ],discounts:'已满99元,享包邮'), 11 | 12 | ShoppingCartModel('小米官方旗舰店', true,false, ShopType.tianMao, [ 13 | OrderModel('https://img.alicdn.com/bao/uploaded/i5/TB1d4D5HQzoK1RjSZFlDP9i4VXa_121840.jpg_80x80.jpg', 14 | '【现货速发】Xiaomi/小米小米9 骁龙855全面屏索尼4800万指纹拍照', '4G+全网通全息幻彩蓝官方标配6+128GB购机送', 5, 2999, 1), 15 | OrderModel('https://img.alicdn.com/bao/uploaded/i5/TB1d4D5HQzoK1RjSZFlDP9i4VXa_121840.jpg_80x80.jpg', 16 | '【现货速发】Xiaomi/小米小米9 骁龙855全面屏索尼4800万指纹拍照', '4G+全网通全息幻彩蓝官方标配8+128GB购机送', 5, 3299, 1), 17 | ],discounts:'已满150包邮'), 18 | ShoppingCartModel('lg金捷专卖店', false,false, ShopType.tianMao, [ 19 | OrderModel('https://img.alicdn.com/bao/uploaded/i1/2074230498/O1CN01lZnjxG1FY7lsf191X_!!0-item_pic.jpg_80x80.jpg', 20 | '【官方自营】LG 27UK650-W 27英寸10bit 电脑 IPS 4K显示器升降', '官方标配;白色', 0, 3099, 1), 21 | ]), 22 | ShoppingCartModel('趣玩黑市', false,false, ShopType.taoBao, [ 23 | OrderModel('https://img.alicdn.com/bao/uploaded/i4/2842363615/O1CN01kOv4AT1cZiIe9i0gp_!!2842363615.jpg_80x80.jpg', 24 | '超大回车键发泄键盘程序员必备神器客服减压午睡枕三合一多功能', '均码;超大回车键', 0, 29, 1), 25 | ]), 26 | ShoppingCartModel('Machome苹果家园上', false,false, ShopType.tianMao, [ 27 | OrderModel('https://img.alicdn.com/bao/uploaded/i3/37656861/O1CN01Xq5z7720YNwJmcPlA_!!37656861.jpg_80x80.jpg', 28 | '2019新款Apple/苹果MacBook Pro MPXQ2CH/A笔记本电脑选配13 15', '19款15/2.3八核i9/16/512银MV932;邮寄;官方标配', 0, 18770, 1), 29 | ]), 30 | ShoppingCartModel('苏宁易购官方旗舰', true,false, ShopType.tianMao, [ 31 | OrderModel('https://img.alicdn.com/bao/uploaded/i5/TB1lpCRDHvpK1RjSZPivk2mwXXa_043412.jpg_80x80.jpg', 32 | '【下单低至4548元】Apple/苹果 iPhone 8 Plus 64G 全网通4G手机 ', '无需合约版;银色;官方标配;64GB', 0, 4688, 1), 33 | ]), 34 | ]; 35 | -------------------------------------------------------------------------------- /lib/common/model/Release.dart: -------------------------------------------------------------------------------- 1 | import 'package:json_annotation/json_annotation.dart'; 2 | 3 | part 'Release.g.dart'; 4 | 5 | @JsonSerializable() 6 | class Release { 7 | int id; 8 | @JsonKey(name: "tag_name") 9 | String tagName; 10 | @JsonKey(name: "target_commitish") 11 | String targetCommitish; 12 | String name; 13 | String body; 14 | @JsonKey(name: "body_html") 15 | String bodyHtml; 16 | @JsonKey(name: "tarball_url") 17 | String tarballUrl; 18 | @JsonKey(name: "zipball_url") 19 | String zipballUrl; 20 | 21 | bool draft; 22 | @JsonKey(name: "prerelease") 23 | bool preRelease; 24 | @JsonKey(name: "created_at") 25 | DateTime createdAt; 26 | @JsonKey(name: "published_at") 27 | DateTime publishedAt; 28 | 29 | // User author; 30 | // List assets; 31 | 32 | Release( 33 | this.id, 34 | this.tagName, 35 | @JsonKey(name: "target_commitish") this.targetCommitish, 36 | this.name, 37 | this.body, 38 | this.bodyHtml, 39 | this.tarballUrl, 40 | this.zipballUrl, 41 | this.draft, 42 | this.preRelease, 43 | this.createdAt, 44 | this.publishedAt, 45 | // this.author, 46 | // this.assets, 47 | ); 48 | 49 | factory Release.fromJson(Map json) => _$ReleaseFromJson(json); 50 | 51 | Map toJson() => _$ReleaseToJson(this); 52 | } 53 | -------------------------------------------------------------------------------- /lib/common/model/Release.g.dart: -------------------------------------------------------------------------------- 1 | // GENERATED CODE - DO NOT MODIFY BY HAND 2 | 3 | part of 'Release.dart'; 4 | 5 | // ************************************************************************** 6 | // JsonSerializableGenerator 7 | // ************************************************************************** 8 | 9 | Release _$ReleaseFromJson(Map json) { 10 | return Release( 11 | json['id'] as int, 12 | json['tag_name'] as String, 13 | json['target_commitish'] as String, 14 | json['name'] as String, 15 | json['body'] as String, 16 | json['body_html'] as String, 17 | json['tarball_url'] as String, 18 | json['zipball_url'] as String, 19 | json['draft'] as bool, 20 | json['prerelease'] as bool, 21 | json['created_at'] == null ? null : DateTime.parse(json['created_at'] as String), 22 | json['published_at'] == null ? null : DateTime.parse(json['published_at'] as String), 23 | ); 24 | } 25 | 26 | Map _$ReleaseToJson(Release instance) => { 27 | 'id': instance.id, 28 | 'tag_name': instance.tagName, 29 | 'target_commitish': instance.targetCommitish, 30 | 'name': instance.name, 31 | 'body': instance.body, 32 | 'body_html': instance.bodyHtml, 33 | 'tarball_url': instance.tarballUrl, 34 | 'zipball_url': instance.zipballUrl, 35 | 'draft': instance.draft, 36 | 'prerelease': instance.preRelease, 37 | 'created_at': instance.createdAt?.toIso8601String(), 38 | 'published_at': instance.publishedAt?.toIso8601String(), 39 | // 'author': instance.author, 40 | // 'assets': instance.assets 41 | }; 42 | -------------------------------------------------------------------------------- /lib/common/model/conversation.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_taobao/common/utils/common_utils.dart'; 3 | import 'package:flutter_taobao/common/utils/sql.dart'; 4 | 5 | class Conversation { 6 | const Conversation( 7 | {@required this.avatar, 8 | @required this.title, 9 | @required this.createAt, 10 | this.type, 11 | this.isMute: false, 12 | this.titleColor: 0xff000000, 13 | this.describtion, 14 | this.unReadMsgCount: 0, 15 | this.displayDot: false, 16 | this.isNetwork: false}) 17 | : assert(avatar != null), 18 | assert(title != null), 19 | assert(createAt != null); 20 | final String avatar; 21 | final String title; 22 | final String describtion; 23 | final String createAt; 24 | final bool isMute; 25 | final int titleColor; 26 | final int unReadMsgCount; 27 | final bool displayDot; 28 | final bool isNetwork; 29 | final String type; 30 | 31 | factory Conversation.fromJson(Map json) { 32 | return Conversation( 33 | avatar: json['picture']['thumbnail'], 34 | createAt: CommonUtils.getTimeDuration(json['registered']['date']), 35 | title: json['name']['first'] + ' ' + json['name']['last'], 36 | describtion: json['location']['timezone']['description'], 37 | unReadMsgCount: json['unReadMsgCount'], 38 | isNetwork: true); 39 | } 40 | } 41 | 42 | class ConversationControlModel { 43 | final String table = 'conversation'; 44 | Sql sql; 45 | 46 | ConversationControlModel() { 47 | sql = Sql.setTable(table); 48 | } 49 | 50 | Future clear() { 51 | return sql.clearTable(table); 52 | } 53 | 54 | Future insert(Conversation conversation) async { 55 | var response = await sql.insert({'avatar': conversation.avatar, 'name': conversation.title}); 56 | return response; 57 | } 58 | 59 | Future> getAllConversation() async { 60 | List list = await sql.getByCondition(); 61 | List resultList = []; 62 | list.forEach((item) { 63 | resultList.add(Conversation.fromJson(item)); 64 | }); 65 | return resultList; 66 | } 67 | } 68 | 69 | List mockConversation = []; 70 | List preConversation = [ 71 | const Conversation(avatar: '', title: '', createAt: '', describtion: ''), 72 | const Conversation( 73 | type: '官方', 74 | avatar: 'static/images/cainiaoyizhan.png', 75 | title: '菜鸟驿站', 76 | titleColor: 0xFF7f3410, 77 | createAt: '09:28', 78 | describtion: '手慢无!抢最高2019元大包', 79 | unReadMsgCount: 2), 80 | const Conversation( 81 | type: '官方', 82 | avatar: 'static/images/taobaotoutiao.png', 83 | title: '淘宝头条', 84 | titleColor: 0xFF7f3410, 85 | createAt: '12:30', 86 | describtion: '这栋老宅被加价5000多万,还说买家赚钱了?', 87 | displayDot: false, 88 | unReadMsgCount: 8), 89 | const Conversation( 90 | type: '官方', 91 | avatar: 'static/images/88members.png', 92 | title: '淘气值', 93 | titleColor: 0xFF7f3410, 94 | createAt: '14:01', 95 | describtion: '88VIP 独家包场免费看《复仇4》', 96 | unReadMsgCount: 10, 97 | ), 98 | const Conversation( 99 | type: '品牌', 100 | avatar: 'static/images/apple_home.png', 101 | title: '苹果家园', 102 | titleColor: 0xFF7f3410, 103 | createAt: '昨天', 104 | describtion: '😂😁🙏☺️💪👍亲,您看中的咨询的产品还没下单,请及时下单付款哟,以便快马加鞭的帮您送达呢 (*^▽^*)', 105 | unReadMsgCount: 5, 106 | ), 107 | ]; 108 | 109 | class Manager { 110 | // 工厂模式 111 | factory Manager() => _getInstance(); 112 | 113 | static Manager get instance => _getInstance(); 114 | static Manager _instance; 115 | bool _hasNewData = false; 116 | 117 | Manager._internal() { 118 | // 初始化 119 | } 120 | 121 | static Manager _getInstance() { 122 | if (_instance == null) { 123 | _instance = new Manager._internal(); 124 | } 125 | return _instance; 126 | } 127 | 128 | setSate(bool hasNewData) { 129 | this._hasNewData = hasNewData; 130 | } 131 | 132 | getState() { 133 | return this._hasNewData; 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /lib/common/model/image.dart: -------------------------------------------------------------------------------- 1 | class ImageModel { 2 | int width; 3 | int height; 4 | String thumb; 5 | 6 | ImageModel({this.height, this.width, this.thumb}); 7 | 8 | ImageModel.fromJSON(dynamic json) 9 | : width = int.parse(json['width']), 10 | height = int.parse(json['height']), 11 | thumb = json['thumb']; 12 | } 13 | -------------------------------------------------------------------------------- /lib/common/model/kingkong.dart: -------------------------------------------------------------------------------- 1 | class KingKongItem { 2 | String href; 3 | String picUrl; 4 | String title; 5 | KingKongItem({this.href, this.picUrl,this.title}); 6 | KingKongItem.fromJson(Map json) 7 | : href = json['href'], 8 | title=json['title'], 9 | picUrl = json['pic_url']; 10 | } 11 | 12 | class KingKongList { 13 | List items; 14 | KingKongList({this.items}); 15 | factory KingKongList.fromJson( dynamic json) { 16 | List list = (json as List).map((i) { 17 | return KingKongItem.fromJson(i); 18 | }).toList(); 19 | return KingKongList(items: list); 20 | } 21 | } -------------------------------------------------------------------------------- /lib/common/model/order.dart: -------------------------------------------------------------------------------- 1 | class OrderModel { 2 | String productImageUrl; 3 | String title; 4 | String configuration; 5 | int amountPurchasing; 6 | double price; 7 | int quantity; 8 | bool isSelected; 9 | 10 | OrderModel(this.productImageUrl, this.title, this.configuration, this.amountPurchasing, this.price, this.quantity, 11 | {this.isSelected = false}); 12 | } 13 | -------------------------------------------------------------------------------- /lib/common/model/post.dart: -------------------------------------------------------------------------------- 1 | class PostModel { 2 | String name; 3 | String logoImage; 4 | String address; 5 | String message; 6 | String messageImage; 7 | int readCout; 8 | int likesCount; 9 | int commentsCount; 10 | String postTime; 11 | List photos; 12 | bool isLike; 13 | 14 | PostModel( 15 | {this.name, 16 | this.logoImage, 17 | this.address, 18 | this.message, 19 | this.commentsCount, 20 | this.likesCount, 21 | this.messageImage, 22 | this.postTime, 23 | this.photos,this.readCout,this.isLike}); 24 | } 25 | -------------------------------------------------------------------------------- /lib/common/model/product.dart: -------------------------------------------------------------------------------- 1 | class ProductItemModel { 2 | String jumpurl; 3 | String bgColor; 4 | String picurl; 5 | String title; 6 | String titleColor; 7 | String subtitle; 8 | String subtitleColor; 9 | ProductItemModel( 10 | {this.jumpurl, 11 | this.bgColor, 12 | this.picurl, 13 | this.title, 14 | this.titleColor, 15 | this.subtitle, 16 | this.subtitleColor}); 17 | factory ProductItemModel.fromJson(Map json) { 18 | return ProductItemModel( 19 | bgColor: json['bg_color'], 20 | jumpurl: json['jump_url'], 21 | picurl: json['pic_url'], 22 | subtitle: json['subtitle'], 23 | titleColor: json['title_color'], 24 | subtitleColor: json['subtitle_color'], 25 | title: json['title']); 26 | } 27 | } 28 | 29 | class ProductListModel { 30 | List items; 31 | String title; 32 | 33 | ProductListModel({this.items, this.title}); 34 | factory ProductListModel.fromJson(Map json) { 35 | var itemsList = json['items'] as List; 36 | var menueItems = itemsList.map((i) { 37 | return ProductItemModel.fromJson(i); 38 | }).toList(); 39 | 40 | return ProductListModel(items: menueItems, title: json['title']); 41 | } 42 | } -------------------------------------------------------------------------------- /lib/common/model/search.dart: -------------------------------------------------------------------------------- 1 | class SearchResultItemModal { 2 | String shopName; 3 | String wareName; 4 | String price; 5 | String coupon; 6 | String imageUrl; 7 | String commentcount; 8 | String good; //好评率 9 | String shopId; 10 | String disCount; 11 | 12 | SearchResultItemModal( 13 | {this.shopId, 14 | this.shopName, 15 | this.commentcount, 16 | this.coupon, 17 | this.price, 18 | this.good, 19 | this.disCount, 20 | this.imageUrl, 21 | this.wareName}); 22 | 23 | factory SearchResultItemModal.fromJson(dynamic json) { 24 | String picurl = 'http://img10.360buyimg.com/mobilecms/s270x270_' + json['Content']['imageurl']; 25 | String coupon; 26 | if (json['coupon'] != null) { 27 | if (json['coupon']['m'] != '0') { 28 | coupon = '满${json['coupon']['m']}减${json['coupon']['j']}'; 29 | } 30 | } 31 | String disCount; 32 | if (json['pfdt'] != null) { 33 | if (json['pfdt']['m'] != '') { 34 | disCount = '${json['pfdt']['m']}件${json['pfdt']['j']}折'; 35 | } 36 | } 37 | 38 | return SearchResultItemModal( 39 | shopId: json['shop_id'], 40 | shopName: json['shop_name'], 41 | imageUrl: picurl, 42 | good: json['good'], 43 | commentcount: json['commentcount'], 44 | price: json['dredisprice'], 45 | coupon: coupon, 46 | disCount: disCount, 47 | wareName: json['Content']['warename']); 48 | } 49 | } 50 | 51 | class SearchResultListModal { 52 | List data; 53 | 54 | SearchResultListModal(this.data); 55 | 56 | factory SearchResultListModal.fromJson(List json) { 57 | return SearchResultListModal(json.map((i) => SearchResultItemModal.fromJson(i)).toList()); 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /lib/common/model/shopping_cart.dart: -------------------------------------------------------------------------------- 1 | import 'order.dart'; 2 | 3 | class ShoppingCartModel { 4 | String shopName; 5 | bool hasCoupons; 6 | bool hasTmallEasyBuy; 7 | ShopType shopType; 8 | List orderModels; 9 | String discounts; 10 | bool isSelected; 11 | 12 | ShoppingCartModel(this.shopName, this.hasCoupons, this.hasTmallEasyBuy, this.shopType, this.orderModels, 13 | {this.discounts, this.isSelected = false}); 14 | } 15 | 16 | enum ShopType { 17 | tianMao, 18 | taoBao, 19 | } 20 | -------------------------------------------------------------------------------- /lib/common/model/tab.dart: -------------------------------------------------------------------------------- 1 | class TabModel { 2 | String title; 3 | String subtitle; 4 | 5 | TabModel({this.title, this.subtitle}) {} 6 | } 7 | -------------------------------------------------------------------------------- /lib/common/services/address.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter_taobao/common/config/config.dart'; 3 | 4 | ///地址数据 5 | class Address { 6 | static const String host = "https://api.github.com/"; 7 | static const String hostWeb = "https://github.com/"; 8 | static const String updateUrl = 'https://www.pgyer.com/gou_android'; 9 | 10 | ///获取授权 post 11 | static getAuthorization() { 12 | return "${host}authorizations"; 13 | } 14 | 15 | ///仓release get 16 | static getReposRelease(reposOwner, reposName) { 17 | return "${host}repos/$reposOwner/$reposName/releases"; 18 | } 19 | 20 | ///仓Tag get 21 | static getReposTag(reposOwner, reposName) { 22 | return "${host}repos/$reposOwner/$reposName/tags"; 23 | } 24 | 25 | ///处理分页参数 26 | static getPageParams(tab, page, [pageSize = Config.PAGE_SIZE]) { 27 | if (page != null) { 28 | if (pageSize != null) { 29 | return "${tab}page=$page&per_page=$pageSize"; 30 | } else { 31 | return "${tab}page=$page"; 32 | } 33 | } else { 34 | return ""; 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /lib/common/services/api.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'dart:collection'; 3 | 4 | import 'code.dart'; 5 | import 'interceptors/error_interceptor.dart'; 6 | import 'interceptors/header_interceptor.dart'; 7 | import 'interceptors/log_interceptor.dart'; 8 | import 'interceptors/response_interceptor.dart'; 9 | import 'result_data.dart'; 10 | 11 | 12 | ///http请求 13 | class HttpManager { 14 | static const CONTENT_TYPE_JSON = "application/json"; 15 | static const CONTENT_TYPE_FORM = "application/x-www-form-urlencoded"; 16 | 17 | Dio _dio = new Dio(); // 使用默认配置 18 | 19 | HttpManager() { 20 | _dio.interceptors.add(new HeaderInterceptors()); 21 | 22 | _dio.interceptors.add(new LogsInterceptors()); 23 | 24 | _dio.interceptors.add(new ErrorInterceptors(_dio)); 25 | 26 | _dio.interceptors.add(new ResponseInterceptors()); 27 | } 28 | 29 | ///发起网络请求 30 | ///[ url] 请求url 31 | ///[ params] 请求参数 32 | ///[ header] 外加头 33 | ///[ option] 配置 34 | netFetch(url, params, Map header, Options option, {noTip = false}) async { 35 | Map headers = new HashMap(); 36 | if (header != null) { 37 | headers.addAll(header); 38 | } 39 | 40 | if (option != null) { 41 | option.headers = headers; 42 | } else { 43 | option = new Options(method: "get"); 44 | option.headers = headers; 45 | } 46 | 47 | resultError(DioError e) { 48 | Response errorResponse; 49 | if (e.response != null) { 50 | errorResponse = e.response; 51 | } else { 52 | errorResponse = new Response(statusCode: 666); 53 | } 54 | if (e.type == DioErrorType.CONNECT_TIMEOUT || e.type == DioErrorType.RECEIVE_TIMEOUT) { 55 | errorResponse.statusCode = Code.NETWORK_TIMEOUT; 56 | } 57 | return new ResultData(Code.errorHandleFunction(errorResponse.statusCode, e.message, noTip), false, errorResponse.statusCode); 58 | } 59 | 60 | Response response; 61 | try { 62 | response = await _dio.request(url, data: params, options: option); 63 | } on DioError catch (e) { 64 | return resultError(e); 65 | } 66 | if(response.data is DioError) { 67 | return resultError(response.data); 68 | } 69 | return response.data; 70 | } 71 | } 72 | 73 | final HttpManager httpManager = new HttpManager(); 74 | -------------------------------------------------------------------------------- /lib/common/services/code.dart: -------------------------------------------------------------------------------- 1 | 2 | ///错误编码 3 | class Code { 4 | ///网络错误 5 | static const NETWORK_ERROR = -1; 6 | 7 | ///网络超时 8 | static const NETWORK_TIMEOUT = -2; 9 | 10 | ///网络返回数据格式化一次 11 | static const NETWORK_JSON_EXCEPTION = -3; 12 | 13 | static const SUCCESS = 200; 14 | 15 | static errorHandleFunction(code, message, noTip) { 16 | if(noTip) { 17 | return message; 18 | } 19 | // eventBus.fire(new HttpErrorEvent(code, message)); 20 | return message; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/common/services/interceptors/error_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:connectivity/connectivity.dart'; 2 | import 'package:dio/dio.dart'; 3 | import '../code.dart'; 4 | import '../result_data.dart'; 5 | 6 | ///是否需要弹提示 7 | const NOT_TIP_KEY = "noTip"; 8 | 9 | /** 10 | * 错误拦截 11 | */ 12 | class ErrorInterceptors extends InterceptorsWrapper { 13 | final Dio _dio; 14 | 15 | ErrorInterceptors(this._dio); 16 | 17 | @override 18 | onRequest(RequestOptions options) async { 19 | //没有网络 20 | var connectivityResult = await (new Connectivity().checkConnectivity()); 21 | if (connectivityResult == ConnectivityResult.none) { 22 | return _dio.resolve(new ResultData(Code.errorHandleFunction(Code.NETWORK_ERROR, "", false), false, Code.NETWORK_ERROR)); 23 | } 24 | return options; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/common/services/interceptors/header_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | 3 | /** 4 | * header拦截器 5 | */ 6 | class HeaderInterceptors extends InterceptorsWrapper { 7 | 8 | 9 | @override 10 | onRequest(RequestOptions options) { 11 | ///超时 12 | options.connectTimeout = 15000; 13 | 14 | return options; 15 | } 16 | } -------------------------------------------------------------------------------- /lib/common/services/interceptors/log_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | import 'package:flutter_taobao/common/config/config.dart'; 3 | 4 | /** 5 | * Log 拦截器 6 | */ 7 | class LogsInterceptors extends InterceptorsWrapper { 8 | @override 9 | onRequest(RequestOptions options) { 10 | if (Config.DEBUG) { 11 | print("请求url:${options.path}"); 12 | print('请求头: ' + options.headers.toString()); 13 | if (options.data != null) { 14 | print('请求参数: ' + options.data.toString()); 15 | } 16 | } 17 | return options; 18 | } 19 | 20 | @override 21 | onResponse(Response response) { 22 | if (Config.DEBUG) { 23 | if (response != null) { 24 | print('返回参数: ' + response.toString()); 25 | } 26 | } 27 | return response; // continue 28 | } 29 | 30 | @override 31 | onError(DioError err) { 32 | if (Config.DEBUG) { 33 | print('请求异常: ' + err.toString()); 34 | print('请求异常信息: ' + err.response?.toString() ?? ""); 35 | } 36 | return err; 37 | } 38 | 39 | 40 | } 41 | -------------------------------------------------------------------------------- /lib/common/services/interceptors/response_interceptor.dart: -------------------------------------------------------------------------------- 1 | import 'package:dio/dio.dart'; 2 | 3 | import '../code.dart'; 4 | import '../result_data.dart'; 5 | 6 | /** 7 | * Token拦截器 8 | */ 9 | class ResponseInterceptors extends InterceptorsWrapper { 10 | 11 | @override 12 | onResponse(Response response) { 13 | RequestOptions option = response.request; 14 | try { 15 | if (option.contentType != null && option.contentType.primaryType == "text") { 16 | return new ResultData(response.data, true, Code.SUCCESS); 17 | } 18 | if (response.statusCode == 200 || response.statusCode == 201) { 19 | return new ResultData(response.data, true, Code.SUCCESS, headers: response.headers); 20 | } 21 | } catch (e) { 22 | print(e.toString() + option.path); 23 | return new ResultData(response.data, false, response.statusCode, headers: response.headers); 24 | } 25 | } 26 | } -------------------------------------------------------------------------------- /lib/common/services/meinv.dart: -------------------------------------------------------------------------------- 1 | import 'package:http/http.dart' as http; 2 | import 'dart:convert'; 3 | 4 | Future getGirlList(String key) async { 5 | String url = 'https://m.image.so.com/j?src=imageonebox&q=$key&obx_type=360pic_meinv&pn=9&sn=0&kn=0&gn=0&cn=0'; 6 | var res = await http.get(url); 7 | if (res.statusCode == 200) { 8 | // print(jsonDecode(res.body)); 9 | List items = jsonDecode(res.body)['list'] as List; 10 | return items; 11 | } else { 12 | return []; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/common/services/result_data.dart: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * 网络结果数据 4 | */ 5 | class ResultData { 6 | var data; 7 | bool result; 8 | int code; 9 | var headers; 10 | 11 | ResultData(this.data, this.result, this.code, {this.headers}); 12 | } 13 | -------------------------------------------------------------------------------- /lib/common/services/search.dart: -------------------------------------------------------------------------------- 1 | import 'package:http/http.dart' as http; 2 | import 'dart:convert'; 3 | 4 | Future get(String url) async { 5 | var res = await http.get(url); 6 | if (res.statusCode == 200) { 7 | var body=res.body; 8 | // List querys = jsonDecode(res.body); 9 | return jsonDecode(body); 10 | } else { 11 | return null; 12 | } 13 | } 14 | 15 | Future getHotSugs() async { 16 | var url = 'https://suggest.taobao.com/sug?area=sug_hot&wireless=2'; 17 | var res = await http.get(url); 18 | if (res.statusCode == 200) { 19 | List querys = jsonDecode(res.body)['querys'] as List; 20 | return querys; 21 | } else { 22 | return []; 23 | } 24 | } 25 | 26 | Future getSuggest(String q) async { 27 | String url = 'https://suggest.taobao.com/sug?q=$q&code=utf-8&area=c2c'; 28 | var res = await http.get(url); 29 | if (res.statusCode == 200) { 30 | List data = jsonDecode(res.body)['result'] as List; 31 | return data; 32 | } else { 33 | return []; 34 | } 35 | } 36 | 37 | getSearchResult(String keyworld, [int page = 0]) async { 38 | String url = 39 | 'https://so.m.jd.com/ware/search._m2wq_list?keyword=$keyworld&datatype=1&callback=C&page=$page&pagesize=10&ext_attr=no&brand_col=no&price_col=no&color_col=no&size_col=no&ext_attr_sort=no&merge_sku=yes&multi_suppliers=yes&area_ids=1,72,2818&qp_disable=no&fdesc=%E5%8C%97%E4%BA%AC'; 40 | var res = await http.get(url); 41 | String body = res.body; 42 | String jsonString = body.substring(2, body.length - 2); 43 | 44 | // debugPrint(jsonString.replaceAll('\\x2F', '/')); 45 | var json; 46 | try{ 47 | json = jsonDecode(jsonString.replaceAll(RegExp(r'\\x..'), '/')); 48 | }catch(e){ 49 | return []; 50 | } 51 | return json['data']['searchm']['Paragraph'] as List; 52 | } 53 | 54 | getSearchResultFirst(String keyworld, [int page = 0]) async { 55 | String url = 56 | 'https://so.m.jd.com/ware/search._m2wq_list?keyword=$keyworld&datatype=1&callback=C&page=$page&pagesize=1&ext_attr=no&brand_col=no&price_col=no&color_col=no&size_col=no&ext_attr_sort=no&merge_sku=yes&multi_suppliers=yes&area_ids=1,72,2818&qp_disable=no&fdesc=%E5%8C%97%E4%BA%AC'; 57 | var res = await http.get(url); 58 | String body = res.body; 59 | String jsonString = body.substring(2, body.length - 2); 60 | 61 | // debugPrint(jsonString.replaceAll('\\x2F', '/')); 62 | var json = jsonDecode(jsonString.replaceAll(RegExp(r'\\x..'), '/')); 63 | return json['data']['searchm']['Paragraph'] as List; 64 | } 65 | -------------------------------------------------------------------------------- /lib/common/utils/log_util.dart: -------------------------------------------------------------------------------- 1 | class LogUtil { 2 | static const String _TAG_DEF = "###LogUtil###"; 3 | 4 | static bool debuggable = true; //是否是debug模式,true: log v 不输出. 5 | static String TAG = _TAG_DEF; 6 | 7 | static void init({bool isDebug: false, String tag: _TAG_DEF}) { 8 | debuggable = isDebug; 9 | TAG = tag; 10 | } 11 | 12 | static void e(Object object, {String tag}) { 13 | _printLog(tag, ' e ', object); 14 | } 15 | 16 | static void v(Object object, {String tag}) { 17 | if (debuggable) { 18 | _printLog(tag, ' v ', object); 19 | } 20 | } 21 | 22 | static void _printLog(String tag, String stag, Object object) { 23 | StringBuffer sb = new StringBuffer(); 24 | sb.write((tag == null || tag.isEmpty) ? TAG : tag); 25 | sb.write(stag); 26 | sb.write(object); 27 | print(sb.toString()); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/common/utils/navigator_utils.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_taobao/ui/page/home/search_goods_page.dart'; 4 | import 'package:flutter_taobao/ui/page/home/search_goods_result_page.dart'; 5 | import 'package:flutter_taobao/ui/page/message/gzx_chat_page.dart'; 6 | 7 | class NavigatorUtils { 8 | static gotoSearchGoodsPage(BuildContext context, {String keywords}) { 9 | // NavigatorRouter( 10 | // context, 11 | // new SearchGoodsPage( 12 | // keywords: keywords, 13 | // )); 14 | 15 | return Navigator.of(context).push(new MyCupertinoPageRoute(SearchGoodsPage( 16 | keywords: keywords, 17 | ))); 18 | } 19 | 20 | static gotoSearchGoodsResultPage(BuildContext context, String keywords) { 21 | NavigatorRouter( 22 | context, 23 | new SearchGoodsResultPage( 24 | keywords: keywords, 25 | )); 26 | } 27 | 28 | static Future gotoGZXChatPage(BuildContext context, conversation) { 29 | return NavigatorRouter( 30 | context, 31 | new GZXChatPage( 32 | conversation: conversation, 33 | )); 34 | } 35 | 36 | static NavigatorRouter(BuildContext context, Widget widget) { 37 | return Navigator.push(context, new CupertinoPageRoute(builder: (context) => widget)); 38 | } 39 | 40 | ///弹出 dialog 41 | static Future showGSYDialog({ 42 | @required BuildContext context, 43 | bool barrierDismissible = true, 44 | WidgetBuilder builder, 45 | }) { 46 | return showDialog( 47 | context: context, 48 | barrierDismissible: barrierDismissible, 49 | builder: (context) { 50 | return MediaQuery( 51 | ///不受系统字体缩放影响 52 | data: MediaQueryData.fromWindow(WidgetsBinding.instance.window) 53 | .copyWith(textScaleFactor: 1), 54 | child: new SafeArea(child: builder(context))); 55 | }); 56 | } 57 | } 58 | 59 | class MyCupertinoPageRoute extends CupertinoPageRoute { 60 | Widget widget; 61 | 62 | MyCupertinoPageRoute(this.widget) : super(builder: (BuildContext context) => widget); 63 | 64 | // OPTIONAL IF YOU WISH TO HAVE SOME EXTRA ANIMATION WHILE ROUTING 65 | @override 66 | Widget buildPage(BuildContext context, Animation animation, Animation secondaryAnimation) { 67 | return new FadeTransition(opacity: animation, child: widget); 68 | } 69 | 70 | @override 71 | // TODO: implement transitionDuration 72 | Duration get transitionDuration => Duration(seconds: 0); 73 | } 74 | -------------------------------------------------------------------------------- /lib/common/utils/provider.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'dart:io'; 3 | import 'dart:typed_data'; 4 | import 'package:path/path.dart'; 5 | import 'package:sqflite/sqflite.dart'; 6 | import 'package:flutter/services.dart' show rootBundle; 7 | 8 | //const createSql = { 9 | // 'cat': """ 10 | // CREATE TABLE "cat" ( 11 | // `id` INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, 12 | // `name` TEXT NOT NULL UNIQUE, 13 | // `depth` INTEGER NOT NULL DEFAULT 1, 14 | // `parentId` INTEGER NOT NULL, 15 | // `desc` TEXT 16 | // ); 17 | // """, 18 | // 'collectio': """ 19 | // CREATE TABLE collection (id INTEGER PRIMARY KEY NOT NULL UNIQUE, name TEXT NOT NULL, router TEXT); 20 | // """, 21 | // 'widget': """ 22 | // CREATE TABLE widget (id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT UNIQUE, name TEXT NOT NULL, cnName TEXT NOT NULL, image TEXT NOT NULL, doc TEXT, demo TEXT, catId INTEGER NOT NULL REFERENCES cat (id), owner TEXT); 23 | // """; 24 | //}; 25 | 26 | class Provider { 27 | static Database db; 28 | 29 | // 获取数据库中所有的表 30 | Future getTables() async { 31 | if (db == null) { 32 | return Future.value([]); 33 | } 34 | List tables = await db.rawQuery( 35 | 'SELECT name FROM sqlite_master WHERE type = "table"'); 36 | List targetList = []; 37 | tables.forEach((item) { 38 | targetList.add(item['name']); 39 | }); 40 | return targetList; 41 | } 42 | 43 | // 检查数据库中, 表是否完整, 在部份android中, 会出现表丢失的情况 44 | Future checkTableIsRight() async { 45 | List expectTables = ['conversation']; 46 | 47 | List tables = await getTables(); 48 | 49 | for (int i = 0; i < expectTables.length; i++) { 50 | if (!tables.contains(expectTables[i])) { 51 | return false; 52 | } 53 | } 54 | return true; 55 | } 56 | 57 | //初始化数据库 58 | 59 | Future init(bool isCreate) async { 60 | //Get a location using getDatabasesPath 61 | String databasesPath = await getDatabasesPath(); 62 | String path = join(databasesPath, 'flutter.db'); 63 | print(path); 64 | try { 65 | db = await openDatabase(path); 66 | } catch (e) { 67 | print("Error $e"); 68 | } 69 | bool tableIsRight = await this.checkTableIsRight(); 70 | 71 | if (!tableIsRight) { 72 | // 关闭上面打开的db,否则无法执行open 73 | db.close(); 74 | // Delete the database 75 | await deleteDatabase(path); 76 | ByteData data = await rootBundle.load(join("static", "app.db")); 77 | List bytes = 78 | data.buffer.asUint8List(data.offsetInBytes, data.lengthInBytes); 79 | await new File(path).writeAsBytes(bytes); 80 | 81 | db = await openDatabase(path, version: 1, 82 | onCreate: (Database db, int version) async { 83 | print('db created version is $version'); 84 | }, onOpen: (Database db) async { 85 | print('new db opened'); 86 | }); 87 | } else { 88 | print("Opening existing database"); 89 | } 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /lib/common/utils/screen_util.dart: -------------------------------------------------------------------------------- 1 | // from github https://github.com/OpenFlutter/flutter_ScreenUtil/blob/master/lib/flutter_screenutil.dart 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | class ScreenUtil { 6 | static ScreenUtil instance = new ScreenUtil(); 7 | 8 | //设计稿的设备尺寸修改 9 | int _designWidth; 10 | int _designHeight; 11 | 12 | static MediaQueryData _mediaQueryData; 13 | static double _screenWidth; 14 | static double _screenHeight; 15 | static double _pixelRatio; 16 | static double _statusBarHeight; 17 | 18 | static double _bottomBarHeight; 19 | 20 | static double _textScaleFactor; 21 | 22 | ScreenUtil({int width, int height}) { 23 | _designWidth = width; 24 | _designHeight = height; 25 | } 26 | 27 | static ScreenUtil getInstance() { 28 | return instance; 29 | } 30 | 31 | void init(BuildContext context) { 32 | MediaQueryData mediaQuery = MediaQuery.of(context); 33 | _mediaQueryData = mediaQuery; 34 | _pixelRatio = mediaQuery.devicePixelRatio; 35 | _screenWidth = mediaQuery.size.width; 36 | _screenHeight = mediaQuery.size.height; 37 | _statusBarHeight = mediaQuery.padding.top; 38 | _bottomBarHeight = _mediaQueryData.padding.bottom; 39 | _textScaleFactor = mediaQuery.textScaleFactor; 40 | 41 | } 42 | 43 | static MediaQueryData get mediaQueryData => _mediaQueryData; 44 | 45 | ///每个逻辑像素的字体像素数,字体的缩放比例 46 | static double get textScaleFactory => _textScaleFactor; 47 | 48 | ///设备的像素密度 49 | static double get pixelRatio => _pixelRatio; 50 | 51 | ///当前设备宽度 dp 52 | static double get screenWidthDp => _screenWidth; 53 | 54 | ///当前设备高度 dp 55 | static double get screenHeightDp => _screenHeight; 56 | 57 | ///当前设备宽度 px 58 | static double get screenWidth => _screenWidth; 59 | ///当前设备高度 px 60 | static double get screenHeight => _screenHeight; 61 | 62 | ///状态栏高度 刘海屏会更高 63 | static double get statusBarHeight => _statusBarHeight; 64 | 65 | ///底部安全区距离 66 | static double get bottomBarHeight => _bottomBarHeight; 67 | 68 | ///实际的dp与设计稿px的比例 69 | get scaleWidth => _screenWidth / instance._designWidth; 70 | 71 | get scaleHeight => _screenHeight / instance._designHeight; 72 | 73 | ///根据设计稿的设备宽度适配 74 | ///高度也根据这个来做适配可以保证不变形 75 | setWidth(int width) => width * scaleWidth; 76 | ///根据设计稿的设备宽度适配 77 | ///高度也根据这个来做适配可以保证不变形 78 | L(double width) => width * scaleWidth; 79 | /// 根据设计稿的设备高度适配 80 | /// 当发现设计稿中的一屏显示的与当前样式效果不符合时, 81 | /// 或者形状有差异时,高度适配建议使用此方法 82 | /// 高度适配主要针对想根据设计稿的一屏展示一样的效果 83 | setHeight(int height) => height * scaleHeight; 84 | 85 | ///字体大小适配方法 86 | ///@param fontSize 传入设计稿上字体的px , 87 | ///@param allowFontScaling 控制字体是否要根据系统的“字体大小”辅助选项来进行缩放。默认值为true。 88 | ///@param allowFontScaling Specifies whether fonts should scale to respect Text Size accessibility settings. The default is true. 89 | setSp(int fontSize, [allowFontScaling = true]) => allowFontScaling 90 | ? setWidth(fontSize) * _textScaleFactor 91 | : setWidth(fontSize); 92 | } -------------------------------------------------------------------------------- /lib/common/utils/shared_preferences.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:shared_preferences/shared_preferences.dart'; 3 | 4 | /// 用来做shared_preferences的存储 5 | class SpUtil { 6 | static SpUtil _instance; 7 | 8 | static Future get instance async { 9 | return await getInstance(); 10 | } 11 | 12 | static SharedPreferences _spf; 13 | 14 | 15 | SpUtil._(); 16 | 17 | Future _init() async { 18 | _spf = await SharedPreferences.getInstance(); 19 | } 20 | 21 | static Future getInstance() async { 22 | if (_instance == null) { 23 | _instance = new SpUtil._(); 24 | await _instance._init(); 25 | } 26 | return _instance; 27 | } 28 | 29 | static bool _beforCheck() { 30 | if (_spf == null) { 31 | return true; 32 | } 33 | return false; 34 | } 35 | 36 | // 判断是否存在数据 37 | bool hasKey(String key) { 38 | Set keys = getKeys(); 39 | return keys.contains(key); 40 | } 41 | 42 | Set getKeys() { 43 | if (_beforCheck()) return null; 44 | return _spf.getKeys(); 45 | } 46 | 47 | get(String key) { 48 | if (_beforCheck()) return null; 49 | return _spf.get(key); 50 | } 51 | 52 | getString(String key) { 53 | if (_beforCheck()) return null; 54 | return _spf.getString(key); 55 | } 56 | 57 | Future putString(String key, String value) { 58 | if (_beforCheck()) return null; 59 | return _spf.setString(key, value); 60 | } 61 | 62 | bool getBool(String key) { 63 | if (_beforCheck()) return null; 64 | return _spf.getBool(key); 65 | } 66 | 67 | Future putBool(String key, bool value) { 68 | if (_beforCheck()) return null; 69 | return _spf.setBool(key, value); 70 | } 71 | 72 | int getInt(String key) { 73 | if (_beforCheck()) return null; 74 | return _spf.getInt(key); 75 | } 76 | 77 | Future putInt(String key, int value) { 78 | if (_beforCheck()) return null; 79 | return _spf.setInt(key, value); 80 | } 81 | 82 | double getDouble(String key) { 83 | if (_beforCheck()) return null; 84 | return _spf.getDouble(key); 85 | } 86 | 87 | Future putDouble(String key, double value) { 88 | if (_beforCheck()) return null; 89 | return _spf.setDouble(key, value); 90 | } 91 | 92 | List getStringList(String key) { 93 | return _spf.getStringList(key); 94 | } 95 | 96 | Future putStringList(String key, List value) { 97 | if (_beforCheck()) return null; 98 | return _spf.setStringList(key, value); 99 | } 100 | 101 | dynamic getDynamic(String key) { 102 | if (_beforCheck()) return null; 103 | return _spf.get(key); 104 | } 105 | 106 | 107 | Future remove(String key) { 108 | if (_beforCheck()) return null; 109 | return _spf.remove(key); 110 | } 111 | 112 | Future clear() { 113 | if (_beforCheck()) return null; 114 | return _spf.clear(); 115 | } 116 | } -------------------------------------------------------------------------------- /lib/common/utils/sql.dart: -------------------------------------------------------------------------------- 1 | import './provider.dart'; 2 | import 'dart:async'; 3 | import 'package:sqflite/sqflite.dart'; 4 | 5 | class BaseModel { 6 | Database db; 7 | final String table = ''; 8 | var query; 9 | 10 | BaseModel(this.db) { 11 | query = db.query; 12 | } 13 | } 14 | 15 | class Sql extends BaseModel { 16 | final String tableName; 17 | 18 | Sql.setTable(String name) 19 | : tableName = name, 20 | super(Provider.db); 21 | 22 | Future get() async { 23 | return await this.query(tableName); 24 | } 25 | 26 | Future getAll() async { 27 | var result = await this.query(tableName); 28 | return result.toList(); 29 | } 30 | 31 | String getTableName() { 32 | return tableName; 33 | } 34 | 35 | Future delete(String value, String key) async { 36 | return await this.db.delete(tableName, where: '$key = ?', whereArgs: [value]); 37 | } 38 | 39 | Future clearTable(String tableName) async { 40 | return await this.db.delete(tableName); 41 | } 42 | 43 | Future getByCondition({Map conditions}) async { 44 | if (conditions == null || conditions.isEmpty) { 45 | return this.get(); 46 | } 47 | String stringConditions = ''; 48 | 49 | int index = 0; 50 | conditions.forEach((key, value) { 51 | if (value == null) { 52 | return; 53 | } 54 | if (value.runtimeType == String) { 55 | stringConditions = '$stringConditions $key = "$value"'; 56 | } 57 | if (value.runtimeType == int) { 58 | stringConditions = '$stringConditions $key = $value'; 59 | } 60 | 61 | if (index >= 0 && index < conditions.length - 1) { 62 | stringConditions = '$stringConditions and'; 63 | } 64 | index++; 65 | }); 66 | // print("this is string condition for sql > $stringConditions"); 67 | return await this.query(tableName, where: stringConditions); 68 | } 69 | 70 | Future> insert(Map json) async { 71 | var id = await this.db.insert(tableName, json); 72 | json['id'] = id; 73 | return json; 74 | } 75 | 76 | /// 77 | /// 搜索 78 | /// @param Object condition 79 | /// @mods [And, Or] default is Or 80 | /// search({'name': "hanxu', 'id': 1}; 81 | /// 82 | Future search({Map conditions, String mods = 'Or'}) async { 83 | if (conditions == null || conditions.isEmpty) { 84 | return this.get(); 85 | } 86 | String stringConditions = ''; 87 | int index = 0; 88 | conditions.forEach((key, value) { 89 | if (value == null) { 90 | return; 91 | } 92 | 93 | if (value.runtimeType == String) { 94 | stringConditions = '$stringConditions $key like "%$value%"'; 95 | } 96 | if (value.runtimeType == int) { 97 | stringConditions = '$stringConditions $key = "%$value%"'; 98 | } 99 | 100 | if (index >= 0 && index < conditions.length - 1) { 101 | stringConditions = '$stringConditions $mods'; 102 | } 103 | index++; 104 | }); 105 | 106 | return await this.query(tableName, where: stringConditions); 107 | } 108 | } 109 | -------------------------------------------------------------------------------- /lib/ui/page/gzx_bottom_navigation_bar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_taobao/common/style/gzx_style.dart'; 3 | import 'package:flutter_taobao/common/utils/screen_util.dart'; 4 | import 'package:flutter_taobao/ui/page/shopping_cart/shopping_cart_page.dart'; 5 | import 'package:flutter_taobao/ui/page/test/demo.dart'; 6 | import 'package:flutter_taobao/ui/page/home/home_page.dart'; 7 | import 'package:flutter_taobao/ui/page/test/test_page.dart'; 8 | import 'package:flutter_taobao/ui/page/weitao/weitao_page.dart'; 9 | 10 | import 'message/message_page.dart'; 11 | import 'my/my_page.dart'; 12 | 13 | class GZXBottomNavigationBar extends StatefulWidget { 14 | static final String sName = "home"; 15 | 16 | @override 17 | _GZXBottomNavigationBarState createState() => _GZXBottomNavigationBarState(); 18 | } 19 | 20 | class _GZXBottomNavigationBarState extends State { 21 | final PageController topPageControl = new PageController(); 22 | Color foreColor = GZXColors.tabBarDefaultForeColor; 23 | List tabItemForeColor = new List(); 24 | 25 | final _bottomNavigationColor = Color(0xFF585858); 26 | Color _bottomNavigationActiveColor = Colors.blue; 27 | 28 | int _currentIndex = 0; 29 | var _controller = PageController( 30 | initialPage: 0, 31 | ); 32 | 33 | ///无奈之举,只能pageView配合tabbar,通过control同步 34 | ///TabView 配合tabbar 在四个页面上问题太多 35 | _renderTabItem() {} 36 | 37 | @override 38 | void initState() { 39 | super.initState(); 40 | } 41 | 42 | @override 43 | void didChangeDependencies() { 44 | // TODO: implement didChangeDependencies 45 | super.didChangeDependencies(); 46 | 47 | _bottomNavigationActiveColor = Theme.of(context).primaryColor; 48 | } 49 | 50 | @override 51 | Widget build(BuildContext context) { 52 | ScreenUtil.instance = ScreenUtil(width: 360)..init(context); 53 | // ScreenUtil.instance = ScreenUtil(width: Klength.designWidth)..init(context); 54 | 55 | return Scaffold( 56 | // drawer: new HomeDrawer(), 57 | body: PageView( 58 | controller: _controller, 59 | children: [ 60 | HomePage(), 61 | WeiTaoPage(), 62 | MessagePage(), 63 | ShoppingCartPage(), 64 | MyPage(), 65 | ], 66 | physics: NeverScrollableScrollPhysics(), 67 | ), 68 | bottomNavigationBar: BottomNavigationBar( 69 | currentIndex: _currentIndex, 70 | onTap: (index) { 71 | _controller.jumpToPage(index); 72 | setState(() { 73 | _currentIndex = index; 74 | }); 75 | }, 76 | type: BottomNavigationBarType.fixed, 77 | items: [ 78 | BottomNavigationBarItem( 79 | icon: Icon( 80 | GZXIcons.home, 81 | // Icons.message, 82 | color: _currentIndex == 0 ? _bottomNavigationActiveColor : _bottomNavigationColor, 83 | ), 84 | activeIcon: Icon( 85 | GZXIcons.home_active, 86 | color: _currentIndex == 0 ? _bottomNavigationActiveColor : _bottomNavigationColor, 87 | size: 34, 88 | ), 89 | title: _currentIndex == 0 ? Container() : _buildBarItemTitle('首页', 0)), 90 | BottomNavigationBarItem( 91 | icon: Icon( 92 | GZXIcons.we_tao, 93 | // Icons.message, 94 | color: _currentIndex == 1 ? _bottomNavigationActiveColor : _bottomNavigationColor, 95 | ), 96 | activeIcon: Icon( 97 | GZXIcons.we_tao_fill, 98 | color: _currentIndex == 1 ? _bottomNavigationActiveColor : _bottomNavigationColor, 99 | ), 100 | title: _buildBarItemTitle('微淘', 1)), 101 | BottomNavigationBarItem( 102 | icon: Icon( 103 | GZXIcons.message, 104 | // Icons.message, 105 | color: _currentIndex == 2 ? _bottomNavigationActiveColor : _bottomNavigationColor, 106 | ), 107 | activeIcon: Icon( 108 | GZXIcons.message_fill, 109 | color: _currentIndex == 2 ? _bottomNavigationActiveColor : _bottomNavigationColor, 110 | ), 111 | title: _buildBarItemTitle('消息', 2)), 112 | BottomNavigationBarItem( 113 | icon: Icon( 114 | GZXIcons.cart, 115 | // Icons.message, 116 | color: _currentIndex == 3 ? _bottomNavigationActiveColor : _bottomNavigationColor, 117 | ), 118 | activeIcon: Icon( 119 | GZXIcons.cart_fill, 120 | color: _currentIndex == 3 ? _bottomNavigationActiveColor : _bottomNavigationColor, 121 | ), 122 | title: _buildBarItemTitle('购物车', 3)), 123 | BottomNavigationBarItem( 124 | icon: Icon( 125 | GZXIcons.my, 126 | // Icons.message, 127 | color: _currentIndex == 4 ? _bottomNavigationActiveColor : _bottomNavigationColor, 128 | ), 129 | activeIcon: Icon( 130 | GZXIcons.my_fill, 131 | color: _currentIndex == 4 ? _bottomNavigationActiveColor : _bottomNavigationColor, 132 | ), 133 | title: _buildBarItemTitle('我的淘宝', 4)), 134 | ], 135 | ), 136 | ); 137 | } 138 | 139 | Widget _buildBarItemTitle(String text, int index) { 140 | return Text( 141 | text, 142 | style: TextStyle( 143 | color: _currentIndex == index ? _bottomNavigationActiveColor : _bottomNavigationColor, fontSize: 12), 144 | ); 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /lib/ui/page/home/products_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ProductPage extends StatefulWidget { 4 | @override 5 | _ProductPageState createState() => _ProductPageState(); 6 | } 7 | 8 | class _ProductPageState extends State { 9 | @override 10 | Widget build(BuildContext context) { 11 | return Container(); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /lib/ui/page/home/search_goods_result_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_taobao/common/style/gzx_style.dart'; 3 | import 'package:flutter_taobao/common/utils/common_utils.dart'; 4 | import 'package:flutter_taobao/common/utils/navigator_utils.dart'; 5 | import 'package:flutter_taobao/ui/page/drawer/gzx_filter_goods_page.dart'; 6 | import 'package:flutter_taobao/ui/page/home/searchlist_page.dart'; 7 | import 'package:flutter_taobao/ui/widget/gzx_search_card.dart'; 8 | 9 | class SearchGoodsResultPage extends StatefulWidget { 10 | final String keywords; 11 | 12 | const SearchGoodsResultPage({Key key, this.keywords}) : super(key: key); 13 | 14 | @override 15 | _SearchGoodsResultPageState createState() => _SearchGoodsResultPageState(); 16 | } 17 | 18 | class _SearchGoodsResultPageState extends State { 19 | List _tabsTitle = ['全部', '天猫', '店铺', '淘宝经验']; 20 | var _scaffoldkey = new GlobalKey(); 21 | TextEditingController _keywordTextEditingController = TextEditingController(); 22 | 23 | @override 24 | void initState() { 25 | // TODO: implement initState 26 | super.initState(); 27 | 28 | _keywordTextEditingController.text = widget.keywords; 29 | } 30 | 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | return Scaffold( 35 | key: _scaffoldkey, 36 | endDrawer: GZXFilterGoodsPage(), 37 | backgroundColor: GZXColors.mainBackgroundColor, 38 | appBar: PreferredSize( 39 | child: AppBar( 40 | // bottomOpacity: 0, 41 | // toolbarOpacity: 0, 42 | brightness: Brightness.light, 43 | backgroundColor: GZXColors.mainBackgroundColor, 44 | elevation: 0, 45 | // forceElevated: false, //是否显示阴影 46 | ), 47 | preferredSize: Size.fromHeight(0)), 48 | body: DefaultTabController( 49 | length: 4, 50 | initialIndex: 0, 51 | child: Column( 52 | children: [ 53 | Row( 54 | children: [ 55 | SizedBox( 56 | width: 8, 57 | ), 58 | GestureDetector( 59 | onTap: () { 60 | Navigator.pop(context); 61 | }, 62 | child: Icon( 63 | GZXIcons.back_light, 64 | size: 20, 65 | ), 66 | ), 67 | Expanded( 68 | flex: 1, 69 | child: GZXSearchCardWidget( 70 | isShowLeading: false, 71 | isShowSuffixIcon: false, 72 | textEditingController: _keywordTextEditingController, 73 | onTap: () { 74 | NavigatorUtils.gotoSearchGoodsPage(context, keywords: widget.keywords); 75 | } 76 | , 77 | // focusNode: _focus, 78 | ), 79 | ), 80 | SizedBox( 81 | width: 8, 82 | ), 83 | Column( 84 | children: [ 85 | Container( 86 | height: 16, 87 | // padding: const EdgeInsets.only(left: 8,right: 8,top: 8,bottom: 8), 88 | alignment: Alignment.center, 89 | decoration: BoxDecoration( 90 | // color: randomColor(), 91 | color: Colors.red, 92 | borderRadius: BorderRadius.circular(8)), 93 | padding: EdgeInsets.symmetric(horizontal: 4), 94 | child: Text( 95 | '20', 96 | style: TextStyle(color: Colors.white, fontSize: 10), 97 | )), 98 | Container( 99 | height: 20, 100 | child: GestureDetector( 101 | onTap: () { 102 | Navigator.pop(context); 103 | }, 104 | child: Icon( 105 | Icons.more_horiz, 106 | size: 20, 107 | ), 108 | ), 109 | ) 110 | ], 111 | ), 112 | SizedBox( 113 | width: 8, 114 | ), 115 | ], 116 | ), 117 | SizedBox( 118 | height: 8, 119 | ), 120 | TabBar( 121 | // controller: widget.tabController, 122 | indicatorColor: Color(0xFFfe5100), 123 | indicatorSize: TabBarIndicatorSize.label, 124 | isScrollable: true, 125 | // labelColor: KColorConstant.themeColor, 126 | labelColor: Color(0xFFfe5100), 127 | unselectedLabelColor: Colors.black, 128 | // labelPadding: EdgeInsets.only(left: (ScreenUtil.screenWidth-30*3)/4), 129 | labelPadding: EdgeInsets.only(left: 30, right: 30), 130 | // labelStyle: TextStyle(fontSize: 1), 131 | onTap: (i) {}, 132 | tabs: _tabsTitle 133 | .map((i) => 134 | Text( 135 | i, 136 | )) 137 | .toList()), 138 | SizedBox( 139 | height: 8, 140 | ), 141 | Expanded( 142 | child: TabBarView( 143 | children: _tabsTitle.map((item){ 144 | return SearchResultListPage( 145 | widget.keywords, 146 | isList: true, 147 | isShowFilterWidget: true, 148 | onTapfilter: () { 149 | _scaffoldkey.currentState.openEndDrawer(); 150 | }, 151 | ); 152 | }).toList() 153 | )) 154 | ] 155 | ),)); 156 | } 157 | } 158 | -------------------------------------------------------------------------------- /lib/ui/page/test/AnimateExpanded.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AnimateExpanded extends StatefulWidget { 4 | @override 5 | _AnimateExpandedState createState() => new _AnimateExpandedState(); 6 | } 7 | 8 | class _AnimateExpandedState extends State { 9 | double _bodyHeight=0.0; 10 | bool _offstage=true; 11 | @override 12 | Widget build(BuildContext context) { 13 | return new Scaffold( 14 | backgroundColor: Colors.grey[500], 15 | body: new SingleChildScrollView( 16 | child: new Column( 17 | mainAxisAlignment: MainAxisAlignment.center, 18 | children: [ 19 | new Card( 20 | child: new Container( 21 | height: 50.0, 22 | child: new Row( 23 | mainAxisAlignment: MainAxisAlignment.end, 24 | children: [ 25 | new IconButton(icon: new Icon(Icons.keyboard_arrow_down), onPressed: () { 26 | setState((){ 27 | // this._bodyHeight=300.0; 28 | _offstage=!_offstage; 29 | }); 30 | },) 31 | ], 32 | ), 33 | ), 34 | ), 35 | new Card( 36 | child: new AnimatedContainer( 37 | // child: new Row( 38 | // mainAxisAlignment: MainAxisAlignment.end, 39 | // crossAxisAlignment: CrossAxisAlignment.start, 40 | // children: [ 41 | // new IconButton(icon: new Icon(Icons.keyboard_arrow_up), onPressed: () { 42 | // setState((){ 43 | // this._bodyHeight =0.0; 44 | // 45 | // }); },), 46 | // ], 47 | // ), 48 | child: Offstage(offstage: _offstage,child: Container(height: 100,),), 49 | curve: Curves.easeInOut, 50 | duration: const Duration(milliseconds: 500), 51 | // height: _bodyHeight, 52 | // color: Colors.red, 53 | ), 54 | ), 55 | new Card( 56 | child: new Container( 57 | height: 50.0, 58 | child: new Row( 59 | mainAxisAlignment: MainAxisAlignment.end, 60 | children: [ 61 | new IconButton(icon: new Icon(Icons.keyboard_arrow_down), onPressed: () { 62 | setState((){ 63 | this._bodyHeight=300.0; 64 | }); 65 | },) 66 | ], 67 | ), 68 | ), 69 | ), 70 | new Card( 71 | child: new AnimatedContainer( 72 | child: new Row( 73 | mainAxisAlignment: MainAxisAlignment.end, 74 | crossAxisAlignment: CrossAxisAlignment.start, 75 | children: [ 76 | new IconButton(icon: new Icon(Icons.keyboard_arrow_up), onPressed: () { 77 | setState((){ 78 | this._bodyHeight =0.0; 79 | 80 | }); },), 81 | ], 82 | ), 83 | curve: Curves.easeInOut, 84 | duration: const Duration(milliseconds: 500), 85 | height: _bodyHeight, 86 | // color: Colors.red, 87 | ), 88 | ), 89 | ], 90 | ), 91 | ), 92 | ); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /lib/ui/page/test/ExpansionList.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/foundation.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class ListItem { 5 | final WidgetBuilder bodyBuilder; 6 | final String title; 7 | final String subtitle; 8 | bool isExpandedInitially; 9 | 10 | ListItem({ 11 | @required this.bodyBuilder, 12 | @required this.title, 13 | this.subtitle = "", 14 | this.isExpandedInitially = false, 15 | }) : assert(title != null), 16 | assert(bodyBuilder != null); 17 | 18 | ExpansionPanelHeaderBuilder get headerBuilder => 19 | (context, isExpanded) => new Row(children: [ 20 | new SizedBox(width: 100.0, child: new Text(title)), 21 | new Text(subtitle) 22 | ]); 23 | } 24 | 25 | class ExpansionList extends StatefulWidget { 26 | /// The items that the expansion list should display; this can change 27 | /// over the course of the object but probably shouldn't as it won't 28 | /// transition nicely or anything like that. 29 | final List items; 30 | 31 | ExpansionList(this.items) { 32 | // quick check to make sure there's no duplicate titles. 33 | assert(new Set.from(items.map((li) => li.title)).length == items.length); 34 | } 35 | 36 | @override 37 | State createState() => new ExpansionListState(); 38 | } 39 | 40 | class ExpansionListState extends State { 41 | Map expandedByTitle = new Map(); 42 | 43 | @override 44 | Widget build(BuildContext context) { 45 | return new ExpansionPanelList( 46 | children: widget.items 47 | .map( 48 | (item) => new ExpansionPanel( 49 | headerBuilder: item.headerBuilder, 50 | body: new Builder(builder: item.bodyBuilder), 51 | isExpanded: 52 | expandedByTitle[item.title] ?? item.isExpandedInitially), 53 | ) 54 | .toList(growable: false), 55 | expansionCallback: (int index, bool isExpanded) { 56 | setState(() { 57 | expandedByTitle[widget.items[index].title] = !isExpanded; 58 | }); 59 | }, 60 | ); 61 | } 62 | } 63 | 64 | void main() => runApp( 65 | new MaterialApp( 66 | home: new SingleChildScrollView( 67 | child: new SafeArea( 68 | child: new Material( 69 | child: new ExpansionList( 70 | [ 71 | new ListItem( 72 | title: "Title 1", 73 | subtitle: "Subtitle 1", 74 | bodyBuilder: (context) => new Text("Body 1")), 75 | new ListItem( 76 | title: "Title 2", 77 | subtitle: "Subtitle 2", 78 | bodyBuilder: (context) => new Text("Body 1"), 79 | isExpandedInitially: true) 80 | ], 81 | ), 82 | ), 83 | ), 84 | ), 85 | ), 86 | ); -------------------------------------------------------------------------------- /lib/ui/page/test/gridview_height_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GridViewHeightPage extends StatefulWidget { 4 | GridViewHeightPage({Key key, this.title}) : super(key: key); 5 | 6 | final String title; 7 | 8 | @override 9 | _GridViewHeightPageState createState() => new _GridViewHeightPageState(); 10 | } 11 | 12 | class _GridViewHeightPageState extends State { 13 | List widgetList = ['A', 'B', 'C']; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | var size = MediaQuery.of(context).size; 18 | 19 | /*24 is for notification bar on Android*/ 20 | final double itemHeight = (size.height - kToolbarHeight - 20) / 2; 21 | final double itemWidth = size.width / 2; 22 | 23 | return new Scaffold( 24 | appBar: new AppBar( 25 | title: new Text(widget.title), 26 | ), 27 | body: new Container( 28 | child: new GridView.count( 29 | crossAxisCount: 2, 30 | childAspectRatio: (itemWidth / itemHeight), 31 | controller: new ScrollController(keepScrollOffset: false), 32 | shrinkWrap: true, 33 | scrollDirection: Axis.vertical, 34 | children: widgetList.map((String value) { 35 | return new Container( 36 | color: Colors.green, 37 | margin: new EdgeInsets.all(1.0), 38 | child: new Center( 39 | child: new Text( 40 | value, 41 | style: new TextStyle( 42 | fontSize: 50.0, 43 | color: Colors.white, 44 | ), 45 | ), 46 | ), 47 | ); 48 | }).toList(), 49 | ), 50 | ), 51 | ); 52 | } 53 | } -------------------------------------------------------------------------------- /lib/ui/page/test/my_home_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter/scheduler.dart'; 3 | 4 | class MyHomePage1 extends StatefulWidget { 5 | const MyHomePage1({Key key, this.title}) : super(key: key); 6 | final String title; 7 | 8 | @override 9 | _MyHomePage1State createState() => _MyHomePage1State(); 10 | } 11 | 12 | class _MyHomePage1State extends State { 13 | final controller = ScrollController(); 14 | OverlayEntry sticky; 15 | GlobalKey stickyKey = GlobalKey(); 16 | 17 | @override 18 | void initState() { 19 | if (sticky != null) { 20 | sticky.remove(); 21 | } 22 | sticky = OverlayEntry( 23 | opaque: false, 24 | // lambda created to help working with hot-reload 25 | builder: (context) => stickyBuilder(context), 26 | ); 27 | 28 | // not possible inside initState 29 | SchedulerBinding.instance.addPostFrameCallback((_) { 30 | Overlay.of(context).insert(sticky); 31 | }); 32 | super.initState(); 33 | } 34 | 35 | @override 36 | void dispose() { 37 | // remove possible overlays on dispose as they would be visible even after [Navigator.push] 38 | sticky.remove(); 39 | super.dispose(); 40 | } 41 | 42 | @override 43 | Widget build(BuildContext context) { 44 | return Scaffold( 45 | body: ListView.builder( 46 | controller: controller, 47 | itemBuilder: (context, index) { 48 | if (index == 6) { 49 | return Container( 50 | key: stickyKey, 51 | height: 100.0, 52 | color: Colors.green, 53 | child: const Text("I'm fat"), 54 | ); 55 | } 56 | return ListTile( 57 | title: Text( 58 | 'Hello $index', 59 | style: const TextStyle(color: Colors.white), 60 | ), 61 | ); 62 | }, 63 | ), 64 | ); 65 | } 66 | 67 | Widget stickyBuilder(BuildContext context) { 68 | return AnimatedBuilder( 69 | animation: controller, 70 | builder: (_,Widget child) { 71 | final keyContext = stickyKey.currentContext; 72 | if (keyContext != null) { 73 | // widget is visible 74 | final box = keyContext.findRenderObject() as RenderBox; 75 | final pos = box.localToGlobal(Offset.zero); 76 | return Positioned( 77 | top: pos.dy + box.size.height, 78 | left: 50.0, 79 | right: 50.0, 80 | height: box.size.height, 81 | child: Material( 82 | child: Container( 83 | alignment: Alignment.center, 84 | color: Colors.purple, 85 | child: const Text("^ Nah I think you're okay"), 86 | ), 87 | ), 88 | ); 89 | } 90 | return Container(); 91 | }, 92 | ); 93 | } 94 | } -------------------------------------------------------------------------------- /lib/ui/page/test/scroll_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_taobao/ui/page/home/searchlist_page.dart'; 3 | 4 | class ScrollPage extends StatefulWidget { 5 | @override 6 | _ScrollPageState createState() => _ScrollPageState(); 7 | } 8 | 9 | class _ScrollPageState extends State { 10 | List gridData = List(); 11 | 12 | _setGridData() { 13 | for (int i = 0; i < 50; i++) { 14 | gridData.add(i); 15 | } 16 | } 17 | 18 | @override 19 | void initState() { 20 | _setGridData(); 21 | } 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return Scaffold(appBar: AppBar(title: Text('方案一'),actions: [ 26 | IconButton(icon: Icon(Icons.arrow_upward), onPressed: (){ 27 | setState(() { 28 | 29 | }); 30 | }) 31 | ],), body: _bodyWid()); 32 | } 33 | 34 | Widget _bodyWid() { 35 | return CustomScrollView(slivers: [ 36 | SliverList( 37 | delegate: SliverChildBuilderDelegate((BuildContext context, int index) { 38 | return _typeTitleWid('热门分类'); 39 | }, childCount: 1)), 40 | SliverPadding(padding: const EdgeInsets.all(8.0), sliver: _typeGridWid()), 41 | SliverList( 42 | delegate: SliverChildBuilderDelegate((BuildContext context, int index) { 43 | return _typeTitleWid('智能推荐'); 44 | }, childCount: 1)), 45 | _typeListWid() 46 | ]); 47 | } 48 | 49 | Widget _typeTitleWid(var titleStr) { 50 | return Container( 51 | color: Colors.white, 52 | child: Column( 53 | mainAxisAlignment: MainAxisAlignment.start, 54 | mainAxisSize: MainAxisSize.max, 55 | crossAxisAlignment: CrossAxisAlignment.start, 56 | children: [ 57 | Padding( 58 | padding: EdgeInsets.all(10.0), 59 | child: Text(titleStr, style: TextStyle(color: Color(0xFF808080), fontSize: 14.0))), 60 | Divider(color: Color(0xFF808080), height: 0.5) 61 | ])); 62 | } 63 | 64 | Widget _typeGridWid() { 65 | return SliverGrid( 66 | gridDelegate: new SliverGridDelegateWithFixedCrossAxisCount( 67 | crossAxisCount: 4, mainAxisSpacing: 8.0, crossAxisSpacing: 8.0, childAspectRatio: 4.0), 68 | delegate: SliverChildBuilderDelegate((BuildContext context, int index) { 69 | if (index + 8 == gridData.length) { 70 | for (int i = 0; i < 50; i++) { 71 | gridData.add(i); 72 | } 73 | try { 74 | setState(() {}); 75 | } catch (e) { 76 | 77 | } 78 | } 79 | return Container( 80 | // height: 64.0, 81 | decoration: BoxDecoration(color: Colors.grey, borderRadius: BorderRadius.circular(3.0)), 82 | child: 83 | Center(child: Text('分类 ${(index + 1)}', style: TextStyle(color: Color(0xFF333333), fontSize: 14.0)))); 84 | }, childCount: gridData.length)); 85 | } 86 | 87 | Widget _typeListWid() { 88 | return SliverFixedExtentList( 89 | itemExtent: 350.0, 90 | delegate: SliverChildBuilderDelegate((BuildContext context, int index) { 91 | //return SearchResultListPage('iphone'); 92 | 93 | // return Container( 94 | // child: Column( 95 | // mainAxisAlignment: MainAxisAlignment.center, 96 | // mainAxisSize: MainAxisSize.max, 97 | // crossAxisAlignment: CrossAxisAlignment.start, 98 | // children: [ 99 | // Padding( 100 | // padding: EdgeInsets.all(10.0), 101 | // child: Text('推荐精彩内容 ${(index + 1)}', 102 | // textAlign: TextAlign.left, style: TextStyle(color: Color(0xFF333333), fontSize: 15.0))), 103 | // Padding(padding: EdgeInsets.only(top: 4.0), child: Divider(color: Color(0xFF808080), height: 0.5)) 104 | // ])); 105 | }, childCount: 1)); 106 | } 107 | } 108 | -------------------------------------------------------------------------------- /lib/ui/page/test/scroll_page1.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ScrollPage1 extends StatefulWidget { 4 | @override 5 | _ScrollPage1State createState() => _ScrollPage1State(); 6 | } 7 | class _ScrollPage1State extends State { 8 | List gridData = List(); 9 | 10 | _setGridData() { 11 | for (int i = 0; i < 15; i++) { 12 | gridData.add(i); 13 | } 14 | } 15 | 16 | @override 17 | void initState() { 18 | _setGridData(); 19 | } 20 | 21 | @override 22 | Widget build(BuildContext context) { 23 | return Scaffold(appBar: AppBar(title: Text('方案二')), body: _bodyWid2()); 24 | } 25 | 26 | Widget _typeGridWid2() { 27 | return GridView.count( 28 | primary: false, 29 | shrinkWrap: true, 30 | crossAxisCount: 4, 31 | mainAxisSpacing: 8.0, 32 | crossAxisSpacing: 8.0, 33 | childAspectRatio: 4.0, 34 | padding: EdgeInsets.all(10.0), 35 | children: gridData.map((int index) { 36 | return Container( 37 | height: 64.0, 38 | decoration: BoxDecoration( 39 | color: Colors.grey, borderRadius: BorderRadius.circular(3.0)), 40 | child: Center( 41 | child: Text('分类 ${(index + 1)}', 42 | style: TextStyle( 43 | color: Color(0xFF333333), fontSize: 14.0)))); 44 | }).toList()); 45 | } 46 | 47 | Widget _typeListWid2() { 48 | return ListView.separated( 49 | primary: false, 50 | shrinkWrap: true, 51 | itemCount: gridData.length, 52 | separatorBuilder: (BuildContext context, int index) => new Divider(), 53 | itemBuilder: (context, item) { 54 | return Padding( 55 | padding: EdgeInsets.all(12.0), 56 | child: Text('推荐精彩内容 ${(item + 1)}', 57 | style: TextStyle(color: Color(0xFF333333), fontSize: 15.0))); 58 | }); 59 | } 60 | 61 | Widget _bodyWid2() { 62 | return ListView( 63 | primary: false, 64 | shrinkWrap: true, 65 | children: [ 66 | // _typeTitleWid('热门分类'), 67 | _typeGridWid2(), 68 | // _typeTitleWid('智能推荐'), 69 | Container(height: MediaQuery.of(context).size.height-44-20,child: _typeListWid2(),) 70 | ]); 71 | } 72 | } 73 | 74 | -------------------------------------------------------------------------------- /lib/ui/page/test/textfield_test_page.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_taobao/common/style/gzx_style.dart'; 3 | 4 | class TextFieldTestPage extends StatefulWidget { 5 | @override 6 | _TextFieldTestPageState createState() => _TextFieldTestPageState(); 7 | } 8 | 9 | class _TextFieldTestPageState extends State { 10 | TextEditingController textEditingController = TextEditingController(); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | appBar: AppBar(), 16 | body: searchCard(), 17 | ); 18 | } 19 | 20 | Widget searchCard() => Padding( 21 | // padding: const EdgeInsets.only(top: 8,bottom: 8), 22 | padding: const EdgeInsets.only(top: 0, right: 0), 23 | child: Card( 24 | elevation: 2.0, 25 | shape: const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(20.0))), //设置圆角 26 | child: Padding( 27 | padding: const EdgeInsets.only(top: 0), 28 | child: Row( 29 | mainAxisAlignment: MainAxisAlignment.center, 30 | crossAxisAlignment: CrossAxisAlignment.center, 31 | children: [ 32 | Padding( 33 | padding: EdgeInsets.only(right: 5, top: 0, left: 5), 34 | child: Icon( 35 | GZXIcons.search_light, 36 | color: Colors.grey, 37 | size: 20, 38 | ), 39 | ) 40 | , 41 | // Container( 42 | // color: Colors.red, 43 | // child: 44 | Expanded( 45 | child: Container( 46 | // color: Colors.red, 47 | height: 30, 48 | child: TextField( 49 | // onTap: widget.onTap, 50 | // focusNode: widget.focusNode, 51 | style: TextStyle(fontSize: 13), 52 | controller: textEditingController, 53 | // autofocus: true, 54 | // focusNode: _focusNode, 55 | decoration: InputDecoration( 56 | contentPadding: const EdgeInsets.only(top: 6), 57 | border: InputBorder.none, 58 | // hintText: searchHintTexts[Random().nextInt(searchHintTexts.length)], 59 | suffixIcon: textEditingController.text.length == 0 60 | ? SizedBox() 61 | : Container( 62 | width: 20.0, 63 | height: 20.0, 64 | alignment: Alignment.centerRight, 65 | child: new IconButton( 66 | alignment: Alignment.centerRight, 67 | padding: const EdgeInsets.only(right: 6), 68 | iconSize: 18.0, 69 | icon: Icon( 70 | Icons.cancel, 71 | color: Colors.grey[500], 72 | size: 16, 73 | ), 74 | //onPressed: , 75 | onPressed: () { 76 | setState(() { 77 | // textEditingController.clear(); 78 | textEditingController.text = ''; 79 | }); 80 | //// setState(() { 81 | //// _inputText = ""; 82 | //// _hasdeleteIcon = (_inputText.isNotEmpty); 83 | //// widget.fieldCallBack(_inputText); 84 | //// }); 85 | }, 86 | ), 87 | ), 88 | ), 89 | // onSubmitted: widget.onSubmitted, 90 | onChanged: (value){ 91 | print('onchanged $value'); 92 | setState(() { 93 | 94 | }); 95 | }, 96 | // ), 97 | )), 98 | ), 99 | 100 | textEditingController.text.length == 0 101 | ? Padding( 102 | padding: EdgeInsets.only(right: 5), 103 | child: Icon( 104 | GZXIcons.camera, 105 | color: Colors.grey, 106 | size: 20, 107 | )) 108 | : SizedBox(), 109 | ], 110 | ), 111 | ), 112 | ), 113 | ); 114 | } 115 | -------------------------------------------------------------------------------- /lib/ui/tools/arc_clipper.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ArcClipper extends CustomClipper { 4 | @override 5 | Path getClip(Size size) { 6 | 7 | size=new Size(size.width, 150); 8 | var path = new Path(); 9 | path.lineTo(0.0, size.height); 10 | 11 | var firstControlPoint = new Offset(size.width / 2, size.height-20); 12 | var firstPoint = new Offset(size.width, size.height); 13 | path.quadraticBezierTo(firstControlPoint.dx, firstControlPoint.dy, 14 | firstPoint.dx, firstPoint.dy); 15 | 16 | // var secondControlPoint = 17 | // new Offset(size.width - (size.width / 2), size.height-30); 18 | // var secondPoint = new Offset(size.width, size.height ); 19 | // path.quadraticBezierTo(secondControlPoint.dx, secondControlPoint.dy, 20 | // secondPoint.dx, secondPoint.dy); 21 | 22 | path.lineTo(size.width, 0.0); 23 | path.close(); 24 | 25 | return path; 26 | } 27 | 28 | @override 29 | bool shouldReclip(CustomClipper oldClipper) => false; 30 | } 31 | -------------------------------------------------------------------------------- /lib/ui/widget/GZXUserIconWidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | /** 4 | * 头像Icon 5 | */ 6 | 7 | class GZXUserIconWidget extends StatelessWidget { 8 | final bool isNetwork; 9 | final String image; 10 | final VoidCallback onPressed; 11 | final double width; 12 | final double height; 13 | final EdgeInsetsGeometry padding; 14 | 15 | GZXUserIconWidget({this.isNetwork, this.image, this.onPressed, this.width = 30.0, this.height = 30.0, this.padding}); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return new RawMaterialButton( 20 | materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, 21 | padding: padding ?? const EdgeInsets.only(top: 4.0, right: 5.0, left: 5.0), 22 | constraints: const BoxConstraints(minWidth: 0.0, minHeight: 0.0), 23 | child: new ClipRRect( 24 | borderRadius: new BorderRadius.all(new Radius.circular(5.0)), 25 | child: this.isNetwork 26 | ? new FadeInImage.assetNetwork( 27 | placeholder: 'static/images/default_nor_avatar.png', 28 | //预览图 29 | fit: BoxFit.fitWidth, 30 | image: image, 31 | width: width, 32 | height: height, 33 | ) 34 | : new Image.asset( 35 | image, 36 | fit: BoxFit.cover, 37 | width: width, 38 | height: height, 39 | ), 40 | ), 41 | onPressed: onPressed); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /lib/ui/widget/animation_headlines.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:flutter_taobao/ui/widget/animation/diff_scale_text.dart'; 5 | import 'package:flutter_taobao/common/data/home.dart'; 6 | 7 | class AnimationHeadlinesWidget extends StatefulWidget { 8 | @override 9 | _AnimationHeadlinesWidgetState createState() => _AnimationHeadlinesWidgetState(); 10 | } 11 | 12 | class _AnimationHeadlinesWidgetState extends State { 13 | 14 | int _diffScaleNext = 0; 15 | 16 | @override 17 | void initState() { 18 | // TODO: implement initState 19 | super.initState(); 20 | 21 | Timer _countdownTimer = new Timer.periodic(new Duration(seconds: 3), (timer) { 22 | // print('countdownTimer.tick'); 23 | if(mounted){ 24 | setState(() { 25 | _diffScaleNext++; 26 | }); 27 | } 28 | }); 29 | 30 | } 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | 35 | return Row(children: [ 36 | SizedBox( 37 | width: 8, 38 | ), 39 | Text( 40 | '淘宝头条', 41 | style: TextStyle(fontWeight: FontWeight.bold), 42 | ), 43 | SizedBox( 44 | width: 8, 45 | ), 46 | ClipRRect( 47 | borderRadius: BorderRadius.circular(3), 48 | child: Container( 49 | color: Color(0xFFfef2f2), 50 | child: Text( 51 | '精华', 52 | style: TextStyle( 53 | fontSize: 10, 54 | color: Colors.red[500], 55 | ), 56 | ), 57 | ), 58 | ), 59 | SizedBox( 60 | width: 8, 61 | ), 62 | Expanded( 63 | child: GestureDetector( 64 | onTap: () { 65 | // setState(() { 66 | // _diffScaleNext++; 67 | // }); 68 | }, 69 | child: Container( 70 | // color: bgColor, 71 | child: DiffScaleText( 72 | text: headlines[_diffScaleNext % headlines.length], 73 | textStyle: TextStyle(fontSize: 12, color: Colors.black), 74 | ), 75 | height: 30, 76 | alignment: Alignment.centerLeft, 77 | ))) 78 | ]); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /lib/ui/widget/banner.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_swiper/flutter_swiper.dart'; 3 | import 'package:flutter_taobao/common/utils/screen_util.dart'; 4 | class RectSwiperPaginationBuilder extends SwiperPlugin { 5 | ///color when current index,if set null , will be Theme.of(context).primaryColor 6 | final Color activeColor; 7 | 8 | ///,if set null , will be Theme.of(context).scaffoldBackgroundColor 9 | final Color color; 10 | 11 | ///Size of the rect when activate 12 | final Size activeSize; 13 | 14 | ///Size of the rect 15 | final Size size; 16 | 17 | /// Space between rects 18 | final double space; 19 | 20 | final Key key; 21 | 22 | const RectSwiperPaginationBuilder( 23 | {this.activeColor, 24 | this.color, 25 | this.key, 26 | this.size: const Size(10.0, 2.0), 27 | this.activeSize: const Size(10.0, 2.0), 28 | this.space: 3.0}); 29 | 30 | @override 31 | Widget build(BuildContext context, SwiperPluginConfig config) { 32 | List list = []; 33 | 34 | int itemCount = config.itemCount; 35 | int activeIndex = config.activeIndex; 36 | 37 | for (int i = 0; i < itemCount; ++i) { 38 | bool active = i == activeIndex; 39 | Size size = active ? this.activeSize : this.size; 40 | list.add(Container( 41 | width: size.width, 42 | height: size.height, 43 | color: active ? activeColor : color, 44 | key: Key("pagination_$i"), 45 | margin: EdgeInsets.all(space), 46 | )); 47 | } 48 | 49 | return new Container(child: Row( 50 | key: key, 51 | mainAxisSize: MainAxisSize.min, 52 | crossAxisAlignment: CrossAxisAlignment.end, 53 | children: list, 54 | ),color: Colors.red,); 55 | } 56 | } 57 | 58 | class GZXSwipperBanner extends StatelessWidget { 59 | final List banners; 60 | GZXSwipperBanner({this.banners}); 61 | @override 62 | Widget build(BuildContext context) { 63 | double width = MediaQuery.of(context).size.width; 64 | double height = ScreenUtil().L(115); 65 | return Container( 66 | width: width, 67 | height: height, 68 | child: Swiper( 69 | itemBuilder: (BuildContext context, index) { 70 | return Image.network( 71 | banners[index], 72 | width: width, 73 | height: height, 74 | ); 75 | }, 76 | itemCount: banners.length, 77 | //viewportFraction: 0.9, 78 | pagination: new SwiperPagination( 79 | alignment: Alignment.bottomCenter, 80 | builder: RectSwiperPaginationBuilder( 81 | color: Color(0xFF999999), 82 | activeColor: Theme.of(context).primaryColor, 83 | size: Size(10, 3), 84 | activeSize: Size(10, 3),space: 0)), 85 | scrollDirection: Axis.horizontal, 86 | autoplay: true, 87 | onTap: (index) => print('点击了第$index个'), 88 | ), 89 | ); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /lib/ui/widget/gzx_checkbox.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GZXCheckbox extends StatefulWidget { 4 | final double size; 5 | final Widget descriptionWidget; 6 | final double spacing; 7 | final ValueChanged onChanged; 8 | final bool value; 9 | 10 | const GZXCheckbox( 11 | {Key key, 12 | @required this.value = true, 13 | @required this.onChanged, 14 | this.size = 18, 15 | this.descriptionWidget, 16 | this.spacing = 0}) 17 | : super(key: key); 18 | 19 | @override 20 | _GZXCheckboxState createState() => _GZXCheckboxState(); 21 | } 22 | 23 | class _GZXCheckboxState extends State { 24 | bool _isSelected = false; 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | return GestureDetector( 29 | onTap: () { 30 | widget.onChanged(!widget.value); 31 | }, 32 | child: Row( 33 | children: [ 34 | !widget.value 35 | ? Container( 36 | width: widget.size, 37 | height: widget.size, 38 | decoration: BoxDecoration( 39 | borderRadius: BorderRadius.all(Radius.circular(10)), 40 | border: Border.all(color: Color(0xFFc5c6c5), width: 1)), 41 | ) 42 | : Container( 43 | width: widget.size, 44 | height: widget.size, 45 | decoration: BoxDecoration( 46 | borderRadius: BorderRadius.all(Radius.circular(widget.size / 2)), color: Color(0xFFfe5400)), 47 | child: Icon( 48 | Icons.check, 49 | size: widget.size - 4, 50 | color: Colors.white, 51 | ), 52 | ), 53 | SizedBox( 54 | width: widget.spacing, 55 | ), 56 | widget.descriptionWidget == null ? Container() : widget.descriptionWidget, 57 | ], 58 | ), 59 | ); 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /lib/ui/widget/gzx_item_tag.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GZXItemTag extends StatelessWidget { 4 | final String tag; 5 | 6 | GZXItemTag({Key key, this.tag}) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container( 11 | // height: 20, 12 | child: Chip( 13 | // elevation: 2, 14 | label: Text(tag, style: TextStyle(color: Colors.white, fontSize: 10,),), 15 | backgroundColor: _nameToColor(tag)), 16 | ); 17 | } 18 | 19 | Color _nameToColor(String name) { 20 | assert(name.length > 1); 21 | final int hash = name.hashCode & 0xffff; 22 | final double hue = (360.0 * hash / (1 << 15)) % 360.0; 23 | return HSVColor.fromAHSV(1.0, hue, 0.4, 0.90).toColor(); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /lib/ui/widget/gzx_quantity_widget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class GZXQuantityWidget extends StatelessWidget { 4 | final int quantity; 5 | final GestureTapCallback addTap; 6 | final GestureTapCallback removeTap; 7 | final Color borderColor; 8 | final double height; 9 | 10 | const GZXQuantityWidget( 11 | {Key key, 12 | this.quantity, 13 | this.addTap, 14 | this.removeTap, 15 | this.borderColor = const Color(0xFFedeeed), 16 | this.height = 20}) 17 | : super(key: key); 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Container( 22 | height: height, 23 | decoration: BoxDecoration( 24 | borderRadius: BorderRadius.all(Radius.circular(2)), border: Border.all(color: borderColor, width: 1)), 25 | child: Row( 26 | mainAxisSize: MainAxisSize.min, 27 | children: [ 28 | GestureDetector( 29 | onTap: removeTap, 30 | child: Container( 31 | alignment: Alignment.center, 32 | width: 20, 33 | // height: 22, 34 | decoration: BoxDecoration(border: _getRemoveButtonBorder()), 35 | child: Icon( 36 | Icons.remove, 37 | color: Colors.grey, 38 | size: 10, 39 | ), 40 | ), 41 | ), 42 | Container( 43 | alignment: Alignment.center, 44 | width: 32, 45 | // height: 22, 46 | decoration: BoxDecoration(border: Border.all(color: Colors.white, width: 1)), 47 | child: Text( 48 | '$quantity', 49 | style: TextStyle(fontSize: 12, color: Colors.grey), 50 | )), 51 | GestureDetector( 52 | onTap: addTap, 53 | child: Container( 54 | alignment: Alignment.center, 55 | width: 20, 56 | // height: 22, 57 | decoration: BoxDecoration(border: _getAddButtonBorder()), 58 | child: Icon( 59 | Icons.add, 60 | color: Colors.grey, 61 | size: 10, 62 | ), 63 | ), 64 | ), 65 | ], 66 | ), 67 | ); 68 | } 69 | 70 | Border _getRemoveButtonBorder() { 71 | return Border( 72 | right: BorderSide(width: 1, color: borderColor), 73 | ); 74 | } 75 | 76 | Border _getAddButtonBorder() { 77 | return Border( 78 | left: BorderSide(width: 1, color: borderColor), 79 | ); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /lib/ui/widget/gzx_tabbar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_taobao/common/model/tab.dart'; 3 | 4 | class GZXTabBarWidget extends StatefulWidget implements PreferredSizeWidget { 5 | final List tabModels; 6 | final TabController tabController; 7 | final int currentIndex; 8 | const GZXTabBarWidget({Key key, this.tabModels, this.tabController, this.currentIndex}) : super(key: key); 9 | 10 | @override 11 | _GZXTabBarWidgetState createState() => _GZXTabBarWidgetState(); 12 | 13 | @override 14 | // TODO: implement preferredSize 15 | Size get preferredSize => Size.fromHeight(30); 16 | } 17 | 18 | class _GZXTabBarWidgetState extends State { 19 | // get preferredSize { 20 | // return Size.fromHeight(60); 21 | // } 22 | int _selectedIndex = 0; 23 | 24 | @override 25 | void initState() { 26 | // TODO: implement initState 27 | super.initState(); 28 | } 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | return Container( 33 | color: Colors.white, 34 | // width: MediaQuery.of(context).size.width, 35 | child: TabBar( 36 | controller: widget.tabController, 37 | indicatorColor: Colors.transparent, 38 | indicatorSize: TabBarIndicatorSize.label, 39 | isScrollable: true, 40 | // labelColor: KColorConstant.themeColor, 41 | labelColor: Color(0xFFfe5100), 42 | unselectedLabelColor: Colors.black, 43 | labelPadding: EdgeInsets.only(right: 5.0, left: 5.0), 44 | onTap: (i) { 45 | _selectedIndex = i; 46 | 47 | setState(() {}); 48 | }, 49 | tabs: widget.tabModels 50 | .map((i) => Container( 51 | // margin: const EdgeInsets.all(0 ), 52 | padding: const EdgeInsets.all(0), 53 | // width: 30, 54 | height: 44.0, 55 | child: new Tab( 56 | child: Row( 57 | children: [ 58 | Column( 59 | children: [ 60 | SizedBox( 61 | height: 3, 62 | ), 63 | Text(i.title), 64 | SizedBox( 65 | height: 3, 66 | ), 67 | widget.tabModels.indexOf(i) == widget.currentIndex 68 | ? ClipRRect( 69 | borderRadius: BorderRadius.circular(7), 70 | child: Container( 71 | padding: const EdgeInsets.all(2), 72 | color: Color(0xFFfe5100), 73 | child: Text( 74 | i.subtitle, 75 | style: TextStyle(fontSize: 9, color: Colors.white), 76 | ), 77 | ), 78 | ) 79 | : Expanded( 80 | child: Text( 81 | i.subtitle, 82 | style: TextStyle(fontSize: 9, color: Color(0xFFb5b6b5)), 83 | ), 84 | ) 85 | ], 86 | ), 87 | SizedBox( 88 | width: 10, 89 | ), 90 | Container( 91 | width: 1, 92 | height: 30, 93 | color: Color(0xFFc9c9ca), 94 | ) 95 | ], 96 | )), 97 | )) 98 | .toList()), 99 | ); 100 | } 101 | } 102 | -------------------------------------------------------------------------------- /lib/ui/widget/gzx_topbar.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:flutter/material.dart'; 4 | 5 | import 'package:flutter/cupertino.dart'; 6 | import 'package:flutter_taobao/common/style/gzx_style.dart'; 7 | import 'package:flutter_taobao/common/utils/navigator_utils.dart'; 8 | import 'package:flutter_taobao/ui/widget/gzx_search_card.dart'; 9 | 10 | class GZXTopBar extends StatelessWidget { 11 | // This ui.widget is the root of your application. 12 | TextEditingController _keywordTextEditingController = TextEditingController(); 13 | 14 | final List searchHintTexts; 15 | 16 | GZXTopBar({Key key, this.searchHintTexts}) : super(key: key); 17 | 18 | FocusNode _focus = new FocusNode(); 19 | 20 | BuildContext _context; 21 | 22 | void _onFocusChange() { 23 | // print('HomeTopBar._onFocusChange${_focus.hasFocus}'); 24 | // if(!_focus.hasFocus){ 25 | // return; 26 | // } 27 | // NavigatorUtils.gotoSearchGoodsPage(_context); 28 | } 29 | 30 | @override 31 | Widget build(BuildContext context) { 32 | _context = context; 33 | _focus.addListener(_onFocusChange); 34 | 35 | final double statusBarHeight = MediaQuery.of(context).padding.top; 36 | return Container( 37 | color: Theme.of(context).primaryColor, 38 | padding: EdgeInsets.only(top: statusBarHeight, left: 0, right: 0, bottom: 0), 39 | child: Row( 40 | children: [ 41 | Container( 42 | margin: EdgeInsets.only(right: 6.0,left: 4), 43 | // color: Colors.red, 44 | height: 30, 45 | width: 30, 46 | child: Column( 47 | mainAxisAlignment: MainAxisAlignment.center, 48 | children: [ 49 | Icon( 50 | GZXIcons.scan, 51 | color: Colors.white, 52 | size: 18, 53 | ), 54 | SizedBox( 55 | height: 3, 56 | ), 57 | Expanded( 58 | child: Text( 59 | '扫一扫', 60 | style: TextStyle( 61 | fontSize: 8, 62 | color: Colors.white, 63 | ), 64 | ), 65 | ) 66 | ], 67 | ), 68 | ), 69 | 70 | Expanded( 71 | flex: 1, 72 | child: GZXSearchCardWidget( 73 | elevation: 0, 74 | onTap: (){ 75 | FocusScope.of(context).requestFocus(FocusNode()); 76 | NavigatorUtils.gotoSearchGoodsPage(_context); 77 | }, 78 | textEditingController: _keywordTextEditingController, 79 | focusNode: _focus, 80 | ), 81 | ), 82 | 83 | Container( 84 | margin: EdgeInsets.only(left: 6.0,right: 4), 85 | // color: Colors.red, 86 | width: 30, 87 | height: 30, 88 | child: Column( 89 | mainAxisAlignment: MainAxisAlignment.center, 90 | children: [ 91 | Icon( 92 | GZXIcons.qr_code, 93 | color: Colors.white, 94 | size: 18, 95 | ), 96 | SizedBox( 97 | height: 3, 98 | ), 99 | Expanded( 100 | child: Text( 101 | '会员码', 102 | style: TextStyle( 103 | fontSize: 8, 104 | color: Colors.white, 105 | ), 106 | ), 107 | ) 108 | ], 109 | ), 110 | ), 111 | // Container( 112 | // margin: EdgeInsets.only(left: 6.0), 113 | // child: Icon( 114 | // Icons.add_alert, 115 | // size: 25.0, 116 | // color: Color.fromRGBO(132, 95, 63, 1.0), 117 | // ), 118 | // ) 119 | ], 120 | ), 121 | ); 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /lib/ui/widget/menue.dart: -------------------------------------------------------------------------------- 1 | import 'package:cached_network_image/cached_network_image.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_taobao/common/model/kingkong.dart'; 4 | import 'package:flutter_taobao/common/utils/screen_util.dart'; 5 | 6 | class HomeKingKongWidget extends StatelessWidget { 7 | final List data; 8 | final String bgurl; 9 | final String fontColor; 10 | HomeKingKongWidget({this.data, this.bgurl, this.fontColor}); 11 | @override 12 | Widget build(BuildContext context) { 13 | double deviceWidth = MediaQuery.of(context).size.width; 14 | 15 | double height = ScreenUtil().L(80); 16 | return Container( 17 | width: deviceWidth, 18 | height: height, 19 | child: _buildRow(deviceWidth), 20 | decoration: bgurl != '' 21 | ? BoxDecoration( 22 | image: DecorationImage( 23 | image: NetworkImage(bgurl), fit: BoxFit.cover)) 24 | : null, 25 | ); 26 | } 27 | 28 | Row _buildRow(double deviceWidth) { 29 | var colorInt = int.parse(fontColor.replaceAll('#', '0x')); 30 | Color color = new Color(colorInt).withOpacity(1.0); 31 | double iconWidth = ScreenUtil().L(58); 32 | double iconHeight = ScreenUtil().L(47); 33 | List widgets = data.map((i) { 34 | return Expanded( 35 | child: Column( 36 | mainAxisAlignment: MainAxisAlignment.center, 37 | children: [ 38 | // Image.network( 39 | // i.picUrl, 40 | // width: iconWidth, 41 | // height: iconHeight, 42 | // ), 43 | CachedNetworkImage( 44 | width: iconWidth, 45 | height: iconHeight, 46 | imageUrl: i.picUrl, 47 | // placeholder: (context, url) => new CircularProgressIndicator(), 48 | errorWidget: (context, url, error) => new Icon(Icons.error), 49 | ), 50 | Text( 51 | i.title, 52 | style: TextStyle( 53 | fontSize: 13.0, 54 | height: 1.5, 55 | decoration: TextDecoration.none, 56 | color: color), 57 | ) 58 | ], 59 | )); 60 | }).toList(); 61 | return Row( 62 | children: widgets, 63 | ); 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /lib/ui/widget/pull_load/ListState.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_taobao/ui/widget/pull_load/PullLoadWidget.dart'; 4 | 5 | /** 6 | * 上下拉刷新列表的通用State 7 | */ 8 | mixin ListState on State, AutomaticKeepAliveClientMixin { 9 | bool isShow = false; 10 | 11 | bool isLoading = false; 12 | 13 | int page = 1; 14 | 15 | final List dataList = new List(); 16 | 17 | final PullLoadWidgetControl pullLoadWidgetControl = new PullLoadWidgetControl(); 18 | 19 | final GlobalKey refreshIndicatorKey = new GlobalKey(); 20 | 21 | showRefreshLoading() { 22 | new Future.delayed(const Duration(seconds: 0), () { 23 | refreshIndicatorKey.currentState.show().then((e) {}); 24 | return true; 25 | }); 26 | } 27 | 28 | @protected 29 | resolveRefreshResult(res) { 30 | if (res != null && res.result) { 31 | pullLoadWidgetControl.dataList.clear(); 32 | if (isShow) { 33 | setState(() { 34 | pullLoadWidgetControl.dataList.addAll(res.data); 35 | }); 36 | } 37 | } 38 | } 39 | 40 | @protected 41 | Future handleRefresh() async { 42 | if (isLoading) { 43 | return null; 44 | } 45 | isLoading = true; 46 | page = 1; 47 | var res = await requestRefresh(); 48 | resolveRefreshResult(res); 49 | resolveDataResult(res); 50 | if (res.next != null) { 51 | var resNext = await res.next; 52 | resolveRefreshResult(resNext); 53 | resolveDataResult(resNext); 54 | } 55 | isLoading = false; 56 | return null; 57 | } 58 | 59 | @protected 60 | Future onLoadMore() async { 61 | if (isLoading) { 62 | return null; 63 | } 64 | isLoading = true; 65 | page++; 66 | var res = await requestLoadMore(); 67 | if (res != null && res.result) { 68 | if (isShow) { 69 | setState(() { 70 | pullLoadWidgetControl.dataList.addAll(res.data); 71 | }); 72 | } 73 | } 74 | resolveDataResult(res); 75 | isLoading = false; 76 | return null; 77 | } 78 | 79 | @protected 80 | resolveDataResult(res) { 81 | if (isShow) { 82 | setState(() { 83 | pullLoadWidgetControl.needLoadMore = (res != null && res.data != null && res.data.length == 20); 84 | }); 85 | } 86 | } 87 | 88 | @protected 89 | clearData() { 90 | if (isShow) { 91 | setState(() { 92 | pullLoadWidgetControl.dataList.clear(); 93 | }); 94 | } 95 | } 96 | 97 | ///下拉刷新数据 98 | @protected 99 | requestRefresh() async {} 100 | 101 | ///上拉更多请求数据 102 | @protected 103 | requestLoadMore() async {} 104 | 105 | ///是否需要第一次进入自动刷新 106 | @protected 107 | bool get isRefreshFirst; 108 | 109 | ///是否需要头部 110 | @protected 111 | bool get needHeader => false; 112 | 113 | ///是否需要保持 114 | @override 115 | bool get wantKeepAlive => true; 116 | 117 | List get getDataList => dataList; 118 | 119 | @override 120 | void initState() { 121 | isShow = true; 122 | super.initState(); 123 | pullLoadWidgetControl.needHeader = needHeader; 124 | pullLoadWidgetControl.dataList = getDataList; 125 | if (pullLoadWidgetControl.dataList.length == 0 && isRefreshFirst) { 126 | showRefreshLoading(); 127 | } 128 | } 129 | 130 | @override 131 | void dispose() { 132 | isShow = false; 133 | isLoading = false; 134 | super.dispose(); 135 | } 136 | } 137 | -------------------------------------------------------------------------------- /lib/ui/widget/recomend.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_taobao/common/style/gzx_style.dart'; 3 | 4 | class RecomendListWidget extends StatelessWidget { 5 | final List items; 6 | final ValueChanged onItemTap; 7 | 8 | RecomendListWidget(this.items, {this.onItemTap}); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | var listView = ListView.separated( 13 | padding: EdgeInsets.symmetric(horizontal: 6), 14 | itemCount: items.length, 15 | itemBuilder: (BuildContext context, int i) { 16 | return InkWell( 17 | onTap: () => onItemTap(items[i]), 18 | child: Container( 19 | // color: Colors.white, 20 | height: 42, 21 | // width: double.infinity, 22 | // color: Colors.red, 23 | alignment: Alignment.centerLeft, 24 | // constraints: BoxConstraints(minWidth: double.infinity), 25 | child: Row( 26 | children: [ 27 | SizedBox( 28 | width: 4, 29 | ), 30 | Expanded( 31 | child: Text( 32 | items[i], 33 | style: TextStyle(fontSize: 12), 34 | ), 35 | ), 36 | Icon( 37 | GZXIcons.jump, 38 | color: Colors.grey[400], 39 | ), 40 | SizedBox( 41 | width: 4, 42 | ), 43 | ], 44 | ), 45 | ), 46 | ); 47 | }, 48 | separatorBuilder: (BuildContext context, int i) { 49 | return Container( 50 | height: 1, 51 | color: Colors.grey[200], 52 | ); 53 | }, 54 | ); 55 | 56 | return Container( 57 | decoration: BoxDecoration( 58 | borderRadius: BorderRadius.only(topLeft: Radius.circular(16), topRight: Radius.circular(16)), 59 | color: Colors.white), 60 | // color: Colors.red, 61 | child: listView); 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /lib/ui/widget/recommed.dart: -------------------------------------------------------------------------------- 1 | import 'package:cached_network_image/cached_network_image.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_taobao/common/model/product.dart'; 4 | import 'package:flutter_taobao/common/utils/common_utils.dart'; 5 | 6 | class RecommendFloor extends StatelessWidget { 7 | final ProductListModel data; 8 | 9 | RecommendFloor(this.data); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | double deviceWidth = MediaQuery.of(context).size.width; 14 | 15 | return Container( 16 | // width: deviceWidth, 17 | // color: Colors.white, 18 | // color: Colors.red, 19 | // padding: EdgeInsets.only(top: 10, bottom: 10, left: 7.5), 20 | child: _build(deviceWidth), 21 | ); 22 | } 23 | 24 | Widget _build(double deviceWidth) { 25 | List items = data.items; 26 | 27 | // double itemWidth = deviceWidth * 168.5 / 360 / 2; 28 | // double imageWidth = deviceWidth * 110.0 / 360 / 2; 29 | deviceWidth -= 28; 30 | double itemWidth = deviceWidth / 4; 31 | double imageWidth = deviceWidth / 4; 32 | List listWidgets = items.map((i) { 33 | var bgColor = CommonUtils.string2Color(i.bgColor); 34 | Color titleColor = CommonUtils.string2Color(i.titleColor); 35 | Color subtitleColor = CommonUtils.string2Color(i.subtitleColor); 36 | return Container( 37 | width: itemWidth, 38 | // margin: EdgeInsets.only(bottom: 5, left: 2), 39 | padding: EdgeInsets.only(top: 8, left: 3, bottom: 7, right: 3), 40 | // color: Colors.red, 41 | child: Column( 42 | crossAxisAlignment: CrossAxisAlignment.start, 43 | // mainAxisAlignment: MainAxisAlignment.end, 44 | children: [ 45 | // SizedBox(height: 10,), 46 | Container( 47 | height: 25, 48 | child: Text( 49 | i.title, 50 | maxLines: 1, 51 | overflow: TextOverflow.ellipsis, 52 | style: TextStyle(fontSize: 15, fontWeight: FontWeight.bold, color: titleColor), 53 | ), 54 | ), 55 | new ClipRRect( 56 | borderRadius: BorderRadius.circular(5), 57 | child: Container( 58 | color: bgColor, 59 | child: Column( 60 | children: [ 61 | SizedBox( 62 | height: 4, 63 | ), 64 | Text( 65 | i.subtitle, 66 | maxLines: 1, 67 | // overflow: TextOverflow.ellipsis, 68 | style: TextStyle(color: subtitleColor, fontWeight: FontWeight.w500, fontSize: 12), 69 | ), 70 | Container( 71 | alignment: Alignment(0, 0), 72 | margin: EdgeInsets.only(top: 5), 73 | child: CachedNetworkImage( 74 | imageUrl: i.picurl, 75 | width: imageWidth, 76 | height: imageWidth + 20, 77 | ), 78 | ) 79 | ], 80 | ), 81 | ), 82 | ), 83 | ], 84 | )); 85 | }).toList(); 86 | return Column( 87 | crossAxisAlignment: CrossAxisAlignment.start, 88 | children: [ 89 | // Container( 90 | // padding: EdgeInsets.only(left: 5, bottom: 10), 91 | // child: Text(data.title, style: KfontConstant.fLoorTitleStyle), 92 | // ), 93 | Wrap( 94 | spacing: 0, 95 | children: listWidgets, 96 | ) 97 | ], 98 | ); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /preview_images/thanks.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/thanks.png -------------------------------------------------------------------------------- /preview_images/微淘.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/微淘.PNG -------------------------------------------------------------------------------- /preview_images/微淘.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/微淘.gif -------------------------------------------------------------------------------- /preview_images/微淘1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/微淘1.PNG -------------------------------------------------------------------------------- /preview_images/我的淘宝.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/我的淘宝.PNG -------------------------------------------------------------------------------- /preview_images/我的淘宝.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/我的淘宝.gif -------------------------------------------------------------------------------- /preview_images/我的淘宝1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/我的淘宝1.PNG -------------------------------------------------------------------------------- /preview_images/搜索.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/搜索.PNG -------------------------------------------------------------------------------- /preview_images/搜索关键字列表.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/搜索关键字列表.PNG -------------------------------------------------------------------------------- /preview_images/搜索宝贝.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/搜索宝贝.gif -------------------------------------------------------------------------------- /preview_images/搜索结果Grid.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/搜索结果Grid.PNG -------------------------------------------------------------------------------- /preview_images/搜索结果List.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/搜索结果List.PNG -------------------------------------------------------------------------------- /preview_images/搜索结果筛选.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/搜索结果筛选.PNG -------------------------------------------------------------------------------- /preview_images/搜索结果筛选1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/搜索结果筛选1.PNG -------------------------------------------------------------------------------- /preview_images/消息.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/消息.PNG -------------------------------------------------------------------------------- /preview_images/消息.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/消息.gif -------------------------------------------------------------------------------- /preview_images/聊天.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/聊天.PNG -------------------------------------------------------------------------------- /preview_images/购物车.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/购物车.PNG -------------------------------------------------------------------------------- /preview_images/购物车.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/购物车.gif -------------------------------------------------------------------------------- /preview_images/首页.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/首页.PNG -------------------------------------------------------------------------------- /preview_images/首页.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/首页.gif -------------------------------------------------------------------------------- /preview_images/首页1.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/preview_images/首页1.PNG -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: flutter_taobao 2 | description: A new Flutter application. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # In Android, build-name is used as versionName while build-number used as versionCode. 10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 12 | # Read more about iOS versioning at 13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 14 | version: 1.0.1 15 | 16 | environment: 17 | sdk: ">=2.1.0 <3.0.0" 18 | 19 | dependencies: 20 | flutter: 21 | sdk: flutter 22 | 23 | # The following adds the Cupertino Icons font to your application. 24 | # Use with the CupertinoIcons class for iOS style icons. 25 | cupertino_icons: ^0.1.2 26 | flutter_swiper: ^1.1.6 27 | connectivity: ^0.4.3+1 28 | dio: ^2.1.4 29 | cached_network_image: ^0.8.0 30 | flutter_spinkit: "^3.1.0" 31 | # 本地存储、收藏功能 32 | shared_preferences: ^0.5.1 33 | flutter_statusbarcolor: ^0.2.0 34 | fluttertoast: ^3.1.0 35 | json_annotation: ^2.4.0 36 | pub_semver: ^1.4.2 37 | package_info: ^0.4.0+3 38 | url_launcher: ^5.0.2 39 | 40 | gzx_dropdown_menu: 41 | git: 42 | url: https://github.com/GanZhiXiong/gzx_dropdown_menu.git 43 | 44 | dev_dependencies: 45 | flutter_test: 46 | sdk: flutter 47 | json_serializable: ^3.0.0 48 | 49 | 50 | 51 | # For information on the generic Dart part of this file, see the 52 | # following ui.page: https://www.dartlang.org/tools/pub/pubspec 53 | 54 | # The following section is specific to Flutter. 55 | flutter: 56 | 57 | # The following line ensures that the Material Icons font is 58 | # included with your application, so that you can use the icons in 59 | # the material Icons class. 60 | uses-material-design: true 61 | 62 | # To add assets to your application, add an assets section, like this: 63 | # assets: 64 | # - images/a_dot_burr.jpeg 65 | # - images/a_dot_ham.jpeg 66 | 67 | # An image asset can refer to one or more resolution-specific "variants", see 68 | # https://flutter.io/assets-and-images/#resolution-aware. 69 | 70 | # For details regarding adding assets from package dependencies, see 71 | # https://flutter.io/assets-and-images/#from-packages 72 | 73 | # To add custom fonts to your application, add a fonts section here, 74 | # in this "flutter" section. Each entry in this list should have a 75 | # "family" key with the font family name, and a "fonts" key with a 76 | # list giving the asset and other descriptors for the font. For 77 | # example: 78 | # fonts: 79 | # - family: Schyler 80 | # fonts: 81 | # - asset: fonts/Schyler-Regular.ttf 82 | # - asset: fonts/Schyler-Italic.ttf 83 | # style: italic 84 | # - family: Trajan Pro 85 | # fonts: 86 | # - asset: fonts/TrajanPro.ttf 87 | # - asset: fonts/TrajanPro_Bold.ttf 88 | # weight: 700 89 | # 90 | # For details regarding fonts from package dependencies, 91 | # see https://flutter.io/custom-fonts/#from-packages 92 | 93 | assets: 94 | - static/ 95 | - static/images/ 96 | 97 | fonts: 98 | - family: taobaoIconFont 99 | fonts: 100 | - asset: static/font/taobao/iconfont.ttf 101 | - family: wxIconFont 102 | fonts: 103 | - asset: static/font/weixin_font/iconfont.ttf -------------------------------------------------------------------------------- /static/app.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/app.db -------------------------------------------------------------------------------- /static/font/taobao/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/font/taobao/iconfont.eot -------------------------------------------------------------------------------- /static/font/taobao/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/font/taobao/iconfont.ttf -------------------------------------------------------------------------------- /static/font/taobao/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/font/taobao/iconfont.woff -------------------------------------------------------------------------------- /static/font/taobao/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/font/taobao/iconfont.woff2 -------------------------------------------------------------------------------- /static/font/weixin_font/iconfont.css: -------------------------------------------------------------------------------- 1 | @font-face {font-family: "iconfont"; 2 | src: url('iconfont.eot?t=1552457679899'); /* IE9 */ 3 | src: url('iconfont.eot?t=1552457679899#iefix') format('embedded-opentype'), /* IE6-IE8 */ 4 | url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAsUAAsAAAAAE9QAAArGAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCELgqYfJN0ATYCJAMsCxgABCAFhG0HgSAbbBCjooZyUqBkf5FgG9N6+GAglkUTY9NsfEekoGkG63mdLYaJsCWsPyUg81BKgmjZqp6di1EYUlRRI6NRKDz2JCiyR6HlHP8v/N/Ps83e538R0DGwFoWr1HW57UovWy+Kq+Y6yquu/522f2Mqts7z3fIUa6k5culPmraX33QxPE6jFEKCcAjJpC6VWpYSFoRhLdDY+6mjocDOViZ5Ss9eBU/lfy7yRCMabi/FwLz7tSqiUYdpKFLT305cwXeISIIISUMipDNHvPFIPNJBiFBCImegzcXp+odGx9r0MCoZYfV3PkwAbYEcncv90wsYIzxmwIwHrTiMayKEUBwYLo2JmqFXKkx6TmcAeEl/P/6BKBiQqCpe0Lv7vRg2S/syUykrAQ2ThDyeAkosUAH7QAbxg1V9wzljP2VxuPlEN2BqSXwsKe2ltwyW6ZIpe8risnOZWa2wBpja2NMEg5+5oQSNnf2HB6GwaAQHg6hDrC6kPzHbZ0wO22iA0ttGDZTBNpqgTLURoEy3kUDJQEsNZQ8wgLgsQhsZLDsF2ik7AyKVmNqZPwdOQL4Azn9Iv2Kl18tS3SKD2EnGOTuSpDUibf++7XGuIOgI6XabOQ8FglrrugSzIT5Elyx68K1BrzcYBgQGaLW9Na25908UtVXu8sIj7qbzpsA/JkMwTV0cxzYQ0RaVo3XbVg961W3HCT4OwW8pRHeTDPoUjYA78UZQfI+sWpG2m5veSRaT/Dmn0eAsfZPPDmuXoj9W/NdO/7vJvx3ZyIqiCUkCpnkhddN02tQXkKiHTejnK0Ep60LNkAQExYbDvRG1cRQu0bqfagtqPQCHSisRyjMJbN8kV59srzbhcr+B4G5JSAvT7gqhXzC8Om1eyg2DutF3s//WeoMhBiF9MZgbyGYJlFTRstxPKpUDBIGXosg6F4X7Ah+RLEnquZ9tbHfibKDbts1wDNjpLYo8b9d+e9ZydzGRGPaeJ7m+0KZ93q7EQQyQGxq8jkpjlS6b053lOsiidlHKZFDRTmO6Qmt2vhN0cCRUaKBfKV3a2usqpNQjgWxvblJhHPJXw5pDH7L8lEbyiF5sh1QB2QkUaA2hNhQ7AQpIiWTBAixoDtQDr/ZzSYtrxsIDVunL98NbmTdtsKu4PP4CBNNxvqza7Ic+yzcGJWZe5XWPIEC5pwf7oykEglhuJNNwjaB1HA4K7xP1EExVJEfFQ1qu967FUJuQaA34nO7zmdqxIlY4NlQGK+jLVmtxgh5ioB0xOMG9GQr6fFiY/oo1pryVQcmsEK9HzQ0c2nHi5ZoSer6OS9lj4MqxafwVL5s8wySIFdPE7K1iDpcSJVZpRhIDC8cWI+ylUw4GTJ2W+1ZoRh/L/JBqr9QDcuFy3LhaEiCoUmaecNrSmkgJiEll+M5MqajCJlVICoNuEdVxW2sUgIWqAF+vjm3uSc1QAJGEwSURQEi40MEzzGUxvR/QUrA1GpJIBkB7Yy+YogDxEfRTDvtwaHytHRPKLqkZPLo7Gptg/ij1dZtm29U4o8Y0P3d15p6EDa8UPsqXK3HrMnZG7m1w7Kp54ZXi49eCl1xvhbZdDCBzLyTz2y8FIiWaUuJ5IkS1uJQ/CsChBZfTUg6qazgfVxj4y1KDWEfEhZd/2ZuS7tpaqGr/3pWoYBsa1BM5aoWn9Hqv/vProCOiQax0mTdU5DdzO/Eh8028xD5xNaKb2hVfewtHVA2jrffZAPMhfNoJgjBdAOh14nRjQzXiJtVC3Y0/HgIxNVOHWurh/J4tL/kv7u2qWs+3yuB/kSgDJKzcUEmS6oaJwIhW3iaTTuzw0uaw2153CJWaaVrt6VRYz65e7QUhX4f7UUmmM7FnTPzxcb7jjsOvhoRVJkzkuvnECQoDMxmaLYCpKjAytWzWeMP/teNFF4pysbvZ6swe1jXBxe5hqoup5BTkJApcMB6keF+3XxSG+xUWdgvqVj1xt4CZwnPd4/9+CxtSkW6CfZrkZmPvzHbQSES0Y/adsc2Kf3+AjfSKIWHf/sZ3P1fIYGE3QNDjwFX4wVE8Bc6qjS1O2LSuTUn4SodPppjIrSHoc/xe/PsWWQqPDefbU5dMar4/H/aRlnwJWcqN990pg3x9rODuak9oOBVu8NSnR9fidVhVeCqeMhHMi6RZs6QNVli4unN2dmefZfvwn7/kgwV//kR00qRy7l/N79Ll5O5dUvQVVbUcr8AQ6MuZB0my1HGhaWGIrzvsvdn7wCbkI29dpDBTH6qfKaS+khY75d1sKLtbjhT+eJIH7W7t3XpLkjd313CX4/v1g/iuagvuAl9XtfPl3KTFymmTuVvazbWd2PoCUO7655M4QaxHNYmgC5ZoHoLlCb01g77FvpYfNY/KyuIv6fc+8m7dmo+znua97/OHr83Ns2Jn7c0et9hJ01e2IG42ut2qL2IvkCixk6Tbr1Nk6AQXLodl4XtspGU6ZVdLunqi1LdpnWKif2kOf6y9ZFffph2LtQ+1Wxz0Q6VHskrhG/Ahcif+UnE7Y6dOanVaLmewmPWS2o6mWyK5e1RW2BFPubOPuF9HzILtjiSd89gc1gA/UJ/vgkSLtTmIzytKCCW9sox/PnmiIFLUCD3u2BGBnC5P9GYfgLjx4IEop+vCpeC79033We/+7tR8wbwxYKLCDdp2skDCuCTzO3jWJAG6nvd+YGgQuuXgZZAoc/z7aK++kihRRVAIB+mxvJ4Uu03cpOfrc5HqnoNRxAm/Jk5+Pt7LO6hgulCds+K6Ga2lIqn+uOcg32TXY2S6/uk6t0LTx5URvrPppJlcX4NOfsH5ZV4W6nJ9J8k/0R6eGURafKgzKeqSHhOZ1fU92O8UGa42eXEaH4pqEoISiGdczCZCoQBAkcwOI4UqI6CTajHlKssWbRneyGVuJgj8AeSmJ2gElRGlCiUUWY94KKhNqzmhSUcsUR+nKagECIJYjnrYMNQL7q6553VPk8F3Xu+4fZVS03uOP3MxKA9uerew+8J7Ds+IDKqkugV5fHzBS3QZaV8tp6TwollWVNnprKQi1NIZxDq6erh0ynKsmd1mMxm3id1eZlPR7+0UQanFHGRqKU0VJ2NLzkmTKzWl19BNK8lpOclljFMBegAA8P+HjxlkwK2p//W6G6MwVzwOBw5e2o8TUv5BMwog+T7EGQHwGBYImkU4/zPiDZZufzKgiWf2Vwb/tZy6sf7g+dT9f6UVAngBNFE8dYCPBplxT7apImmMHQlJPes6qc44mIC2fwh8LHRjv+NzZszk7xPHWIJELQBUGKHJOT0W1GgkgzpGHmiLcRC7Q6/Ug3IL2PUpAETwBSi8AwATfBMQpP8AFZM/QBMCA07t0N9QIzzaTItK5DXGbP7OtCAjR1pPs5lnqJqcl1VqWn2FZaWtLIy3NMcO0GA5RoiqVVFdSyZLWrB94XGY58SKklIUtZfUdTHzE1y4kJ6gBUwVKSGujpvHmLn33ppADHlybdr6+TNIaeS4krCh1fsKKlX01ZmQJ2BIPmAZpg3XMr/SUiI1UkgsXF4iC8w+UqDcHyZMgfeUQkLNk/QYLMz46CDJyvLm5yye9yVo817UiRRV5KhFPRrRjFa0oxNd1CMN5paiKUcu/qa5CSfdyKi3xuTNsE6nZY8Scbj00/iRaBMb0CzHVabBz+emSrTVbu9KA60KjDkl3Ch3FCEAAA==') format('woff2'), 5 | url('iconfont.woff?t=1552457679899') format('woff'), 6 | url('iconfont.ttf?t=1552457679899') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */ 7 | url('iconfont.svg?t=1552457679899#iconfont') format('svg'); /* iOS 4.1- */ 8 | } 9 | 10 | .iconfont { 11 | font-family: "iconfont" !important; 12 | font-size: 16px; 13 | font-style: normal; 14 | -webkit-font-smoothing: antialiased; 15 | -moz-osx-font-smoothing: grayscale; 16 | } 17 | 18 | .icon-wo:before { 19 | content: "\e626"; 20 | } 21 | 22 | .icon-wocur:before { 23 | content: "\e627"; 24 | } 25 | 26 | .icon-faxian1:before { 27 | content: "\e746"; 28 | } 29 | 30 | .icon-tongxunlu:before { 31 | content: "\e687"; 32 | } 33 | 34 | .icon-xiaoxi:before { 35 | content: "\e619"; 36 | } 37 | 38 | .icon-xiaoxi1:before { 39 | content: "\e65d"; 40 | } 41 | 42 | .icon-faxianzhinanzhen:before { 43 | content: "\e60f"; 44 | } 45 | 46 | .icon-diannaoxianshiqi-:before { 47 | content: "\e61d"; 48 | } 49 | 50 | .icon-ico:before { 51 | content: "\e646"; 52 | } 53 | 54 | .icon-cedaohang-tongxunlu:before { 55 | content: "\e711"; 56 | } 57 | 58 | -------------------------------------------------------------------------------- /static/font/weixin_font/iconfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/font/weixin_font/iconfont.eot -------------------------------------------------------------------------------- /static/font/weixin_font/iconfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/font/weixin_font/iconfont.ttf -------------------------------------------------------------------------------- /static/font/weixin_font/iconfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/font/weixin_font/iconfont.woff -------------------------------------------------------------------------------- /static/font/weixin_font/iconfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/font/weixin_font/iconfont.woff2 -------------------------------------------------------------------------------- /static/images/3亿红包.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/3亿红包.png -------------------------------------------------------------------------------- /static/images/618.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/618.png -------------------------------------------------------------------------------- /static/images/88members.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/88members.png -------------------------------------------------------------------------------- /static/images/88vip.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/88vip.png -------------------------------------------------------------------------------- /static/images/apple_home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/apple_home.png -------------------------------------------------------------------------------- /static/images/cainiaoyizhan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/cainiaoyizhan.png -------------------------------------------------------------------------------- /static/images/card.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/card.png -------------------------------------------------------------------------------- /static/images/default_nor_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/default_nor_avatar.png -------------------------------------------------------------------------------- /static/images/taobaotoutiao.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/taobaotoutiao.png -------------------------------------------------------------------------------- /static/images/tmall_easy_buy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/tmall_easy_buy.png -------------------------------------------------------------------------------- /static/images/主会场.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/主会场.png -------------------------------------------------------------------------------- /static/images/主题换肤.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/主题换肤.png -------------------------------------------------------------------------------- /static/images/买1享10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/买1享10.png -------------------------------------------------------------------------------- /static/images/刷脸健康.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/刷脸健康.png -------------------------------------------------------------------------------- /static/images/可爱猫.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/可爱猫.jpeg -------------------------------------------------------------------------------- /static/images/夏装不只5折.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/夏装不只5折.png -------------------------------------------------------------------------------- /static/images/天天红包赛.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/天天红包赛.png -------------------------------------------------------------------------------- /static/images/客服小蜜.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/客服小蜜.png -------------------------------------------------------------------------------- /static/images/待付款.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/待付款.png -------------------------------------------------------------------------------- /static/images/待发货.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/待发货.png -------------------------------------------------------------------------------- /static/images/待收货.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/待收货.png -------------------------------------------------------------------------------- /static/images/我的亲情账号.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/我的亲情账号.png -------------------------------------------------------------------------------- /static/images/我的健康.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/我的健康.png -------------------------------------------------------------------------------- /static/images/我的支付宝.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/我的支付宝.png -------------------------------------------------------------------------------- /static/images/我的淘气值.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/我的淘气值.png -------------------------------------------------------------------------------- /static/images/我的狂欢.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/我的狂欢.png -------------------------------------------------------------------------------- /static/images/我的评价.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/我的评价.png -------------------------------------------------------------------------------- /static/images/权益.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/权益.png -------------------------------------------------------------------------------- /static/images/每日返现.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/每日返现.png -------------------------------------------------------------------------------- /static/images/花呗.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/花呗.png -------------------------------------------------------------------------------- /static/images/评价.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/评价.png -------------------------------------------------------------------------------- /static/images/退款.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/退款.png -------------------------------------------------------------------------------- /static/images/野生小伙伴.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/野生小伙伴.png -------------------------------------------------------------------------------- /static/images/闲置换钱.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/闲置换钱.png -------------------------------------------------------------------------------- /static/images/阿里宝卡.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/阿里宝卡.png -------------------------------------------------------------------------------- /static/images/领券中心.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/领券中心.png -------------------------------------------------------------------------------- /static/images/黄家驹.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/GanZhiXiong/GZXTaoBaoAppFlutter/c5948fbe294835ce96fe99816eba3116a168eac9/static/images/黄家驹.png -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter ui.widget test. 2 | // 3 | // To perform an interaction with a ui.widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the ui.widget 6 | // tree, read text, and verify that the values of ui.widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:flutter_taobao/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | --------------------------------------------------------------------------------