├── .gitignore
├── .metadata
├── README.md
├── android
├── app
│ ├── build.gradle
│ └── src
│ │ └── main
│ │ ├── AndroidManifest.xml
│ │ ├── java
│ │ └── com
│ │ │ └── example
│ │ │ └── fluttershop
│ │ │ └── MainActivity.java
│ │ └── res
│ │ ├── drawable
│ │ └── launch_background.xml
│ │ ├── mipmap-hdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-mdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxhdpi
│ │ └── ic_launcher.png
│ │ ├── mipmap-xxxhdpi
│ │ └── ic_launcher.png
│ │ └── values
│ │ └── styles.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── ios
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ └── contents.xcworkspacedata
└── Runner
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── main.m
├── lib
├── config
│ ├── httpHeaders.dart
│ └── service_url.dart
├── main.dart
├── model
│ ├── cartInfo.dart
│ ├── category.dart
│ ├── categoryGoodsList.dart
│ └── details.dart
├── pages
│ ├── cart_page.dart
│ ├── cart_page
│ │ ├── cart_bottom.dart
│ │ ├── cart_count.dart
│ │ └── cart_item.dart
│ ├── category_page.dart
│ ├── details_page.dart
│ ├── details_page
│ │ ├── details_bottom.dart
│ │ ├── details_explain.dart
│ │ ├── details_tabbar.dart
│ │ ├── details_top_area.dart
│ │ └── details_web.dart
│ ├── home_page.dart
│ ├── index_page.dart
│ └── member_page.dart
├── provide
│ ├── cart.dart
│ ├── category_goods_list.dart
│ ├── child_category.dart
│ ├── counter.dart
│ ├── currentIndex.dart
│ └── details_info.dart
├── routers
│ ├── application.dart
│ ├── router_handler.dart
│ └── routes.dart
└── service
│ └── service_method.dart
├── pubspec.yaml
└── test
└── widget_test.dart
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.lock
4 | *.log
5 | *.pyc
6 | *.swp
7 | .DS_Store
8 | .atom/
9 | .buildlog/
10 | .history
11 | .svn/
12 |
13 | # IntelliJ related
14 | *.iml
15 | *.ipr
16 | *.iws
17 | .idea/
18 |
19 | # Visual Studio Code related
20 | .vscode/
21 |
22 | # Flutter/Dart/Pub related
23 | **/doc/api/
24 | .dart_tool/
25 | .flutter-plugins
26 | .packages
27 | .pub-cache/
28 | .pub/
29 | build/
30 |
31 | # Android related
32 | **/android/**/gradle-wrapper.jar
33 | **/android/.gradle
34 | **/android/captures/
35 | **/android/gradlew
36 | **/android/gradlew.bat
37 | **/android/local.properties
38 | **/android/**/GeneratedPluginRegistrant.java
39 |
40 | # iOS/XCode related
41 | **/ios/**/*.mode1v3
42 | **/ios/**/*.mode2v3
43 | **/ios/**/*.moved-aside
44 | **/ios/**/*.pbxuser
45 | **/ios/**/*.perspectivev3
46 | **/ios/**/*sync/
47 | **/ios/**/.sconsign.dblite
48 | **/ios/**/.tags*
49 | **/ios/**/.vagrant/
50 | **/ios/**/DerivedData/
51 | **/ios/**/Icon?
52 | **/ios/**/Pods/
53 | **/ios/**/.symlinks/
54 | **/ios/**/profile
55 | **/ios/**/xcuserdata
56 | **/ios/.generated/
57 | **/ios/Flutter/App.framework
58 | **/ios/Flutter/Flutter.framework
59 | **/ios/Flutter/Generated.xcconfig
60 | **/ios/Flutter/app.flx
61 | **/ios/Flutter/app.zip
62 | **/ios/Flutter/flutter_assets/
63 | **/ios/ServiceDefinitions.json
64 | **/ios/Runner/GeneratedPluginRegistrant.*
65 |
66 | # Exceptions to above rules.
67 | !**/ios/**/default.mode1v3
68 | !**/ios/**/default.mode2v3
69 | !**/ios/**/default.pbxuser
70 | !**/ios/**/default.perspectivev3
71 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
72 |
--------------------------------------------------------------------------------
/.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: 5391447fae6209bb21a89e6a5a6583cac1af9b4b
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Flutter的移动电商实战
2 |
3 | 项目和教程都在更新中............
4 |
5 | 完全模仿了百姓生活+小程序的项目,数据来自Fiddle提取,有完整的接口API文档。页面包括首页、商品列表页、商品详细页、购物车页面和会员中心。
6 |
7 | 目前项目还在开发当中,配有完整的视频和文字教程,是你Flutter进阶必备项目。
8 |
9 | ## 教程文章地址
10 |
11 | 教程文章地址(60节,超5万字教程,持续更新中):[https://jspang.com/post/FlutterShop.html](https://jspang.com/post/FlutterShop.html)
12 |
13 | ## 用到的组件
14 |
15 | - dio:用于向后端接口作HTTP请求数据
16 | - flutter_swiper: 轮播插件,制作了商城首页的轮播效果
17 | - flutter_screenutil:用于不同屏幕的适配,一次设计,适配所有屏幕
18 | - url_launcher:用于打开网页和实现原生电话的拨打
19 | - flutter_easyrefresh:下拉刷新或者上拉加载插件,方便好用,可定制。
20 | - provide:谷歌最新推出的Flutter状态管理插件,亲儿子,用的爽。
21 | - fluttertoast:Toast轻提示插件,APP必不可少,IOS和Android通用。
22 |
23 |
24 | ## 图片展示
25 |
26 | 
27 |
28 |
29 | ## 所有项目知识点梳理
30 |
31 | 
32 |
33 |
34 | ## 更新日志:
35 |
36 | - 商品分类页面增加了打开详细页的功能。[2019/4/23]
37 |
38 | - 更新首页的分类导航,跳转到分类页面,并且可以跟随变化。[2019/4/22]
39 |
40 | - 商品详细页面主要UI布局完成,还有app的路由系统制作完成。[2019/4/4]
41 |
42 | - 第一次上传项目到GitHub上,我已经写了35课教程,把首页和商品分类页面制作完成。[2019/3/28]
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 | ## 知识架构图
51 |
52 |
53 | ## 一起学习
54 |
55 | 我建立了一个QQ群,大家一起学习:
56 |
57 | **qq群:806799257**
58 |
59 | 入群问题:Flutter出自于哪个公司?
60 |
61 | 入群答案:google (注意全小写,最好用电脑端加入,移动端Bug)
62 |
63 |
64 |
65 |
66 |
--------------------------------------------------------------------------------
/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 | apply plugin: 'com.android.application'
25 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
26 |
27 | android {
28 | compileSdkVersion 27
29 |
30 | lintOptions {
31 | disable 'InvalidPackage'
32 | }
33 |
34 | defaultConfig {
35 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
36 | applicationId "com.example.fluttershop"
37 | minSdkVersion 16
38 | targetSdkVersion 27
39 | versionCode flutterVersionCode.toInteger()
40 | versionName flutterVersionName
41 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
42 | }
43 |
44 | buildTypes {
45 | release {
46 | // TODO: Add your own signing config for the release build.
47 | // Signing with the debug keys for now, so `flutter run --release` works.
48 | signingConfig signingConfigs.debug
49 | }
50 | }
51 | }
52 |
53 | flutter {
54 | source '../..'
55 | }
56 |
57 | dependencies {
58 | testImplementation 'junit:junit:4.12'
59 | androidTestImplementation 'com.android.support.test:runner:1.0.2'
60 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
61 | }
62 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
4 |
8 |
9 |
10 |
15 |
19 |
26 |
30 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
--------------------------------------------------------------------------------
/android/app/src/main/java/com/example/fluttershop/MainActivity.java:
--------------------------------------------------------------------------------
1 | package com.example.fluttershop;
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 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/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/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 |
--------------------------------------------------------------------------------
/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 "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
11 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
18 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; };
19 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; };
20 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
21 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
22 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
23 | /* End PBXBuildFile section */
24 |
25 | /* Begin PBXCopyFilesBuildPhase section */
26 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
27 | isa = PBXCopyFilesBuildPhase;
28 | buildActionMask = 2147483647;
29 | dstPath = "";
30 | dstSubfolderSpec = 10;
31 | files = (
32 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
33 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
34 | );
35 | name = "Embed Frameworks";
36 | runOnlyForDeploymentPostprocessing = 0;
37 | };
38 | /* End PBXCopyFilesBuildPhase section */
39 |
40 | /* Begin PBXFileReference section */
41 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
42 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
43 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
44 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
45 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
46 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
47 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
48 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
49 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
50 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
51 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
52 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
53 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
54 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
55 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
56 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
57 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
58 | /* End PBXFileReference section */
59 |
60 | /* Begin PBXFrameworksBuildPhase section */
61 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
62 | isa = PBXFrameworksBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
66 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
67 | );
68 | runOnlyForDeploymentPostprocessing = 0;
69 | };
70 | /* End PBXFrameworksBuildPhase section */
71 |
72 | /* Begin PBXGroup section */
73 | 9740EEB11CF90186004384FC /* Flutter */ = {
74 | isa = PBXGroup;
75 | children = (
76 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
77 | 3B80C3931E831B6300D905FE /* App.framework */,
78 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
79 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
80 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
81 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
82 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
83 | );
84 | name = Flutter;
85 | sourceTree = "";
86 | };
87 | 97C146E51CF9000F007C117D = {
88 | isa = PBXGroup;
89 | children = (
90 | 9740EEB11CF90186004384FC /* Flutter */,
91 | 97C146F01CF9000F007C117D /* Runner */,
92 | 97C146EF1CF9000F007C117D /* Products */,
93 | CF3B75C9A7D2FA2A4C99F110 /* Frameworks */,
94 | );
95 | sourceTree = "";
96 | };
97 | 97C146EF1CF9000F007C117D /* Products */ = {
98 | isa = PBXGroup;
99 | children = (
100 | 97C146EE1CF9000F007C117D /* Runner.app */,
101 | );
102 | name = Products;
103 | sourceTree = "";
104 | };
105 | 97C146F01CF9000F007C117D /* Runner */ = {
106 | isa = PBXGroup;
107 | children = (
108 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
109 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
110 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
111 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
112 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
113 | 97C147021CF9000F007C117D /* Info.plist */,
114 | 97C146F11CF9000F007C117D /* Supporting Files */,
115 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
116 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
117 | );
118 | path = Runner;
119 | sourceTree = "";
120 | };
121 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
122 | isa = PBXGroup;
123 | children = (
124 | 97C146F21CF9000F007C117D /* main.m */,
125 | );
126 | name = "Supporting Files";
127 | sourceTree = "";
128 | };
129 | /* End PBXGroup section */
130 |
131 | /* Begin PBXNativeTarget section */
132 | 97C146ED1CF9000F007C117D /* Runner */ = {
133 | isa = PBXNativeTarget;
134 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
135 | buildPhases = (
136 | 9740EEB61CF901F6004384FC /* Run Script */,
137 | 97C146EA1CF9000F007C117D /* Sources */,
138 | 97C146EB1CF9000F007C117D /* Frameworks */,
139 | 97C146EC1CF9000F007C117D /* Resources */,
140 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
141 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
142 | );
143 | buildRules = (
144 | );
145 | dependencies = (
146 | );
147 | name = Runner;
148 | productName = Runner;
149 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
150 | productType = "com.apple.product-type.application";
151 | };
152 | /* End PBXNativeTarget section */
153 |
154 | /* Begin PBXProject section */
155 | 97C146E61CF9000F007C117D /* Project object */ = {
156 | isa = PBXProject;
157 | attributes = {
158 | LastUpgradeCheck = 0910;
159 | ORGANIZATIONNAME = "The Chromium Authors";
160 | TargetAttributes = {
161 | 97C146ED1CF9000F007C117D = {
162 | CreatedOnToolsVersion = 7.3.1;
163 | };
164 | };
165 | };
166 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
167 | compatibilityVersion = "Xcode 3.2";
168 | developmentRegion = English;
169 | hasScannedForEncodings = 0;
170 | knownRegions = (
171 | en,
172 | Base,
173 | );
174 | mainGroup = 97C146E51CF9000F007C117D;
175 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
176 | projectDirPath = "";
177 | projectRoot = "";
178 | targets = (
179 | 97C146ED1CF9000F007C117D /* Runner */,
180 | );
181 | };
182 | /* End PBXProject section */
183 |
184 | /* Begin PBXResourcesBuildPhase section */
185 | 97C146EC1CF9000F007C117D /* Resources */ = {
186 | isa = PBXResourcesBuildPhase;
187 | buildActionMask = 2147483647;
188 | files = (
189 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
190 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
191 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
192 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
193 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
194 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
195 | );
196 | runOnlyForDeploymentPostprocessing = 0;
197 | };
198 | /* End PBXResourcesBuildPhase section */
199 |
200 | /* Begin PBXShellScriptBuildPhase section */
201 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
202 | isa = PBXShellScriptBuildPhase;
203 | buildActionMask = 2147483647;
204 | files = (
205 | );
206 | inputPaths = (
207 | );
208 | name = "Thin Binary";
209 | outputPaths = (
210 | );
211 | runOnlyForDeploymentPostprocessing = 0;
212 | shellPath = /bin/sh;
213 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
214 | };
215 | 9740EEB61CF901F6004384FC /* Run Script */ = {
216 | isa = PBXShellScriptBuildPhase;
217 | buildActionMask = 2147483647;
218 | files = (
219 | );
220 | inputPaths = (
221 | );
222 | name = "Run Script";
223 | outputPaths = (
224 | );
225 | runOnlyForDeploymentPostprocessing = 0;
226 | shellPath = /bin/sh;
227 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
228 | };
229 | /* End PBXShellScriptBuildPhase section */
230 |
231 | /* Begin PBXSourcesBuildPhase section */
232 | 97C146EA1CF9000F007C117D /* Sources */ = {
233 | isa = PBXSourcesBuildPhase;
234 | buildActionMask = 2147483647;
235 | files = (
236 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
237 | 97C146F31CF9000F007C117D /* main.m in Sources */,
238 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
239 | );
240 | runOnlyForDeploymentPostprocessing = 0;
241 | };
242 | /* End PBXSourcesBuildPhase section */
243 |
244 | /* Begin PBXVariantGroup section */
245 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
246 | isa = PBXVariantGroup;
247 | children = (
248 | 97C146FB1CF9000F007C117D /* Base */,
249 | );
250 | name = Main.storyboard;
251 | sourceTree = "";
252 | };
253 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
254 | isa = PBXVariantGroup;
255 | children = (
256 | 97C147001CF9000F007C117D /* Base */,
257 | );
258 | name = LaunchScreen.storyboard;
259 | sourceTree = "";
260 | };
261 | /* End PBXVariantGroup section */
262 |
263 | /* Begin XCBuildConfiguration section */
264 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
265 | isa = XCBuildConfiguration;
266 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
267 | buildSettings = {
268 | ALWAYS_SEARCH_USER_PATHS = NO;
269 | CLANG_ANALYZER_NONNULL = YES;
270 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
271 | CLANG_CXX_LIBRARY = "libc++";
272 | CLANG_ENABLE_MODULES = YES;
273 | CLANG_ENABLE_OBJC_ARC = YES;
274 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
275 | CLANG_WARN_BOOL_CONVERSION = YES;
276 | CLANG_WARN_COMMA = YES;
277 | CLANG_WARN_CONSTANT_CONVERSION = YES;
278 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
279 | CLANG_WARN_EMPTY_BODY = YES;
280 | CLANG_WARN_ENUM_CONVERSION = YES;
281 | CLANG_WARN_INFINITE_RECURSION = YES;
282 | CLANG_WARN_INT_CONVERSION = YES;
283 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
284 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
285 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
286 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
287 | CLANG_WARN_STRICT_PROTOTYPES = YES;
288 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
289 | CLANG_WARN_UNREACHABLE_CODE = YES;
290 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
291 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
292 | COPY_PHASE_STRIP = NO;
293 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
294 | ENABLE_NS_ASSERTIONS = NO;
295 | ENABLE_STRICT_OBJC_MSGSEND = YES;
296 | GCC_C_LANGUAGE_STANDARD = gnu99;
297 | GCC_NO_COMMON_BLOCKS = YES;
298 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
299 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
300 | GCC_WARN_UNDECLARED_SELECTOR = YES;
301 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
302 | GCC_WARN_UNUSED_FUNCTION = YES;
303 | GCC_WARN_UNUSED_VARIABLE = YES;
304 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
305 | MTL_ENABLE_DEBUG_INFO = NO;
306 | SDKROOT = iphoneos;
307 | TARGETED_DEVICE_FAMILY = "1,2";
308 | VALIDATE_PRODUCT = YES;
309 | };
310 | name = Profile;
311 | };
312 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
313 | isa = XCBuildConfiguration;
314 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
315 | buildSettings = {
316 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
317 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
318 | DEVELOPMENT_TEAM = S8QB4VV633;
319 | ENABLE_BITCODE = NO;
320 | FRAMEWORK_SEARCH_PATHS = (
321 | "$(inherited)",
322 | "$(PROJECT_DIR)/Flutter",
323 | );
324 | INFOPLIST_FILE = Runner/Info.plist;
325 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
326 | LIBRARY_SEARCH_PATHS = (
327 | "$(inherited)",
328 | "$(PROJECT_DIR)/Flutter",
329 | );
330 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterShop;
331 | PRODUCT_NAME = "$(TARGET_NAME)";
332 | VERSIONING_SYSTEM = "apple-generic";
333 | };
334 | name = Profile;
335 | };
336 | 97C147031CF9000F007C117D /* Debug */ = {
337 | isa = XCBuildConfiguration;
338 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
339 | buildSettings = {
340 | ALWAYS_SEARCH_USER_PATHS = NO;
341 | CLANG_ANALYZER_NONNULL = YES;
342 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
343 | CLANG_CXX_LIBRARY = "libc++";
344 | CLANG_ENABLE_MODULES = YES;
345 | CLANG_ENABLE_OBJC_ARC = YES;
346 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
347 | CLANG_WARN_BOOL_CONVERSION = YES;
348 | CLANG_WARN_COMMA = YES;
349 | CLANG_WARN_CONSTANT_CONVERSION = YES;
350 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
351 | CLANG_WARN_EMPTY_BODY = YES;
352 | CLANG_WARN_ENUM_CONVERSION = YES;
353 | CLANG_WARN_INFINITE_RECURSION = YES;
354 | CLANG_WARN_INT_CONVERSION = YES;
355 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
356 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
357 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
358 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
359 | CLANG_WARN_STRICT_PROTOTYPES = YES;
360 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
361 | CLANG_WARN_UNREACHABLE_CODE = YES;
362 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
363 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
364 | COPY_PHASE_STRIP = NO;
365 | DEBUG_INFORMATION_FORMAT = dwarf;
366 | ENABLE_STRICT_OBJC_MSGSEND = YES;
367 | ENABLE_TESTABILITY = YES;
368 | GCC_C_LANGUAGE_STANDARD = gnu99;
369 | GCC_DYNAMIC_NO_PIC = NO;
370 | GCC_NO_COMMON_BLOCKS = YES;
371 | GCC_OPTIMIZATION_LEVEL = 0;
372 | GCC_PREPROCESSOR_DEFINITIONS = (
373 | "DEBUG=1",
374 | "$(inherited)",
375 | );
376 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
377 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
378 | GCC_WARN_UNDECLARED_SELECTOR = YES;
379 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
380 | GCC_WARN_UNUSED_FUNCTION = YES;
381 | GCC_WARN_UNUSED_VARIABLE = YES;
382 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
383 | MTL_ENABLE_DEBUG_INFO = YES;
384 | ONLY_ACTIVE_ARCH = YES;
385 | SDKROOT = iphoneos;
386 | TARGETED_DEVICE_FAMILY = "1,2";
387 | };
388 | name = Debug;
389 | };
390 | 97C147041CF9000F007C117D /* Release */ = {
391 | isa = XCBuildConfiguration;
392 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
393 | buildSettings = {
394 | ALWAYS_SEARCH_USER_PATHS = NO;
395 | CLANG_ANALYZER_NONNULL = YES;
396 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
397 | CLANG_CXX_LIBRARY = "libc++";
398 | CLANG_ENABLE_MODULES = YES;
399 | CLANG_ENABLE_OBJC_ARC = YES;
400 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
401 | CLANG_WARN_BOOL_CONVERSION = YES;
402 | CLANG_WARN_COMMA = YES;
403 | CLANG_WARN_CONSTANT_CONVERSION = YES;
404 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
405 | CLANG_WARN_EMPTY_BODY = YES;
406 | CLANG_WARN_ENUM_CONVERSION = YES;
407 | CLANG_WARN_INFINITE_RECURSION = YES;
408 | CLANG_WARN_INT_CONVERSION = YES;
409 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
410 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
411 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
412 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
413 | CLANG_WARN_STRICT_PROTOTYPES = YES;
414 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
415 | CLANG_WARN_UNREACHABLE_CODE = YES;
416 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
417 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
418 | COPY_PHASE_STRIP = NO;
419 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
420 | ENABLE_NS_ASSERTIONS = NO;
421 | ENABLE_STRICT_OBJC_MSGSEND = YES;
422 | GCC_C_LANGUAGE_STANDARD = gnu99;
423 | GCC_NO_COMMON_BLOCKS = YES;
424 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
425 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
426 | GCC_WARN_UNDECLARED_SELECTOR = YES;
427 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
428 | GCC_WARN_UNUSED_FUNCTION = YES;
429 | GCC_WARN_UNUSED_VARIABLE = YES;
430 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
431 | MTL_ENABLE_DEBUG_INFO = NO;
432 | SDKROOT = iphoneos;
433 | TARGETED_DEVICE_FAMILY = "1,2";
434 | VALIDATE_PRODUCT = YES;
435 | };
436 | name = Release;
437 | };
438 | 97C147061CF9000F007C117D /* Debug */ = {
439 | isa = XCBuildConfiguration;
440 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
441 | buildSettings = {
442 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
443 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
444 | ENABLE_BITCODE = NO;
445 | FRAMEWORK_SEARCH_PATHS = (
446 | "$(inherited)",
447 | "$(PROJECT_DIR)/Flutter",
448 | );
449 | INFOPLIST_FILE = Runner/Info.plist;
450 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
451 | LIBRARY_SEARCH_PATHS = (
452 | "$(inherited)",
453 | "$(PROJECT_DIR)/Flutter",
454 | );
455 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterShop;
456 | PRODUCT_NAME = "$(TARGET_NAME)";
457 | VERSIONING_SYSTEM = "apple-generic";
458 | };
459 | name = Debug;
460 | };
461 | 97C147071CF9000F007C117D /* Release */ = {
462 | isa = XCBuildConfiguration;
463 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
464 | buildSettings = {
465 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
466 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
467 | ENABLE_BITCODE = NO;
468 | FRAMEWORK_SEARCH_PATHS = (
469 | "$(inherited)",
470 | "$(PROJECT_DIR)/Flutter",
471 | );
472 | INFOPLIST_FILE = Runner/Info.plist;
473 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
474 | LIBRARY_SEARCH_PATHS = (
475 | "$(inherited)",
476 | "$(PROJECT_DIR)/Flutter",
477 | );
478 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterShop;
479 | PRODUCT_NAME = "$(TARGET_NAME)";
480 | VERSIONING_SYSTEM = "apple-generic";
481 | };
482 | name = Release;
483 | };
484 | /* End XCBuildConfiguration section */
485 |
486 | /* Begin XCConfigurationList section */
487 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
488 | isa = XCConfigurationList;
489 | buildConfigurations = (
490 | 97C147031CF9000F007C117D /* Debug */,
491 | 97C147041CF9000F007C117D /* Release */,
492 | 249021D3217E4FDB00AE95B9 /* Profile */,
493 | );
494 | defaultConfigurationIsVisible = 0;
495 | defaultConfigurationName = Release;
496 | };
497 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
498 | isa = XCConfigurationList;
499 | buildConfigurations = (
500 | 97C147061CF9000F007C117D /* Debug */,
501 | 97C147071CF9000F007C117D /* Release */,
502 | 249021D4217E4FDB00AE95B9 /* Profile */,
503 | );
504 | defaultConfigurationIsVisible = 0;
505 | defaultConfigurationName = Release;
506 | };
507 | /* End XCConfigurationList section */
508 | };
509 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
510 | }
511 |
--------------------------------------------------------------------------------
/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 |
31 |
32 |
33 |
34 |
40 |
41 |
42 |
43 |
44 |
45 |
56 |
58 |
64 |
65 |
66 |
67 |
68 |
69 |
75 |
77 |
83 |
84 |
85 |
86 |
88 |
89 |
92 |
93 |
94 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/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-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shenghy/flutter_shop/05ff32f82176b1f98cacccac16bd9e07efa17f2c/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/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 |
--------------------------------------------------------------------------------
/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/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | flutter_shop
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/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/config/httpHeaders.dart:
--------------------------------------------------------------------------------
1 | const httpHeaders={
2 | 'Accept': 'application/json, text/plain, */*',
3 | 'Accept-Encoding': 'gzip, deflate, br',
4 | 'Accept-Language': 'zh-CN,zh;q=0.9',
5 | 'Connection': 'keep-alive',
6 | 'Content-Type': 'application/json',
7 | 'Cookie': '_ga=GA1.2.676402787.1548321037; GCID=9d149c5-11cb3b3-80ad198-04b551d; _gid=GA1.2.359074521.1550799897; _gat=1; Hm_lvt_022f847c4e3acd44d4a2481d9187f1e6=1550106367,1550115714,1550123110,1550799897; SERVERID=1fa1f330efedec1559b3abbcb6e30f50|1550799909|1550799898; Hm_lpvt_022f847c4e3acd44d4a2481d9187f1e6=1550799907',
8 | 'Host': 'time.geekbang.org',
9 | 'Origin': 'https://time.geekbang.org',
10 | 'Referer': 'https://time.geekbang.org/',
11 | 'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36'
12 | };
--------------------------------------------------------------------------------
/lib/config/service_url.dart:
--------------------------------------------------------------------------------
1 | const serviceUrl= 'http://v.jspang.com:8088/baixing/';
2 | //const serviceUrl= 'http://test.baixingliangfan.cn/baixing/';
3 | const servicePath={
4 | 'homePageContext': serviceUrl+'wxmini/homePageContent', // 商家首页信息
5 | 'homePageBelowConten': serviceUrl+'wxmini/homePageBelowConten', //商城首页热卖商品拉取
6 | 'getCategory': serviceUrl+'wxmini/getCategory', //商品类别信息
7 | 'getMallGoods': serviceUrl+'wxmini/getMallGoods', //商品分类的商品列表
8 | 'getGoodDetailById':serviceUrl+'wxmini/getGoodDetailById', //商品详细信息列表
9 | };
10 |
11 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import './pages/index_page.dart';
3 | import 'package:provide/provide.dart';
4 | import './provide/child_category.dart';
5 | import './provide/category_goods_list.dart';
6 | import './provide/details_info.dart';
7 | import './provide/cart.dart';
8 | import './provide/currentIndex.dart';
9 | import 'package:fluro/fluro.dart';
10 | import './routers/routes.dart';
11 | import './routers/application.dart';
12 |
13 |
14 |
15 |
16 | import './provide/counter.dart';
17 |
18 | void main(){
19 | var childCategory= ChildCategory();
20 | var categoryGoodsListProvide= CategoryGoodsListProvide();
21 | var detailsInfoProvide= DetailsInfoProvide();
22 | var cartProvide =CartProvide();
23 | var currentIndexProvide =CurrentIndexProvide();
24 | var counter =Counter();
25 | var providers =Providers();
26 |
27 | providers
28 | ..provide(Provider.value(childCategory))
29 | ..provide(Provider.value(categoryGoodsListProvide))
30 | ..provide(Provider.value(detailsInfoProvide))
31 | ..provide(Provider.value(cartProvide))
32 | ..provide(Provider.value(currentIndexProvide))
33 | ..provide(Provider.value(counter));
34 |
35 | runApp(ProviderNode(child:MyApp(),providers:providers));
36 | }
37 |
38 | class MyApp extends StatelessWidget {
39 | @override
40 | Widget build(BuildContext context) {
41 |
42 | final router = Router();
43 | Routes.configureRoutes(router);
44 | Application.router=router;
45 |
46 |
47 | return Container(
48 |
49 | child: MaterialApp(
50 | title:'百姓生活+',
51 | debugShowCheckedModeBanner: false,
52 | onGenerateRoute: Application.router.generator,
53 | theme: ThemeData(
54 | primaryColor:Colors.pink,
55 | ),
56 | home:IndexPage()
57 | ),
58 | );
59 | }
60 | }
--------------------------------------------------------------------------------
/lib/model/cartInfo.dart:
--------------------------------------------------------------------------------
1 | class CartInfoMode {
2 | String goodsId;
3 | String goodsName;
4 | int count;
5 | double price;
6 | String images;
7 | bool isCheck;
8 |
9 | CartInfoMode(
10 | {this.goodsId, this.goodsName, this.count, this.price, this.images,this.isCheck});
11 |
12 | CartInfoMode.fromJson(Map json) {
13 | goodsId = json['goodsId'];
14 | goodsName = json['goodsName'];
15 | count = json['count'];
16 | price = json['price'];
17 | images = json['images'];
18 | isCheck = json['isCheck'];
19 | }
20 |
21 | Map toJson() {
22 | final Map data = new Map();
23 | data['goodsId'] = this.goodsId;
24 | data['goodsName'] = this.goodsName;
25 | data['count'] = this.count;
26 | data['price'] = this.price;
27 | data['images'] = this.images;
28 | data['isCheck']= this.isCheck;
29 | return data;
30 | }
31 | }
--------------------------------------------------------------------------------
/lib/model/category.dart:
--------------------------------------------------------------------------------
1 | class CategoryModel {
2 | String code;
3 | String message;
4 | List data;
5 |
6 | CategoryModel({this.code, this.message, this.data});
7 |
8 | CategoryModel.fromJson(Map json) {
9 | code = json['code'];
10 | message = json['message'];
11 | if (json['data'] != null) {
12 | data = new List();
13 | json['data'].forEach((v) {
14 | data.add(new Data.fromJson(v));
15 | });
16 | }
17 | }
18 |
19 | Map toJson() {
20 | final Map data = new Map();
21 | data['code'] = this.code;
22 | data['message'] = this.message;
23 | if (this.data != null) {
24 | data['data'] = this.data.map((v) => v.toJson()).toList();
25 | }
26 | return data;
27 | }
28 | }
29 |
30 | class Data {
31 | String mallCategoryId;
32 | String mallCategoryName;
33 | List bxMallSubDto;
34 | Null comments;
35 | String image;
36 |
37 | Data(
38 | {this.mallCategoryId,
39 | this.mallCategoryName,
40 | this.bxMallSubDto,
41 | this.comments,
42 | this.image});
43 |
44 | Data.fromJson(Map json) {
45 | mallCategoryId = json['mallCategoryId'];
46 | mallCategoryName = json['mallCategoryName'];
47 | if (json['bxMallSubDto'] != null) {
48 | bxMallSubDto = new List();
49 | json['bxMallSubDto'].forEach((v) {
50 | bxMallSubDto.add(new BxMallSubDto.fromJson(v));
51 | });
52 | }
53 | comments = json['comments'];
54 | image = json['image'];
55 | }
56 |
57 | Map toJson() {
58 | final Map data = new Map();
59 | data['mallCategoryId'] = this.mallCategoryId;
60 | data['mallCategoryName'] = this.mallCategoryName;
61 | if (this.bxMallSubDto != null) {
62 | data['bxMallSubDto'] = this.bxMallSubDto.map((v) => v.toJson()).toList();
63 | }
64 | data['comments'] = this.comments;
65 | data['image'] = this.image;
66 | return data;
67 | }
68 | }
69 |
70 | class BxMallSubDto {
71 | String mallSubId;
72 | String mallCategoryId;
73 | String mallSubName;
74 | String comments;
75 |
76 | BxMallSubDto(
77 | {this.mallSubId, this.mallCategoryId, this.mallSubName, this.comments});
78 |
79 | BxMallSubDto.fromJson(Map json) {
80 | mallSubId = json['mallSubId'];
81 | mallCategoryId = json['mallCategoryId'];
82 | mallSubName = json['mallSubName'];
83 | comments = json['comments'];
84 | }
85 |
86 | Map toJson() {
87 | final Map data = new Map();
88 | data['mallSubId'] = this.mallSubId;
89 | data['mallCategoryId'] = this.mallCategoryId;
90 | data['mallSubName'] = this.mallSubName;
91 | data['comments'] = this.comments;
92 | return data;
93 | }
94 | }
--------------------------------------------------------------------------------
/lib/model/categoryGoodsList.dart:
--------------------------------------------------------------------------------
1 | class CategoryGoodsListModel {
2 | String code;
3 | String message;
4 | List data;
5 |
6 | CategoryGoodsListModel({this.code, this.message, this.data});
7 |
8 | CategoryGoodsListModel.fromJson(Map json) {
9 | code = json['code'];
10 | message = json['message'];
11 | if (json['data'] != null) {
12 | data = new List();
13 | json['data'].forEach((v) {
14 | data.add(new CategoryListData.fromJson(v));
15 | });
16 | }
17 | }
18 |
19 | Map toJson() {
20 | final Map data = new Map();
21 | data['code'] = this.code;
22 | data['message'] = this.message;
23 | if (this.data != null) {
24 | data['data'] = this.data.map((v) => v.toJson()).toList();
25 | }
26 | return data;
27 | }
28 | }
29 |
30 | class CategoryListData {
31 | String image;
32 | double oriPrice;
33 | double presentPrice;
34 | String goodsName;
35 | String goodsId;
36 |
37 | CategoryListData(
38 | {this.image,
39 | this.oriPrice,
40 | this.presentPrice,
41 | this.goodsName,
42 | this.goodsId});
43 |
44 | CategoryListData.fromJson(Map json) {
45 | image = json['image'];
46 | oriPrice = json['oriPrice'];
47 | presentPrice = json['presentPrice'];
48 | goodsName = json['goodsName'];
49 | goodsId = json['goodsId'];
50 | }
51 |
52 | Map toJson() {
53 | final Map data = new Map();
54 | data['image'] = this.image;
55 | data['oriPrice'] = this.oriPrice;
56 | data['presentPrice'] = this.presentPrice;
57 | data['goodsName'] = this.goodsName;
58 | data['goodsId'] = this.goodsId;
59 | return data;
60 | }
61 | }
--------------------------------------------------------------------------------
/lib/model/details.dart:
--------------------------------------------------------------------------------
1 | class DetailsModel {
2 | String code;
3 | String message;
4 | DetailsGoodsData data;
5 |
6 | DetailsModel({this.code, this.message, this.data});
7 |
8 | DetailsModel.fromJson(Map json) {
9 | code = json['code'];
10 | message = json['message'];
11 | data = json['data'] != null ? new DetailsGoodsData.fromJson(json['data']) : null;
12 | }
13 |
14 | Map toJson() {
15 | final Map data = new Map();
16 | data['code'] = this.code;
17 | data['message'] = this.message;
18 | if (this.data != null) {
19 | data['data'] = this.data.toJson();
20 | }
21 | return data;
22 | }
23 | }
24 |
25 | class DetailsGoodsData {
26 | GoodInfo goodInfo;
27 | List goodComments;
28 | AdvertesPicture advertesPicture;
29 |
30 | DetailsGoodsData({this.goodInfo, this.goodComments, this.advertesPicture});
31 |
32 | DetailsGoodsData.fromJson(Map json) {
33 | goodInfo = json['goodInfo'] != null
34 | ? new GoodInfo.fromJson(json['goodInfo'])
35 | : null;
36 | if (json['goodComments'] != null) {
37 | goodComments = new List();
38 | json['goodComments'].forEach((v) {
39 | goodComments.add(new GoodComments.fromJson(v));
40 | });
41 | }
42 | advertesPicture = json['advertesPicture'] != null
43 | ? new AdvertesPicture.fromJson(json['advertesPicture'])
44 | : null;
45 | }
46 |
47 | Map toJson() {
48 | final Map data = new Map();
49 | if (this.goodInfo != null) {
50 | data['goodInfo'] = this.goodInfo.toJson();
51 | }
52 | if (this.goodComments != null) {
53 | data['goodComments'] = this.goodComments.map((v) => v.toJson()).toList();
54 | }
55 | if (this.advertesPicture != null) {
56 | data['advertesPicture'] = this.advertesPicture.toJson();
57 | }
58 | return data;
59 | }
60 | }
61 |
62 | class GoodInfo {
63 | String image5;
64 | int amount;
65 | String image3;
66 | String image4;
67 | String goodsId;
68 | String isOnline;
69 | String image1;
70 | String image2;
71 | String goodsSerialNumber;
72 | double oriPrice;
73 | double presentPrice;
74 | String comPic;
75 | int state;
76 | String shopId;
77 | String goodsName;
78 | String goodsDetail;
79 |
80 | GoodInfo(
81 | {this.image5,
82 | this.amount,
83 | this.image3,
84 | this.image4,
85 | this.goodsId,
86 | this.isOnline,
87 | this.image1,
88 | this.image2,
89 | this.goodsSerialNumber,
90 | this.oriPrice,
91 | this.presentPrice,
92 | this.comPic,
93 | this.state,
94 | this.shopId,
95 | this.goodsName,
96 | this.goodsDetail});
97 |
98 | GoodInfo.fromJson(Map json) {
99 | image5 = json['image5'];
100 | amount = json['amount'];
101 | image3 = json['image3'];
102 | image4 = json['image4'];
103 | goodsId = json['goodsId'];
104 | isOnline = json['isOnline'];
105 | image1 = json['image1'];
106 | image2 = json['image2'];
107 | goodsSerialNumber = json['goodsSerialNumber'];
108 | oriPrice = json['oriPrice'];
109 | presentPrice = json['presentPrice'];
110 | comPic = json['comPic'];
111 | state = json['state'];
112 | shopId = json['shopId'];
113 | goodsName = json['goodsName'];
114 | goodsDetail = json['goodsDetail'];
115 | }
116 |
117 | Map toJson() {
118 | final Map data = new Map();
119 | data['image5'] = this.image5;
120 | data['amount'] = this.amount;
121 | data['image3'] = this.image3;
122 | data['image4'] = this.image4;
123 | data['goodsId'] = this.goodsId;
124 | data['isOnline'] = this.isOnline;
125 | data['image1'] = this.image1;
126 | data['image2'] = this.image2;
127 | data['goodsSerialNumber'] = this.goodsSerialNumber;
128 | data['oriPrice'] = this.oriPrice;
129 | data['presentPrice'] = this.presentPrice;
130 | data['comPic'] = this.comPic;
131 | data['state'] = this.state;
132 | data['shopId'] = this.shopId;
133 | data['goodsName'] = this.goodsName;
134 | data['goodsDetail'] = this.goodsDetail;
135 | return data;
136 | }
137 | }
138 |
139 | class GoodComments {
140 | int sCORE;
141 | String comments;
142 | String userName;
143 | int discussTime;
144 |
145 | GoodComments({this.sCORE, this.comments, this.userName, this.discussTime});
146 |
147 | GoodComments.fromJson(Map json) {
148 | sCORE = json['SCORE'];
149 | comments = json['comments'];
150 | userName = json['userName'];
151 | discussTime = json['discussTime'];
152 | }
153 |
154 | Map toJson() {
155 | final Map data = new Map();
156 | data['SCORE'] = this.sCORE;
157 | data['comments'] = this.comments;
158 | data['userName'] = this.userName;
159 | data['discussTime'] = this.discussTime;
160 | return data;
161 | }
162 | }
163 |
164 | class AdvertesPicture {
165 | String pICTUREADDRESS;
166 | String tOPLACE;
167 |
168 | AdvertesPicture({this.pICTUREADDRESS, this.tOPLACE});
169 |
170 | AdvertesPicture.fromJson(Map json) {
171 | pICTUREADDRESS = json['PICTURE_ADDRESS'];
172 | tOPLACE = json['TO_PLACE'];
173 | }
174 |
175 | Map toJson() {
176 | final Map data = new Map();
177 | data['PICTURE_ADDRESS'] = this.pICTUREADDRESS;
178 | data['TO_PLACE'] = this.tOPLACE;
179 | return data;
180 | }
181 | }
182 |
--------------------------------------------------------------------------------
/lib/pages/cart_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:provide/provide.dart';
3 | import '../provide/cart.dart';
4 | import './cart_page/cart_item.dart';
5 | import './cart_page/cart_bottom.dart';
6 |
7 |
8 |
9 |
10 | class CartPage extends StatelessWidget {
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Scaffold(
15 | appBar: AppBar(
16 | title: Text('购物车'),
17 | ),
18 | body: FutureBuilder(
19 | future:_getCartInfo(context),
20 | builder: (context,snapshot){
21 | List cartList=Provide.value(context).cartList;
22 | if(snapshot.hasData && cartList!=null){
23 | return Stack(
24 | children: [
25 | Provide(
26 |
27 | builder: (context,child,childCategory){
28 | cartList= Provide.value(context).cartList;
29 | print(cartList);
30 | return ListView.builder(
31 | itemCount: cartList.length,
32 | itemBuilder: (context,index){
33 | return CartItem(cartList[index]);
34 | },
35 | );
36 | }
37 | ),
38 | Positioned(
39 | bottom:0,
40 | left:0,
41 | child: CartBottom(),
42 | )
43 | ],
44 | );
45 |
46 |
47 | }else{
48 | return Text('正在加载');
49 | }
50 | },
51 | ),
52 | );
53 | }
54 |
55 | Future _getCartInfo(BuildContext context) async{
56 | await Provide.value(context).getCartInfo();
57 | return 'end';
58 | }
59 |
60 |
61 | }
--------------------------------------------------------------------------------
/lib/pages/cart_page/cart_bottom.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_screenutil/flutter_screenutil.dart';
3 | import 'package:provide/provide.dart';
4 | import '../../provide/cart.dart';
5 |
6 | class CartBottom extends StatelessWidget {
7 | @override
8 | Widget build(BuildContext context) {
9 | return Container(
10 | margin: EdgeInsets.all(5.0),
11 | color: Colors.white,
12 | width: ScreenUtil().setWidth(750),
13 | child: Provide(
14 | builder: (context,child,childCategory){
15 | return Row(
16 | children: [
17 | selectAllBtn(context),
18 | allPriceArea(context),
19 | goButton(context)
20 | ],
21 | );
22 | },
23 | )
24 | );
25 | }
26 |
27 | //全选按钮
28 | Widget selectAllBtn(context){
29 | bool isAllCheck = Provide.value(context).isAllCheck;
30 | return Container(
31 | child: Row(
32 | children: [
33 | Checkbox(
34 | value: isAllCheck,
35 | activeColor: Colors.pink,
36 | onChanged: (bool val){
37 | Provide.value(context).changeAllCheckBtnState(val);
38 | },
39 | ),
40 | Text('全选')
41 | ],
42 | ),
43 | );
44 | }
45 |
46 | // 合计区域
47 | Widget allPriceArea(context){
48 | double allPrice = Provide.value(context).allPrice;
49 |
50 | return Container(
51 | width: ScreenUtil().setWidth(430),
52 | alignment: Alignment.centerRight,
53 | child: Column(
54 | children: [
55 | Row(
56 | children: [
57 | Container(
58 | alignment: Alignment.centerRight,
59 | width: ScreenUtil().setWidth(280),
60 | child: Text(
61 | '合计:',
62 | style:TextStyle(
63 | fontSize: ScreenUtil().setSp(36)
64 | )
65 | ),
66 | ),
67 | Container(
68 | alignment: Alignment.centerLeft,
69 | width: ScreenUtil().setWidth(150),
70 | child: Text(
71 | '¥${allPrice}',
72 | style:TextStyle(
73 | fontSize: ScreenUtil().setSp(36),
74 | color: Colors.red,
75 | )
76 | ),
77 |
78 | )
79 |
80 |
81 | ],
82 | ),
83 | Container(
84 | width: ScreenUtil().setWidth(430),
85 | alignment: Alignment.centerRight,
86 | child: Text(
87 | '满10元免配送费,预购免配送费',
88 | style: TextStyle(
89 | color: Colors.black38,
90 | fontSize: ScreenUtil().setSp(22)
91 | ),
92 | ),
93 | )
94 |
95 | ],
96 | ),
97 | );
98 |
99 | }
100 |
101 | //结算按钮
102 | Widget goButton(context){
103 | int allGoodsCount = Provide.value(context).allGoodsCount;
104 | return Container(
105 | width: ScreenUtil().setWidth(160),
106 | padding: EdgeInsets.only(left: 10),
107 | child:InkWell(
108 | onTap: (){},
109 | child: Container(
110 | padding: EdgeInsets.all(10.0),
111 | alignment: Alignment.center,
112 | decoration: BoxDecoration(
113 | color: Colors.red,
114 | borderRadius: BorderRadius.circular(3.0)
115 | ),
116 | child: Text(
117 | '结算(${allGoodsCount})',
118 | style: TextStyle(
119 | color: Colors.white
120 | ),
121 | ),
122 | ),
123 | ) ,
124 | );
125 |
126 |
127 | }
128 |
129 | }
--------------------------------------------------------------------------------
/lib/pages/cart_page/cart_count.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_screenutil/flutter_screenutil.dart';
3 | import 'package:provide/provide.dart';
4 | import '../../provide/cart.dart';
5 |
6 | class CartCount extends StatelessWidget {
7 | var item;
8 | CartCount(this.item);
9 |
10 |
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Container(
15 | width: ScreenUtil().setWidth(165),
16 | margin: EdgeInsets.only(top:5.0),
17 | decoration: BoxDecoration(
18 | border:Border.all(width: 1 , color:Colors.black12)
19 | ),
20 | child: Row(
21 | children: [
22 | _reduceBtn(context),
23 | _countArea(),
24 | _addBtn(context),
25 | ],
26 | ),
27 |
28 | );
29 | }
30 | // 减少按钮
31 | Widget _reduceBtn(context){
32 | return InkWell(
33 | onTap: (){
34 | Provide.value(context).addOrReduceAction(item,'reduce');
35 | },
36 | child: Container(
37 | width: ScreenUtil().setWidth(45),
38 | height: ScreenUtil().setHeight(45),
39 | alignment: Alignment.center,
40 |
41 | decoration: BoxDecoration(
42 | color: item.count>1?Colors.white:Colors.black12,
43 | border:Border(
44 | right:BorderSide(width:1,color:Colors.black12)
45 | )
46 | ),
47 | child:item.count>1? Text('-'):Text(' '),
48 | ),
49 | );
50 | }
51 |
52 | //添加按钮
53 | Widget _addBtn(context){
54 | return InkWell(
55 | onTap: (){
56 | Provide.value(context).addOrReduceAction(item,'add');
57 | },
58 | child: Container(
59 | width: ScreenUtil().setWidth(45),
60 | height: ScreenUtil().setHeight(45),
61 | alignment: Alignment.center,
62 |
63 | decoration: BoxDecoration(
64 | color: Colors.white,
65 | border:Border(
66 | left:BorderSide(width:1,color:Colors.black12)
67 | )
68 | ),
69 | child: Text('+'),
70 | ),
71 | );
72 | }
73 |
74 | //中间数量显示区域
75 | Widget _countArea(){
76 | return Container(
77 | width: ScreenUtil().setWidth(70),
78 | height: ScreenUtil().setHeight(45),
79 | alignment: Alignment.center,
80 | color: Colors.white,
81 | child: Text('${item.count}'),
82 | );
83 | }
84 |
85 | }
--------------------------------------------------------------------------------
/lib/pages/cart_page/cart_item.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_screenutil/flutter_screenutil.dart';
3 | import '../../model/cartInfo.dart';
4 | import './cart_count.dart';
5 | import 'package:provide/provide.dart';
6 | import '../../provide/cart.dart';
7 |
8 | class CartItem extends StatelessWidget {
9 | final CartInfoMode item;
10 | CartItem(this.item);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | print(item);
15 | return Container(
16 | margin: EdgeInsets.fromLTRB(5.0,2.0,5.0,2.0),
17 | padding: EdgeInsets.fromLTRB(5.0,10.0,5.0,10.0),
18 | decoration: BoxDecoration(
19 | color: Colors.white,
20 | border: Border(
21 | bottom: BorderSide(width:1,color:Colors.black12)
22 | )
23 | ),
24 | child: Row(
25 | children: [
26 | _cartCheckBt(context,item),
27 | _cartImage(item),
28 | _cartGoodsName(item),
29 | _cartPrice(context,item)
30 | ],
31 | ),
32 | );
33 | }
34 | //多选按钮
35 | Widget _cartCheckBt(context,item){
36 | return Container(
37 | child: Checkbox(
38 | value: item.isCheck,
39 | activeColor:Colors.pink,
40 | onChanged: (bool val){
41 | item.isCheck=val;
42 | Provide.value(context).changeCheckState(item);
43 | },
44 | ),
45 | );
46 | }
47 | //商品图片
48 | Widget _cartImage(item){
49 |
50 | return Container(
51 | width: ScreenUtil().setWidth(150),
52 | padding: EdgeInsets.all(3.0),
53 | decoration: BoxDecoration(
54 | border: Border.all(width: 1,color:Colors.black12)
55 | ),
56 | child: Image.network(item.images),
57 | );
58 | }
59 | //商品名称
60 | Widget _cartGoodsName(item){
61 | return Container(
62 | width: ScreenUtil().setWidth(300),
63 | padding: EdgeInsets.all(10),
64 | alignment: Alignment.topLeft,
65 | child: Column(
66 | children: [
67 | Text(item.goodsName),
68 | CartCount(item)
69 | ],
70 | ),
71 | );
72 | }
73 |
74 | //商品价格
75 | Widget _cartPrice(context,item){
76 |
77 | return Container(
78 | width:ScreenUtil().setWidth(150) ,
79 | alignment: Alignment.centerRight,
80 |
81 | child: Column(
82 | children: [
83 | Text('¥${item.price}'),
84 | Container(
85 | child: InkWell(
86 | onTap: (){
87 | Provide.value(context).deleteOneGoods(item.goodsId);
88 | },
89 | child: Icon(
90 | Icons.delete_forever,
91 | color: Colors.black26,
92 | size: 30,
93 | ),
94 | ),
95 | )
96 | ],
97 | ),
98 | );
99 | }
100 |
101 | }
--------------------------------------------------------------------------------
/lib/pages/category_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../service/service_method.dart';
3 | import 'dart:convert';
4 | import 'package:flutter_easyrefresh/easy_refresh.dart';
5 | import '../model/category.dart';
6 | import '../model/categoryGoodsList.dart';
7 |
8 | import 'package:provide/provide.dart';
9 | import '../provide/child_category.dart';
10 | import '../provide/category_goods_list.dart';
11 | import 'package:fluttertoast/fluttertoast.dart';
12 | import '../routers/application.dart';
13 |
14 |
15 |
16 | import 'package:flutter_screenutil/flutter_screenutil.dart';
17 |
18 | class CategoryPage extends StatefulWidget {
19 | _CategoryPageState createState() => _CategoryPageState();
20 | }
21 |
22 | class _CategoryPageState extends State {
23 | // CategoryBigListModel listCategory = CategoryBigListModel([]);
24 |
25 | @override
26 | Widget build(BuildContext context) {
27 | return Scaffold(
28 | appBar: AppBar(
29 | title: Text('商品分类'),
30 | ),
31 | body: Container(
32 | child: Row(
33 | children: [
34 | LeftCategoryNav(),
35 | Column(
36 | children: [
37 | RightCategoryNav(),
38 | CategoryGoodsList()
39 | ],
40 | )
41 | ],
42 | ),
43 | ),
44 | );
45 | }
46 | }
47 |
48 | //左侧导航菜单
49 | class LeftCategoryNav extends StatefulWidget {
50 | _LeftCategoryNavState createState() => _LeftCategoryNavState();
51 | }
52 |
53 | class _LeftCategoryNavState extends State {
54 | List list = [];
55 | var listIndex = 0; //索引
56 |
57 | @override
58 | void initState() {
59 | _getCategory();
60 |
61 |
62 | super.initState();
63 | }
64 |
65 | @override
66 | Widget build(BuildContext context) {
67 |
68 | return Provide(
69 |
70 | builder: (context,child,val){
71 | _getGoodList(context);
72 | listIndex=val.categoryIndex;
73 |
74 | return Container(
75 | width: ScreenUtil().setWidth(180),
76 | decoration: BoxDecoration(
77 | border: Border(right: BorderSide(width: 1, color: Colors.black12))),
78 | child: ListView.builder(
79 | itemCount: list.length,
80 | itemBuilder: (context, index) {
81 | return _leftInkWel(index);
82 | },
83 | ),
84 | );
85 | },
86 | );
87 | }
88 |
89 | Widget _leftInkWel(int index) {
90 | bool isClick=false;
91 | isClick=(index==listIndex)?true:false;
92 |
93 | return InkWell(
94 | onTap: () {
95 |
96 |
97 | var childList = list[index].bxMallSubDto;
98 | var categoryId= list[index].mallCategoryId;
99 | Provide.value(context).changeCategory(categoryId,index);
100 | Provide.value(context).getChildCategory(childList,categoryId);
101 | _getGoodList(context,categoryId:categoryId );
102 | },
103 | child: Container(
104 | height: ScreenUtil().setHeight(100),
105 | padding: EdgeInsets.only(left: 10, top: 20),
106 | decoration: BoxDecoration(
107 | color: isClick?Color.fromRGBO(236, 238, 239, 1.0):Colors.white,
108 | border:
109 | Border(bottom: BorderSide(width: 1, color: Colors.black12))),
110 | child: Text(
111 | list[index].mallCategoryName,
112 | style: TextStyle(fontSize: ScreenUtil().setSp(28)),
113 | ),
114 | ),
115 | );
116 | }
117 |
118 | //得到后台大类数据
119 | void _getCategory() async {
120 | await request('getCategory').then((val) {
121 | var data = json.decode(val.toString());
122 |
123 | CategoryModel category = CategoryModel.fromJson(data);
124 |
125 | setState(() {
126 | list = category.data;
127 | });
128 |
129 | Provide.value(context).getChildCategory( list[0].bxMallSubDto,'4');
130 |
131 | //print(list[0].bxMallSubDto);
132 |
133 | //list[0].bxMallSubDto.forEach((item) => print(item.mallSubName));
134 | });
135 | }
136 | //得到商品列表数据
137 | void _getGoodList(context,{String categoryId }) {
138 |
139 |
140 | var data={
141 | 'categoryId':categoryId==null?Provide.value(context).categoryId:categoryId,
142 | 'categorySubId':Provide.value(context).subId,
143 | 'page':1
144 | };
145 |
146 |
147 |
148 | request('getMallGoods',formData:data ).then((val){
149 | var data = json.decode(val.toString());
150 | CategoryGoodsListModel goodsList= CategoryGoodsListModel.fromJson(data);
151 | // Provide.value(context).getGoodsList(goodsList.data);
152 | Provide.value(context).getGoodsList(goodsList.data);
153 |
154 | });
155 | }
156 |
157 | }
158 |
159 | //右侧小类类别
160 |
161 | class RightCategoryNav extends StatefulWidget {
162 | _RightCategoryNavState createState() => _RightCategoryNavState();
163 | }
164 |
165 | class _RightCategoryNavState extends State {
166 |
167 |
168 |
169 |
170 |
171 | @override
172 | Widget build(BuildContext context) {
173 |
174 | return Container(
175 | // child: Text('${childCategory.childCategoryList.length}'),
176 |
177 | child: Provide(
178 | builder: (context,child,childCategory){
179 | return Container(
180 | height: ScreenUtil().setHeight(80),
181 | width: ScreenUtil().setWidth(570),
182 | decoration: BoxDecoration(
183 | color: Colors.white,
184 | border: Border(
185 | bottom: BorderSide(width: 1,color: Colors.black12)
186 | )
187 | ),
188 | child:ListView.builder(
189 | scrollDirection: Axis.horizontal,
190 | itemCount: childCategory.childCategoryList.length,
191 | itemBuilder: (context,index){
192 |
193 | return _rightInkWell(index,childCategory.childCategoryList[index]);
194 | },
195 | )
196 | );
197 | },
198 | )
199 | );
200 | }
201 |
202 | Widget _rightInkWell(int index,BxMallSubDto item){
203 | bool isCheck = false;
204 | isCheck =(index==Provide.value(context).childIndex)?true:false;
205 |
206 | return InkWell(
207 | onTap: (){
208 | print (2222222222);
209 | Provide.value(context).changeChildIndex(index,item.mallSubId);
210 | _getGoodList(context,item.mallSubId);
211 | },
212 | child: Container(
213 | padding:EdgeInsets.fromLTRB(5.0,10.0,5.0,10.0),
214 |
215 | child: Text(
216 | item.mallSubName,
217 |
218 | style: TextStyle(
219 | fontSize:ScreenUtil().setSp(28),
220 | color:isCheck?Colors.pink:Colors.black ),
221 | ),
222 | ),
223 | );
224 | }
225 |
226 |
227 | //得到商品列表数据
228 | void _getGoodList(context,String categorySubId) {
229 |
230 | var data={
231 | 'categoryId':Provide.value(context).categoryId,
232 | 'categorySubId':categorySubId,
233 | 'page':1
234 | };
235 |
236 | request('getMallGoods',formData:data ).then((val){
237 | var data = json.decode(val.toString());
238 | CategoryGoodsListModel goodsList= CategoryGoodsListModel.fromJson(data);
239 | // Provide.value(context).getGoodsList(goodsList.data);
240 | if(goodsList.data==null){
241 | Provide.value(context).getGoodsList([]);
242 | }else{
243 | Provide.value(context).getGoodsList(goodsList.data);
244 |
245 | }
246 | });
247 | }
248 |
249 |
250 |
251 | }
252 |
253 |
254 | //商品列表,可以上拉加载
255 |
256 | class CategoryGoodsList extends StatefulWidget {
257 | @override
258 | _CategoryGoodsListState createState() => _CategoryGoodsListState();
259 | }
260 |
261 | class _CategoryGoodsListState extends State {
262 |
263 | GlobalKey _easyRefreshKey =new GlobalKey();
264 | GlobalKey _footerKey = new GlobalKey();
265 | var scrollController=new ScrollController();
266 |
267 |
268 | @override
269 | Widget build(BuildContext context) {
270 | return Provide(
271 | builder: (context,child,data){
272 | try{
273 | if(Provide.value(context).page==1){
274 | scrollController.jumpTo(0.0);
275 | }
276 | }catch(e){
277 | print('进入页面第一次初始化:${e}');
278 | }
279 |
280 | if(data.goodsList.length>0){
281 | return Expanded(
282 | child:Container(
283 | width: ScreenUtil().setWidth(570) ,
284 | child:EasyRefresh(
285 | refreshFooter: ClassicsFooter(
286 | key:_footerKey,
287 | bgColor:Colors.white,
288 | textColor:Colors.pink,
289 | moreInfoColor: Colors.pink,
290 | showMore:true,
291 | noMoreText:Provide.value(context).noMoreText,
292 | moreInfo:'加载中',
293 | loadReadyText:'上拉加载'
294 | ),
295 | child:ListView.builder(
296 | controller: scrollController,
297 | itemCount: data.goodsList.length,
298 | itemBuilder: (context,index){
299 | return _ListWidget(data.goodsList,index);
300 | },
301 | ) ,
302 | loadMore: ()async{
303 | if(Provide.value(context).noMoreText=='没有更多了'){
304 | Fluttertoast.showToast(
305 | msg: "已经到底了",
306 | toastLength: Toast.LENGTH_SHORT,
307 | gravity: ToastGravity.CENTER,
308 | timeInSecForIos: 1,
309 | backgroundColor: Colors.pink,
310 | textColor: Colors.white,
311 | fontSize: 16.0
312 | );
313 | }else{
314 |
315 | _getMoreList();
316 | }
317 |
318 | },
319 | )
320 |
321 | ) ,
322 | );
323 | }else{
324 | return Text('暂时没有数据');
325 | }
326 |
327 |
328 | },
329 |
330 | );
331 | }
332 |
333 | //上拉加载更多的方法
334 | void _getMoreList(){
335 |
336 | Provide.value(context).addPage();
337 | var data={
338 | 'categoryId':Provide.value(context).categoryId,
339 | 'categorySubId':Provide.value(context).subId,
340 | 'page':Provide.value(context).page
341 | };
342 |
343 | request('getMallGoods',formData:data ).then((val){
344 | var data = json.decode(val.toString());
345 | CategoryGoodsListModel goodsList= CategoryGoodsListModel.fromJson(data);
346 |
347 | if(goodsList.data==null){
348 | Provide.value(context).changeNoMore('没有更多了');
349 | }else{
350 |
351 | Provide.value(context).addGoodsList(goodsList.data);
352 |
353 | }
354 | });
355 |
356 |
357 | }
358 |
359 |
360 |
361 | Widget _ListWidget(List newList,int index){
362 |
363 |
364 |
365 | return InkWell(
366 | onTap: (){
367 | Application.router.navigateTo(context,"/detail?id=${newList[index].goodsId}");
368 | },
369 | child: Container(
370 | padding: EdgeInsets.only(top: 5.0,bottom: 5.0),
371 | decoration: BoxDecoration(
372 | color: Colors.white,
373 | border: Border(
374 | bottom: BorderSide(width: 1.0,color: Colors.black12)
375 | )
376 | ),
377 |
378 | child: Row(
379 | children: [
380 | _goodsImage(newList,index)
381 | ,
382 | Column(
383 | children: [
384 | _goodsName(newList,index),
385 | _goodsPrice(newList,index)
386 | ],
387 | )
388 | ],
389 | ),
390 | )
391 | );
392 |
393 | }
394 | //商品图片
395 | Widget _goodsImage(List newList,int index){
396 |
397 | return Container(
398 | width: ScreenUtil().setWidth(200),
399 | child: Image.network(newList[index].image),
400 | );
401 |
402 | }
403 | //商品名称方法
404 | Widget _goodsName(List newList,int index){
405 | return Container(
406 | padding: EdgeInsets.all(5.0),
407 | width: ScreenUtil().setWidth(370),
408 | child: Text(
409 | newList[index].goodsName,
410 | maxLines: 2,
411 | overflow: TextOverflow.ellipsis,
412 | style: TextStyle(fontSize: ScreenUtil().setSp(28)),
413 | ),
414 | );
415 | }
416 | //商品价格方法
417 | Widget _goodsPrice(List newList,int index){
418 | return Container(
419 | margin: EdgeInsets.only(top:20.0),
420 | width: ScreenUtil().setWidth(370),
421 | child:Row(
422 | children: [
423 | Text(
424 | '价格:¥${newList[index].presentPrice}',
425 | style: TextStyle(color:Colors.pink,fontSize:ScreenUtil().setSp(30)),
426 | ),
427 | Text(
428 |
429 | '¥${newList[index].oriPrice}',
430 | style: TextStyle(
431 | color: Colors.black26,
432 | decoration: TextDecoration.lineThrough
433 | ),
434 | )
435 | ]
436 | )
437 | );
438 | }
439 |
440 |
441 | }
442 |
443 |
--------------------------------------------------------------------------------
/lib/pages/details_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:provide/provide.dart';
3 | import '../provide/details_info.dart';
4 | import './details_page/details_top_area.dart';
5 | import './details_page/details_explain.dart';
6 | import './details_page/details_tabBar.dart';
7 | import './details_page/details_web.dart';
8 | import './details_page/details_bottom.dart';
9 |
10 |
11 | class DetailsPage extends StatelessWidget {
12 | final String goodsId;
13 | DetailsPage(this.goodsId);
14 |
15 | @override
16 | Widget build(BuildContext context) {
17 |
18 | return Scaffold(
19 | appBar: AppBar(
20 | leading: IconButton(
21 | icon:Icon(Icons.arrow_back),
22 | onPressed: (){
23 | print('返回上一页');
24 | Navigator.pop(context);
25 | },
26 | ),
27 | title: Text('商品详细页'),
28 | ),
29 | body:FutureBuilder(
30 | future: _getBackInfo(context) ,
31 | builder: (context,snapshot){
32 | if(snapshot.hasData){
33 | return Stack(
34 | children: [
35 | ListView(
36 | children: [
37 | DetailsTopArea(),
38 | DetailsExplain(),
39 | DetailsTabBar(),
40 | DetailsWeb(),
41 |
42 |
43 | ],
44 | ),
45 | Positioned(
46 | bottom: 0,
47 | left: 0,
48 | child: DetailsBottom()
49 | )
50 | ],
51 | );
52 |
53 |
54 |
55 |
56 | }else{
57 | return Text('加载中........');
58 | }
59 | }
60 | )
61 | );
62 | }
63 |
64 | Future _getBackInfo(BuildContext context )async{
65 | await Provide.value(context).getGoodsInfo(goodsId);
66 | return '完成加载';
67 | }
68 |
69 | }
--------------------------------------------------------------------------------
/lib/pages/details_page/details_bottom.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_screenutil/flutter_screenutil.dart';
3 | import 'package:provide/provide.dart';
4 | import '../../provide/cart.dart';
5 | import '../../provide/details_info.dart';
6 | import '../../provide/currentIndex.dart';
7 |
8 |
9 | class DetailsBottom extends StatelessWidget {
10 | @override
11 | Widget build(BuildContext context) {
12 | var goodsInfo=Provide.value(context).goodsInfo.data.goodInfo;
13 |
14 |
15 | var goodsID= goodsInfo.goodsId;
16 | var goodsName =goodsInfo.goodsName;
17 | var count =1;
18 | var price =goodsInfo.presentPrice;
19 | var images= goodsInfo.image1;
20 |
21 | return Container(
22 | width:ScreenUtil().setWidth(750),
23 | color: Colors.white,
24 | height: ScreenUtil().setHeight(80),
25 | child: Row(
26 | children: [
27 | Stack(
28 | children: [
29 | InkWell(
30 | onTap: (){
31 | Provide.value(context).changeIndex(2);
32 | Navigator.pop(context);
33 | },
34 | child: Container(
35 | width: ScreenUtil().setWidth(110) ,
36 | alignment: Alignment.center,
37 | child:Icon(
38 | Icons.shopping_cart,
39 | size: 35,
40 | color: Colors.red,
41 | ),
42 | ) ,
43 | ),
44 | Provide(
45 | builder: (context,child,val){
46 | int goodsCount = Provide.value(context).allGoodsCount;
47 | return Positioned(
48 | top:0,
49 | right: 10,
50 | child: Container(
51 | padding:EdgeInsets.fromLTRB(6, 3, 6, 3),
52 | decoration: BoxDecoration(
53 | color:Colors.pink,
54 | border:Border.all(width: 2,color: Colors.white),
55 | borderRadius: BorderRadius.circular(12.0)
56 | ),
57 | child: Text(
58 | '${goodsCount}',
59 | style: TextStyle(
60 | color: Colors.white,
61 | fontSize: ScreenUtil().setSp(22)
62 | ),
63 | ),
64 | ),
65 | ) ;
66 | },
67 | )
68 |
69 | ],
70 | ),
71 |
72 | InkWell(
73 | onTap: ()async {
74 | await Provide.value(context).save(goodsID,goodsName,count,price,images);
75 |
76 | },
77 | child: Container(
78 | alignment: Alignment.center,
79 | width: ScreenUtil().setWidth(320),
80 | height: ScreenUtil().setHeight(80),
81 | color: Colors.green,
82 | child: Text(
83 | '加入购物车',
84 | style: TextStyle(color: Colors.white,fontSize: ScreenUtil().setSp(28)),
85 | ),
86 | ) ,
87 | ),
88 | InkWell(
89 | onTap: ()async{
90 | await Provide.value(context).remove();
91 | },
92 | child: Container(
93 | alignment: Alignment.center,
94 | width: ScreenUtil().setWidth(320),
95 | height: ScreenUtil().setHeight(80),
96 | color: Colors.red,
97 | child: Text(
98 | '马上购买',
99 | style: TextStyle(color: Colors.white,fontSize: ScreenUtil().setSp(28)),
100 | ),
101 | ) ,
102 | ),
103 | ],
104 | ),
105 | );
106 | }
107 | }
--------------------------------------------------------------------------------
/lib/pages/details_page/details_explain.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_screenutil/flutter_screenutil.dart';
3 |
4 |
5 | class DetailsExplain extends StatelessWidget {
6 | @override
7 | Widget build(BuildContext context) {
8 | return Container(
9 | color:Colors.white,
10 | margin: EdgeInsets.only(top: 10),
11 | width: ScreenUtil().setWidth(750),
12 | padding: EdgeInsets.all(10.0),
13 | child: Text(
14 | '说明:> 急速送达 > 正品保证',
15 | style: TextStyle(
16 | color:Colors.red,
17 | fontSize:ScreenUtil().setSp(30) ),
18 | )
19 | );
20 | }
21 | }
--------------------------------------------------------------------------------
/lib/pages/details_page/details_tabbar.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_screenutil/flutter_screenutil.dart';
3 | import 'package:provide/provide.dart';
4 | import '../../provide/details_info.dart';
5 |
6 | class DetailsTabBar extends StatelessWidget {
7 |
8 | Widget build(BuildContext context) {
9 | return Provide(
10 | builder: (context,child,val){
11 | var isLeft= Provide.value(context).isLeft;
12 | var isRight =Provide.value(context).isRight;
13 |
14 | return Container(
15 | margin: EdgeInsets.only(top: 15.0),
16 | child: Column(
17 | children: [
18 | Row(
19 | children: [
20 | _myTabBarLeft(context,isLeft),
21 | _myTabBarRight(context,isRight)
22 | ],
23 | ),
24 | ],
25 |
26 |
27 | ),
28 |
29 | ) ;
30 | },
31 |
32 | );
33 | }
34 |
35 | Widget _myTabBarLeft(BuildContext context,bool isLeft){
36 | return InkWell(
37 | onTap: (){
38 |
39 | Provide.value(context).changeLeftAndRight('left');
40 | },
41 | child: Container(
42 |
43 | padding:EdgeInsets.all(10.0),
44 | alignment: Alignment.center,
45 | width: ScreenUtil().setWidth(375),
46 | decoration: BoxDecoration(
47 | color: Colors.white,
48 | border: Border(
49 | bottom: BorderSide(
50 | width: 1.0,
51 | color: isLeft?Colors.pink:Colors.black12
52 | )
53 | )
54 | ),
55 | child: Text(
56 | '详细',
57 | style: TextStyle(
58 | color:isLeft?Colors.pink:Colors.black
59 | ),
60 | ),
61 | ),
62 | );
63 | }
64 | Widget _myTabBarRight(BuildContext context,bool isRight){
65 | return InkWell(
66 | onTap: (){
67 |
68 | Provide.value(context).changeLeftAndRight('right');
69 | },
70 | child: Container(
71 |
72 | padding:EdgeInsets.all(10.0),
73 | alignment: Alignment.center,
74 | width: ScreenUtil().setWidth(375),
75 | decoration: BoxDecoration(
76 | color: Colors.white,
77 | border: Border(
78 | bottom: BorderSide(
79 | width: 1.0,
80 | color: isRight?Colors.pink:Colors.black12
81 | )
82 | )
83 | ),
84 | child: Text(
85 | '评论',
86 | style: TextStyle(
87 | color:isRight?Colors.pink:Colors.black
88 | ),
89 | ),
90 | ),
91 | );
92 | }
93 |
94 | }
--------------------------------------------------------------------------------
/lib/pages/details_page/details_top_area.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:provide/provide.dart';
3 | import '../../provide/details_info.dart';
4 | import 'package:flutter_screenutil/flutter_screenutil.dart';
5 |
6 | //商品详情页的首屏区域,包括图片、商品名称,商品价格,商品编号的UI展示
7 | class DetailsTopArea extends StatelessWidget {
8 | @override
9 | Widget build(BuildContext context) {
10 | return Provide(
11 |
12 | builder:(context,child,val){
13 | var goodsInfo=Provide.value(context).goodsInfo.data.goodInfo;
14 |
15 | if(goodsInfo != null){
16 |
17 | return Container(
18 | color: Colors.white,
19 | padding: EdgeInsets.all(2.0),
20 | child: Column(
21 | children: [
22 | _goodsImage( goodsInfo.image1),
23 | _goodsName( goodsInfo.goodsName ),
24 | _goodsNum(goodsInfo.goodsSerialNumber),
25 | _goodsPrice(goodsInfo.presentPrice,goodsInfo.oriPrice),
26 |
27 | ],
28 | ),
29 | );
30 |
31 | }else{
32 | return Text('正在加载中......');
33 | }
34 | }
35 | );
36 | }
37 |
38 | //商品图片
39 | Widget _goodsImage(url){
40 | return Image.network(
41 | url,
42 | width:ScreenUtil().setWidth(740)
43 | );
44 |
45 | }
46 |
47 | //商品名称
48 | Widget _goodsName(name){
49 |
50 | return Container(
51 |
52 | width: ScreenUtil().setWidth(730),
53 | padding: EdgeInsets.only(left:15.0),
54 | child: Text(
55 | name,
56 | maxLines: 1,
57 | style: TextStyle(
58 | fontSize: ScreenUtil().setSp(30)
59 | ),
60 | ),
61 | );
62 | }
63 |
64 | //商品编号
65 |
66 | Widget _goodsNum(num){
67 | return Container(
68 |
69 | width: ScreenUtil().setWidth(730),
70 | padding: EdgeInsets.only(left:15.0),
71 | margin: EdgeInsets.only(top:8.0),
72 | child: Text(
73 | '编号:${num}',
74 | style: TextStyle(
75 | color: Colors.black26
76 | ),
77 | ),
78 |
79 | );
80 | }
81 |
82 | //商品价格方法
83 |
84 | Widget _goodsPrice(presentPrice,oriPrice){
85 |
86 | return Container(
87 |
88 | width: ScreenUtil().setWidth(730),
89 | padding: EdgeInsets.only(left:15.0),
90 | margin: EdgeInsets.only(top:8.0),
91 | child: Row(
92 | children: [
93 | Text(
94 | '¥${presentPrice}',
95 | style: TextStyle(
96 | color:Colors.pinkAccent,
97 | fontSize: ScreenUtil().setSp(40),
98 |
99 | ),
100 |
101 | ),
102 | Text(
103 | '市场价:¥${oriPrice}',
104 | style: TextStyle(
105 | color: Colors.black26,
106 | decoration: TextDecoration.lineThrough
107 | ),
108 |
109 |
110 | )
111 | ],
112 | ),
113 | );
114 |
115 | }
116 |
117 |
118 |
119 | }
--------------------------------------------------------------------------------
/lib/pages/details_page/details_web.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:provide/provide.dart';
3 | import '../../provide/details_info.dart';
4 | import 'package:flutter_html/flutter_html.dart';
5 | import 'package:flutter_screenutil/flutter_screenutil.dart';
6 |
7 | class DetailsWeb extends StatelessWidget {
8 |
9 | @override
10 | Widget build(BuildContext context) {
11 | var goodsDetail=Provide.value(context).goodsInfo.data.goodInfo.goodsDetail;
12 |
13 |
14 | return Provide(
15 |
16 | builder: (context,child,val){
17 | var isLeft = Provide.value(context).isLeft;
18 | if(isLeft){
19 | return Container(
20 | child: Html(
21 | data:goodsDetail
22 | ),
23 | );
24 | }else{
25 | return Container(
26 | width: ScreenUtil().setWidth(750),
27 | padding: EdgeInsets.all(10),
28 | alignment: Alignment.center,
29 | child:Text('暂时没有数据')
30 | );
31 | }
32 | },
33 | );
34 |
35 | }
36 | }
--------------------------------------------------------------------------------
/lib/pages/home_page.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import '../service/service_method.dart';
3 | import 'package:flutter_swiper/flutter_swiper.dart';
4 | import 'dart:convert';
5 | import 'package:flutter_screenutil/flutter_screenutil.dart';
6 | import 'package:url_launcher/url_launcher.dart';
7 | import 'package:flutter_easyrefresh/easy_refresh.dart';
8 | import '../routers/application.dart';
9 |
10 | //--------
11 | import 'package:provide/provide.dart';
12 | import '../provide/child_category.dart';
13 | import '../provide/currentIndex.dart';
14 | import '../model/category.dart';
15 |
16 |
17 | class HomePage extends StatefulWidget {
18 | _HomePageState createState() => _HomePageState();
19 |
20 | }
21 |
22 | class _HomePageState extends State with AutomaticKeepAliveClientMixin {
23 |
24 | int page = 1;
25 | List