├── .Rhistory
├── .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
├── homePage1.png
├── homepag2.png
├── ios
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Podfile
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ ├── IDEWorkspaceChecks.plist
│ │ └── WorkspaceSettings.xcsettings
└── Runner
│ ├── AppDelegate.h
│ ├── AppDelegate.m
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-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
│ └── service_url.dart
├── main.dart
├── model
│ ├── cartinfo.dart
│ ├── categoryGoodsList.dart
│ ├── category_model.dart
│ └── details_model.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_tab.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
│ └── routers.dart
└── service
│ └── service_method.dart
├── pubspec.yaml
├── test
└── widget_test.dart
├── 个人中心.png
├── 分类.png
├── 商品详情.png
└── 购物车.png
/.Rhistory:
--------------------------------------------------------------------------------
1 | q()
2 | q()
3 |
--------------------------------------------------------------------------------
/.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 | [视频教程:技术胖]( https://m.qlchat.com/wechat/page/topic-simple-video?topicId=2000003599735644&byhand=1 )
3 |
4 | ## 版本信息:
5 | version: 1.0.0+1
6 | environment: sdk: ">=2.0.0-dev.68.0 <3.0.0"
7 |
8 | ### model转换 [https://javiercbk.github.io/json_to_dart/ ]( https://javiercbk.github.io/json_to_dart/ )
9 | ### state管理 [provide: ^1.0.2 ]( https://github.com/google/flutter-provide )
10 |
11 |
12 | ### 使用三方库
13 | [网络请求库: dio]( https://github.com/flutterchina/dio )
14 | [轮播库: flutter_swiper]( https://github.com/best-flutter/flutter_swiper )
15 | [UI尺寸适配库: flutter_screenutil]( https://github.com/OpenFlutter/flutter_screenutil )
16 | [打电话: url_launcher]( https://github.com/flutter/plugins/tree/master/packages/url_launcher )
17 | [下拉刷新&上拉加载: flutter_easyrefresh]( https://github.com/xuelongqy/flutter_easyrefresh )
18 | [提示框: fluttertoast]( https://github.com/PonnamKarthik/FlutterToast )
19 | [路由管理: fluro]( https://github.com/theyakka/fluro )
20 | [html加载: flutter_html]( https://github.com/Sub6Resources/flutter_html)
21 | [数据持久化: shared_preferences]( https://github.com/flutter/plugins/tree/master/packages/shared_preferences)
22 |
23 |
24 |
25 |
26 | ### 代码结构
27 | >- |--lib
28 | > - |-- config
29 | > - |-- service_url.dart (存放url)
30 | > - |-- model
31 | > - |-- cartInfo.dart (购物车model)
32 | > - |-- category_model.dart (分类model)
33 | > - |-- categoryGoodsList.dart (分类列表model)
34 | > - |-- details_model.dart (详情model)
35 | > - |-- provide
36 | > - |-- category_goods_list.dart <分类页--商品列表>
37 | > - |-- child_category.dart <分类页--商品子分类>
38 | > - |-- details_info.dart <商品详情>
39 | > - |-- cart.dart <购物车逻辑>
40 | > - |-- currentIndex.dart
41 | > - |-- pages (页面)
42 | > - |-- cart_page
43 | > - |-- cart_item.dart (购物车item)
44 | > - |-- cart_count.dart (购物车+-按钮)
45 | > - |-- cart_bottom.dart (购物车底部UI)
46 | > - |-- details_page
47 | > - |-- details_bottom.dart (加入购物车/立即购买按钮)
48 | > - |-- details_top_area.dart (商品详情的顶部)
49 | > - |-- details_explain.dart (商品详情的解释固定UI)
50 | > - |-- details_tab.dart (商品详情的tab)
51 | > - |-- details_web.dart (商品详情的leftweb)
52 | > - |-- index_page.dart (tabbar页面)
53 | > - |-- home_page.dart (首页页面)
54 | > - |-- details_page.dart (商品详情页面)
55 | > - |-- category_page.dart (分类页面)
56 | > - |-- cart_page.dart (购物车页面)
57 | > - |-- member_page.dart (会员中心页面)
58 | > - |-- service
59 | > - |-- service_method.dart (网络请求)
60 | > - |-- routers
61 | > - |-- application.dart (静态化Router对象)
62 | > - |-- router_handle.dart (handle:负责跳转)
63 | > - |-- router.dart (handle注册进fluro)
64 | > - |-- mian.dart (入口)
65 |
66 | ## 项目截图
67 | ### 首页
68 | 
69 | 
70 | 
71 |
72 | ### 分类
73 | 
74 |
75 | ### 购物车
76 | 
77 |
78 | ### 会员中心
79 | 
80 |
81 |
82 |
83 |
--------------------------------------------------------------------------------
/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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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 |
--------------------------------------------------------------------------------
/homePage1.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/homePage1.png
--------------------------------------------------------------------------------
/homepag2.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/homepag2.png
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
2 | #include "Generated.xcconfig"
3 |
--------------------------------------------------------------------------------
/ios/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment this line to define a global platform for your project
2 | # platform :ios, '9.0'
3 |
4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency.
5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true'
6 |
7 | project 'Runner', {
8 | 'Debug' => :debug,
9 | 'Profile' => :release,
10 | 'Release' => :release,
11 | }
12 |
13 | def parse_KV_file(file, separator='=')
14 | file_abs_path = File.expand_path(file)
15 | if !File.exists? file_abs_path
16 | return [];
17 | end
18 | pods_ary = []
19 | skip_line_start_symbols = ["#", "/"]
20 | File.foreach(file_abs_path) { |line|
21 | next if skip_line_start_symbols.any? { |symbol| line =~ /^\s*#{symbol}/ }
22 | plugin = line.split(pattern=separator)
23 | if plugin.length == 2
24 | podname = plugin[0].strip()
25 | path = plugin[1].strip()
26 | podpath = File.expand_path("#{path}", file_abs_path)
27 | pods_ary.push({:name => podname, :path => podpath});
28 | else
29 | puts "Invalid plugin specification: #{line}"
30 | end
31 | }
32 | return pods_ary
33 | end
34 |
35 | target 'Runner' do
36 | # Prepare symlinks folder. We use symlinks to avoid having Podfile.lock
37 | # referring to absolute paths on developers' machines.
38 | system('rm -rf .symlinks')
39 | system('mkdir -p .symlinks/plugins')
40 |
41 | # Flutter Pods
42 | generated_xcode_build_settings = parse_KV_file('./Flutter/Generated.xcconfig')
43 | if generated_xcode_build_settings.empty?
44 | puts "Generated.xcconfig must exist. If you're running pod install manually, make sure flutter packages get is executed first."
45 | end
46 | generated_xcode_build_settings.map { |p|
47 | if p[:name] == 'FLUTTER_FRAMEWORK_DIR'
48 | symlink = File.join('.symlinks', 'flutter')
49 | File.symlink(File.dirname(p[:path]), symlink)
50 | pod 'Flutter', :path => File.join(symlink, File.basename(p[:path]))
51 | end
52 | }
53 |
54 | # Plugin Pods
55 | plugin_pods = parse_KV_file('../.flutter-plugins')
56 | plugin_pods.map { |p|
57 | symlink = File.join('.symlinks', 'plugins', p[:name])
58 | File.symlink(p[:path], symlink)
59 | pod p[:name], :path => File.join(symlink, 'ios')
60 | }
61 | end
62 |
63 | post_install do |installer|
64 | installer.pods_project.targets.each do |target|
65 | target.build_configurations.each do |config|
66 | config.build_settings['ENABLE_BITCODE'] = 'NO'
67 | end
68 | end
69 | end
70 |
--------------------------------------------------------------------------------
/ios/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 | 1F49A4629C1E9981F4FEEC6D /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = B26339B66B63461C0506BDAD /* libPods-Runner.a */; };
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 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
44 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
45 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
46 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
47 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
48 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
49 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
50 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
51 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
52 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
53 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
54 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
55 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
56 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
57 | B26339B66B63461C0506BDAD /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; };
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 | 1F49A4629C1E9981F4FEEC6D /* libPods-Runner.a in Frameworks */,
68 | );
69 | runOnlyForDeploymentPostprocessing = 0;
70 | };
71 | /* End PBXFrameworksBuildPhase section */
72 |
73 | /* Begin PBXGroup section */
74 | 04D64913B4031079CBB3D2F0 /* Pods */ = {
75 | isa = PBXGroup;
76 | children = (
77 | );
78 | name = Pods;
79 | sourceTree = "";
80 | };
81 | 9740EEB11CF90186004384FC /* Flutter */ = {
82 | isa = PBXGroup;
83 | children = (
84 | 3B80C3931E831B6300D905FE /* App.framework */,
85 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
86 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
87 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
88 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
89 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
90 | );
91 | name = Flutter;
92 | sourceTree = "";
93 | };
94 | 97C146E51CF9000F007C117D = {
95 | isa = PBXGroup;
96 | children = (
97 | 9740EEB11CF90186004384FC /* Flutter */,
98 | 97C146F01CF9000F007C117D /* Runner */,
99 | 97C146EF1CF9000F007C117D /* Products */,
100 | 04D64913B4031079CBB3D2F0 /* Pods */,
101 | D8D666CE3D715E49178175BF /* Frameworks */,
102 | );
103 | sourceTree = "";
104 | };
105 | 97C146EF1CF9000F007C117D /* Products */ = {
106 | isa = PBXGroup;
107 | children = (
108 | 97C146EE1CF9000F007C117D /* Runner.app */,
109 | );
110 | name = Products;
111 | sourceTree = "";
112 | };
113 | 97C146F01CF9000F007C117D /* Runner */ = {
114 | isa = PBXGroup;
115 | children = (
116 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */,
117 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */,
118 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
119 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
120 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
121 | 97C147021CF9000F007C117D /* Info.plist */,
122 | 97C146F11CF9000F007C117D /* Supporting Files */,
123 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
124 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
125 | );
126 | path = Runner;
127 | sourceTree = "";
128 | };
129 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
130 | isa = PBXGroup;
131 | children = (
132 | 97C146F21CF9000F007C117D /* main.m */,
133 | );
134 | name = "Supporting Files";
135 | sourceTree = "";
136 | };
137 | D8D666CE3D715E49178175BF /* Frameworks */ = {
138 | isa = PBXGroup;
139 | children = (
140 | B26339B66B63461C0506BDAD /* libPods-Runner.a */,
141 | );
142 | name = Frameworks;
143 | sourceTree = "";
144 | };
145 | /* End PBXGroup section */
146 |
147 | /* Begin PBXNativeTarget section */
148 | 97C146ED1CF9000F007C117D /* Runner */ = {
149 | isa = PBXNativeTarget;
150 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
151 | buildPhases = (
152 | 87AA82D659338CB54CDE9150 /* [CP] Check Pods Manifest.lock */,
153 | 9740EEB61CF901F6004384FC /* Run Script */,
154 | 97C146EA1CF9000F007C117D /* Sources */,
155 | 97C146EB1CF9000F007C117D /* Frameworks */,
156 | 97C146EC1CF9000F007C117D /* Resources */,
157 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
158 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
159 | A90E05DBB68E2EA6001AACA3 /* [CP] Embed Pods Frameworks */,
160 | );
161 | buildRules = (
162 | );
163 | dependencies = (
164 | );
165 | name = Runner;
166 | productName = Runner;
167 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
168 | productType = "com.apple.product-type.application";
169 | };
170 | /* End PBXNativeTarget section */
171 |
172 | /* Begin PBXProject section */
173 | 97C146E61CF9000F007C117D /* Project object */ = {
174 | isa = PBXProject;
175 | attributes = {
176 | LastUpgradeCheck = 0910;
177 | ORGANIZATIONNAME = "The Chromium Authors";
178 | TargetAttributes = {
179 | 97C146ED1CF9000F007C117D = {
180 | CreatedOnToolsVersion = 7.3.1;
181 | ProvisioningStyle = Manual;
182 | };
183 | };
184 | };
185 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
186 | compatibilityVersion = "Xcode 3.2";
187 | developmentRegion = English;
188 | hasScannedForEncodings = 0;
189 | knownRegions = (
190 | English,
191 | en,
192 | Base,
193 | );
194 | mainGroup = 97C146E51CF9000F007C117D;
195 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
196 | projectDirPath = "";
197 | projectRoot = "";
198 | targets = (
199 | 97C146ED1CF9000F007C117D /* Runner */,
200 | );
201 | };
202 | /* End PBXProject section */
203 |
204 | /* Begin PBXResourcesBuildPhase section */
205 | 97C146EC1CF9000F007C117D /* Resources */ = {
206 | isa = PBXResourcesBuildPhase;
207 | buildActionMask = 2147483647;
208 | files = (
209 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
210 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
211 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
212 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
213 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
214 | );
215 | runOnlyForDeploymentPostprocessing = 0;
216 | };
217 | /* End PBXResourcesBuildPhase section */
218 |
219 | /* Begin PBXShellScriptBuildPhase section */
220 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
221 | isa = PBXShellScriptBuildPhase;
222 | buildActionMask = 2147483647;
223 | files = (
224 | );
225 | inputPaths = (
226 | );
227 | name = "Thin Binary";
228 | outputPaths = (
229 | );
230 | runOnlyForDeploymentPostprocessing = 0;
231 | shellPath = /bin/sh;
232 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
233 | };
234 | 87AA82D659338CB54CDE9150 /* [CP] Check Pods Manifest.lock */ = {
235 | isa = PBXShellScriptBuildPhase;
236 | buildActionMask = 2147483647;
237 | files = (
238 | );
239 | inputPaths = (
240 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
241 | "${PODS_ROOT}/Manifest.lock",
242 | );
243 | name = "[CP] Check Pods Manifest.lock";
244 | outputPaths = (
245 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt",
246 | );
247 | runOnlyForDeploymentPostprocessing = 0;
248 | shellPath = /bin/sh;
249 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
250 | showEnvVarsInLog = 0;
251 | };
252 | 9740EEB61CF901F6004384FC /* Run Script */ = {
253 | isa = PBXShellScriptBuildPhase;
254 | buildActionMask = 2147483647;
255 | files = (
256 | );
257 | inputPaths = (
258 | );
259 | name = "Run Script";
260 | outputPaths = (
261 | );
262 | runOnlyForDeploymentPostprocessing = 0;
263 | shellPath = /bin/sh;
264 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
265 | };
266 | A90E05DBB68E2EA6001AACA3 /* [CP] Embed Pods Frameworks */ = {
267 | isa = PBXShellScriptBuildPhase;
268 | buildActionMask = 2147483647;
269 | files = (
270 | );
271 | inputPaths = (
272 | "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh",
273 | "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework",
274 | );
275 | name = "[CP] Embed Pods Frameworks";
276 | outputPaths = (
277 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
278 | );
279 | runOnlyForDeploymentPostprocessing = 0;
280 | shellPath = /bin/sh;
281 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n";
282 | showEnvVarsInLog = 0;
283 | };
284 | /* End PBXShellScriptBuildPhase section */
285 |
286 | /* Begin PBXSourcesBuildPhase section */
287 | 97C146EA1CF9000F007C117D /* Sources */ = {
288 | isa = PBXSourcesBuildPhase;
289 | buildActionMask = 2147483647;
290 | files = (
291 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */,
292 | 97C146F31CF9000F007C117D /* main.m in Sources */,
293 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
294 | );
295 | runOnlyForDeploymentPostprocessing = 0;
296 | };
297 | /* End PBXSourcesBuildPhase section */
298 |
299 | /* Begin PBXVariantGroup section */
300 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
301 | isa = PBXVariantGroup;
302 | children = (
303 | 97C146FB1CF9000F007C117D /* Base */,
304 | );
305 | name = Main.storyboard;
306 | sourceTree = "";
307 | };
308 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
309 | isa = PBXVariantGroup;
310 | children = (
311 | 97C147001CF9000F007C117D /* Base */,
312 | );
313 | name = LaunchScreen.storyboard;
314 | sourceTree = "";
315 | };
316 | /* End PBXVariantGroup section */
317 |
318 | /* Begin XCBuildConfiguration section */
319 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
320 | isa = XCBuildConfiguration;
321 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
322 | buildSettings = {
323 | ALWAYS_SEARCH_USER_PATHS = NO;
324 | CLANG_ANALYZER_NONNULL = YES;
325 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
326 | CLANG_CXX_LIBRARY = "libc++";
327 | CLANG_ENABLE_MODULES = YES;
328 | CLANG_ENABLE_OBJC_ARC = YES;
329 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
330 | CLANG_WARN_BOOL_CONVERSION = YES;
331 | CLANG_WARN_COMMA = YES;
332 | CLANG_WARN_CONSTANT_CONVERSION = YES;
333 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
334 | CLANG_WARN_EMPTY_BODY = YES;
335 | CLANG_WARN_ENUM_CONVERSION = YES;
336 | CLANG_WARN_INFINITE_RECURSION = YES;
337 | CLANG_WARN_INT_CONVERSION = YES;
338 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
339 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
340 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
341 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
342 | CLANG_WARN_STRICT_PROTOTYPES = YES;
343 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
344 | CLANG_WARN_UNREACHABLE_CODE = YES;
345 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
346 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
347 | COPY_PHASE_STRIP = NO;
348 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
349 | ENABLE_NS_ASSERTIONS = NO;
350 | ENABLE_STRICT_OBJC_MSGSEND = YES;
351 | GCC_C_LANGUAGE_STANDARD = gnu99;
352 | GCC_NO_COMMON_BLOCKS = YES;
353 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
354 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
355 | GCC_WARN_UNDECLARED_SELECTOR = YES;
356 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
357 | GCC_WARN_UNUSED_FUNCTION = YES;
358 | GCC_WARN_UNUSED_VARIABLE = YES;
359 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
360 | MTL_ENABLE_DEBUG_INFO = NO;
361 | SDKROOT = iphoneos;
362 | TARGETED_DEVICE_FAMILY = "1,2";
363 | VALIDATE_PRODUCT = YES;
364 | };
365 | name = Profile;
366 | };
367 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
368 | isa = XCBuildConfiguration;
369 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
370 | buildSettings = {
371 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
372 | CODE_SIGN_STYLE = Manual;
373 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
374 | DEVELOPMENT_TEAM = "";
375 | ENABLE_BITCODE = NO;
376 | FRAMEWORK_SEARCH_PATHS = (
377 | "$(inherited)",
378 | "$(PROJECT_DIR)/Flutter",
379 | );
380 | INFOPLIST_FILE = Runner/Info.plist;
381 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
382 | LIBRARY_SEARCH_PATHS = (
383 | "$(inherited)",
384 | "$(PROJECT_DIR)/Flutter",
385 | );
386 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterShop;
387 | PRODUCT_NAME = "$(TARGET_NAME)";
388 | PROVISIONING_PROFILE_SPECIFIER = "";
389 | VERSIONING_SYSTEM = "apple-generic";
390 | };
391 | name = Profile;
392 | };
393 | 97C147031CF9000F007C117D /* Debug */ = {
394 | isa = XCBuildConfiguration;
395 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
396 | buildSettings = {
397 | ALWAYS_SEARCH_USER_PATHS = NO;
398 | CLANG_ANALYZER_NONNULL = YES;
399 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
400 | CLANG_CXX_LIBRARY = "libc++";
401 | CLANG_ENABLE_MODULES = YES;
402 | CLANG_ENABLE_OBJC_ARC = YES;
403 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
404 | CLANG_WARN_BOOL_CONVERSION = YES;
405 | CLANG_WARN_COMMA = YES;
406 | CLANG_WARN_CONSTANT_CONVERSION = YES;
407 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
408 | CLANG_WARN_EMPTY_BODY = YES;
409 | CLANG_WARN_ENUM_CONVERSION = YES;
410 | CLANG_WARN_INFINITE_RECURSION = YES;
411 | CLANG_WARN_INT_CONVERSION = YES;
412 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
413 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
414 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
415 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
416 | CLANG_WARN_STRICT_PROTOTYPES = YES;
417 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
418 | CLANG_WARN_UNREACHABLE_CODE = YES;
419 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
420 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
421 | COPY_PHASE_STRIP = NO;
422 | DEBUG_INFORMATION_FORMAT = dwarf;
423 | ENABLE_STRICT_OBJC_MSGSEND = YES;
424 | ENABLE_TESTABILITY = YES;
425 | GCC_C_LANGUAGE_STANDARD = gnu99;
426 | GCC_DYNAMIC_NO_PIC = NO;
427 | GCC_NO_COMMON_BLOCKS = YES;
428 | GCC_OPTIMIZATION_LEVEL = 0;
429 | GCC_PREPROCESSOR_DEFINITIONS = (
430 | "DEBUG=1",
431 | "$(inherited)",
432 | );
433 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
434 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
435 | GCC_WARN_UNDECLARED_SELECTOR = YES;
436 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
437 | GCC_WARN_UNUSED_FUNCTION = YES;
438 | GCC_WARN_UNUSED_VARIABLE = YES;
439 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
440 | MTL_ENABLE_DEBUG_INFO = YES;
441 | ONLY_ACTIVE_ARCH = YES;
442 | SDKROOT = iphoneos;
443 | TARGETED_DEVICE_FAMILY = "1,2";
444 | };
445 | name = Debug;
446 | };
447 | 97C147041CF9000F007C117D /* Release */ = {
448 | isa = XCBuildConfiguration;
449 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
450 | buildSettings = {
451 | ALWAYS_SEARCH_USER_PATHS = NO;
452 | CLANG_ANALYZER_NONNULL = YES;
453 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
454 | CLANG_CXX_LIBRARY = "libc++";
455 | CLANG_ENABLE_MODULES = YES;
456 | CLANG_ENABLE_OBJC_ARC = YES;
457 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
458 | CLANG_WARN_BOOL_CONVERSION = YES;
459 | CLANG_WARN_COMMA = YES;
460 | CLANG_WARN_CONSTANT_CONVERSION = YES;
461 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
462 | CLANG_WARN_EMPTY_BODY = YES;
463 | CLANG_WARN_ENUM_CONVERSION = YES;
464 | CLANG_WARN_INFINITE_RECURSION = YES;
465 | CLANG_WARN_INT_CONVERSION = YES;
466 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
467 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
468 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
469 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
470 | CLANG_WARN_STRICT_PROTOTYPES = YES;
471 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
472 | CLANG_WARN_UNREACHABLE_CODE = YES;
473 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
474 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
475 | COPY_PHASE_STRIP = NO;
476 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
477 | ENABLE_NS_ASSERTIONS = NO;
478 | ENABLE_STRICT_OBJC_MSGSEND = YES;
479 | GCC_C_LANGUAGE_STANDARD = gnu99;
480 | GCC_NO_COMMON_BLOCKS = YES;
481 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
482 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
483 | GCC_WARN_UNDECLARED_SELECTOR = YES;
484 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
485 | GCC_WARN_UNUSED_FUNCTION = YES;
486 | GCC_WARN_UNUSED_VARIABLE = YES;
487 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
488 | MTL_ENABLE_DEBUG_INFO = NO;
489 | SDKROOT = iphoneos;
490 | TARGETED_DEVICE_FAMILY = "1,2";
491 | VALIDATE_PRODUCT = YES;
492 | };
493 | name = Release;
494 | };
495 | 97C147061CF9000F007C117D /* Debug */ = {
496 | isa = XCBuildConfiguration;
497 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
498 | buildSettings = {
499 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
500 | CODE_SIGN_STYLE = Manual;
501 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
502 | DEVELOPMENT_TEAM = "";
503 | ENABLE_BITCODE = NO;
504 | FRAMEWORK_SEARCH_PATHS = (
505 | "$(inherited)",
506 | "$(PROJECT_DIR)/Flutter",
507 | );
508 | INFOPLIST_FILE = Runner/Info.plist;
509 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
510 | LIBRARY_SEARCH_PATHS = (
511 | "$(inherited)",
512 | "$(PROJECT_DIR)/Flutter",
513 | );
514 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterShop;
515 | PRODUCT_NAME = "$(TARGET_NAME)";
516 | PROVISIONING_PROFILE_SPECIFIER = "";
517 | VERSIONING_SYSTEM = "apple-generic";
518 | };
519 | name = Debug;
520 | };
521 | 97C147071CF9000F007C117D /* Release */ = {
522 | isa = XCBuildConfiguration;
523 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
524 | buildSettings = {
525 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
526 | CODE_SIGN_STYLE = Manual;
527 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
528 | DEVELOPMENT_TEAM = "";
529 | ENABLE_BITCODE = NO;
530 | FRAMEWORK_SEARCH_PATHS = (
531 | "$(inherited)",
532 | "$(PROJECT_DIR)/Flutter",
533 | );
534 | INFOPLIST_FILE = Runner/Info.plist;
535 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
536 | LIBRARY_SEARCH_PATHS = (
537 | "$(inherited)",
538 | "$(PROJECT_DIR)/Flutter",
539 | );
540 | PRODUCT_BUNDLE_IDENTIFIER = com.example.flutterShop;
541 | PRODUCT_NAME = "$(TARGET_NAME)";
542 | PROVISIONING_PROFILE_SPECIFIER = "";
543 | VERSIONING_SYSTEM = "apple-generic";
544 | };
545 | name = Release;
546 | };
547 | /* End XCBuildConfiguration section */
548 |
549 | /* Begin XCConfigurationList section */
550 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
551 | isa = XCConfigurationList;
552 | buildConfigurations = (
553 | 97C147031CF9000F007C117D /* Debug */,
554 | 97C147041CF9000F007C117D /* Release */,
555 | 249021D3217E4FDB00AE95B9 /* Profile */,
556 | );
557 | defaultConfigurationIsVisible = 0;
558 | defaultConfigurationName = Release;
559 | };
560 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
561 | isa = XCConfigurationList;
562 | buildConfigurations = (
563 | 97C147061CF9000F007C117D /* Debug */,
564 | 97C147071CF9000F007C117D /* Release */,
565 | 249021D4217E4FDB00AE95B9 /* Profile */,
566 | );
567 | defaultConfigurationIsVisible = 0;
568 | defaultConfigurationName = Release;
569 | };
570 | /* End XCConfigurationList section */
571 | };
572 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
573 | }
574 |
--------------------------------------------------------------------------------
/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 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | BuildSystemType
6 | Original
7 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @interface AppDelegate : FlutterAppDelegate
5 |
6 | @end
7 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.m:
--------------------------------------------------------------------------------
1 | #include "AppDelegate.h"
2 | #include "GeneratedPluginRegistrant.h"
3 |
4 | @implementation AppDelegate
5 |
6 | - (BOOL)application:(UIApplication *)application
7 | didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
8 | [GeneratedPluginRegistrant registerWithRegistry:self];
9 | // Override point for customization after application launch.
10 | return [super application:application didFinishLaunchingWithOptions:launchOptions];
11 | }
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/shaoting0730/flutter_shop/41e77f44124657469e1920b5bbd3ca61b15e5eca/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/service_url.dart:
--------------------------------------------------------------------------------
1 | const serviceUrl = 'http://v.jspang.com:8088/baixing/';
2 | const servicePath = {
3 | 'homePageContent':serviceUrl + 'wxmini/homePageContent', // 商店首页信息
4 | 'homePageBelowConten':serviceUrl + 'wxmini/homePageBelowConten', // 首页热卖商品
5 | 'getCategory':serviceUrl + 'wxmini/getCategory', // 商品类别信息
6 | 'getMallGoods':serviceUrl + 'wxmini/getMallGoods', // 商品分类页面商品列表
7 | 'getGoodDetailById':serviceUrl + 'wxmini/getGoodDetailById', // 商品详情
8 | };
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_shop/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 'package:fluro/fluro.dart';
8 | import './routers/application.dart';
9 | import './routers/routers.dart';
10 | import './provide/cart.dart';
11 | import './provide/currentIndex.dart';
12 |
13 |
14 | void main(){
15 | var childCategory = ChildCategory();
16 | var categoryGoodsListProvide = CategoryGoodsListProvide();
17 | var detailsInfoProvide = DetailsInfoProvide();
18 | var cartProvide = CartProvide();
19 | var currentIndexProvide = CurrentIndexProvide();
20 | var providers = Providers();
21 |
22 | providers
23 | ..provide(Provider.value(childCategory))
24 | ..provide(Provider.value(categoryGoodsListProvide))
25 | ..provide(Provider.value(detailsInfoProvide))
26 | ..provide(Provider.value(currentIndexProvide))
27 | ..provide(Provider.value(cartProvide));
28 |
29 | runApp(ProviderNode(child: MyApp(),providers: providers));
30 | }
31 |
32 | class MyApp extends StatelessWidget {
33 | @override
34 | Widget build(BuildContext context) {
35 | final router =Router();
36 | Routers.configureRouters(router);
37 | Application.router = router;
38 | return Container(
39 | child: MaterialApp(
40 | title: '百姓生活+',
41 | onGenerateRoute: Application.router.generator,
42 | debugShowCheckedModeBanner: false, // 去除debug旗标
43 | theme: ThemeData(
44 | primaryColor: Colors.pink
45 | ),
46 | home: IndexPage(),
47 | ),
48 | );
49 | }
50 | }
--------------------------------------------------------------------------------
/lib/model/cartinfo.dart:
--------------------------------------------------------------------------------
1 | class CartInfoModel {
2 | String goodsId;
3 | String goodsName;
4 | int count;
5 | double price;
6 | String image;
7 | bool isCheck;
8 |
9 | CartInfoModel(
10 | {this.goodsId, this.goodsName, this.count, this.price, this.image, this.isCheck});
11 |
12 | CartInfoModel.fromJson(Map json) {
13 | goodsId = json['goodsId'];
14 | goodsName = json['goodsName'];
15 | count = json['count'];
16 | price = json['price'];
17 | image = json['image'];
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['image'] = this.image;
28 | data['isCheck'] = this.isCheck;
29 | return data;
30 | }
31 | }
--------------------------------------------------------------------------------
/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/category_model.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/details_model.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 | import 'dart:async';
7 |
8 | class CartPage extends StatelessWidget {
9 | @override
10 | Widget build(BuildContext context) {
11 | return Scaffold(
12 | appBar: AppBar(
13 | title: Text('购物车'),
14 | ),
15 | body: FutureBuilder(
16 | future: _getCartInfo(context),
17 | builder: (context, snapshot) {
18 | if (snapshot.hasData) {
19 | List castList = Provide.value(context).cartList;
20 | return Stack(
21 | children: [
22 | Provide(
23 | builder: (context, child, childCategory) {
24 | castList = Provide.value(context).cartList;
25 | return ListView.builder(
26 | itemCount: castList.length,
27 | itemBuilder: (context, index) {
28 | return CartItem(castList[index]);
29 | },
30 | );
31 | },
32 | ),
33 | Positioned(
34 | bottom: 0,
35 | left: 0,
36 | child: CartBottom(),
37 | )
38 | ],
39 | );
40 | } else {
41 | return Center(
42 | child: Text('正在加载'),
43 | );
44 | }
45 | },
46 | ),
47 | );
48 | }
49 |
50 | Future _getCartInfo(BuildContext context) async {
51 | await Provide.value(context).getCartInfo();
52 | return 'end';
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/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 | padding: EdgeInsets.all(5.0),
11 | color: Colors.white,
12 | child: Provide(
13 | builder: (context, child, val) {
14 | return Row(
15 | children: [
16 | selectAllBtn(context),
17 | allPriceArea(context),
18 | commitBtn(context)
19 | ],
20 | );
21 | },
22 | ),
23 | );
24 | }
25 |
26 | // 全选
27 | Widget selectAllBtn(context) {
28 | bool isAllCheck = Provide.value(context).isAllCheck;
29 | return Container(
30 | child: Row(
31 | children: [
32 | Checkbox(
33 | value: isAllCheck,
34 | activeColor: Colors.pink,
35 | onChanged: (bool val) {
36 | Provide.value(context).changeAllCheckBtnState(val);
37 | },
38 | ),
39 | Text('全选')
40 | ],
41 | ),
42 | );
43 | }
44 |
45 | // 合计文字
46 | Widget allPriceArea(context) {
47 | double allPrice = Provide.value(context).allPrice;
48 | return Container(
49 | width: ScreenUtil().setWidth(430),
50 | child: Column(
51 | children: [
52 | Row(
53 | children: [
54 | Container(
55 | alignment: Alignment.centerRight,
56 | width: ScreenUtil().setWidth(280),
57 | child: Text(
58 | '合计:',
59 | style: TextStyle(fontSize: ScreenUtil().setSp(36)),
60 | ),
61 | ),
62 | Container(
63 | alignment: Alignment.centerLeft,
64 | width: ScreenUtil().setWidth(150),
65 | child: Text(
66 | '¥' + allPrice.toString(),
67 | style: TextStyle(
68 | fontSize: ScreenUtil().setSp(36), color: Colors.red),
69 | ),
70 | )
71 | ],
72 | ),
73 | Container(
74 | width: ScreenUtil().setWidth(430),
75 | alignment: Alignment.centerRight,
76 | child: Text('满10元免配送费,预购免配送费',
77 | style: TextStyle(
78 | color: Colors.black38,
79 | fontSize: ScreenUtil().setSp(22),
80 | )),
81 | )
82 | ],
83 | ),
84 | );
85 | }
86 |
87 | // 结算按钮
88 | Widget commitBtn(context) {
89 | int allGoodsCount = Provide.value(context).allGoodsCount;
90 | return Container(
91 | width: ScreenUtil().setWidth(160),
92 | padding: EdgeInsets.only(left: 10),
93 | child: InkWell(
94 | onTap: () {},
95 | child: Container(
96 | padding: EdgeInsets.all(10.0),
97 | alignment: Alignment.center,
98 | decoration: BoxDecoration(
99 | color: Colors.red,
100 | borderRadius: BorderRadius.circular(4.0),
101 | ),
102 | child: Text(
103 | '结算($allGoodsCount)',
104 | style: TextStyle(color: Colors.white),
105 | ),
106 | ),
107 | ),
108 | );
109 | }
110 |
111 |
112 |
113 | }
114 |
--------------------------------------------------------------------------------
/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 | final item;
8 | CartCount(this.item);
9 | @override
10 | Widget build(BuildContext context) {
11 | return Container(
12 | width: ScreenUtil().setWidth(165),
13 | margin: EdgeInsets.only(top: 5.0),
14 | decoration: BoxDecoration(
15 | border: Border.all(width: 1,color: Colors.black12)
16 | ),
17 | child: Row(
18 | children: [
19 | _reduceBtn(context),
20 | _countArea(),
21 | _addBtn(context)
22 | ],
23 | ),
24 | );
25 | }
26 |
27 | // -
28 | Widget _reduceBtn(context){
29 | return InkWell(
30 | onTap: (){
31 | Provide.value(context).addOrReduceAction(item, 'reduce');
32 | },
33 | child: Container(
34 | width: ScreenUtil().setWidth(45),
35 | height: ScreenUtil().setHeight(45),
36 | alignment: Alignment.center,
37 | decoration: BoxDecoration(
38 | color: item.count > 1 ? Colors.white : Colors.black12,
39 | border: Border(
40 | right: BorderSide(width: 1,color: Colors.black12)
41 | )
42 | ),
43 | child: item.count > 1 ? Text('-') : Text(''),
44 | ),
45 | );
46 | }
47 | // +
48 | Widget _addBtn(context){
49 | return InkWell(
50 | onTap: (){
51 | Provide.value(context).addOrReduceAction(item, 'add');
52 | },
53 | child: Container(
54 | width: ScreenUtil().setWidth(45),
55 | height: ScreenUtil().setHeight(45),
56 | alignment: Alignment.center,
57 | decoration: BoxDecoration(
58 | color: Colors.white,
59 | border: Border(
60 | left: BorderSide(width: 1,color: Colors.black12)
61 | )
62 | ),
63 | child: Text('+'),
64 | ),
65 | );
66 | }
67 |
68 | //数量
69 | Widget _countArea(){
70 | return Container(
71 | width: ScreenUtil().setWidth(70),
72 | height: ScreenUtil().setHeight(45),
73 | alignment: Alignment.center,
74 | color: Colors.white,
75 | child: Text(item.count.toString()),
76 | );
77 | }
78 |
79 |
80 |
81 | }
--------------------------------------------------------------------------------
/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 CartInfoModel item;
10 | CartItem(this.item);
11 |
12 | @override
13 | Widget build(BuildContext context) {
14 | return Container(
15 | margin: EdgeInsets.fromLTRB(5.0, 2.0, 5.0, 2.0),
16 | padding: EdgeInsets.fromLTRB(5.0, 10.0, 5.0, 10.0),
17 | decoration: BoxDecoration(
18 | color: Colors.white,
19 | border: Border(
20 | bottom: BorderSide(width: 1,color: Colors.black12)
21 | )
22 | ),
23 | child: Row(
24 | children: [
25 | _cartCheckBtn(context,item),
26 | _cartImage(),
27 | _cartGoodsName(),
28 | _cartPrice(context,item)
29 | ],
30 | ),
31 | );
32 | }
33 |
34 | // 多选按钮
35 | Widget _cartCheckBtn(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).chanegCheckState(item);
43 | },
44 | ),
45 | );
46 | }
47 |
48 | //商品图片
49 | Widget _cartImage(){
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.image),
57 | );
58 | }
59 |
60 | // 商品名称
61 | Widget _cartGoodsName(){
62 | return Container(
63 | width: ScreenUtil().setWidth(300),
64 | padding: EdgeInsets.all(10),
65 | alignment: Alignment.topLeft,
66 | child: Column(
67 | children: [
68 | Text(item.goodsName),
69 | CartCount(item)
70 | ],
71 | ),
72 | );
73 | }
74 |
75 | // 商品价格
76 | Widget _cartPrice(context,item){
77 | return Container(
78 | width: ScreenUtil().setWidth(150),
79 | alignment: Alignment.centerRight,
80 | child: Column(
81 | children: [
82 | Text('¥' + item.price.toString()),
83 | Container(
84 | child: InkWell(
85 | onTap: (){
86 | Provide.value(context).deleteOneGoods(item.goodsId);
87 | },
88 | child: Icon(
89 | Icons.delete_forever,
90 | color: Colors.black26,
91 | size: 30,
92 | ),
93 | ),
94 | )
95 | ],
96 | ),
97 | );
98 | }
99 |
100 | }
--------------------------------------------------------------------------------
/lib/pages/category_page.dart:
--------------------------------------------------------------------------------
1 |
2 | import 'package:flutter/material.dart';
3 | import '../service/service_method.dart';
4 | import 'dart:convert';
5 | import 'package:flutter_easyrefresh/easy_refresh.dart';
6 | import '../model/category_model.dart';
7 | import '../model/categoryGoodsList.dart';
8 |
9 | import 'package:provide/provide.dart';
10 | import '../provide/child_category.dart';
11 | import '../provide/category_goods_list.dart';
12 | import 'package:fluttertoast/fluttertoast.dart';
13 | import '../routers/application.dart';
14 |
15 |
16 |
17 | import 'package:flutter_screenutil/flutter_screenutil.dart';
18 |
19 | class CategoryPage extends StatefulWidget {
20 | _CategoryPageState createState() => _CategoryPageState();
21 | }
22 |
23 | class _CategoryPageState extends State {
24 | // CategoryBigListModel listCategory = CategoryBigListModel([]);
25 |
26 | @override
27 | Widget build(BuildContext context) {
28 | return Scaffold(
29 | appBar: AppBar(
30 | title: Text('商品分类'),
31 | ),
32 | body: Container(
33 | child: Row(
34 | children: [
35 | LeftCategoryNav(),
36 | Column(
37 | children: [
38 | RightCategoryNav(),
39 | CategoryGoodsList()
40 | ],
41 | )
42 | ],
43 | ),
44 | ),
45 | );
46 | }
47 | }
48 |
49 | //左侧导航菜单
50 | class LeftCategoryNav extends StatefulWidget {
51 | _LeftCategoryNavState createState() => _LeftCategoryNavState();
52 | }
53 |
54 | class _LeftCategoryNavState extends State {
55 | List list = [];
56 | var listIndex = 0; //索引
57 |
58 | @override
59 | void initState() {
60 | _getCategory();
61 |
62 |
63 | super.initState();
64 | }
65 |
66 | @override
67 | Widget build(BuildContext context) {
68 |
69 | return Provide(
70 |
71 | builder: (context,child,val){
72 | _getGoodList(context);
73 | listIndex=val.categoryIndex;
74 |
75 | return Container(
76 | width: ScreenUtil().setWidth(180),
77 | decoration: BoxDecoration(
78 | border: Border(right: BorderSide(width: 1, color: Colors.black12))),
79 | child: ListView.builder(
80 | itemCount: list.length,
81 | itemBuilder: (context, index) {
82 | return _leftInkWel(index);
83 | },
84 | ),
85 | );
86 | },
87 | );
88 | }
89 |
90 | Widget _leftInkWel(int index) {
91 | bool isClick=false;
92 | isClick=(index==listIndex)?true:false;
93 |
94 | return InkWell(
95 | onTap: () {
96 |
97 |
98 | var childList = list[index].bxMallSubDto;
99 | var categoryId= list[index].mallCategoryId;
100 | Provide.value(context).changeCategory(categoryId,index);
101 | Provide.value(context).getChildCategory(childList,categoryId);
102 | _getGoodList(context,categoryId:categoryId );
103 | },
104 | child: Container(
105 | height: ScreenUtil().setHeight(100),
106 | padding: EdgeInsets.only(left: 10, top: 20),
107 | decoration: BoxDecoration(
108 | color: isClick?Color.fromRGBO(236, 238, 239, 1.0):Colors.white,
109 | border:
110 | Border(bottom: BorderSide(width: 1, color: Colors.black12))),
111 | child: Text(
112 | list[index].mallCategoryName,
113 | style: TextStyle(fontSize: ScreenUtil().setSp(28)),
114 | ),
115 | ),
116 | );
117 | }
118 |
119 | //得到后台大类数据
120 | void _getCategory() async {
121 | await request('getCategory').then((val) {
122 | var data = json.decode(val.toString());
123 |
124 | CategoryModel category = CategoryModel.fromJson(data);
125 |
126 | setState(() {
127 | list = category.data;
128 | });
129 |
130 | Provide.value(context).getChildCategory( list[0].bxMallSubDto,'4');
131 |
132 | //print(list[0].bxMallSubDto);
133 |
134 | //list[0].bxMallSubDto.forEach((item) => print(item.mallSubName));
135 | });
136 | }
137 | //得到商品列表数据
138 | void _getGoodList(context,{String categoryId }) {
139 |
140 |
141 | var data={
142 | 'categoryId':categoryId==null?Provide.value(context).categoryId:categoryId,
143 | 'categorySubId':Provide.value(context).subId,
144 | 'page':1
145 | };
146 |
147 |
148 |
149 | request('getMallGoods',formData:data ).then((val){
150 | var data = json.decode(val.toString());
151 | CategoryGoodsListModel goodsList= CategoryGoodsListModel.fromJson(data);
152 | // Provide.value(context).getGoodsList(goodsList.data);
153 | Provide.value(context).getGoodsList(goodsList.data);
154 |
155 | });
156 | }
157 |
158 | }
159 |
160 | //右侧小类类别
161 |
162 | class RightCategoryNav extends StatefulWidget {
163 | _RightCategoryNavState createState() => _RightCategoryNavState();
164 | }
165 |
166 | class _RightCategoryNavState extends State {
167 |
168 |
169 |
170 |
171 |
172 | @override
173 | Widget build(BuildContext context) {
174 |
175 | return Container(
176 | // child: Text('${childCategory.childCategoryList.length}'),
177 |
178 | child: Provide(
179 | builder: (context,child,childCategory){
180 | return Container(
181 | height: ScreenUtil().setHeight(80),
182 | width: ScreenUtil().setWidth(570),
183 | decoration: BoxDecoration(
184 | color: Colors.white,
185 | border: Border(
186 | bottom: BorderSide(width: 1,color: Colors.black12)
187 | )
188 | ),
189 | child:ListView.builder(
190 | scrollDirection: Axis.horizontal,
191 | itemCount: childCategory.childCategoryList.length,
192 | itemBuilder: (context,index){
193 |
194 | return _rightInkWell(index,childCategory.childCategoryList[index]);
195 | },
196 | )
197 | );
198 | },
199 | )
200 | );
201 | }
202 |
203 | Widget _rightInkWell(int index,BxMallSubDto item){
204 | bool isCheck = false;
205 | isCheck =(index==Provide.value(context).childIndex)?true:false;
206 |
207 | return InkWell(
208 | onTap: (){
209 | print (2222222222);
210 | Provide.value(context).changeChildIndex(index,item.mallSubId);
211 | _getGoodList(context,item.mallSubId);
212 | },
213 | child: Container(
214 | padding:EdgeInsets.fromLTRB(5.0,10.0,5.0,10.0),
215 |
216 | child: Text(
217 | item.mallSubName,
218 |
219 | style: TextStyle(
220 | fontSize:ScreenUtil().setSp(28),
221 | color:isCheck?Colors.pink:Colors.black ),
222 | ),
223 | ),
224 | );
225 | }
226 |
227 |
228 | //得到商品列表数据
229 | void _getGoodList(context,String categorySubId) {
230 |
231 | var data={
232 | 'categoryId':Provide.value(context).categoryId,
233 | 'categorySubId':categorySubId,
234 | 'page':1
235 | };
236 |
237 | request('getMallGoods',formData:data ).then((val){
238 | var data = json.decode(val.toString());
239 | CategoryGoodsListModel goodsList= CategoryGoodsListModel.fromJson(data);
240 | // Provide.value(context).getGoodsList(goodsList.data);
241 | if(goodsList.data==null){
242 | Provide.value(context).getGoodsList([]);
243 | }else{
244 | Provide.value(context).getGoodsList(goodsList.data);
245 |
246 | }
247 | });
248 | }
249 |
250 |
251 |
252 | }
253 |
254 |
255 | //商品列表,可以上拉加载
256 |
257 | class CategoryGoodsList extends StatefulWidget {
258 | @override
259 | _CategoryGoodsListState createState() => _CategoryGoodsListState();
260 | }
261 |
262 | class _CategoryGoodsListState extends State {
263 |
264 | // GlobalKey _easyRefreshKey =new GlobalKey();
265 | GlobalKey _footerKey = new GlobalKey();
266 | var scrollController=new ScrollController();
267 |
268 |
269 | @override
270 | Widget build(BuildContext context) {
271 | return Provide(
272 | builder: (context,child,data){
273 | try{
274 | if(Provide.value(context).page==1){
275 | scrollController.jumpTo(0.0);
276 | }
277 | }catch(e){
278 | print('进入页面第一次初始化');
279 | }
280 |
281 | if(data.goodsList.length>0){
282 | return Expanded(
283 | child:Container(
284 | width: ScreenUtil().setWidth(570) ,
285 | child:EasyRefresh(
286 | refreshFooter: ClassicsFooter(
287 | key:_footerKey,
288 | bgColor:Colors.white,
289 | textColor:Colors.pink,
290 | moreInfoColor: Colors.pink,
291 | showMore:true,
292 | noMoreText:Provide.value(context).noMoreText,
293 | moreInfo:'加载中',
294 | loadReadyText:'上拉加载'
295 | ),
296 | child:ListView.builder(
297 | controller: scrollController,
298 | itemCount: data.goodsList.length,
299 | itemBuilder: (context,index){
300 | return _listWidget(data.goodsList,index);
301 | },
302 | ) ,
303 | loadMore: ()async{
304 | if(Provide.value(context).noMoreText=='没有更多了'){
305 | Fluttertoast.showToast(
306 | msg: "已经到底了",
307 | toastLength: Toast.LENGTH_SHORT,
308 | gravity: ToastGravity.CENTER,
309 | timeInSecForIos: 1,
310 | backgroundColor: Colors.pink,
311 | textColor: Colors.white,
312 | fontSize: 16.0
313 | );
314 | }else{
315 |
316 | _getMoreList();
317 | }
318 |
319 | },
320 | )
321 |
322 | ) ,
323 | );
324 | }else{
325 | return Text('暂时没有数据');
326 | }
327 |
328 |
329 | },
330 |
331 | );
332 | }
333 |
334 | //上拉加载更多的方法
335 | void _getMoreList(){
336 |
337 | Provide.value(context).addPage();
338 | var data={
339 | 'categoryId':Provide.value(context).categoryId,
340 | 'categorySubId':Provide.value(context).subId,
341 | 'page':Provide.value(context).page
342 | };
343 |
344 | request('getMallGoods',formData:data ).then((val){
345 | var data = json.decode(val.toString());
346 | CategoryGoodsListModel goodsList= CategoryGoodsListModel.fromJson(data);
347 |
348 | if(goodsList.data==null){
349 | Provide.value(context).changeNoMore('没有更多了');
350 | }else{
351 |
352 | Provide.value(context).addGoodsList(goodsList.data);
353 |
354 | }
355 | });
356 |
357 |
358 | }
359 |
360 |
361 |
362 | Widget _listWidget(List newList,int index){
363 | return InkWell(
364 | onTap: (){
365 | Application.router.navigateTo(context, "./detail?id=${newList[index].goodsId}");
366 | },
367 | child: Container(
368 | padding: EdgeInsets.only(top: 5.0,bottom: 5.0),
369 | decoration: BoxDecoration(
370 | color: Colors.white,
371 | border: Border(
372 | bottom: BorderSide(width: 1.0,color: Colors.black12)
373 | )
374 | ),
375 |
376 | child: Row(
377 | children: [
378 | _goodsImage(newList,index)
379 | ,
380 | Column(
381 | children: [
382 | _goodsName(newList,index),
383 | _goodsPrice(newList,index)
384 | ],
385 | )
386 | ],
387 | ),
388 | )
389 | );
390 |
391 | }
392 | //商品图片
393 | Widget _goodsImage(List newList,int index){
394 |
395 | return Container(
396 | width: ScreenUtil().setWidth(200),
397 | child: Image.network(newList[index].image),
398 | );
399 |
400 | }
401 | //商品名称方法
402 | Widget _goodsName(List newList,int index){
403 | return Container(
404 | padding: EdgeInsets.all(5.0),
405 | width: ScreenUtil().setWidth(370),
406 | child: Text(
407 | newList[index].goodsName,
408 | maxLines: 2,
409 | overflow: TextOverflow.ellipsis,
410 | style: TextStyle(fontSize: ScreenUtil().setSp(28)),
411 | ),
412 | );
413 | }
414 | //商品价格方法
415 | Widget _goodsPrice(List newList,int index){
416 | return Container(
417 | margin: EdgeInsets.only(top:20.0),
418 | width: ScreenUtil().setWidth(370),
419 | child:Row(
420 | children: [
421 | Text(
422 | '价格:¥${newList[index].presentPrice}',
423 | style: TextStyle(color:Colors.pink,fontSize:ScreenUtil().setSp(30)),
424 | ),
425 | Text(
426 |
427 | '¥${newList[index].oriPrice}',
428 | style: TextStyle(
429 | color: Colors.black26,
430 | decoration: TextDecoration.lineThrough
431 | ),
432 | )
433 | ]
434 | )
435 | );
436 | }
437 |
438 |
439 | }
--------------------------------------------------------------------------------
/lib/pages/details_page.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 | import 'package:flutter/material.dart';
3 | import 'package:provide/provide.dart';
4 | import '../provide/details_info.dart';
5 | import './details_page/details_top_area.dart'; // 商品图片 + 名字 + 价格
6 | import './details_page/details_explain.dart'; //
7 | import './details_page/details_tab.dart'; //
8 | import './details_page/details_web.dart';
9 | import './details_page/details_bottom.dart';
10 |
11 |
12 | class DetailsPage extends StatelessWidget {
13 | final String goodsId;
14 | DetailsPage(this.goodsId);
15 |
16 | @override
17 | Widget build(BuildContext context) {
18 | return Scaffold(
19 | appBar: AppBar(
20 | leading: IconButton(
21 | icon: Icon(Icons.arrow_back),
22 | onPressed: () {
23 | Navigator.pop(context);
24 | },
25 | ),
26 | title: Text('详情')),
27 | body: FutureBuilder(
28 | future: _getBackInfo(context),
29 | builder: (context, snapshot) {
30 | if (snapshot.hasData) {
31 | return Stack(
32 | children: [
33 | Container(
34 | child: ListView(
35 | children: [
36 | DetailsTopArea(),
37 | DetailsExplain(),
38 | DetailsTab(),
39 | DetailsWeb()
40 | ],
41 | ),
42 | ),
43 | Positioned(
44 | bottom:0,
45 | left: 0,
46 | child: DetailsBottom(),
47 | )
48 | ],
49 | );
50 | } else {
51 | return Center(
52 | child: Text('加载中'),
53 | );
54 | }
55 | },
56 | ),
57 | );
58 | }
59 |
60 | Future _getBackInfo(BuildContext context) async {
61 | await Provide.value(context).getGoodsInfo(goodsId);
62 | return '加载完成';
63 | }
64 | }
65 |
--------------------------------------------------------------------------------
/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 | class DetailsBottom extends StatelessWidget {
9 | @override
10 | Widget build(BuildContext context) {
11 | var goodsInfo =
12 | Provide.value(context).goodsInfo.data.goodInfo;
13 | var goodsId = goodsInfo.goodsId;
14 | var goodsName = goodsInfo.goodsName;
15 | var count = 1;
16 | var price = goodsInfo.presentPrice;
17 | var images = goodsInfo.image1;
18 |
19 | return Container(
20 | width: ScreenUtil().setWidth(750),
21 | color: Colors.white,
22 | height: ScreenUtil().setHeight(80),
23 | child: Row(
24 | children: [
25 | Stack(
26 | children: [
27 | InkWell(
28 | onTap: () {
29 | Provide.value(context).changeIndex(2);
30 | Navigator.pop(context);
31 | },
32 | child: Container(
33 | width: ScreenUtil().setWidth(110),
34 | alignment: Alignment.center,
35 | child:
36 | Icon(Icons.shopping_cart, size: 35, color: Colors.red)),
37 | ),
38 | Provide(
39 | builder: (context,child,val){
40 | Provide.value(context).getCartInfo();
41 | int goodsCount = Provide.value(context).allGoodsCount;
42 | return Positioned(
43 | top:0,
44 | right: 10,
45 | child: Container(
46 | padding: EdgeInsets.fromLTRB(6, 3, 6, 3),
47 | decoration: BoxDecoration(
48 | color: Colors.pink,
49 | border: Border.all(width: 2,color:Colors.white),
50 | borderRadius: BorderRadius.circular(12.0)
51 | ),
52 | child: Text(
53 | goodsCount.toString(),
54 | style: TextStyle(
55 | color: Colors.white,
56 | fontSize: ScreenUtil().setSp(22)
57 | ),
58 | ),
59 | ),
60 | );
61 | },
62 | )
63 | ],
64 | ),
65 | InkWell(
66 | onTap: () async {
67 | await Provide.value(context)
68 | .save(goodsId, goodsName, count, price, images);
69 | },
70 | child: Container(
71 | width: ScreenUtil().setWidth(320),
72 | height: ScreenUtil().setHeight(80),
73 | alignment: Alignment.center,
74 | color: Colors.green,
75 | child: Text('加入购物车',
76 | style: TextStyle(
77 | color: Colors.white, fontSize: ScreenUtil().setSp(28))),
78 | ),
79 | ),
80 | InkWell(
81 | onTap: () async {
82 | await Provide.value(context).remove();
83 | },
84 | child: Container(
85 | width: ScreenUtil().setWidth(320),
86 | height: ScreenUtil().setHeight(80),
87 | alignment: Alignment.center,
88 | color: Colors.red,
89 | child: Text('立即购买',
90 | style: TextStyle(
91 | color: Colors.white, fontSize: ScreenUtil().setSp(28))),
92 | ),
93 | )
94 | ],
95 | ),
96 | );
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/lib/pages/details_page/details_explain.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter_screenutil/flutter_screenutil.dart';
3 |
4 | class DetailsExplain extends StatelessWidget {
5 |
6 | @override
7 | Widget build(BuildContext context) {
8 | return Container(
9 | color: Colors.white,
10 | margin: EdgeInsets.only(top: 10.0),
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 | }
22 | }
--------------------------------------------------------------------------------
/lib/pages/details_page/details_tab.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 | class DetailsTab extends StatelessWidget {
7 | @override
8 | Widget build(BuildContext context) {
9 | return Provide(
10 | builder: (context, child, value) {
11 | var isLeft = Provide.value(context).isLeft;
12 | var isRight = Provide.value(context).isRight;
13 | return Container(
14 | margin: EdgeInsets.only(top: 15.0),
15 | child: Row(
16 | children: [
17 | _myTabLeft(context, isLeft),
18 | _myTabRight(context, isRight),
19 | ],
20 | ),
21 | );
22 | },
23 | );
24 | }
25 |
26 | Widget _myTabLeft(BuildContext context, bool isLeft) {
27 | return InkWell(
28 | onTap: () {
29 | Provide.value(context).changeLeftAndRight('left');
30 | },
31 | child: Container(
32 | padding: EdgeInsets.all(10.0),
33 | alignment: Alignment.center,
34 | width: ScreenUtil().setWidth(375),
35 | decoration: BoxDecoration(
36 | color: Colors.white,
37 | border: Border(
38 | bottom: BorderSide(
39 | width: 1.0, color: isLeft ? Colors.pink : Colors.black12))),
40 | child: Text('详情',
41 | style: TextStyle(color: isLeft ? Colors.pink : Colors.black45)),
42 | ),
43 | );
44 | }
45 |
46 | Widget _myTabRight(BuildContext context, bool isRight) {
47 | return InkWell(
48 | onTap: () {
49 | Provide.value(context).changeLeftAndRight('right');
50 | },
51 | child: Container(
52 | padding: EdgeInsets.all(10.0),
53 | alignment: Alignment.center,
54 | width: ScreenUtil().setWidth(375),
55 | decoration: BoxDecoration(
56 | color: Colors.white,
57 | border: Border(
58 | bottom: BorderSide(
59 | width: 1.0,
60 | color: isRight ? Colors.pink : Colors.black12))),
61 | child: Text('评论',
62 | style: TextStyle(color: isRight ? Colors.pink : Colors.black45)),
63 | ),
64 | );
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/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 | class DetailsTopArea extends StatelessWidget {
7 | @override
8 | Widget build(BuildContext context) {
9 | return Provide(
10 | builder: (context,child,val){
11 | var goodsInfo = Provide.value(context).goodsInfo.data.goodInfo;
12 | if(goodsInfo != null){
13 | return Container(
14 | color: Colors.white,
15 | child: Column(
16 | children: [
17 | _goodsImage(goodsInfo.image1),
18 | _goodsName(goodsInfo.goodsName),
19 | _goodsNum(goodsInfo..goodsSerialNumber),
20 | _goodsPrice(goodsInfo.presentPrice,goodsInfo.oriPrice),
21 | ],
22 | ),
23 | );
24 | }else{
25 | return Text('正在加载....');
26 | }
27 | },
28 | );
29 | }
30 |
31 | // 商品图片
32 | Widget _goodsImage(url){
33 | return Image.network(
34 | url,
35 | width: ScreenUtil().setWidth(740),
36 | );
37 | }
38 |
39 | // 商品名称
40 | Widget _goodsName(name){
41 | return Container(
42 | width: ScreenUtil().setWidth(740),
43 | padding: EdgeInsets.only(left: 15.0),
44 | child: Text(
45 | name.toString(),
46 | style: TextStyle(fontSize: ScreenUtil().setSp(30)),
47 | maxLines: 1,
48 | ),
49 | );
50 | }
51 |
52 | // 商品编号
53 | Widget _goodsNum(num){
54 | return Container(
55 | width: ScreenUtil().setWidth(730),
56 | padding: EdgeInsets.only(left: 15.0),
57 | margin: EdgeInsets.only(top: 8.0),
58 | child: Text(
59 | '编号:' + num.toString(),
60 | style: TextStyle(color: Colors.black12),
61 | ),
62 | );
63 | }
64 |
65 | //商品价格方法
66 | Widget _goodsPrice(presentPrice,oriPrice){
67 | return Container(
68 | width: ScreenUtil().setWidth(730),
69 | padding: EdgeInsets.only(left:15.0),
70 | margin: EdgeInsets.only(top:8.0),
71 | child: Row(
72 | children: [
73 | Text(
74 | presentPrice.toString(),
75 | style: TextStyle(
76 | color:Colors.pinkAccent,
77 | fontSize: ScreenUtil().setSp(40),
78 | ),
79 | ),
80 | SizedBox(width: 10.0,),
81 | Text(
82 | '市场价:' + oriPrice.toString(),
83 | style: TextStyle(
84 | color: Colors.black26,
85 | decoration: TextDecoration.lineThrough
86 | ),
87 | )
88 | ],
89 | ),
90 | );
91 | }
92 |
93 | }
--------------------------------------------------------------------------------
/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_screenutil/flutter_screenutil.dart';
5 | import 'package:flutter_html/flutter_html.dart';
6 |
7 | class DetailsWeb extends StatelessWidget {
8 | @override
9 | Widget build(BuildContext context) {
10 | var goodsDetails = Provide.value(context)
11 | .goodsInfo
12 | .data
13 | .goodInfo
14 | .goodsDetail;
15 | return Provide(
16 | builder: (context, child, val) {
17 | var isLeft = Provide.value(context).isLeft;
18 | if (isLeft) {
19 | return Container(
20 | child: Html(
21 | data: goodsDetails,
22 | ),
23 | );
24 | } else {
25 | return Container(
26 | width: ScreenUtil().setWidth(750),
27 | height: ScreenUtil().setHeight(200),
28 | padding: EdgeInsets.all(10),
29 | alignment: Alignment.center,
30 | child: Text('暂时没有数据'),
31 | );
32 | }
33 | },
34 | );
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/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 | import '../provide/currentIndex.dart';
10 | import 'package:provide/provide.dart';
11 | import '../provide/child_category.dart';
12 | import '../model/category_model.dart';
13 |
14 | class HomePage extends StatefulWidget {
15 | _HomePageState createState() => _HomePageState();
16 | }
17 |
18 | class _HomePageState extends State
19 | with AutomaticKeepAliveClientMixin {
20 | int page = 1;
21 | List