├── .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 | 
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 | 
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