├── .gitignore ├── README.md ├── android ├── .project ├── .settings │ └── org.eclipse.buildship.core.prefs ├── app │ ├── .classpath │ ├── .project │ ├── .settings │ │ └── org.eclipse.buildship.core.prefs │ ├── build.gradle │ ├── my-release-key.keystore │ └── src │ │ └── main │ │ ├── AndroidManifest.xml │ │ ├── java │ │ └── com │ │ │ └── example │ │ │ └── joybuy │ │ │ └── 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 ├── key.properties └── settings.gradle ├── file ├── android_joybuy.png └── ios_joybuy.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 │ │ └── 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 ├── api │ └── searchApi.dart ├── config │ └── Constants.dart ├── generated │ └── i18n.dart ├── index │ ├── BestSellers.dart │ ├── ImageWidget.dart │ ├── IndexList.dart │ ├── NavWidget.dart │ ├── Recommend.dart │ ├── SliderWidget.dart │ ├── SupperDeals.dart │ ├── TopShop.dart │ └── details.dart ├── main.dart ├── model │ └── repo.dart ├── search │ ├── Item.dart │ └── SearchBar.dart ├── tools │ ├── NumberPart.Dart │ ├── Url.dart │ └── Utils.dart └── widget │ └── LayoutWidget.dart ├── pubspec.yaml ├── res └── values │ └── strings_en.arb └── test └── widget_test.dart /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.lock 4 | *.log 5 | *.pyc 6 | *.swp 7 | .DS_Store 8 | .atom/ 9 | .buildlog/ 10 | .history 11 | .svn/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # Visual Studio Code related 20 | .vscode/ 21 | 22 | # Flutter/Dart/Pub related 23 | **/doc/api/ 24 | .dart_tool/ 25 | .flutter-plugins 26 | .packages 27 | .pub-cache/ 28 | .pub/ 29 | build/ 30 | 31 | # Android related 32 | **/android/**/gradle-wrapper.jar 33 | **/android/.gradle 34 | **/android/captures/ 35 | **/android/gradlew 36 | **/android/gradlew.bat 37 | **/android/local.properties 38 | **/android/**/GeneratedPluginRegistrant.java 39 | 40 | # iOS/XCode related 41 | **/ios/**/*.mode1v3 42 | **/ios/**/*.mode2v3 43 | **/ios/**/*.moved-aside 44 | **/ios/**/*.pbxuser 45 | **/ios/**/*.perspectivev3 46 | **/ios/**/*sync/ 47 | **/ios/**/.sconsign.dblite 48 | **/ios/**/.tags* 49 | **/ios/**/.vagrant/ 50 | **/ios/**/DerivedData/ 51 | **/ios/**/Icon? 52 | **/ios/**/Pods/ 53 | **/ios/**/.symlinks/ 54 | **/ios/**/profile 55 | **/ios/**/xcuserdata 56 | **/ios/.generated/ 57 | **/ios/Flutter/App.framework 58 | **/ios/Flutter/Flutter.framework 59 | **/ios/Flutter/Generated.xcconfig 60 | **/ios/Flutter/app.flx 61 | **/ios/Flutter/app.zip 62 | **/ios/Flutter/flutter_assets/ 63 | **/ios/ServiceDefinitions.json 64 | **/ios/Runner/GeneratedPluginRegistrant.* 65 | 66 | # Exceptions to above rules. 67 | !**/ios/**/default.mode1v3 68 | !**/ios/**/default.mode2v3 69 | !**/ios/**/default.pbxuser 70 | !**/ios/**/default.perspectivev3 71 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 72 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # joybuy flutter sample (https://m.joybuy.com) 2 | 3 | This is a flutter case program developed by imitating Jingdong(京东) International Station. 4 | 5 | For environmental installation, please refer to the [flutter][1] . 6 | 7 | This supports IOS and Android and runs on different devices 8 | The Widget involved in this case 9 | include Container, Row,Column,Stack,Scaffold,AppBar,ListTile,Divider,Expanded、TabBarView …… 10 | 11 | ## Open the IOS simulator 12 | 13 | > open -a Simulator 14 | 15 | ## android simulator 16 | 17 | > install genymotion 18 | 19 | or android studio create Virtual Devices 20 | 21 | ## code editor 22 | 23 | > Code Editor Recommends VS Code 24 | 25 | Recommended android studio for Layout Detection 26 | https://flutter.io/docs/development/tools/inspector 27 | 28 | IOS iPhone se and iPhone xs 29 | ![ios joybuy][2] 30 | 31 | android 32 | ![ios joybuy][3] 33 | 34 | [1]: https://flutter.io/docs/get-started/install 35 | [2]: ./file/ios_joybuy.png 36 | [3]: ./file/android_joybuy.png 37 | -------------------------------------------------------------------------------- /android/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | android 4 | Project android created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.buildship.core.gradleprojectbuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.buildship.core.gradleprojectnature 16 | 17 | 18 | -------------------------------------------------------------------------------- /android/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir= 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /android/app/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /android/app/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | app 4 | Project app created by Buildship. 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.buildship.core.gradleprojectbuilder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.buildship.core.gradleprojectnature 22 | 23 | 24 | -------------------------------------------------------------------------------- /android/app/.settings/org.eclipse.buildship.core.prefs: -------------------------------------------------------------------------------- 1 | connection.project.dir=.. 2 | eclipse.preferences.version=1 3 | -------------------------------------------------------------------------------- /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 | def keystorePropertiesFile = rootProject.file("key.properties") 28 | def keystoreProperties = new Properties() 29 | keystoreProperties.load(new FileInputStream(keystorePropertiesFile)) 30 | 31 | android { 32 | compileSdkVersion 27 33 | 34 | lintOptions { 35 | disable 'InvalidPackage' 36 | } 37 | 38 | defaultConfig { 39 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 40 | applicationId "com.example.joybuy" 41 | minSdkVersion 16 42 | targetSdkVersion 27 43 | versionCode flutterVersionCode.toInteger() 44 | versionName flutterVersionName 45 | testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 46 | } 47 | 48 | signingConfigs { 49 | release { 50 | keyAlias keystoreProperties['keyAlias'] 51 | keyPassword keystoreProperties['keyPassword'] 52 | storeFile file(keystoreProperties['storeFile']) 53 | storePassword keystoreProperties['storePassword'] 54 | } 55 | } 56 | buildTypes { 57 | release { 58 | signingConfig signingConfigs.release 59 | } 60 | } 61 | } 62 | 63 | flutter { 64 | source '../..' 65 | } 66 | 67 | dependencies { 68 | testImplementation 'junit:junit:4.12' 69 | androidTestImplementation 'com.android.support.test:runner:1.0.2' 70 | androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' 71 | } 72 | -------------------------------------------------------------------------------- /android/app/my-release-key.keystore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/android/app/my-release-key.keystore -------------------------------------------------------------------------------- /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/joybuy/MainActivity.java: -------------------------------------------------------------------------------- 1 | package com.example.joybuy; 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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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/key.properties: -------------------------------------------------------------------------------- 1 | storePassword=123456 2 | keyPassword=123456 3 | keyAlias=-my-key-alias 4 | storeFile=my-release-key.keystore -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /file/android_joybuy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/file/android_joybuy.png -------------------------------------------------------------------------------- /file/ios_joybuy.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/file/ios_joybuy.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 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; }; 12 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 13 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; }; 14 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; }; 16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 17 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; }; 18 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */; }; 19 | 97B4F3C7BA6224CE325A65B2 /* libPods-Runner.a in Frameworks */ = {isa = PBXBuildFile; fileRef = AC7695E51C43286EA106F4D1 /* libPods-Runner.a */; }; 20 | 97C146F31CF9000F007C117D /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 97C146F21CF9000F007C117D /* main.m */; }; 21 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 22 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 23 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 24 | /* End PBXBuildFile section */ 25 | 26 | /* Begin PBXCopyFilesBuildPhase section */ 27 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 28 | isa = PBXCopyFilesBuildPhase; 29 | buildActionMask = 2147483647; 30 | dstPath = ""; 31 | dstSubfolderSpec = 10; 32 | files = ( 33 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */, 34 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */, 35 | ); 36 | name = "Embed Frameworks"; 37 | runOnlyForDeploymentPostprocessing = 0; 38 | }; 39 | /* End PBXCopyFilesBuildPhase section */ 40 | 41 | /* Begin PBXFileReference section */ 42 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 43 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 44 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; }; 45 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 46 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; }; 47 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 48 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; 49 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; }; 50 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 51 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 52 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; }; 53 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 54 | 97C146F21CF9000F007C117D /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; 55 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 56 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 57 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 58 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 59 | AC7695E51C43286EA106F4D1 /* libPods-Runner.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Runner.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 60 | /* End PBXFileReference section */ 61 | 62 | /* Begin PBXFrameworksBuildPhase section */ 63 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 64 | isa = PBXFrameworksBuildPhase; 65 | buildActionMask = 2147483647; 66 | files = ( 67 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */, 68 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */, 69 | 97B4F3C7BA6224CE325A65B2 /* libPods-Runner.a in Frameworks */, 70 | ); 71 | runOnlyForDeploymentPostprocessing = 0; 72 | }; 73 | /* End PBXFrameworksBuildPhase section */ 74 | 75 | /* Begin PBXGroup section */ 76 | 57861A4EFB3E87E41056D8DE /* Pods */ = { 77 | isa = PBXGroup; 78 | children = ( 79 | ); 80 | name = Pods; 81 | sourceTree = ""; 82 | }; 83 | 622987883A866DBFA57AFC8C /* Frameworks */ = { 84 | isa = PBXGroup; 85 | children = ( 86 | AC7695E51C43286EA106F4D1 /* libPods-Runner.a */, 87 | ); 88 | name = Frameworks; 89 | sourceTree = ""; 90 | }; 91 | 9740EEB11CF90186004384FC /* Flutter */ = { 92 | isa = PBXGroup; 93 | children = ( 94 | 2D5378251FAA1A9400D5DBA9 /* flutter_assets */, 95 | 3B80C3931E831B6300D905FE /* App.framework */, 96 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 97 | 9740EEBA1CF902C7004384FC /* Flutter.framework */, 98 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 99 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 100 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 101 | ); 102 | name = Flutter; 103 | sourceTree = ""; 104 | }; 105 | 97C146E51CF9000F007C117D = { 106 | isa = PBXGroup; 107 | children = ( 108 | 9740EEB11CF90186004384FC /* Flutter */, 109 | 97C146F01CF9000F007C117D /* Runner */, 110 | 97C146EF1CF9000F007C117D /* Products */, 111 | 57861A4EFB3E87E41056D8DE /* Pods */, 112 | 622987883A866DBFA57AFC8C /* Frameworks */, 113 | ); 114 | sourceTree = ""; 115 | }; 116 | 97C146EF1CF9000F007C117D /* Products */ = { 117 | isa = PBXGroup; 118 | children = ( 119 | 97C146EE1CF9000F007C117D /* Runner.app */, 120 | ); 121 | name = Products; 122 | sourceTree = ""; 123 | }; 124 | 97C146F01CF9000F007C117D /* Runner */ = { 125 | isa = PBXGroup; 126 | children = ( 127 | 7AFFD8ED1D35381100E5BB4D /* AppDelegate.h */, 128 | 7AFFD8EE1D35381100E5BB4D /* AppDelegate.m */, 129 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 130 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 131 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 132 | 97C147021CF9000F007C117D /* Info.plist */, 133 | 97C146F11CF9000F007C117D /* Supporting Files */, 134 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 135 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 136 | ); 137 | path = Runner; 138 | sourceTree = ""; 139 | }; 140 | 97C146F11CF9000F007C117D /* Supporting Files */ = { 141 | isa = PBXGroup; 142 | children = ( 143 | 97C146F21CF9000F007C117D /* main.m */, 144 | ); 145 | name = "Supporting Files"; 146 | sourceTree = ""; 147 | }; 148 | /* End PBXGroup section */ 149 | 150 | /* Begin PBXNativeTarget section */ 151 | 97C146ED1CF9000F007C117D /* Runner */ = { 152 | isa = PBXNativeTarget; 153 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 154 | buildPhases = ( 155 | D1592D93BF814DCE67B5F656 /* [CP] Check Pods Manifest.lock */, 156 | 9740EEB61CF901F6004384FC /* Run Script */, 157 | 97C146EA1CF9000F007C117D /* Sources */, 158 | 97C146EB1CF9000F007C117D /* Frameworks */, 159 | 97C146EC1CF9000F007C117D /* Resources */, 160 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 161 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 162 | A4A4CA7BC116EDC506D9F4E8 /* [CP] Embed Pods Frameworks */, 163 | ); 164 | buildRules = ( 165 | ); 166 | dependencies = ( 167 | ); 168 | name = Runner; 169 | productName = Runner; 170 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 171 | productType = "com.apple.product-type.application"; 172 | }; 173 | /* End PBXNativeTarget section */ 174 | 175 | /* Begin PBXProject section */ 176 | 97C146E61CF9000F007C117D /* Project object */ = { 177 | isa = PBXProject; 178 | attributes = { 179 | LastUpgradeCheck = 0910; 180 | ORGANIZATIONNAME = "The Chromium Authors"; 181 | TargetAttributes = { 182 | 97C146ED1CF9000F007C117D = { 183 | CreatedOnToolsVersion = 7.3.1; 184 | }; 185 | }; 186 | }; 187 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 188 | compatibilityVersion = "Xcode 3.2"; 189 | developmentRegion = English; 190 | hasScannedForEncodings = 0; 191 | knownRegions = ( 192 | en, 193 | Base, 194 | ); 195 | mainGroup = 97C146E51CF9000F007C117D; 196 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 197 | projectDirPath = ""; 198 | projectRoot = ""; 199 | targets = ( 200 | 97C146ED1CF9000F007C117D /* Runner */, 201 | ); 202 | }; 203 | /* End PBXProject section */ 204 | 205 | /* Begin PBXResourcesBuildPhase section */ 206 | 97C146EC1CF9000F007C117D /* Resources */ = { 207 | isa = PBXResourcesBuildPhase; 208 | buildActionMask = 2147483647; 209 | files = ( 210 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 211 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 212 | 9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */, 213 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 214 | 2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */, 215 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 216 | ); 217 | runOnlyForDeploymentPostprocessing = 0; 218 | }; 219 | /* End PBXResourcesBuildPhase section */ 220 | 221 | /* Begin PBXShellScriptBuildPhase section */ 222 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 223 | isa = PBXShellScriptBuildPhase; 224 | buildActionMask = 2147483647; 225 | files = ( 226 | ); 227 | inputPaths = ( 228 | ); 229 | name = "Thin Binary"; 230 | outputPaths = ( 231 | ); 232 | runOnlyForDeploymentPostprocessing = 0; 233 | shellPath = /bin/sh; 234 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin"; 235 | }; 236 | 9740EEB61CF901F6004384FC /* Run Script */ = { 237 | isa = PBXShellScriptBuildPhase; 238 | buildActionMask = 2147483647; 239 | files = ( 240 | ); 241 | inputPaths = ( 242 | ); 243 | name = "Run Script"; 244 | outputPaths = ( 245 | ); 246 | runOnlyForDeploymentPostprocessing = 0; 247 | shellPath = /bin/sh; 248 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 249 | }; 250 | A4A4CA7BC116EDC506D9F4E8 /* [CP] Embed Pods Frameworks */ = { 251 | isa = PBXShellScriptBuildPhase; 252 | buildActionMask = 2147483647; 253 | files = ( 254 | ); 255 | inputFileListPaths = ( 256 | ); 257 | inputPaths = ( 258 | "${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh", 259 | "${PODS_ROOT}/../.symlinks/flutter/ios/Flutter.framework", 260 | ); 261 | name = "[CP] Embed Pods Frameworks"; 262 | outputFileListPaths = ( 263 | ); 264 | outputPaths = ( 265 | "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework", 266 | ); 267 | runOnlyForDeploymentPostprocessing = 0; 268 | shellPath = /bin/sh; 269 | shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; 270 | showEnvVarsInLog = 0; 271 | }; 272 | D1592D93BF814DCE67B5F656 /* [CP] Check Pods Manifest.lock */ = { 273 | isa = PBXShellScriptBuildPhase; 274 | buildActionMask = 2147483647; 275 | files = ( 276 | ); 277 | inputFileListPaths = ( 278 | ); 279 | inputPaths = ( 280 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock", 281 | "${PODS_ROOT}/Manifest.lock", 282 | ); 283 | name = "[CP] Check Pods Manifest.lock"; 284 | outputFileListPaths = ( 285 | ); 286 | outputPaths = ( 287 | "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", 288 | ); 289 | runOnlyForDeploymentPostprocessing = 0; 290 | shellPath = /bin/sh; 291 | 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"; 292 | showEnvVarsInLog = 0; 293 | }; 294 | /* End PBXShellScriptBuildPhase section */ 295 | 296 | /* Begin PBXSourcesBuildPhase section */ 297 | 97C146EA1CF9000F007C117D /* Sources */ = { 298 | isa = PBXSourcesBuildPhase; 299 | buildActionMask = 2147483647; 300 | files = ( 301 | 978B8F6F1D3862AE00F588F7 /* AppDelegate.m in Sources */, 302 | 97C146F31CF9000F007C117D /* main.m in Sources */, 303 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 304 | ); 305 | runOnlyForDeploymentPostprocessing = 0; 306 | }; 307 | /* End PBXSourcesBuildPhase section */ 308 | 309 | /* Begin PBXVariantGroup section */ 310 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 311 | isa = PBXVariantGroup; 312 | children = ( 313 | 97C146FB1CF9000F007C117D /* Base */, 314 | ); 315 | name = Main.storyboard; 316 | sourceTree = ""; 317 | }; 318 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 319 | isa = PBXVariantGroup; 320 | children = ( 321 | 97C147001CF9000F007C117D /* Base */, 322 | ); 323 | name = LaunchScreen.storyboard; 324 | sourceTree = ""; 325 | }; 326 | /* End PBXVariantGroup section */ 327 | 328 | /* Begin XCBuildConfiguration section */ 329 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 330 | isa = XCBuildConfiguration; 331 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 332 | buildSettings = { 333 | ALWAYS_SEARCH_USER_PATHS = NO; 334 | CLANG_ANALYZER_NONNULL = YES; 335 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 336 | CLANG_CXX_LIBRARY = "libc++"; 337 | CLANG_ENABLE_MODULES = YES; 338 | CLANG_ENABLE_OBJC_ARC = YES; 339 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 340 | CLANG_WARN_BOOL_CONVERSION = YES; 341 | CLANG_WARN_COMMA = YES; 342 | CLANG_WARN_CONSTANT_CONVERSION = YES; 343 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 344 | CLANG_WARN_EMPTY_BODY = YES; 345 | CLANG_WARN_ENUM_CONVERSION = YES; 346 | CLANG_WARN_INFINITE_RECURSION = YES; 347 | CLANG_WARN_INT_CONVERSION = YES; 348 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 349 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 350 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 351 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 352 | CLANG_WARN_STRICT_PROTOTYPES = YES; 353 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 354 | CLANG_WARN_UNREACHABLE_CODE = YES; 355 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 356 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 357 | COPY_PHASE_STRIP = NO; 358 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 359 | ENABLE_NS_ASSERTIONS = NO; 360 | ENABLE_STRICT_OBJC_MSGSEND = YES; 361 | GCC_C_LANGUAGE_STANDARD = gnu99; 362 | GCC_NO_COMMON_BLOCKS = YES; 363 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 364 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 365 | GCC_WARN_UNDECLARED_SELECTOR = YES; 366 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 367 | GCC_WARN_UNUSED_FUNCTION = YES; 368 | GCC_WARN_UNUSED_VARIABLE = YES; 369 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 370 | MTL_ENABLE_DEBUG_INFO = NO; 371 | SDKROOT = iphoneos; 372 | TARGETED_DEVICE_FAMILY = "1,2"; 373 | VALIDATE_PRODUCT = YES; 374 | }; 375 | name = Profile; 376 | }; 377 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 378 | isa = XCBuildConfiguration; 379 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 380 | buildSettings = { 381 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 382 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 383 | DEVELOPMENT_TEAM = S8QB4VV633; 384 | ENABLE_BITCODE = NO; 385 | FRAMEWORK_SEARCH_PATHS = ( 386 | "$(inherited)", 387 | "$(PROJECT_DIR)/Flutter", 388 | ); 389 | INFOPLIST_FILE = Runner/Info.plist; 390 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 391 | LIBRARY_SEARCH_PATHS = ( 392 | "$(inherited)", 393 | "$(PROJECT_DIR)/Flutter", 394 | ); 395 | PRODUCT_BUNDLE_IDENTIFIER = com.example.joybuy; 396 | PRODUCT_NAME = "$(TARGET_NAME)"; 397 | VERSIONING_SYSTEM = "apple-generic"; 398 | }; 399 | name = Profile; 400 | }; 401 | 97C147031CF9000F007C117D /* Debug */ = { 402 | isa = XCBuildConfiguration; 403 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 404 | buildSettings = { 405 | ALWAYS_SEARCH_USER_PATHS = NO; 406 | CLANG_ANALYZER_NONNULL = YES; 407 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 408 | CLANG_CXX_LIBRARY = "libc++"; 409 | CLANG_ENABLE_MODULES = YES; 410 | CLANG_ENABLE_OBJC_ARC = YES; 411 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 412 | CLANG_WARN_BOOL_CONVERSION = YES; 413 | CLANG_WARN_COMMA = YES; 414 | CLANG_WARN_CONSTANT_CONVERSION = YES; 415 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 416 | CLANG_WARN_EMPTY_BODY = YES; 417 | CLANG_WARN_ENUM_CONVERSION = YES; 418 | CLANG_WARN_INFINITE_RECURSION = YES; 419 | CLANG_WARN_INT_CONVERSION = YES; 420 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 421 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 422 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 423 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 424 | CLANG_WARN_STRICT_PROTOTYPES = YES; 425 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 426 | CLANG_WARN_UNREACHABLE_CODE = YES; 427 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 428 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 429 | COPY_PHASE_STRIP = NO; 430 | DEBUG_INFORMATION_FORMAT = dwarf; 431 | ENABLE_STRICT_OBJC_MSGSEND = YES; 432 | ENABLE_TESTABILITY = YES; 433 | GCC_C_LANGUAGE_STANDARD = gnu99; 434 | GCC_DYNAMIC_NO_PIC = NO; 435 | GCC_NO_COMMON_BLOCKS = YES; 436 | GCC_OPTIMIZATION_LEVEL = 0; 437 | GCC_PREPROCESSOR_DEFINITIONS = ( 438 | "DEBUG=1", 439 | "$(inherited)", 440 | ); 441 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 442 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 443 | GCC_WARN_UNDECLARED_SELECTOR = YES; 444 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 445 | GCC_WARN_UNUSED_FUNCTION = YES; 446 | GCC_WARN_UNUSED_VARIABLE = YES; 447 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 448 | MTL_ENABLE_DEBUG_INFO = YES; 449 | ONLY_ACTIVE_ARCH = YES; 450 | SDKROOT = iphoneos; 451 | TARGETED_DEVICE_FAMILY = "1,2"; 452 | }; 453 | name = Debug; 454 | }; 455 | 97C147041CF9000F007C117D /* Release */ = { 456 | isa = XCBuildConfiguration; 457 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 458 | buildSettings = { 459 | ALWAYS_SEARCH_USER_PATHS = NO; 460 | CLANG_ANALYZER_NONNULL = YES; 461 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 462 | CLANG_CXX_LIBRARY = "libc++"; 463 | CLANG_ENABLE_MODULES = YES; 464 | CLANG_ENABLE_OBJC_ARC = YES; 465 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 466 | CLANG_WARN_BOOL_CONVERSION = YES; 467 | CLANG_WARN_COMMA = YES; 468 | CLANG_WARN_CONSTANT_CONVERSION = YES; 469 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 470 | CLANG_WARN_EMPTY_BODY = YES; 471 | CLANG_WARN_ENUM_CONVERSION = YES; 472 | CLANG_WARN_INFINITE_RECURSION = YES; 473 | CLANG_WARN_INT_CONVERSION = YES; 474 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 475 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 476 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 477 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 478 | CLANG_WARN_STRICT_PROTOTYPES = YES; 479 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 480 | CLANG_WARN_UNREACHABLE_CODE = YES; 481 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 482 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 483 | COPY_PHASE_STRIP = NO; 484 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 485 | ENABLE_NS_ASSERTIONS = NO; 486 | ENABLE_STRICT_OBJC_MSGSEND = YES; 487 | GCC_C_LANGUAGE_STANDARD = gnu99; 488 | GCC_NO_COMMON_BLOCKS = YES; 489 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 490 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 491 | GCC_WARN_UNDECLARED_SELECTOR = YES; 492 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 493 | GCC_WARN_UNUSED_FUNCTION = YES; 494 | GCC_WARN_UNUSED_VARIABLE = YES; 495 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 496 | MTL_ENABLE_DEBUG_INFO = NO; 497 | SDKROOT = iphoneos; 498 | TARGETED_DEVICE_FAMILY = "1,2"; 499 | VALIDATE_PRODUCT = YES; 500 | }; 501 | name = Release; 502 | }; 503 | 97C147061CF9000F007C117D /* Debug */ = { 504 | isa = XCBuildConfiguration; 505 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 506 | buildSettings = { 507 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 508 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 509 | ENABLE_BITCODE = NO; 510 | FRAMEWORK_SEARCH_PATHS = ( 511 | "$(inherited)", 512 | "$(PROJECT_DIR)/Flutter", 513 | ); 514 | INFOPLIST_FILE = Runner/Info.plist; 515 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 516 | LIBRARY_SEARCH_PATHS = ( 517 | "$(inherited)", 518 | "$(PROJECT_DIR)/Flutter", 519 | ); 520 | PRODUCT_BUNDLE_IDENTIFIER = com.example.joybuy; 521 | PRODUCT_NAME = "$(TARGET_NAME)"; 522 | VERSIONING_SYSTEM = "apple-generic"; 523 | }; 524 | name = Debug; 525 | }; 526 | 97C147071CF9000F007C117D /* Release */ = { 527 | isa = XCBuildConfiguration; 528 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 529 | buildSettings = { 530 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 531 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 532 | ENABLE_BITCODE = NO; 533 | FRAMEWORK_SEARCH_PATHS = ( 534 | "$(inherited)", 535 | "$(PROJECT_DIR)/Flutter", 536 | ); 537 | INFOPLIST_FILE = Runner/Info.plist; 538 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 539 | LIBRARY_SEARCH_PATHS = ( 540 | "$(inherited)", 541 | "$(PROJECT_DIR)/Flutter", 542 | ); 543 | PRODUCT_BUNDLE_IDENTIFIER = com.example.joybuy; 544 | PRODUCT_NAME = "$(TARGET_NAME)"; 545 | VERSIONING_SYSTEM = "apple-generic"; 546 | }; 547 | name = Release; 548 | }; 549 | /* End XCBuildConfiguration section */ 550 | 551 | /* Begin XCConfigurationList section */ 552 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 553 | isa = XCConfigurationList; 554 | buildConfigurations = ( 555 | 97C147031CF9000F007C117D /* Debug */, 556 | 97C147041CF9000F007C117D /* Release */, 557 | 249021D3217E4FDB00AE95B9 /* Profile */, 558 | ); 559 | defaultConfigurationIsVisible = 0; 560 | defaultConfigurationName = Release; 561 | }; 562 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 563 | isa = XCConfigurationList; 564 | buildConfigurations = ( 565 | 97C147061CF9000F007C117D /* Debug */, 566 | 97C147071CF9000F007C117D /* Release */, 567 | 249021D4217E4FDB00AE95B9 /* Profile */, 568 | ); 569 | defaultConfigurationIsVisible = 0; 570 | defaultConfigurationName = Release; 571 | }; 572 | /* End XCConfigurationList section */ 573 | }; 574 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 575 | } 576 | -------------------------------------------------------------------------------- /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/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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/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. 6 | -------------------------------------------------------------------------------- /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 | joybuy 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/api/searchApi.dart: -------------------------------------------------------------------------------- 1 | import 'package:joybuy.com/model/repo.dart'; 2 | import 'package:date_format/date_format.dart'; 3 | 4 | import 'dart:convert' show json, utf8; 5 | import 'dart:io'; 6 | import 'dart:async'; 7 | 8 | class Api { 9 | static final HttpClient _httpClient = HttpClient(); 10 | static final String _url = "api.github.com"; 11 | 12 | static Future> getRepositoriesWithSearchQuery(String query) async { 13 | final uri = Uri.https(_url, '/search/repositories', { 14 | 'q': query, 15 | 'sort': 'stars', 16 | 'order': 'desc', 17 | 'page': '0', 18 | 'per_page': '25' 19 | }); 20 | 21 | final jsonResponse = await _getJson(uri); 22 | if (jsonResponse == null) { 23 | return null; 24 | } 25 | if (jsonResponse['errors'] != null) { 26 | return null; 27 | } 28 | if (jsonResponse['items'] == null) { 29 | return List(); 30 | } 31 | 32 | return Repo.mapJSONStringToList(jsonResponse['items']); 33 | } 34 | 35 | static Future> getTrendingRepositories() async { 36 | final lastWeek = DateTime.now().subtract(Duration(days: 7)); 37 | final formattedDate = formatDate(lastWeek, [yyyy, '-', mm, '-', dd]); 38 | 39 | final uri = Uri.https(_url, '/search/repositories', { 40 | 'q': 'created:>$formattedDate', 41 | 'sort': 'stars', 42 | 'order': 'desc', 43 | 'page': '0', 44 | 'per_page': '25' 45 | }); 46 | 47 | final jsonResponse = await _getJson(uri); 48 | if (jsonResponse == null) { 49 | return null; 50 | } 51 | if (jsonResponse['errors'] != null) { 52 | return null; 53 | } 54 | if (jsonResponse['items'] == null) { 55 | return List(); 56 | } 57 | 58 | return Repo.mapJSONStringToList(jsonResponse['items']); 59 | } 60 | 61 | static Future> _getJson(Uri uri) async { 62 | try { 63 | final httpRequest = await _httpClient.getUrl(uri); 64 | final httpResponse = await httpRequest.close(); 65 | if (httpResponse.statusCode != HttpStatus.OK) { 66 | return null; 67 | } 68 | 69 | final responseBody = await httpResponse.transform(utf8.decoder).join(); 70 | return json.decode(responseBody); 71 | } on Exception catch (e) { 72 | print('$e'); 73 | return null; 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /lib/config/Constants.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class AppDataIds { 4 | static const GlobalHomeId = 1238; 5 | static const sellerRankingId = 1939; 6 | } 7 | 8 | class AppColors { 9 | static const BackgroundColor = 0xffebebeb; 10 | static const AppBarColor = 0xff303030; 11 | static const TabIconActiveColor = 0xff46c11b; 12 | static const TabIconNormalColor = 0xff999999; 13 | static const ConversationTitleColor = 0xff353535; 14 | } 15 | 16 | class DomainUrl { 17 | static const joybuy = "https://m.joybuy.com/"; 18 | } 19 | 20 | class Constants { 21 | static const IconFontFamily = "appIconFont"; 22 | static const ConversationAvatarSize = 48.0; 23 | static const UnreadMsgNotifyDotSize = 18.0; 24 | static const ConversationMuteSize = 18.0; 25 | static const DeiceInfoItemHeight = 32.0; 26 | static const ContactAvatarSize = 36.0; 27 | static const DividerWidth = 1.0; 28 | static const IndexBarWitch = 24.0; 29 | static const IndexLetterBoxSize = 114.0; 30 | static const IndexLetterBoxRadius = 4.0; 31 | static const FullWidthIconBtnIconSize = 24.0; 32 | } 33 | 34 | class AppStyles { 35 | static const TitleStyle = TextStyle( 36 | fontSize: 14.0, 37 | color: Color(AppColors.ConversationTitleColor), 38 | ); 39 | } 40 | -------------------------------------------------------------------------------- /lib/generated/i18n.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:flutter/foundation.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | // ignore_for_file: non_constant_identifier_names 7 | // ignore_for_file: camel_case_types 8 | // ignore_for_file: prefer_single_quotes 9 | 10 | //This file is automatically generated. DO NOT EDIT, all your changes would be lost. 11 | class S implements WidgetsLocalizations { 12 | const S(); 13 | 14 | static const GeneratedLocalizationsDelegate delegate = 15 | GeneratedLocalizationsDelegate(); 16 | 17 | static S of(BuildContext context) => Localizations.of(context, S); 18 | 19 | @override 20 | TextDirection get textDirection => TextDirection.ltr; 21 | 22 | } 23 | 24 | class $en extends S { 25 | const $en(); 26 | } 27 | 28 | class GeneratedLocalizationsDelegate extends LocalizationsDelegate { 29 | const GeneratedLocalizationsDelegate(); 30 | 31 | List get supportedLocales { 32 | return const [ 33 | Locale("en", ""), 34 | ]; 35 | } 36 | 37 | LocaleListResolutionCallback listResolution({Locale fallback}) { 38 | return (List locales, Iterable supported) { 39 | if (locales == null || locales.isEmpty) { 40 | return fallback ?? supported.first; 41 | } else { 42 | return _resolve(locales.first, fallback, supported); 43 | } 44 | }; 45 | } 46 | 47 | LocaleResolutionCallback resolution({Locale fallback}) { 48 | return (Locale locale, Iterable supported) { 49 | return _resolve(locale, fallback, supported); 50 | }; 51 | } 52 | 53 | Locale _resolve(Locale locale, Locale fallback, Iterable supported) { 54 | if (locale == null || !isSupported(locale)) { 55 | return fallback ?? supported.first; 56 | } 57 | 58 | final Locale languageLocale = Locale(locale.languageCode, ""); 59 | if (supported.contains(locale)) { 60 | return locale; 61 | } else if (supported.contains(languageLocale)) { 62 | return languageLocale; 63 | } else { 64 | final Locale fallbackLocale = fallback ?? supported.first; 65 | return fallbackLocale; 66 | } 67 | } 68 | 69 | @override 70 | Future load(Locale locale) { 71 | final String lang = getLang(locale); 72 | if (lang != null) { 73 | switch (lang) { 74 | case "en": 75 | return SynchronousFuture(const $en()); 76 | default: 77 | // NO-OP. 78 | } 79 | } 80 | return SynchronousFuture(const S()); 81 | } 82 | 83 | @override 84 | bool isSupported(Locale locale) => 85 | locale != null && supportedLocales.contains(locale); 86 | 87 | @override 88 | bool shouldReload(GeneratedLocalizationsDelegate old) => false; 89 | } 90 | 91 | String getLang(Locale l) => l == null 92 | ? null 93 | : l.countryCode != null && l.countryCode.isEmpty 94 | ? l.languageCode 95 | : l.toString(); 96 | -------------------------------------------------------------------------------- /lib/index/BestSellers.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../tools/Utils.dart'; 3 | import "package:joybuy.com/tools/NumberPart.Dart"; 4 | import 'package:joybuy.com/widget/LayoutWidget.dart'; 5 | import 'package:joybuy.com/tools/Url.dart'; 6 | import 'package:cached_network_image/cached_network_image.dart'; 7 | 8 | class BestSellersWidget extends StatefulWidget { 9 | final itemData; 10 | final titleData; 11 | final moreData; 12 | 13 | BestSellersWidget( 14 | {Key key, 15 | @required this.titleData, 16 | @required this.itemData, 17 | @required this.moreData}) 18 | : super(key: key); 19 | _BestSellersState createState() => _BestSellersState(); 20 | } 21 | 22 | class _BestSellersState extends State { 23 | var layout; 24 | Widget getItemWidget(BuildContext context, int i) { 25 | int length = widget.itemData['skus'].length; 26 | if (length > 5) { 27 | length = 5; 28 | } 29 | List topColor = [ 30 | Color.fromARGB(255, 232, 48, 48), 31 | Color.fromARGB(255, 226, 95, 48), 32 | Color.fromARGB(255, 229, 177, 52), 33 | Colors.grey, 34 | ]; 35 | // return new GestureDetector( 36 | // child: Container( 37 | // margin: EdgeInsets.only(top: 0), 38 | // child: new ListView.builder( 39 | // shrinkWrap: true, 40 | // scrollDirection: Axis.vertical, 41 | // itemCount: length, 42 | // physics: NeverScrollableScrollPhysics(), 43 | // itemBuilder: (BuildContext ctx, int i) { 44 | var subItem = widget.itemData["skus"][i]; 45 | var colorIndex = i < topColor.length ? i : topColor.length - 1; 46 | 47 | return Container( 48 | color: Colors.white, 49 | height: 130, 50 | margin: EdgeInsets.only(left: 10, right: 10), 51 | child: InkWell( 52 | onTap: () { 53 | Url.launchDetailURL(subItem["skuId"].toString()); 54 | }, 55 | // width: double.maxFinite, 56 | child: Row(verticalDirection: VerticalDirection.up, children: [ 57 | Container( 58 | padding: EdgeInsets.all(10), 59 | child: CachedNetworkImage( 60 | // placeholder: new CircularProgressIndicator(), 61 | fit: BoxFit.fill, 62 | imageUrl: 63 | EptUtils().cutImage(subItem["productImage"], 130, 130), 64 | width: 130, 65 | ), 66 | ), 67 | Container( 68 | child: ClipPath( 69 | clipper: new NumberPart(radius: 0.0), 70 | child: Container( 71 | height: 30, 72 | width: 20, 73 | padding: EdgeInsets.only(top: 5, left: 3), 74 | color: topColor.elementAt(colorIndex), 75 | child: Text( 76 | " " + (i + 1).toString() + " ", 77 | style: new TextStyle( 78 | // background: paint, 79 | fontSize: 12.0, 80 | color: Colors.white), 81 | ), 82 | ), 83 | ), 84 | width: 30, 85 | alignment: Alignment.topCenter, 86 | ), 87 | Expanded( 88 | child: Container( 89 | alignment: Alignment.topCenter, 90 | padding: EdgeInsets.only(top: 0), 91 | child: Column( 92 | mainAxisAlignment: MainAxisAlignment.spaceBetween, //对齐方式:平均间隔 93 | crossAxisAlignment: CrossAxisAlignment.start, 94 | mainAxisSize: MainAxisSize.max, 95 | children: [ 96 | Text(subItem["productName"], 97 | style: new TextStyle(fontSize: 14, color: Colors.black), 98 | overflow: TextOverflow.ellipsis, 99 | textAlign: TextAlign.left), 100 | Row( 101 | mainAxisAlignment: MainAxisAlignment.start, 102 | children: [ 103 | Icon( 104 | Icons.star, 105 | size: 18, 106 | color: Colors.yellow, 107 | ), 108 | Icon( 109 | Icons.star, 110 | size: 18, 111 | color: Colors.yellow, 112 | ), 113 | Icon( 114 | Icons.star, 115 | size: 18, 116 | color: Colors.yellow, 117 | ), 118 | Icon( 119 | Icons.star, 120 | size: 18, 121 | color: Colors.yellow, 122 | ), 123 | Icon( 124 | Icons.star, 125 | size: 18, 126 | color: Colors.grey, 127 | ), 128 | Text("(" + 88.toString() + ")", 129 | style: 130 | new TextStyle(fontSize: 14, color: Colors.grey), 131 | textAlign: TextAlign.center), 132 | ], 133 | ), 134 | Container( 135 | alignment: Alignment.centerLeft, 136 | child: Text("\$ " + subItem["price"], 137 | style: new TextStyle( 138 | fontSize: 14, 139 | color: Colors.red, 140 | fontWeight: FontWeight.w700), 141 | textAlign: TextAlign.center), 142 | ), 143 | Divider() 144 | ], 145 | ), 146 | ), 147 | ) 148 | ])), 149 | ); 150 | // ), 151 | // ); 152 | } 153 | 154 | Widget getheaderCreator(BuildContext context, int position) { 155 | return Container( 156 | height: 40, 157 | padding: EdgeInsets.all(5), 158 | child: Row( 159 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 160 | mainAxisSize: MainAxisSize.max, 161 | children: [ 162 | new Text( 163 | widget.titleData['title'].toString(), 164 | style: new TextStyle(fontWeight: FontWeight.w700), 165 | textAlign: TextAlign.left, 166 | ), 167 | ], 168 | ), 169 | ); 170 | } 171 | 172 | Widget getBottomCreator(BuildContext context, int position) { 173 | return Container( 174 | padding: EdgeInsets.all(5), 175 | height: 35, 176 | width: double.maxFinite, 177 | margin: EdgeInsets.all(2), 178 | decoration: new BoxDecoration( 179 | color: Color.fromARGB(255, 246, 246, 246), 180 | // border: Border(top: BorderSide.none,bottom: BorderSide(width: 2)), 181 | 182 | borderRadius: BorderRadius.only( 183 | topRight: Radius.circular(0.0), 184 | topLeft: Radius.circular(0.0), 185 | bottomRight: Radius.circular(15.0), 186 | bottomLeft: Radius.circular(15.0), 187 | ), 188 | ), 189 | // alignment: Alignment.bottomCenter, 190 | child: Row( 191 | mainAxisAlignment: MainAxisAlignment.center, 192 | mainAxisSize: MainAxisSize.max, 193 | children: [ 194 | new Text( 195 | widget.moreData['more']['title'].toString() + " >", 196 | style: new TextStyle(fontWeight: FontWeight.w700), 197 | textAlign: TextAlign.center, 198 | ), 199 | ], 200 | ), 201 | ); 202 | } 203 | 204 | @override 205 | Widget build(BuildContext content) { 206 | // return Text('detail---${widget.id}'); 207 | int itemCount = widget.itemData['skus'].length; 208 | if (itemCount > 5) { 209 | itemCount = 5; 210 | } 211 | 212 | layout = LayoutWidget(itemCount, 213 | itemWidgetCreator: getItemWidget, 214 | headerCreator: getheaderCreator, 215 | bottomCreator: getBottomCreator); 216 | 217 | return layout; 218 | } 219 | } 220 | -------------------------------------------------------------------------------- /lib/index/ImageWidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:cached_network_image/cached_network_image.dart'; 3 | 4 | class ImageWidget extends StatefulWidget { 5 | final itemData; 6 | 7 | ImageWidget({Key key, @required this.itemData}) : super(key: key); 8 | 9 | _ImageState createState() => _ImageState(); 10 | } 11 | 12 | class _ImageState extends State { 13 | @override 14 | Widget build(BuildContext content) { 15 | // return Text('detail---${widget.id}'); 16 | 17 | if (widget.itemData['floorType'] == 10) { 18 | return getSingleImage(); 19 | } 20 | if (widget.itemData['floorType'] == 6) { 21 | return getDoubleImage(); 22 | } 23 | } 24 | 25 | Container getSingleImage() { 26 | double imageHeight = 140; 27 | if (widget.itemData['styleType'] == 2) { 28 | imageHeight = 175; 29 | } 30 | return Container( 31 | // height: imageHeight, 32 | margin: EdgeInsets.all(10), 33 | alignment: Alignment(0.0, 0.0), 34 | // constraints: BoxConstraints.expand(width: double.maxFinite), 35 | padding: EdgeInsets.only(left: 0, top: 0), 36 | child: CachedNetworkImage( 37 | // placeholder: new CircularProgressIndicator(), 38 | fit: BoxFit.cover, 39 | imageUrl: widget.itemData["clsBanner"][0]["clsImage"], 40 | )); 41 | } 42 | 43 | List getImageRow() { 44 | var datas = widget.itemData["items"]; 45 | return new List.generate(datas.length, (int i) { 46 | var subItem = widget.itemData["items"][i]; 47 | return Expanded( 48 | flex: 1, 49 | child: Container( 50 | padding: EdgeInsets.all(2), 51 | // width: double.maxFinite, 52 | child: CachedNetworkImage( 53 | // placeholder: new CircularProgressIndicator(), 54 | fit: BoxFit.cover, 55 | imageUrl: subItem["activityImage"], 56 | ))); 57 | }); 58 | } 59 | 60 | Container getDoubleImage() { 61 | return Container( 62 | margin: EdgeInsets.all(10), 63 | child: Row( 64 | mainAxisSize: MainAxisSize.min, 65 | mainAxisAlignment: MainAxisAlignment.center, 66 | children: getImageRow(), 67 | )); 68 | } 69 | } 70 | -------------------------------------------------------------------------------- /lib/index/IndexList.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:dio/dio.dart'; 3 | import 'SliderWidget.dart'; 4 | import 'NavWidget.dart'; 5 | import 'ImageWidget.dart'; 6 | import 'SupperDeals.dart'; 7 | import 'BestSellers.dart'; 8 | import 'TopShop.dart'; 9 | import 'Recommend.dart'; 10 | import 'package:joybuy.com/config/Constants.dart'; 11 | import 'dart:convert' show json; 12 | import 'package:cached_network_image/cached_network_image.dart'; 13 | 14 | Dio dio = new Dio(); 15 | 16 | class IndexList extends StatefulWidget { 17 | IndexList({Key key, @required this.mt}) : super(key: key); 18 | final String mt; 19 | 20 | _IndexListState createState() => _IndexListState(); 21 | } 22 | 23 | class _IndexListState extends State 24 | with AutomaticKeepAliveClientMixin { 25 | var indexData; 26 | var getSellerTopData = false; 27 | bool get wantKeepAlive => true; 28 | 29 | @override 30 | void initState() { 31 | super.initState(); 32 | getIndexData(); //得到首页的数据 33 | } 34 | 35 | @override 36 | Widget build(BuildContext content) { 37 | // return Text('这是电影列表页面---'+widget.mt+'---${mlist.length}'); 38 | if (indexData == null) { 39 | return Image( 40 | image: new NetworkImage( 41 | "https://static.joybuy.com/ept/home-en/1.1.0/components/header/i/logo.png")); 42 | } 43 | int size = indexData['floors'].length; 44 | if (!getSellerTopData) { 45 | getSellerTopData = true; 46 | getBestsellersData(); 47 | } 48 | List list = new List(); 49 | var floors = indexData['floors']; 50 | for (int i = 0; i < size; i++) { 51 | var item = floors[i]; 52 | Widget wg; 53 | if (item['floorType'] == 1 && item['styleType'] == 3) { 54 | wg = SliderWidget(itemData: item); 55 | list.add(wg); 56 | } else if (item['floorType'] == 6 && item['styleType'] == 3) { 57 | wg = NavWidget(itemData: item); 58 | list.add(wg); 59 | } else if (item['floorType'] == 6 && item['styleType'] == 4) { 60 | wg = ImageWidget(itemData: item); 61 | list.add(wg); 62 | } else if (item['floorType'] == 5 && item['styleType'] == 3) { 63 | wg = SupperDealsWidget( 64 | titleData: floors[i - 1], itemData: item, moreData: floors[i + 1]); 65 | list.add(wg); 66 | } else if (item['floorType'] == 10 && item['styleType'] == 1) { 67 | wg = ImageWidget(itemData: item); 68 | list.add(wg); 69 | } else if (item['floorType'] == 5 && item['styleType'] == 2) { 70 | wg = BestSellersWidget( 71 | titleData: floors[i - 1], 72 | itemData: item, 73 | moreData: floors[i + 1], 74 | ); 75 | list.add(wg); 76 | } else if (item['floorType'] == 10 && item['styleType'] == 2) { 77 | wg = ImageWidget(itemData: item); 78 | list.add(wg); 79 | } else if (item['floorType'] == 6) { 80 | wg = ImageWidget(itemData: item); 81 | list.add(wg); 82 | } else if (item['floorType'] == 4) { 83 | wg = TopShopWidget(titleData: floors[i - 1], itemData: item); 84 | list.add(wg); 85 | } else if (item['floorType'] == 5 && item['styleType'] == 1) { 86 | wg = RecommendWidget(titleData: floors[i - 1], itemData: item); 87 | list.add(wg); 88 | } 89 | } 90 | // return new Row( 91 | 92 | // children: list, 93 | // ); 94 | return Container( 95 | color: Color(0xffeeeeee), 96 | child: new ListView.builder( 97 | shrinkWrap: true, 98 | itemCount: list.length, 99 | itemBuilder: (BuildContext ctx, int i) { 100 | return list.elementAt(i); 101 | })); 102 | 103 | // return new ListView.builder( 104 | // shrinkWrap: true, 105 | // itemCount: size, 106 | // itemBuilder: (BuildContext ctx, int i) { 107 | // var item = indexData['floors'][i]; 108 | // return Container( 109 | // child: IndexWidget( 110 | // styleType: item['styleType'], 111 | // floorType: item['floorType'], 112 | // itemData: item, 113 | // ), 114 | // ); 115 | // }); 116 | } 117 | 118 | getIndexData() async { 119 | var dataId = AppDataIds.GlobalHomeId; 120 | var response = 121 | await dio.get('https://mstone-api.jd.com/ept/page?id=$dataId'); 122 | var result = response.data; 123 | setState(() { 124 | var jsonRes = json.decode(result); 125 | indexData = jsonRes['data']; 126 | }); 127 | } 128 | 129 | getBestsellersData() async { 130 | int dataId = AppDataIds.sellerRankingId; 131 | var responseBestsellers = 132 | await dio.get('https://mstone-api.jd.com/ept/page?id=$dataId'); 133 | var rspbestsellers = responseBestsellers.data; 134 | setState(() { 135 | var jsonRes = json.decode(rspbestsellers); 136 | var data = jsonRes['data']; 137 | var bestsellersData; 138 | if (data.length > 0 && 139 | data["floors"].length > 0 && 140 | data["floors"][0]["tabList"].length > 0) { 141 | bestsellersData = data["floors"][0]["tabList"]; 142 | } 143 | int size = indexData['floors'].length; 144 | for (var i = 0; i < size; i++) { 145 | var floors = indexData['floors']; 146 | var item = floors[i]; 147 | 148 | if (item['floorType'] == 5 && item['styleType'] == 2) { 149 | indexData['floors'][i]["skus"] = bestsellersData[0]["skus"]; 150 | } 151 | } 152 | }); 153 | } 154 | } 155 | -------------------------------------------------------------------------------- /lib/index/NavWidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NavWidget extends StatefulWidget { 4 | final itemData; 5 | 6 | NavWidget({Key key, @required this.itemData}) : super(key: key); 7 | 8 | _NavState createState() => _NavState(); 9 | } 10 | 11 | class _NavState extends State { 12 | List getNavRow() { 13 | var datas = widget.itemData["items"]; 14 | return new List.generate(datas.length, (int index) { 15 | var subItem = widget.itemData["items"][index]; 16 | Widget w = Container( 17 | child: Column(verticalDirection: VerticalDirection.up, children: [ 18 | new Text( 19 | subItem["activityName"], 20 | style: TextStyle(fontSize: 10), 21 | ) 22 | ])); 23 | return w; 24 | }); 25 | } 26 | 27 | @override 28 | Widget build(BuildContext content) { 29 | // return Text('detail---${widget.id}'); 30 | return Container( 31 | // color: Colors.white, 32 | 33 | decoration: new BoxDecoration( 34 | image: new DecorationImage( 35 | alignment: Alignment.center, 36 | image: new NetworkImage(widget.itemData["bgImg"]), 37 | fit: BoxFit.fill, 38 | repeat: ImageRepeat.noRepeat), 39 | ), 40 | margin: EdgeInsets.only(left: 10, right: 10), 41 | padding: EdgeInsets.all(10), 42 | child: Column( 43 | verticalDirection: VerticalDirection.down, 44 | mainAxisSize: MainAxisSize.max, 45 | crossAxisAlignment: CrossAxisAlignment.stretch, 46 | children: [ 47 | Container( 48 | height: 30, 49 | margin: EdgeInsets.all(0), 50 | padding: EdgeInsets.only(top: 10, left: 10), 51 | child: new Text( 52 | widget.itemData['title'].toString(), 53 | style: new TextStyle(fontWeight: FontWeight.w700), 54 | textAlign: TextAlign.left, 55 | ), 56 | ), 57 | Expanded( 58 | child: Container( 59 | height: 120, 60 | margin: EdgeInsets.only(top: 0), 61 | child: Container( 62 | padding: EdgeInsets.all(10), 63 | child: Row( 64 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 65 | children: getNavRow(), 66 | )), 67 | )) 68 | ]), 69 | height: 140, 70 | ); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lib/index/Recommend.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:joybuy.com/tools/Utils.dart'; 3 | import 'package:joybuy.com/widget/LayoutWidget.dart'; 4 | import 'package:joybuy.com/tools/Url.dart'; 5 | import 'package:cached_network_image/cached_network_image.dart'; 6 | 7 | class RecommendWidget extends StatefulWidget { 8 | final itemData; 9 | final titleData; 10 | 11 | RecommendWidget({Key key, @required this.titleData, @required this.itemData}) 12 | : super(key: key); 13 | _RecommendState createState() => _RecommendState(); 14 | } 15 | 16 | class _RecommendState extends State { 17 | Widget getItemWidget(BuildContext context, int i) { 18 | var subItem = widget.itemData["skus"][i * 2]; 19 | var subItem2 = widget.itemData["skus"][i * 2 + 1]; 20 | return Container( 21 | color: Colors.white, 22 | margin: EdgeInsets.only(left: 10, right: 10), 23 | child: Row( 24 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 25 | children: [ 26 | Expanded( 27 | child: Column(children: [ 28 | CachedNetworkImage( 29 | // placeholder: new CircularProgressIndicator(), 30 | fit: BoxFit.cover, 31 | // width: 200, 32 | imageUrl: EptUtils().cutImage(subItem["productImage"], 200, 200), 33 | ), 34 | Text("\$" + subItem["price"], 35 | style: new TextStyle(fontSize: 12, color: Colors.red), 36 | textAlign: TextAlign.center), 37 | ])), 38 | Expanded( 39 | child: Column(children: [ 40 | CachedNetworkImage( 41 | // placeholder: new CircularProgressIndicator(), 42 | fit: BoxFit.cover, 43 | imageUrl: EptUtils().cutImage(subItem2["productImage"], 200, 200), 44 | width: 200, 45 | ), 46 | Text("\$" + subItem2["price"], 47 | style: new TextStyle(fontSize: 12, color: Colors.red), 48 | textAlign: TextAlign.center), 49 | ])) 50 | ], 51 | // width: double.maxFinite, 52 | ), 53 | ); 54 | } 55 | 56 | Widget getheaderCreator(BuildContext context, int i) { 57 | return Container( 58 | padding: EdgeInsets.all(10), 59 | child: new Text( 60 | widget.titleData['title'].toString(), 61 | style: new TextStyle(fontWeight: FontWeight.w700), 62 | textAlign: TextAlign.left, 63 | ), 64 | ); 65 | } 66 | 67 | @override 68 | Widget build(BuildContext content) { 69 | double count = (widget.itemData["skus"].length / 2); 70 | return LayoutWidget(count.toInt(), 71 | itemWidgetCreator: getItemWidget, headerCreator: getheaderCreator); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /lib/index/SliderWidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_swiper/flutter_swiper.dart'; 3 | import 'package:cached_network_image/cached_network_image.dart'; 4 | 5 | class SliderWidget extends StatefulWidget { 6 | SliderWidget({Key key, @required this.itemData}) : super(key: key); 7 | final itemData; 8 | _SliderWidgetData createState() => _SliderWidgetData(); 9 | } 10 | 11 | class _SliderWidgetData extends State { 12 | @override 13 | Widget build(BuildContext content) { 14 | var banner = widget.itemData['banner']; 15 | final int length = banner.length; 16 | String bgImg = widget.itemData['bgImg']; 17 | 18 | return Stack( 19 | alignment: new Alignment(0, 1), 20 | children: [ 21 | Container( 22 | child: new Swiper( 23 | itemBuilder: (BuildContext context, int index) { 24 | return new Image.network( 25 | banner[index]["bannerImage"], 26 | fit: BoxFit.fill, 27 | ); 28 | }, 29 | itemCount: length, 30 | autoplay: true, 31 | pagination: new SwiperPagination( 32 | margin: EdgeInsets.all(100.0), 33 | ), 34 | //control: new SwiperControl(), 35 | ), 36 | height: 400, 37 | ), 38 | Container( 39 | margin: EdgeInsets.only(left: 10, right: 10), 40 | child: new Image( 41 | image: NetworkImage(bgImg), 42 | ), 43 | ) 44 | ], 45 | ); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/index/SupperDeals.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../tools/Utils.dart'; 3 | import 'dart:async'; 4 | import 'package:joybuy.com/tools/Url.dart'; 5 | import 'dart:math'; 6 | import 'package:cached_network_image/cached_network_image.dart'; 7 | 8 | class SupperDealsWidget extends StatefulWidget { 9 | final itemData; 10 | final titleData; 11 | final moreData; 12 | 13 | SupperDealsWidget( 14 | {Key key, 15 | @required this.titleData, 16 | @required this.itemData, 17 | this.moreData}) 18 | : super(key: key); 19 | _SupperDealsState createState() => _SupperDealsState(); 20 | } 21 | 22 | class _SupperDealsState extends State { 23 | /// 倒计时的计时器。 24 | Timer _timer; 25 | int _hours = 11; 26 | int _minutes = 59; 27 | 28 | /// 当前倒计时的秒数。 29 | int _seconds = 59; 30 | static final Random random = Random(1000); 31 | 32 | void _startTimer() { 33 | // 计时器(`Timer`)组件的定期(`periodic`)构造函数,创建一个新的重复计时器。 34 | _timer = Timer.periodic(Duration(seconds: 1), (timer) { 35 | setState(() { 36 | if (_seconds == 0) { 37 | _seconds = 59; 38 | return; 39 | } else { 40 | --_seconds; 41 | } 42 | }); 43 | }); 44 | } 45 | 46 | @override 47 | void initState() { 48 | super.initState(); 49 | _startTimer(); 50 | _seconds = 59; 51 | } 52 | 53 | Widget build(BuildContext content) { 54 | // return Text('detail---${widget.id}'); 55 | int length = widget.itemData['skus'].length; 56 | 57 | return Container( 58 | margin: EdgeInsets.only(left: 10, right: 10), 59 | child: Column( 60 | verticalDirection: VerticalDirection.down, 61 | mainAxisSize: MainAxisSize.max, 62 | crossAxisAlignment: CrossAxisAlignment.stretch, 63 | children: [ 64 | Container( 65 | padding: EdgeInsets.all(5), 66 | height: 30, 67 | child: Row( 68 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 69 | mainAxisSize: MainAxisSize.max, 70 | children: [ 71 | new Text( 72 | widget.titleData['title'].toString(), 73 | style: new TextStyle(fontWeight: FontWeight.w700), 74 | textAlign: TextAlign.left, 75 | ), 76 | new Container( 77 | child: new Row(children: [ 78 | new Text( 79 | "These deals end in ", 80 | style: new TextStyle(fontSize: 10, color: Colors.grey), 81 | textAlign: TextAlign.right, 82 | ), 83 | new Text( 84 | " $_hours : $_minutes : $_seconds", 85 | style: new TextStyle( 86 | fontWeight: FontWeight.w600, color: Colors.red), 87 | textAlign: TextAlign.center, 88 | ), 89 | ])), 90 | ], 91 | ), 92 | ), 93 | new Expanded( 94 | child: Container( 95 | margin: EdgeInsets.only(top: 0), 96 | child: new ListView( 97 | addSemanticIndexes: false, 98 | addAutomaticKeepAlives: false, 99 | addRepaintBoundaries: false, 100 | shrinkWrap: true, 101 | scrollDirection: Axis.horizontal, 102 | children: getList(), 103 | ), 104 | ), 105 | ), 106 | Container( 107 | padding: EdgeInsets.all(5), 108 | alignment: Alignment.center, 109 | child: Text( 110 | widget.moreData['more']['title'].toString() + " >", 111 | textAlign: TextAlign.center, 112 | ), 113 | ), 114 | ]), 115 | height: 250, 116 | ); 117 | } 118 | 119 | List getList() { 120 | int length = widget.itemData['skus'].length; 121 | List list = List(); 122 | for (var i = 0; i < length; i++) { 123 | final int goodsProgress = random.nextInt(100); 124 | Widget w = getItem(i); 125 | widget.itemData["skus"][i]["goodsProgress"] = goodsProgress.toString(); 126 | list.add(w); 127 | } 128 | return list; 129 | } 130 | 131 | Container getItem(int i) { 132 | var subItem = widget.itemData["skus"][i]; 133 | 134 | return Container( 135 | decoration: new BoxDecoration( 136 | color: Colors.white, 137 | borderRadius: BorderRadius.circular(6), 138 | ), 139 | margin: EdgeInsets.all(5), 140 | child: InkWell( 141 | onTap: () { 142 | Url.launchDetailURL(subItem["skuId"].toString()); 143 | }, 144 | child: Container( 145 | child: Stack( 146 | alignment: Alignment.topCenter, 147 | children: [ 148 | Positioned( 149 | left: 0, 150 | top: 0, 151 | child: Container( 152 | color: Color(0xfffaa400), 153 | child: Row( 154 | children: [ 155 | Text( 156 | subItem["goodsProgress"], 157 | style: new TextStyle( 158 | color: Colors.white, 159 | fontSize: 14.0, 160 | fontFamily: "serif"), 161 | ), 162 | Column( 163 | children: [ 164 | Text("%", 165 | style: new TextStyle( 166 | color: Colors.white, 167 | fontSize: 8.0, 168 | fontFamily: "serif")), 169 | Text("off", 170 | style: new TextStyle( 171 | color: Colors.white, 172 | fontSize: 8.0, 173 | fontFamily: "serif")) 174 | ], 175 | ) 176 | ], 177 | ))), 178 | Container( 179 | padding: 180 | EdgeInsets.only(top: 20, left: 2, right: 2, bottom: 2), 181 | // width: double.maxFinite, 182 | child: Column( 183 | verticalDirection: VerticalDirection.down, 184 | children: [ 185 | CachedNetworkImage( 186 | // placeholder: new CircularProgressIndicator(), 187 | imageUrl: EptUtils() 188 | .cutImage(subItem["productImage"], 100, 100), 189 | width: 100, 190 | height: 100, 191 | ), 192 | Text("\$" + subItem["price"], 193 | style: 194 | new TextStyle(fontSize: 12, color: Colors.red), 195 | textAlign: TextAlign.center), 196 | Text("\$" + subItem["marketPrice"], 197 | style: 198 | new TextStyle(fontSize: 12, color: Colors.grey), 199 | textAlign: TextAlign.center), 200 | ])) 201 | ], 202 | ))), 203 | ); 204 | } 205 | } 206 | -------------------------------------------------------------------------------- /lib/index/TopShop.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../tools/Utils.dart'; 3 | import 'package:cached_network_image/cached_network_image.dart'; 4 | 5 | class TopShopWidget extends StatefulWidget { 6 | final itemData; 7 | final titleData; 8 | 9 | TopShopWidget({Key key, @required this.titleData, @required this.itemData}) 10 | : super(key: key); 11 | _TopShopState createState() => _TopShopState(); 12 | } 13 | 14 | class _TopShopState extends State { 15 | List _getProductList() { 16 | var skus = widget.itemData["skus"]; 17 | return List.generate(skus.length, (int i) { 18 | var subItem = skus[i]; 19 | Widget widget = Expanded( 20 | child: Container( 21 | // height: 250, 22 | padding: EdgeInsets.all(10), 23 | child: 24 | Column(verticalDirection: VerticalDirection.down, children: [ 25 | CachedNetworkImage( 26 | // placeholder: new CircularProgressIndicator(), 27 | // height: 80, 28 | fit: BoxFit.cover, 29 | imageUrl: 30 | EptUtils().cutImage(subItem["productImage"], 200, 200), 31 | ), 32 | Text("\$" + subItem["price"], 33 | style: new TextStyle(fontSize: 12, color: Colors.red), 34 | textAlign: TextAlign.center), 35 | ]))); 36 | return widget; 37 | }); 38 | } 39 | 40 | @override 41 | Widget build(BuildContext content) { 42 | // return Text('detail---${widget.id}'); 43 | int length = widget.itemData['skus'].length; 44 | return Container( 45 | // height: 300, 46 | margin: EdgeInsets.only(left: 10, right: 10), 47 | child: new AspectRatio( 48 | aspectRatio: 1.1 / 1, //横纵比 长宽比 3:2 49 | child: Column( 50 | verticalDirection: VerticalDirection.down, 51 | crossAxisAlignment: CrossAxisAlignment.center, 52 | // mainAxisAlignment: MainAxisAlignment.start, 53 | children: [ 54 | Container( 55 | height: 30, 56 | padding: EdgeInsets.all(10), 57 | child: Row( 58 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 59 | children: [ 60 | new Text( 61 | widget.titleData['title'].toString(), 62 | style: new TextStyle(fontWeight: FontWeight.w700), 63 | textAlign: TextAlign.left, 64 | ), 65 | ], 66 | ), 67 | ), 68 | new Expanded( 69 | child: Container( 70 | margin: EdgeInsets.only(top: 0), 71 | decoration: new BoxDecoration( 72 | // border: new Border.all(width: 2.0, color: Colors.red), 73 | image: new DecorationImage( 74 | fit: BoxFit.fill, 75 | image: 76 | new NetworkImage(widget.itemData["bannerImage"]), 77 | // centerSlice: 78 | // new Rect.fromLTRB(270.0, 180.0, 1360.0, 730.0), 79 | ), 80 | ), 81 | // constraints: BoxConstraints.expand(height: 350), 82 | // alignment: Alignment.bottomCenter, 83 | child: Column( 84 | //alignment: Alignment(0, 0.3), 85 | 86 | children: [ 87 | Container( 88 | margin: EdgeInsets.all(20), 89 | padding: EdgeInsets.all(10), 90 | alignment: Alignment.center, 91 | child: Column(children: [ 92 | Text(widget.itemData["title1"].toString(), 93 | style: new TextStyle( 94 | fontSize: 15, 95 | color: Colors.white, 96 | fontWeight: FontWeight.w700), 97 | textAlign: TextAlign.center), 98 | Text(widget.itemData["title12"].toString(), 99 | style: new TextStyle( 100 | fontSize: 13, color: Colors.white), 101 | textAlign: TextAlign.center) 102 | ]), 103 | height: 60, 104 | ), 105 | Expanded( 106 | child: Container( 107 | margin: EdgeInsets.all(10), 108 | decoration: new BoxDecoration( 109 | color: Colors.white, 110 | border: new Border.all( 111 | width: 2.0, color: Colors.white), 112 | 113 | // centerSlice: new Rect.fromLTRB(270.0, 180.0, 1360.0, 730.0), 114 | ), 115 | alignment: Alignment.center, 116 | child: Row( 117 | mainAxisAlignment: 118 | MainAxisAlignment.spaceBetween, 119 | children: _getProductList(), 120 | ))) 121 | ], 122 | )), 123 | ) 124 | ]), 125 | )); 126 | } 127 | } 128 | -------------------------------------------------------------------------------- /lib/index/details.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MoveieDetail extends StatefulWidget{ 4 | MoveieDetail({Key key,@required this.id,@required this.title}):super(key:key); 5 | final String id; 6 | final String title; 7 | _MoveieDetailState createState()=> _MoveieDetailState(); 8 | } 9 | 10 | class _MoveieDetailState extends State{ 11 | @override 12 | Widget build(BuildContext content){ 13 | // return Text('detail---${widget.id}'); 14 | return Scaffold( 15 | appBar: AppBar( 16 | title: Text(widget.title), 17 | centerTitle: true, 18 | ), 19 | body: Text('电影ID为:${widget.id}'), 20 | ); 21 | } 22 | } -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import './index/IndexList.dart'; 3 | import 'package:flutter/rendering.dart'; 4 | import 'search/SearchBar.dart'; 5 | import 'package:cached_network_image/cached_network_image.dart'; 6 | 7 | void main() { 8 | // debugPaintSizeEnabled = true; //打开视觉调试开关 9 | runApp(MaterialApp(title: "joybuy.com", home: Myhome())); 10 | } 11 | 12 | class Myhome extends StatefulWidget { 13 | _MyhomeState createState() => _MyhomeState(); 14 | } 15 | 16 | class _MyhomeState extends State { 17 | @override 18 | Widget build(BuildContext content) { 19 | return DefaultTabController( 20 | length: 1, 21 | child: Scaffold( 22 | appBar: AppBar( 23 | title: Image.network( 24 | "https://static.joybuy.com/ept_m/index/v20181225/logo.png", 25 | fit: BoxFit.fill, 26 | width: 80, 27 | height: 15, 28 | ), 29 | // centerTitle: true, 30 | backgroundColor: Colors.white, 31 | iconTheme: IconThemeData(color: Colors.grey), 32 | actions: [ 33 | IconButton( 34 | icon: Icon(Icons.search), 35 | onPressed: () { 36 | Navigator.push( 37 | context, 38 | MaterialPageRoute( 39 | builder: (context) => SearchList(), 40 | )); 41 | }, 42 | ), 43 | ], 44 | ), 45 | drawer: Drawer( 46 | child: ListView( 47 | padding: EdgeInsets.all(0), 48 | children: [ 49 | UserAccountsDrawerHeader( 50 | accountName: Text("****"), 51 | accountEmail: Text("***@**.com"), 52 | currentAccountPicture: CircleAvatar( 53 | backgroundImage: NetworkImage( 54 | 'https://static.joybuy.com/ept_m/res/en/launcher-144.png'), 55 | ), 56 | decoration: BoxDecoration( 57 | image: DecorationImage( 58 | fit: BoxFit.cover, 59 | image: NetworkImage( 60 | "http://t2.hddhhn.com/uploads/tu/201707/521/82.jpg"))), 61 | ), 62 | ListTile( 63 | title: Text('Home'), 64 | trailing: Icon(Icons.home), 65 | ), 66 | ListTile( 67 | title: Text('My Orders'), 68 | trailing: Icon(Icons.info), 69 | ), 70 | ListTile( 71 | title: Text('my Account'), 72 | trailing: Icon(Icons.input), 73 | ), 74 | Divider(), 75 | ListTile( 76 | title: Text('Categories'), 77 | trailing: Icon(Icons.category), 78 | ), 79 | Divider(), 80 | ListTile( 81 | title: Text('Ship To'), 82 | trailing: Container( 83 | width: 100, 84 | child: Row( 85 | children: [ 86 | Expanded( 87 | child: Text('United States', 88 | textAlign: TextAlign.right)), 89 | // Container( 90 | // child: Icon(Icons.arrow_right), 91 | // width: 10, 92 | // ) 93 | ], 94 | )), 95 | ), 96 | ListTile( 97 | title: Text('site'), 98 | trailing: Container( 99 | width: 90, 100 | child: Row( 101 | children: [ 102 | Expanded( 103 | child: Text('Global Site', 104 | textAlign: TextAlign.right)), 105 | Container( 106 | child: Icon(Icons.arrow_drop_down), 107 | width: 10, 108 | ) 109 | ], 110 | )), 111 | ), 112 | ListTile( 113 | title: Text('currency'), 114 | trailing: Container( 115 | width: 80, 116 | child: Row( 117 | mainAxisAlignment: MainAxisAlignment.start, 118 | children: [ 119 | Expanded( 120 | child: Text( 121 | 'USD', 122 | textAlign: TextAlign.right, 123 | )), 124 | Container( 125 | child: Icon(Icons.arrow_drop_down), 126 | width: 10, 127 | ) 128 | ], 129 | )), 130 | ), 131 | ListTile( 132 | title: Text('setting'), 133 | ), 134 | ], 135 | ), 136 | ), 137 | body: TabBarView( 138 | children: [ 139 | IndexList(mt: 'in_theaters'), 140 | ], 141 | ), 142 | ), 143 | ); 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /lib/model/repo.dart: -------------------------------------------------------------------------------- 1 | class Repo { 2 | final String htmlUrl; 3 | final int watchersCount; 4 | final String language; 5 | final String description; 6 | final String name; 7 | final String owner; 8 | 9 | Repo(this.htmlUrl, this.watchersCount, this.language, this.description, 10 | this.name, this.owner); 11 | 12 | static List mapJSONStringToList(List jsonList) { 13 | return jsonList 14 | .map((r) => Repo(r['url'], r['watchers_count'], r['language'], 15 | r['description'], r['name'], r['owner']['login'])) 16 | .toList(); 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /lib/search/Item.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:joybuy.com/model/repo.dart'; 3 | import 'package:joybuy.com/tools/Url.dart'; 4 | 5 | class GithubItem extends StatelessWidget { 6 | final Repo repo; 7 | GithubItem(this.repo); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Card( 12 | child: InkWell( 13 | onTap: () { 14 | Url.launchURL(repo.htmlUrl); 15 | }, 16 | highlightColor: Colors.lightBlueAccent, 17 | splashColor: Colors.red, 18 | child: Container( 19 | padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 8.0), 20 | child: Column( 21 | crossAxisAlignment: CrossAxisAlignment.start, 22 | children: [ 23 | Text((repo.name != null) ? repo.name : '-', 24 | style: Theme.of(context).textTheme.subhead), 25 | Padding( 26 | padding: EdgeInsets.only(top: 4.0), 27 | child: Text( 28 | repo.description != null 29 | ? repo.description 30 | : 'No desription', 31 | style: Theme.of(context).textTheme.body1), 32 | ), 33 | Padding( 34 | padding: EdgeInsets.only(top: 8.0), 35 | child: Row( 36 | children: [ 37 | Expanded( 38 | child: Text((repo.owner != null) ? repo.owner : '', 39 | textAlign: TextAlign.start, 40 | style: Theme.of(context).textTheme.caption)), 41 | Expanded( 42 | child: Row( 43 | mainAxisAlignment: MainAxisAlignment.center, 44 | crossAxisAlignment: CrossAxisAlignment.center, 45 | children: [ 46 | Icon( 47 | Icons.star, 48 | color: Colors.deepOrange, 49 | ), 50 | Padding( 51 | padding: EdgeInsets.only(top: 4.0), 52 | child: Text( 53 | (repo.watchersCount != null) 54 | ? '${repo.watchersCount} ' 55 | : '0 ', 56 | textAlign: TextAlign.center, 57 | style: Theme.of(context).textTheme.caption), 58 | ), 59 | ], 60 | ), 61 | ), 62 | Expanded( 63 | child: Text( 64 | (repo.language != null) ? repo.language : '', 65 | textAlign: TextAlign.end, 66 | style: Theme.of(context).textTheme.caption)), 67 | ], 68 | ), 69 | ), 70 | ]), 71 | )), 72 | ); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /lib/search/SearchBar.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:joybuy.com/api/searchApi.dart'; 3 | import 'package:joybuy.com/model/repo.dart'; 4 | import 'Item.dart'; 5 | import 'dart:async'; 6 | 7 | class SearchList extends StatefulWidget { 8 | SearchList({Key key}) : super(key: key); 9 | 10 | @override 11 | State createState() => _SearchState(); 12 | } 13 | 14 | class _SearchState extends State { 15 | final key = GlobalKey(); 16 | final TextEditingController _searchQuery = TextEditingController(); 17 | bool _isSearching = false; 18 | String _error; 19 | List _results = List(); 20 | 21 | Timer debounceTimer; 22 | 23 | _SearchState() { 24 | _searchQuery.addListener(() { 25 | if (debounceTimer != null) { 26 | debounceTimer.cancel(); 27 | } 28 | debounceTimer = Timer(Duration(milliseconds: 500), () { 29 | if (this.mounted) { 30 | performSearch(_searchQuery.text); 31 | } 32 | }); 33 | }); 34 | } 35 | 36 | void performSearch(String query) async { 37 | if (query.isEmpty) { 38 | setState(() { 39 | _isSearching = false; 40 | _error = null; 41 | _results = List(); 42 | }); 43 | return; 44 | } 45 | 46 | setState(() { 47 | _isSearching = true; 48 | _error = null; 49 | _results = List(); 50 | }); 51 | 52 | final repos = await Api.getRepositoriesWithSearchQuery(query); 53 | if (this._searchQuery.text == query && this.mounted) { 54 | setState(() { 55 | _isSearching = false; 56 | if (repos != null) { 57 | _results = repos; 58 | } else { 59 | _error = 'Error searching repos'; 60 | } 61 | }); 62 | } 63 | } 64 | 65 | @override 66 | Widget build(BuildContext context) { 67 | return Scaffold( 68 | key: key, 69 | appBar: AppBar( 70 | centerTitle: true, 71 | title: TextField( 72 | autofocus: true, 73 | controller: _searchQuery, 74 | style: TextStyle(color: Colors.white), 75 | decoration: InputDecoration( 76 | border: InputBorder.none, 77 | prefixIcon: Padding( 78 | padding: EdgeInsetsDirectional.only(end: 16.0), 79 | child: Icon( 80 | Icons.search, 81 | color: Colors.white, 82 | )), 83 | hintText: "Search repositories...", 84 | hintStyle: TextStyle(color: Colors.white)), 85 | ), 86 | ), 87 | body: buildBody(context)); 88 | } 89 | 90 | Widget buildBody(BuildContext context) { 91 | if (_isSearching) { 92 | return CenterTitle('Searching Github...'); 93 | } else if (_error != null) { 94 | return CenterTitle(_error); 95 | } else if (_searchQuery.text.isEmpty) { 96 | return CenterTitle('Begin Search by typing on search bar'); 97 | } else { 98 | return ListView.builder( 99 | padding: EdgeInsets.symmetric(vertical: 8.0), 100 | itemCount: _results.length, 101 | itemBuilder: (BuildContext context, int index) { 102 | return GithubItem(_results[index]); 103 | }); 104 | } 105 | } 106 | } 107 | 108 | class CenterTitle extends StatelessWidget { 109 | final String title; 110 | 111 | CenterTitle(this.title); 112 | 113 | @override 114 | Widget build(BuildContext context) { 115 | return Container( 116 | padding: EdgeInsets.symmetric(horizontal: 16.0, vertical: 16.0), 117 | alignment: Alignment.center, 118 | child: Text( 119 | title, 120 | style: Theme.of(context).textTheme.headline, 121 | textAlign: TextAlign.center, 122 | )); 123 | } 124 | } 125 | -------------------------------------------------------------------------------- /lib/tools/NumberPart.Dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NumberPart extends CustomClipper { 4 | final double radius; 5 | 6 | NumberPart({this.radius}); 7 | Path getClip(Size size) { 8 | final path = Path() 9 | ..lineTo(0.0, 0.0) 10 | ..lineTo(0.0, size.height) 11 | ..lineTo(size.width / 1.3 - 5, size.height / 1.3) 12 | ..lineTo(size.width, size.height) 13 | ..lineTo(size.width, 0.0) 14 | ..close(); 15 | return path; 16 | } 17 | 18 | @override 19 | bool shouldReclip(NumberPart numberPart) { 20 | return this.radius != numberPart.radius; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/tools/Url.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:url_launcher/url_launcher.dart'; 3 | import 'package:joybuy.com/config/Constants.dart'; 4 | 5 | class Url { 6 | static launchURL(url) async { 7 | if (await canLaunch(url)) { 8 | await launch(url); 9 | } else { 10 | throw 'Could not launch $url'; 11 | } 12 | } 13 | 14 | static launchDetailURL(id) async { 15 | var url = DomainUrl.joybuy + id + ".html"; 16 | if (await canLaunch(url)) { 17 | await launch(url); 18 | } else { 19 | throw 'Could not launch $url'; 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/tools/Utils.dart: -------------------------------------------------------------------------------- 1 | class EptUtils { 2 | String cutImage(String imgUrl, int width, int height) { 3 | if (imgUrl != null && imgUrl.length > 0) { 4 | String rbImgUrl; 5 | if (imgUrl.indexOf(".gif") < 0) { 6 | rbImgUrl = imgUrl.replaceFirst("/jfs/", 7 | "/s" + width.toString() + "x" + height.toString() + "_jfs/"); 8 | if (imgUrl.indexOf("jfs/") < 0) { 9 | // return "https://static.joybuy.com/ept_m/index/v20181225/logo.png"; 10 | // rbImgUrl = imgUrl.replaceFirst("/cms/", 11 | // "/cms/s" + width.toString() + "x" + height.toString() + "_jfs/"); 12 | } 13 | } else { 14 | rbImgUrl = imgUrl; 15 | } 16 | 17 | print(rbImgUrl); 18 | return rbImgUrl.trim(); 19 | } 20 | return ""; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/widget/LayoutWidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | typedef HeaderWidgetBuild = Widget Function(BuildContext context, int position); 4 | 5 | typedef ItemWidgetBuild = Widget Function(BuildContext context, int position); 6 | typedef BottomWidgetBuild = Widget Function(BuildContext context, int position); 7 | 8 | class LayoutWidget extends StatefulWidget { 9 | int headercount = 0; 10 | int itemCount = 0; 11 | int bottomCount = 0; 12 | ItemWidgetBuild itemWidgetCreator; 13 | HeaderWidgetBuild headerCreator; 14 | BottomWidgetBuild bottomCreator; 15 | 16 | LayoutWidget(this.itemCount, 17 | {Key key, 18 | this.headercount, 19 | this.bottomCount, 20 | this.itemWidgetCreator, 21 | this.headerCreator, 22 | this.bottomCreator}) 23 | : super(key: key); 24 | 25 | @override 26 | LayoutState createState() { 27 | if (this.headerCreator != null) { 28 | headercount = 1; 29 | } 30 | if (this.bottomCreator != null) { 31 | bottomCount = 1; 32 | } 33 | return new LayoutState(); 34 | } 35 | } 36 | 37 | class LayoutState extends State { 38 | int headerCount = 0; 39 | int itemCount = 0; 40 | int bottomCount = 0; 41 | HeaderWidgetBuild headerCreator; 42 | BottomWidgetBuild bottomWidgetBuild; 43 | 44 | @override 45 | Widget build(BuildContext context) { 46 | _initCount(); 47 | int totalCount = _getListCount(); 48 | // 当数量比较少的情况采用非回收的方式 49 | if (totalCount < 10) { 50 | List list = new List.generate(totalCount, (int i) { 51 | return buildItemWidget(context, i); 52 | }); 53 | return Container( 54 | child: new ListView( 55 | children: list, 56 | shrinkWrap: true, 57 | physics: NeverScrollableScrollPhysics(), 58 | )); 59 | } else { 60 | return Container( 61 | child: new ListView.builder( 62 | shrinkWrap: true, 63 | physics: NeverScrollableScrollPhysics(), 64 | itemBuilder: (BuildContext context, int position) { 65 | return buildItemWidget(context, position); 66 | }, 67 | itemCount: _getListCount()), 68 | ); 69 | } 70 | } 71 | 72 | int _getListCount() { 73 | return headerCount + itemCount + bottomCount; 74 | } 75 | 76 | void _initCount() { 77 | headerCount = widget.headercount == null ? headerCount : widget.headercount; 78 | itemCount = widget.itemCount == null ? itemCount : widget.itemCount; 79 | bottomCount = widget.bottomCount == null ? bottomCount : widget.bottomCount; 80 | if (widget.bottomCreator != null) { 81 | bottomWidgetBuild = widget.bottomCreator; 82 | } 83 | if (widget.headerCreator != null) { 84 | headerCreator = widget.headerCreator; 85 | } 86 | } 87 | 88 | Widget _headerItemWidget(BuildContext context, int index) { 89 | if (widget.headerCreator != null) { 90 | return widget.headerCreator(context, index); 91 | } else { 92 | // return headerCreator(context, index); 93 | } 94 | } 95 | 96 | Widget _bottomItemWidget(BuildContext context, int index) { 97 | if (widget.bottomCreator != null) { 98 | return widget.bottomCreator(context, index); 99 | } else { 100 | // return bottomWidgetBuild(context, index); 101 | } 102 | } 103 | 104 | Widget buildItemWidget(BuildContext context, int index) { 105 | if (index < headerCount) { 106 | return _headerItemWidget(context, index); 107 | } else if (index >= (headerCount + itemCount)) { 108 | int pos = index - headerCount - itemCount; 109 | return _bottomItemWidget(context, pos); 110 | } else { 111 | int pos = index - headerCount; 112 | return _itemBuildWidget(context, pos); 113 | } 114 | } 115 | 116 | Widget _itemBuildWidget(BuildContext context, int index) { 117 | if (widget.itemWidgetCreator != null) { 118 | return widget.itemWidgetCreator(context, index); 119 | } else { 120 | return new GestureDetector( 121 | child: new Padding( 122 | padding: new EdgeInsets.all(10.0), child: new Text("Row $index")), 123 | onTap: () { 124 | print('click $index --------------------'); 125 | }, 126 | ); 127 | } 128 | } 129 | } 130 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: joybuy.com 2 | description: A new Flutter project. 3 | 4 | # The following defines the version and build number for your application. 5 | # A version number is three numbers separated by dots, like 1.2.43 6 | # followed by an optional build number separated by a +. 7 | # Both the version and the builder number may be overridden in flutter 8 | # build by specifying --build-name and --build-number, respectively. 9 | # Read more about versioning at semver.org. 10 | version: 1.0.0+1 11 | 12 | environment: 13 | sdk: ">=2.0.0-dev.68.0 <3.0.0" 14 | 15 | dependencies: 16 | flutter: 17 | sdk: flutter 18 | 19 | # The following adds the Cupertino Icons font to your application. 20 | # Use with the CupertinoIcons class for iOS style icons. 21 | cupertino_icons: ^0.1.2 22 | dio: ^1.0.9 23 | flutter_swiper: ^1.1.4 24 | date_format: "^1.0.4" 25 | url_launcher: "^4.0.3" 26 | cached_network_image: "^0.5.1" 27 | 28 | dev_dependencies: 29 | flutter_test: 30 | sdk: flutter 31 | # For information on the generic Dart part of this file, see the 32 | # following page: https://www.dartlang.org/tools/pub/pubspec 33 | 34 | # The following section is specific to Flutter. 35 | flutter: 36 | # The following line ensures that the Material Icons font is 37 | # included with your application, so that you can use the icons in 38 | # the material Icons class. 39 | uses-material-design: true 40 | # To add assets to your application, add an assets section, like this: 41 | # assets: 42 | # - images/a_dot_burr.jpeg 43 | # - images/a_dot_ham.jpeg 44 | # An image asset can refer to one or more resolution-specific "variants", see 45 | # https://flutter.io/assets-and-images/#resolution-aware. 46 | # For details regarding adding assets from package dependencies, see 47 | # https://flutter.io/assets-and-images/#from-packages 48 | # To add custom fonts to your application, add a fonts section here, 49 | # in this "flutter" section. Each entry in this list should have a 50 | # "family" key with the font family name, and a "fonts" key with a 51 | # list giving the asset and other descriptors for the font. For 52 | # example: 53 | # fonts: 54 | # - family: Schyler 55 | # fonts: 56 | # - asset: fonts/Schyler-Regular.ttf 57 | # - asset: fonts/Schyler-Italic.ttf 58 | # style: italic 59 | # - family: Trajan Pro 60 | # fonts: 61 | # - asset: fonts/TrajanPro.ttf 62 | # - asset: fonts/TrajanPro_Bold.ttf 63 | # weight: 700 64 | # 65 | # For details regarding fonts from package dependencies, 66 | # see https://flutter.io/custom-fonts/#from-packages 67 | -------------------------------------------------------------------------------- /res/values/strings_en.arb: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/wchaowu/flutter_sample/c2f497a13b02cd9bdb4a69a4078486f46723c370/res/values/strings_en.arb -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_test/flutter_test.dart'; 3 | 4 | void main() { 5 | testWidgets('my first widget test', (WidgetTester tester) async { 6 | // You can use keys to locate the widget you need to test 7 | var sliderKey = new UniqueKey(); 8 | var value = 0.0; 9 | 10 | // Tells the tester to build a UI based on the widget tree passed to it 11 | await tester.pumpWidget( 12 | new StatefulBuilder( 13 | builder: (BuildContext context, StateSetter setState) { 14 | return new MaterialApp( 15 | home: new Material( 16 | child: new Center( 17 | child: new Slider( 18 | key: sliderKey, 19 | value: value, 20 | onChanged: (double newValue) { 21 | setState(() { 22 | value = newValue; 23 | }); 24 | }, 25 | ), 26 | ), 27 | ), 28 | ); 29 | }, 30 | ), 31 | ); 32 | expect(value, equals(0.0)); 33 | 34 | // Taps on the widget found by key 35 | await tester.tap(find.byKey(sliderKey)); 36 | 37 | // Verifies that the widget updated the value correctly 38 | expect(value, equals(0.5)); 39 | }); 40 | } 41 | --------------------------------------------------------------------------------