├── .gitignore ├── .metadata ├── .vscode └── launch.json ├── LICENSE ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── day34 │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── 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-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── images │ ├── background.png │ └── search.png ├── products.json └── screenshots │ ├── cart-page.png │ ├── filter-modal.png │ ├── home-page.png │ ├── payment-page.png │ └── product-view.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings └── Runner │ ├── AppDelegate.swift │ ├── 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 │ └── Runner-Bridging-Header.h ├── lib ├── animation │ └── FadeAnimation.dart ├── main.dart ├── models │ └── product.dart └── pages │ ├── cart.dart │ ├── explore.dart │ ├── notification.dart │ ├── payment.dart │ ├── payment_success.dart │ ├── product_view.dart │ ├── profile.dart │ └── search.dart ├── pubspec.lock ├── pubspec.yaml ├── test └── widget_test.dart └── web ├── favicon.png ├── icons ├── Icon-192.png └── Icon-512.png ├── index.html └── manifest.json /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Android Studio will place build artifacts here 44 | /android/app/debug 45 | /android/app/profile 46 | /android/app/release 47 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled and should not be manually edited. 5 | 6 | version: 7 | revision: d79295af24c3ed621c33713ecda14ad196fd9c31 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "day34", 9 | "request": "launch", 10 | "type": "dart", 11 | "args": [ 12 | "--no-sound-null-safety", 13 | ] 14 | }, 15 | { 16 | "name": "day34 (profile mode)", 17 | "request": "launch", 18 | "type": "dart", 19 | "flutterMode": "profile", 20 | "args": [ 21 | "--no-sound-null-safety", 22 | ] 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## Flutter e-commerce Application Example - Day 34 2 | 3 | ```dart 4 | class Afgprogrammer extends Flutter100DaysOfCode { 5 | video() { 6 | return { 7 | "title": "Flutter e-commerce Application Example", 8 | "description": "Let’s make an e-commerce application.", 9 | "day": 34, 10 | } 11 | } 12 | } 13 | ``` 14 | 15 | Assets 16 | * [Unsplash](https://unsplash.com) 17 | * [icon8](https://icons8.com) 18 | 19 | ## Previous Designs 20 | [Checkout my Youtube channel](https://youtube.com/afgprogrammer) 21 | 22 | 23 | ## Development Setup 24 | Clone the repository and run the following commands: 25 | ``` 26 | flutter pub get 27 | flutter run 28 | ``` 29 | 30 | ## Screenshot 31 | ### Home Page 32 | 33 | 34 | ### Filter Modal 35 | 36 | 37 | ### Product View 38 | 39 | 40 | ### Cart Page 41 | 42 | 43 | ### Payment Page 44 | 45 | 46 | ## Links 47 | 48 | * [Website](https://afgprogrammer.com) 49 | * [Youtube channel](https://youtube.com/afgprogrammer) 50 | * [Twitter](https://twitter.com/afgprogrammer) 51 | * [Instagram](https://instagram.com/afgprogrammer) 52 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /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 plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | compileSdkVersion 30 30 | 31 | sourceSets { 32 | main.java.srcDirs += 'src/main/kotlin' 33 | } 34 | 35 | defaultConfig { 36 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 37 | applicationId "com.example.day34" 38 | minSdkVersion 16 39 | targetSdkVersion 30 40 | versionCode flutterVersionCode.toInteger() 41 | versionName flutterVersionName 42 | } 43 | 44 | buildTypes { 45 | release { 46 | // TODO: Add your own signing config for the release build. 47 | // Signing with the debug keys for now, so `flutter run --release` works. 48 | signingConfig signingConfigs.debug 49 | } 50 | } 51 | } 52 | 53 | flutter { 54 | source '../..' 55 | } 56 | 57 | dependencies { 58 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 59 | } 60 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 13 | 17 | 21 | 26 | 30 | 31 | 32 | 33 | 34 | 35 | 37 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/day34/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.day34 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:4.1.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | jcenter() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 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.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /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-6.7-all.zip 7 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /assets/images/background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/assets/images/background.png -------------------------------------------------------------------------------- /assets/images/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/assets/images/search.png -------------------------------------------------------------------------------- /assets/products.json: -------------------------------------------------------------------------------- 1 | { 2 | "products": [ 3 | { 4 | "name": "Winter Coat", 5 | "imageURL": "https://images.unsplash.com/photo-1539533018447-63fcce2678e3?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MXx8Y29hdHxlbnwwfHwwfHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60", 6 | "brand": "OSIRUS", 7 | "price": 100 8 | }, 9 | { 10 | "name": "Cotton Sweatshirt", 11 | "imageURL": "https://images.unsplash.com/photo-1556172732-bcded74ff3a2?ixid=MnwxMjA3fDB8MHxzZWFyY2h8NTd8fHN3ZWF0c2hpcnR8ZW58MHx8MHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60", 12 | "brand": "OSIRUS", 13 | "price": 49 14 | }, 15 | { 16 | "name": "Cotton Pant", 17 | "imageURL": "https://images.unsplash.com/photo-1506629082955-511b1aa562c8?ixid=MnwxMjA3fDB8MHxzZWFyY2h8MTl8fHBhbnR8ZW58MHx8MHx8&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60", 18 | "brand": "OSIRUS", 19 | "price": 58 20 | }, 21 | { 22 | "name": "Green Sweater", 23 | "imageURL": "https://images.unsplash.com/photo-1536992266094-82847e1fd431?ixid=MnwxMjA3fDB8MHxzZWFyY2h8NHx8c3dlYXRlcnxlbnwwfHwwfHw%3D&ixlib=rb-1.2.1&auto=format&fit=crop&w=500&q=60", 24 | "brand": "OSIRUS", 25 | "price": 69 26 | } 27 | ] 28 | } -------------------------------------------------------------------------------- /assets/screenshots/cart-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/assets/screenshots/cart-page.png -------------------------------------------------------------------------------- /assets/screenshots/filter-modal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/assets/screenshots/filter-modal.png -------------------------------------------------------------------------------- /assets/screenshots/home-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/assets/screenshots/home-page.png -------------------------------------------------------------------------------- /assets/screenshots/payment-page.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/assets/screenshots/payment-page.png -------------------------------------------------------------------------------- /assets/screenshots/product-view.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/assets/screenshots/product-view.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | *.mode1v3 2 | *.mode2v3 3 | *.moved-aside 4 | *.pbxuser 5 | *.perspectivev3 6 | **/*sync/ 7 | .sconsign.dblite 8 | .tags* 9 | **/.vagrant/ 10 | **/DerivedData/ 11 | Icon? 12 | **/Pods/ 13 | **/.symlinks/ 14 | profile 15 | xcuserdata 16 | **/.generated/ 17 | Flutter/App.framework 18 | Flutter/Flutter.framework 19 | Flutter/Flutter.podspec 20 | Flutter/Generated.xcconfig 21 | Flutter/ephemeral/ 22 | Flutter/app.flx 23 | Flutter/app.zip 24 | Flutter/flutter_assets/ 25 | Flutter/flutter_export_environment.sh 26 | ServiceDefinitions.json 27 | Runner/GeneratedPluginRegistrant.* 28 | 29 | # Exceptions to above rules. 30 | !default.mode1v3 31 | !default.mode2v3 32 | !default.pbxuser 33 | !default.perspectivev3 34 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 8.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 97 | ); 98 | path = Runner; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | 97C146ED1CF9000F007C117D /* Runner */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 107 | buildPhases = ( 108 | 9740EEB61CF901F6004384FC /* Run Script */, 109 | 97C146EA1CF9000F007C117D /* Sources */, 110 | 97C146EB1CF9000F007C117D /* Frameworks */, 111 | 97C146EC1CF9000F007C117D /* Resources */, 112 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 114 | ); 115 | buildRules = ( 116 | ); 117 | dependencies = ( 118 | ); 119 | name = Runner; 120 | productName = Runner; 121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 122 | productType = "com.apple.product-type.application"; 123 | }; 124 | /* End PBXNativeTarget section */ 125 | 126 | /* Begin PBXProject section */ 127 | 97C146E61CF9000F007C117D /* Project object */ = { 128 | isa = PBXProject; 129 | attributes = { 130 | LastUpgradeCheck = 1020; 131 | ORGANIZATIONNAME = ""; 132 | TargetAttributes = { 133 | 97C146ED1CF9000F007C117D = { 134 | CreatedOnToolsVersion = 7.3.1; 135 | LastSwiftMigration = 1100; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 140 | compatibilityVersion = "Xcode 9.3"; 141 | developmentRegion = en; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 97C146E51CF9000F007C117D; 148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 97C146ED1CF9000F007C117D /* Runner */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 97C146EC1CF9000F007C117D /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXShellScriptBuildPhase section */ 172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 173 | isa = PBXShellScriptBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | ); 177 | inputPaths = ( 178 | ); 179 | name = "Thin Binary"; 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 185 | }; 186 | 9740EEB61CF901F6004384FC /* Run Script */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "Run Script"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 199 | }; 200 | /* End PBXShellScriptBuildPhase section */ 201 | 202 | /* Begin PBXSourcesBuildPhase section */ 203 | 97C146EA1CF9000F007C117D /* Sources */ = { 204 | isa = PBXSourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 97C146FB1CF9000F007C117D /* Base */, 219 | ); 220 | name = Main.storyboard; 221 | sourceTree = ""; 222 | }; 223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C147001CF9000F007C117D /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 244 | CLANG_WARN_BOOL_CONVERSION = YES; 245 | CLANG_WARN_COMMA = YES; 246 | CLANG_WARN_CONSTANT_CONVERSION = YES; 247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 249 | CLANG_WARN_EMPTY_BODY = YES; 250 | CLANG_WARN_ENUM_CONVERSION = YES; 251 | CLANG_WARN_INFINITE_RECURSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = iphoneos; 278 | SUPPORTED_PLATFORMS = iphoneos; 279 | TARGETED_DEVICE_FAMILY = "1,2"; 280 | VALIDATE_PRODUCT = YES; 281 | }; 282 | name = Profile; 283 | }; 284 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 285 | isa = XCBuildConfiguration; 286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | CLANG_ENABLE_MODULES = YES; 290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 291 | ENABLE_BITCODE = NO; 292 | INFOPLIST_FILE = Runner/Info.plist; 293 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 294 | PRODUCT_BUNDLE_IDENTIFIER = com.example.day34; 295 | PRODUCT_NAME = "$(TARGET_NAME)"; 296 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 297 | SWIFT_VERSION = 5.0; 298 | VERSIONING_SYSTEM = "apple-generic"; 299 | }; 300 | name = Profile; 301 | }; 302 | 97C147031CF9000F007C117D /* Debug */ = { 303 | isa = XCBuildConfiguration; 304 | buildSettings = { 305 | ALWAYS_SEARCH_USER_PATHS = NO; 306 | CLANG_ANALYZER_NONNULL = YES; 307 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 308 | CLANG_CXX_LIBRARY = "libc++"; 309 | CLANG_ENABLE_MODULES = YES; 310 | CLANG_ENABLE_OBJC_ARC = YES; 311 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 312 | CLANG_WARN_BOOL_CONVERSION = YES; 313 | CLANG_WARN_COMMA = YES; 314 | CLANG_WARN_CONSTANT_CONVERSION = YES; 315 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 316 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 317 | CLANG_WARN_EMPTY_BODY = YES; 318 | CLANG_WARN_ENUM_CONVERSION = YES; 319 | CLANG_WARN_INFINITE_RECURSION = YES; 320 | CLANG_WARN_INT_CONVERSION = YES; 321 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 322 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 323 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 324 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 325 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 326 | CLANG_WARN_STRICT_PROTOTYPES = YES; 327 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 328 | CLANG_WARN_UNREACHABLE_CODE = YES; 329 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 330 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 331 | COPY_PHASE_STRIP = NO; 332 | DEBUG_INFORMATION_FORMAT = dwarf; 333 | ENABLE_STRICT_OBJC_MSGSEND = YES; 334 | ENABLE_TESTABILITY = YES; 335 | GCC_C_LANGUAGE_STANDARD = gnu99; 336 | GCC_DYNAMIC_NO_PIC = NO; 337 | GCC_NO_COMMON_BLOCKS = YES; 338 | GCC_OPTIMIZATION_LEVEL = 0; 339 | GCC_PREPROCESSOR_DEFINITIONS = ( 340 | "DEBUG=1", 341 | "$(inherited)", 342 | ); 343 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 344 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 345 | GCC_WARN_UNDECLARED_SELECTOR = YES; 346 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 347 | GCC_WARN_UNUSED_FUNCTION = YES; 348 | GCC_WARN_UNUSED_VARIABLE = YES; 349 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 350 | MTL_ENABLE_DEBUG_INFO = YES; 351 | ONLY_ACTIVE_ARCH = YES; 352 | SDKROOT = iphoneos; 353 | TARGETED_DEVICE_FAMILY = "1,2"; 354 | }; 355 | name = Debug; 356 | }; 357 | 97C147041CF9000F007C117D /* Release */ = { 358 | isa = XCBuildConfiguration; 359 | buildSettings = { 360 | ALWAYS_SEARCH_USER_PATHS = NO; 361 | CLANG_ANALYZER_NONNULL = YES; 362 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 363 | CLANG_CXX_LIBRARY = "libc++"; 364 | CLANG_ENABLE_MODULES = YES; 365 | CLANG_ENABLE_OBJC_ARC = YES; 366 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 367 | CLANG_WARN_BOOL_CONVERSION = YES; 368 | CLANG_WARN_COMMA = YES; 369 | CLANG_WARN_CONSTANT_CONVERSION = YES; 370 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 371 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 372 | CLANG_WARN_EMPTY_BODY = YES; 373 | CLANG_WARN_ENUM_CONVERSION = YES; 374 | CLANG_WARN_INFINITE_RECURSION = YES; 375 | CLANG_WARN_INT_CONVERSION = YES; 376 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 377 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 378 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 379 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 380 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 381 | CLANG_WARN_STRICT_PROTOTYPES = YES; 382 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 383 | CLANG_WARN_UNREACHABLE_CODE = YES; 384 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 385 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 386 | COPY_PHASE_STRIP = NO; 387 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 388 | ENABLE_NS_ASSERTIONS = NO; 389 | ENABLE_STRICT_OBJC_MSGSEND = YES; 390 | GCC_C_LANGUAGE_STANDARD = gnu99; 391 | GCC_NO_COMMON_BLOCKS = YES; 392 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 393 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 394 | GCC_WARN_UNDECLARED_SELECTOR = YES; 395 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 396 | GCC_WARN_UNUSED_FUNCTION = YES; 397 | GCC_WARN_UNUSED_VARIABLE = YES; 398 | IPHONEOS_DEPLOYMENT_TARGET = 9.0; 399 | MTL_ENABLE_DEBUG_INFO = NO; 400 | SDKROOT = iphoneos; 401 | SUPPORTED_PLATFORMS = iphoneos; 402 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 403 | TARGETED_DEVICE_FAMILY = "1,2"; 404 | VALIDATE_PRODUCT = YES; 405 | }; 406 | name = Release; 407 | }; 408 | 97C147061CF9000F007C117D /* Debug */ = { 409 | isa = XCBuildConfiguration; 410 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 411 | buildSettings = { 412 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 413 | CLANG_ENABLE_MODULES = YES; 414 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 415 | ENABLE_BITCODE = NO; 416 | INFOPLIST_FILE = Runner/Info.plist; 417 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 418 | PRODUCT_BUNDLE_IDENTIFIER = com.example.day34; 419 | PRODUCT_NAME = "$(TARGET_NAME)"; 420 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 421 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 422 | SWIFT_VERSION = 5.0; 423 | VERSIONING_SYSTEM = "apple-generic"; 424 | }; 425 | name = Debug; 426 | }; 427 | 97C147071CF9000F007C117D /* Release */ = { 428 | isa = XCBuildConfiguration; 429 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 430 | buildSettings = { 431 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 432 | CLANG_ENABLE_MODULES = YES; 433 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 434 | ENABLE_BITCODE = NO; 435 | INFOPLIST_FILE = Runner/Info.plist; 436 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 437 | PRODUCT_BUNDLE_IDENTIFIER = com.example.day34; 438 | PRODUCT_NAME = "$(TARGET_NAME)"; 439 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 440 | SWIFT_VERSION = 5.0; 441 | VERSIONING_SYSTEM = "apple-generic"; 442 | }; 443 | name = Release; 444 | }; 445 | /* End XCBuildConfiguration section */ 446 | 447 | /* Begin XCConfigurationList section */ 448 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 449 | isa = XCConfigurationList; 450 | buildConfigurations = ( 451 | 97C147031CF9000F007C117D /* Debug */, 452 | 97C147041CF9000F007C117D /* Release */, 453 | 249021D3217E4FDB00AE95B9 /* Profile */, 454 | ); 455 | defaultConfigurationIsVisible = 0; 456 | defaultConfigurationName = Release; 457 | }; 458 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 459 | isa = XCConfigurationList; 460 | buildConfigurations = ( 461 | 97C147061CF9000F007C117D /* Debug */, 462 | 97C147071CF9000F007C117D /* Release */, 463 | 249021D4217E4FDB00AE95B9 /* Profile */, 464 | ); 465 | defaultConfigurationIsVisible = 0; 466 | defaultConfigurationName = Release; 467 | }; 468 | /* End XCConfigurationList section */ 469 | }; 470 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 471 | } 472 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 32 | 33 | 39 | 40 | 41 | 42 | 43 | 44 | 54 | 56 | 62 | 63 | 64 | 65 | 66 | 67 | 73 | 75 | 81 | 82 | 83 | 84 | 86 | 87 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @UIApplicationMain 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/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/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | day34 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/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /lib/animation/FadeAnimation.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:simple_animations/simple_animations.dart'; 3 | 4 | class FadeAnimation extends StatelessWidget { 5 | final double delay; 6 | final Widget child; 7 | 8 | FadeAnimation(this.delay, this.child); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | final tween = MultiTrackTween([ 13 | Track("opacity").add(Duration(milliseconds: 500), Tween(begin: 0.0, end: 1.0)), 14 | Track("translateY").add( 15 | Duration(milliseconds: 500), Tween(begin: -30.0, end: 0.0), 16 | curve: Curves.easeOut) 17 | ]); 18 | 19 | return ControlledAnimation( 20 | delay: Duration(milliseconds: (500 * delay).round()), 21 | duration: tween.duration, 22 | tween: tween, 23 | child: child, 24 | builderWithChild: (context, child, animation) => Opacity( 25 | opacity: (animation as Map)["opacity"], 26 | child: Transform.translate( 27 | offset: Offset(0, (animation as Map)["translateY"]), 28 | child: child 29 | ), 30 | ), 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:day34/pages/cart.dart'; 2 | import 'package:day34/pages/explore.dart'; 3 | import 'package:day34/pages/notification.dart'; 4 | import 'package:day34/pages/profile.dart'; 5 | import 'package:day34/pages/search.dart'; 6 | import 'package:flashy_tab_bar/flashy_tab_bar.dart'; 7 | import 'package:flutter/material.dart'; 8 | 9 | void main() { 10 | runApp(MaterialApp( 11 | home: HomePage(), 12 | debugShowCheckedModeBanner: false, 13 | )); 14 | } 15 | 16 | class HomePage extends StatefulWidget { 17 | const HomePage({ Key? key }) : super(key: key); 18 | 19 | @override 20 | _HomePageState createState() => _HomePageState(); 21 | } 22 | 23 | class _HomePageState extends State { 24 | late PageController _pageController; 25 | int _selectedPage = 0; 26 | 27 | List pages = [ 28 | ExplorePage(), 29 | SearchPage(), 30 | CartPage(), 31 | ProfilePage() 32 | ]; 33 | 34 | void _onItemTapped(int index) { 35 | setState(() { 36 | _selectedPage = index; 37 | _pageController.jumpToPage(index); 38 | }); 39 | } 40 | 41 | @override 42 | void initState() { 43 | // TODO: implement initState 44 | _pageController = PageController(initialPage: 0); 45 | 46 | super.initState(); 47 | } 48 | 49 | @override 50 | Widget build(BuildContext context) { 51 | return Scaffold( 52 | body: PageView( 53 | onPageChanged: (index) => setState(() { _selectedPage = index; }), 54 | controller: _pageController, 55 | children: [ 56 | ...pages 57 | ], 58 | ), 59 | bottomNavigationBar: FlashyTabBar( 60 | selectedIndex: _selectedPage, 61 | showElevation: false, 62 | onItemSelected: (index) => _onItemTapped(index), 63 | items: [ 64 | FlashyTabBarItem( 65 | icon: Icon(Icons.home_outlined, size: 23), 66 | title: Text('Home'), 67 | ), 68 | FlashyTabBarItem( 69 | icon: Icon(Icons.search, size: 23), 70 | title: Text('Search'), 71 | ), 72 | FlashyTabBarItem( 73 | icon: Icon(Icons.shopping_bag_outlined, size: 23), 74 | title: Text('Cart'), 75 | ), 76 | FlashyTabBarItem( 77 | icon: Icon(Icons.account_circle_outlined, size: 23,), 78 | title: Text('Profile'), 79 | ), 80 | ], 81 | ), 82 | ); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /lib/models/product.dart: -------------------------------------------------------------------------------- 1 | class Product { 2 | final String name; 3 | final String brand; 4 | final String imageURL; 5 | final int price; 6 | 7 | Product(this.name, this.brand, this.imageURL, this.price); 8 | 9 | factory Product.fromJson(Map json) { 10 | return new Product( 11 | json["name"], 12 | json["brand"], 13 | json["imageURL"], 14 | json["price"] 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/pages/cart.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:day34/animation/FadeAnimation.dart'; 4 | import 'package:day34/models/product.dart'; 5 | import 'package:day34/pages/payment.dart'; 6 | import 'package:day34/pages/product_view.dart'; 7 | import 'package:dotted_border/dotted_border.dart'; 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter/services.dart'; 10 | import 'package:flutter_slidable/flutter_slidable.dart'; 11 | 12 | class CartPage extends StatefulWidget { 13 | const CartPage({ Key? key }) : super(key: key); 14 | 15 | @override 16 | _CartPageState createState() => _CartPageState(); 17 | } 18 | 19 | class _CartPageState extends State with TickerProviderStateMixin { 20 | late List cartItems = []; 21 | List cartItemCount = [1, 1, 1, 1]; 22 | int totalPrice = 0; 23 | 24 | Future fetchItems() async { 25 | final String response = await rootBundle.loadString('assets/products.json'); 26 | final data = await json.decode(response); 27 | 28 | cartItems = data['products'] 29 | .map((data) => Product.fromJson(data)).toList(); 30 | 31 | sumTotal(); 32 | } 33 | 34 | sumTotal() { 35 | cartItems.forEach((item) { 36 | totalPrice = item.price + totalPrice; 37 | }); 38 | } 39 | 40 | @override 41 | void initState() { 42 | // TODO: implement initState 43 | super.initState(); 44 | 45 | fetchItems().whenComplete(() => setState(() {})); 46 | } 47 | 48 | @override 49 | Widget build(BuildContext context) { 50 | return Scaffold( 51 | appBar: AppBar( 52 | elevation: 0, 53 | backgroundColor: Colors.transparent, 54 | title: Text('My Cart', style: TextStyle(color: Colors.black)), 55 | ), 56 | body: Column( 57 | crossAxisAlignment: CrossAxisAlignment.start, 58 | children: [ 59 | Container( 60 | padding: EdgeInsets.symmetric(horizontal: 20), 61 | height: MediaQuery.of(context).size.height * 0.53, 62 | child: cartItems.length > 0 ? FadeAnimation(1.4, 63 | AnimatedList( 64 | scrollDirection: Axis.vertical, 65 | initialItemCount: cartItems.length, 66 | itemBuilder: (context, index, animation) { 67 | return Slidable( 68 | actionPane: SlidableDrawerActionPane(), 69 | secondaryActions: [ 70 | MaterialButton( 71 | color: Colors.red.withOpacity(0.15), 72 | elevation: 0, 73 | height: 60, 74 | minWidth: 60, 75 | shape: CircleBorder(), 76 | child: Icon(Icons.delete, color: Colors.red, size: 30,), 77 | onPressed: () { 78 | setState(() { 79 | totalPrice = totalPrice - (int.parse(cartItems[index].price.toString()) * cartItemCount[index]); 80 | 81 | AnimatedList.of(context).removeItem(index, (context, animation) { 82 | return cartItem(cartItems[index], index, animation); 83 | }); 84 | 85 | cartItems.removeAt(index); 86 | cartItemCount.removeAt(index); 87 | }); 88 | }, 89 | ), 90 | ], 91 | child: cartItem(cartItems[index], index, animation), 92 | ); 93 | } 94 | ), 95 | ) : Container(), 96 | ), 97 | SizedBox(height: 30), 98 | FadeAnimation(1.2, 99 | Container( 100 | padding: EdgeInsets.symmetric(horizontal: 20), 101 | child: Row( 102 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 103 | children: [ 104 | Text('Shipping', style: TextStyle(fontSize: 20)), 105 | Text('\$5.99', style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold)) 106 | ], 107 | ), 108 | ), 109 | ), 110 | FadeAnimation(1.3, Padding( 111 | padding: EdgeInsets.all(20.0), 112 | child: DottedBorder( 113 | color: Colors.grey.shade400, 114 | dashPattern: [10, 10], 115 | padding: EdgeInsets.all(0), 116 | child: Container() 117 | ), 118 | )), 119 | FadeAnimation(1.3, Container( 120 | padding: EdgeInsets.symmetric(horizontal: 20), 121 | child: Row( 122 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 123 | children: [ 124 | Text('Total', style: TextStyle(fontSize: 20)), 125 | Text('\$${totalPrice + 5.99}', style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold)) 126 | ], 127 | ), 128 | )), 129 | SizedBox(height: 10), 130 | FadeAnimation(1.4, Padding( 131 | padding: EdgeInsets.all(20.0), 132 | child: MaterialButton( 133 | onPressed: () { 134 | Navigator.push(context, MaterialPageRoute(builder: (context) => PaymentPage())); 135 | }, 136 | height: 50, 137 | elevation: 0, 138 | splashColor: Colors.yellow[700], 139 | shape: RoundedRectangleBorder( 140 | borderRadius: BorderRadius.circular(10) 141 | ), 142 | color: Colors.yellow[800], 143 | child: Center( 144 | child: Text("Checkout", style: TextStyle(color: Colors.white, fontSize: 18),), 145 | ), 146 | ), 147 | )) 148 | ] 149 | ) 150 | ); 151 | } 152 | 153 | cartItem(Product product, int index, animation) { 154 | return GestureDetector( 155 | onTap: () { 156 | Navigator.push(context, MaterialPageRoute(builder: (context) => ProductViewPage(product: product))); 157 | }, 158 | child: SlideTransition( 159 | position: Tween( 160 | begin: const Offset(-1, 0), 161 | end: Offset.zero 162 | ).animate(animation), 163 | child: Container( 164 | margin: EdgeInsets.only(bottom: 20), 165 | padding: EdgeInsets.symmetric(horizontal: 10), 166 | decoration: BoxDecoration( 167 | color: Colors.white, 168 | borderRadius: BorderRadius.circular(10), 169 | boxShadow: [ 170 | BoxShadow( 171 | color: Colors.grey.shade200, 172 | offset: Offset(0, 2), 173 | blurRadius: 6, 174 | ), 175 | ], 176 | ), 177 | child: Row( 178 | children: [ 179 | Container( 180 | margin: EdgeInsets.only(right: 10), 181 | child: ClipRRect( 182 | borderRadius: BorderRadius.circular(10), 183 | child: Image.network( 184 | product.imageURL, 185 | fit: BoxFit.cover, 186 | height: 100, 187 | width: 100, 188 | ), 189 | ), 190 | ), 191 | Expanded( 192 | child: Column( 193 | crossAxisAlignment: CrossAxisAlignment.start, 194 | children: [ 195 | Text(product.brand, style: TextStyle(color: Colors.orange.shade400, fontSize: 14,),), 196 | SizedBox(height: 5,), 197 | Text(product.name, 198 | style: TextStyle( 199 | fontSize: 18, 200 | fontWeight: FontWeight.w600, 201 | ), 202 | ), 203 | SizedBox(height: 15), 204 | Text( 205 | '\$${product.price}', 206 | style: TextStyle( 207 | fontSize: 20, 208 | color: Colors.grey.shade800, 209 | ), 210 | ), 211 | SizedBox(height: 10), 212 | ] 213 | ), 214 | ), 215 | Column( 216 | crossAxisAlignment: CrossAxisAlignment.center, 217 | children: [ 218 | MaterialButton( 219 | minWidth: 10, 220 | padding: EdgeInsets.all(0), 221 | onPressed: () { 222 | setState(() { 223 | if (cartItemCount[index] > 1) { 224 | cartItemCount[index]--; 225 | totalPrice = totalPrice - product.price; 226 | } 227 | }); 228 | }, 229 | shape: CircleBorder(), 230 | child: Icon(Icons.remove_circle_outline, color: Colors.grey.shade400, size: 30,), 231 | ), 232 | Container(child: Center(child: Text(cartItemCount[index].toString(), style: TextStyle(fontSize: 20, color: Colors.grey.shade800),),),), 233 | MaterialButton( 234 | padding: EdgeInsets.all(0), 235 | minWidth: 10, 236 | splashColor: Colors.yellow[700], 237 | onPressed: () { 238 | setState(() { 239 | cartItemCount[index]++; 240 | totalPrice = totalPrice + product.price; 241 | }); 242 | }, 243 | shape: CircleBorder(), 244 | child: Icon(Icons.add_circle, size: 30,), 245 | ), 246 | ], 247 | ), 248 | ] 249 | ), 250 | ), 251 | ), 252 | ); 253 | } 254 | } 255 | -------------------------------------------------------------------------------- /lib/pages/explore.dart: -------------------------------------------------------------------------------- 1 | import 'dart:convert'; 2 | 3 | import 'package:day34/animation/FadeAnimation.dart'; 4 | import 'package:day34/models/product.dart'; 5 | import 'package:day34/pages/product_view.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter/services.dart'; 8 | 9 | class ExplorePage extends StatefulWidget { 10 | const ExplorePage({ Key? key }) : super(key: key); 11 | 12 | @override 13 | _ExplorePageState createState() => _ExplorePageState(); 14 | } 15 | 16 | class _ExplorePageState extends State with TickerProviderStateMixin { 17 | late ScrollController _scrollController; 18 | bool _isScrolled = false; 19 | 20 | List productList = []; 21 | List size = [ 22 | "S", 23 | "M", 24 | "L", 25 | "XL", 26 | ]; 27 | 28 | List colors = [ 29 | Colors.black, 30 | Colors.purple, 31 | Colors.orange.shade200, 32 | Colors.blueGrey, 33 | Color(0xFFFFC1D9), 34 | ]; 35 | 36 | int _selectedColor = 0; 37 | int _selectedSize = 1; 38 | 39 | var selectedRange = RangeValues(150.00, 1500.00); 40 | 41 | @override 42 | void initState() { 43 | _scrollController = ScrollController(); 44 | _scrollController.addListener(_listenToScrollChange); 45 | products(); 46 | 47 | super.initState(); 48 | } 49 | 50 | void _listenToScrollChange() { 51 | if (_scrollController.offset >= 100.0) { 52 | setState(() { 53 | _isScrolled = true; 54 | }); 55 | } else { 56 | setState(() { 57 | _isScrolled = false; 58 | }); 59 | } 60 | } 61 | 62 | @override 63 | Widget build(BuildContext context) { 64 | return CustomScrollView( 65 | controller: _scrollController, 66 | slivers: [ 67 | SliverAppBar( 68 | expandedHeight: 300.0, 69 | elevation: 0, 70 | pinned: true, 71 | floating: true, 72 | stretch: true, 73 | backgroundColor: Colors.grey.shade50, 74 | flexibleSpace: FlexibleSpaceBar( 75 | collapseMode: CollapseMode.pin, 76 | titlePadding: EdgeInsets.only(left: 20, right: 30, bottom: 100), 77 | stretchModes: [ 78 | StretchMode.zoomBackground, 79 | // StretchMode.fadeTitle 80 | ], 81 | title: AnimatedOpacity( 82 | opacity: _isScrolled ? 0.0 : 1.0, 83 | duration: Duration(milliseconds: 500), 84 | child: FadeAnimation(1, Text("Find your 2021 Collections", 85 | style: TextStyle( 86 | color: Colors.black, 87 | fontSize: 28.0, 88 | ))), 89 | ), 90 | background: Image.asset("assets/images/background.png", fit: BoxFit.cover,) 91 | ), 92 | bottom: AppBar( 93 | toolbarHeight: 70, 94 | elevation: 0, 95 | backgroundColor: Colors.transparent, 96 | title: Row( 97 | children: [ 98 | Expanded( 99 | child: FadeAnimation(1.4, Container( 100 | height: 50, 101 | child: TextField( 102 | readOnly: true, 103 | cursorColor: Colors.grey, 104 | decoration: InputDecoration( 105 | contentPadding: EdgeInsets.symmetric(horizontal: 20, vertical: 20), 106 | filled: true, 107 | fillColor: Colors.white, 108 | prefixIcon: Icon(Icons.search, color: Colors.black), 109 | border: OutlineInputBorder( 110 | borderRadius: BorderRadius.circular(10), 111 | borderSide: BorderSide.none 112 | ), 113 | hintText: "Search e.g Cotton Sweatshirt", 114 | hintStyle: TextStyle(fontSize: 14, color: Colors.black), 115 | ), 116 | ), 117 | )), 118 | ), 119 | SizedBox(width: 10), 120 | FadeAnimation(1.5, Container( 121 | height: 50, 122 | width: 50, 123 | decoration: BoxDecoration( 124 | color: Colors.white, 125 | borderRadius: BorderRadius.circular(10) 126 | ), 127 | child: IconButton( 128 | onPressed: () { 129 | showFilterModal(); 130 | }, 131 | icon: Icon(Icons.filter_list, color: Colors.black, size: 30,), 132 | ), 133 | )) 134 | ], 135 | ), 136 | ), 137 | ), 138 | SliverList( 139 | delegate: SliverChildListDelegate([ 140 | Container( 141 | padding: EdgeInsets.only(top: 20, left: 20), 142 | height: 330, 143 | child: Column( 144 | children: [ 145 | FadeAnimation(1.4, Row( 146 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 147 | children: [ 148 | Text('Popular Products', style: TextStyle(color: Colors.black, fontSize: 18, fontWeight: FontWeight.bold),), 149 | Padding( 150 | padding: EdgeInsets.only(right: 20.0), 151 | child: Text('See all ', style: TextStyle(color: Colors.black, fontSize: 14),), 152 | ), 153 | ], 154 | )), 155 | SizedBox(height: 10,), 156 | Expanded( 157 | child: ListView.builder( 158 | scrollDirection: Axis.horizontal, 159 | itemCount: productList.length, 160 | itemBuilder: (context, index) { 161 | return productCart(productList[index]); 162 | } 163 | ) 164 | ) 165 | ] 166 | ) 167 | ), 168 | Container( 169 | padding: EdgeInsets.only(top: 20, left: 20), 170 | height: 180, 171 | child: Column( 172 | children: [ 173 | FadeAnimation(1.4, Row( 174 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 175 | children: [ 176 | Text('For You', style: TextStyle(color: Colors.black, fontSize: 18, fontWeight: FontWeight.bold),), 177 | Padding( 178 | padding: EdgeInsets.only(right: 20.0), 179 | child: Text('See all ', style: TextStyle(color: Colors.black, fontSize: 14),), 180 | ), 181 | ], 182 | )), 183 | SizedBox(height: 10,), 184 | Expanded( 185 | child: ListView.builder( 186 | scrollDirection: Axis.horizontal, 187 | itemCount: productList.length, 188 | itemBuilder: (context, index) { 189 | return forYou(productList[index]); 190 | } 191 | ) 192 | ) 193 | ] 194 | ) 195 | ), 196 | Container( 197 | padding: EdgeInsets.only(top: 20, left: 20), 198 | height: 330, 199 | child: Column( 200 | children: [ 201 | Row( 202 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 203 | children: [ 204 | Text('Winter Collection', style: TextStyle(color: Colors.black, fontSize: 18, fontWeight: FontWeight.bold),), 205 | Padding( 206 | padding: EdgeInsets.only(right: 20.0), 207 | child: Text('See all ', style: TextStyle(color: Colors.black, fontSize: 14),), 208 | ), 209 | ], 210 | ), 211 | SizedBox(height: 10,), 212 | Expanded( 213 | child: ListView.builder( 214 | scrollDirection: Axis.horizontal, 215 | itemCount: productList.length, 216 | itemBuilder: (context, index) { 217 | return productCart(productList[index]); 218 | } 219 | ) 220 | ) 221 | ] 222 | ) 223 | ), 224 | Container( 225 | padding: EdgeInsets.only(top: 20, left: 20), 226 | height: 330, 227 | child: Column( 228 | children: [ 229 | Row( 230 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 231 | children: [ 232 | Text('Cotton Collection', style: TextStyle(color: Colors.black, fontSize: 18, fontWeight: FontWeight.bold),), 233 | Padding( 234 | padding: EdgeInsets.only(right: 20.0), 235 | child: Text('See all ', style: TextStyle(color: Colors.black, fontSize: 14),), 236 | ), 237 | ], 238 | ), 239 | SizedBox(height: 10,), 240 | Expanded( 241 | child: ListView.builder( 242 | reverse: true, 243 | scrollDirection: Axis.horizontal, 244 | itemCount: productList.length, 245 | itemBuilder: (context, index) { 246 | return productCart(productList[index]); 247 | } 248 | ) 249 | ) 250 | ] 251 | ) 252 | ), 253 | ]), 254 | ) 255 | ] 256 | ); 257 | } 258 | 259 | Future products() async { 260 | final String response = await rootBundle.loadString('assets/products.json'); 261 | final data = await json.decode(response); 262 | 263 | setState(() { 264 | productList = data['products'] 265 | .map((data) => Product.fromJson(data)).toList(); 266 | }); 267 | } 268 | 269 | productCart(Product product) { 270 | return AspectRatio( 271 | aspectRatio: 1 / 1, 272 | child: FadeAnimation(1.5, GestureDetector( 273 | onTap: () { 274 | Navigator.push(context, MaterialPageRoute(builder: (context) => ProductViewPage(product: product,))); 275 | }, 276 | child: Container( 277 | margin: EdgeInsets.only(right: 20, bottom: 25), 278 | decoration: BoxDecoration( 279 | borderRadius: BorderRadius.circular(20), 280 | color: Colors.white, 281 | boxShadow: [BoxShadow( 282 | offset: Offset(5, 10), 283 | blurRadius: 15, 284 | color: Colors.grey.shade200, 285 | )], 286 | ), 287 | padding: EdgeInsets.all(10), 288 | child: Column( 289 | crossAxisAlignment: CrossAxisAlignment.start, 290 | children: [ 291 | Container( 292 | height: 150, 293 | child: Stack( 294 | children: [ 295 | Container( 296 | width: double.infinity, 297 | child: ClipRRect( 298 | borderRadius: BorderRadius.circular(15), 299 | child: Image.network(product.imageURL, fit: BoxFit.cover) 300 | ), 301 | ), 302 | // Add to cart button 303 | Positioned( 304 | right: 5, 305 | bottom: 5, 306 | child: MaterialButton( 307 | color: Colors.black, 308 | minWidth: 45, 309 | height: 45, 310 | shape: RoundedRectangleBorder( 311 | borderRadius: BorderRadius.circular(50) 312 | ), 313 | onPressed: () { 314 | addToCartModal(); 315 | }, 316 | padding: EdgeInsets.all(5), 317 | child: Center(child: Icon(Icons.shopping_cart, color: Colors.white, size: 20,)), 318 | ), 319 | ) 320 | ], 321 | ), 322 | ), 323 | SizedBox(height: 20,), 324 | Text(product.name, 325 | style: TextStyle(color: Colors.black, fontSize: 18,), 326 | ), 327 | SizedBox(height: 10,), 328 | Row( 329 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 330 | children: [ 331 | Text(product.brand, style: TextStyle(color: Colors.orange.shade400, fontSize: 14,),), 332 | Text("\$ " +product.price.toString() + '.00', 333 | style: TextStyle(color: Colors.black, fontSize: 18, fontWeight: FontWeight.w800), 334 | ), 335 | ], 336 | ), 337 | ], 338 | ), 339 | ), 340 | )), 341 | ); 342 | } 343 | 344 | forYou(Product product) { 345 | return AspectRatio( 346 | aspectRatio: 3 / 1, 347 | child: FadeAnimation(1.5, Container( 348 | margin: EdgeInsets.only(right: 20, bottom: 25), 349 | decoration: BoxDecoration( 350 | borderRadius: BorderRadius.circular(20), 351 | color: Colors.white, 352 | boxShadow: [BoxShadow( 353 | offset: Offset(5, 10), 354 | blurRadius: 15, 355 | color: Colors.grey.shade200, 356 | )], 357 | ), 358 | padding: EdgeInsets.all(10), 359 | child: Row( 360 | crossAxisAlignment: CrossAxisAlignment.start, 361 | children: [ 362 | Container( 363 | width: 100, 364 | child: ClipRRect( 365 | borderRadius: BorderRadius.circular(15), 366 | child: Image.network(product.imageURL, fit: BoxFit.cover)), 367 | ), 368 | SizedBox(width: 10,), 369 | Expanded( 370 | child: Column( 371 | crossAxisAlignment: CrossAxisAlignment.start, 372 | mainAxisAlignment: MainAxisAlignment.center, 373 | children: [ 374 | Text(product.name, 375 | style: TextStyle(color: Colors.black, fontSize: 18,), 376 | ), 377 | SizedBox(height: 5,), 378 | Text(product.brand, style: TextStyle(color: Colors.orange.shade400, fontSize: 13,),), 379 | SizedBox(height: 10,), 380 | Text("\$ " +product.price.toString() + '.00', 381 | style: TextStyle(color: Colors.black, fontSize: 18, fontWeight: FontWeight.w800), 382 | ), 383 | ] 384 | ), 385 | ) 386 | ], 387 | ), 388 | )), 389 | ); 390 | } 391 | 392 | showFilterModal() { 393 | showModalBottomSheet( 394 | context: context, 395 | backgroundColor: Colors.white, 396 | shape: RoundedRectangleBorder( 397 | borderRadius: BorderRadius.only(topLeft: Radius.circular(20), topRight: Radius.circular(20)) 398 | ), 399 | builder: (context) { 400 | return StatefulBuilder( 401 | builder: (context, setState) { 402 | return Container( 403 | padding: EdgeInsets.only(top: 20, left: 20, right: 20, bottom: 20), 404 | height: MediaQuery.of(context).size.height * 0.8, 405 | child: Column( 406 | crossAxisAlignment: CrossAxisAlignment.start, 407 | children: [ 408 | Row( 409 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 410 | children: [ 411 | Text('Filter', style: TextStyle(color: Colors.black, fontSize: 18, fontWeight: FontWeight.bold),), 412 | MaterialButton( 413 | onPressed: () { 414 | Navigator.pop(context); 415 | }, 416 | minWidth: 40, 417 | height: 40, 418 | color: Colors.grey.shade300, 419 | elevation: 0, 420 | padding: EdgeInsets.all(0), 421 | shape: RoundedRectangleBorder( 422 | borderRadius: BorderRadius.circular(50) 423 | ), 424 | child: Icon(Icons.close, color: Colors.black,), 425 | ) 426 | ], 427 | ), 428 | SizedBox(height: 20,), 429 | Text("Color", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),), 430 | SizedBox(height: 10,), 431 | Container( 432 | height: 60, 433 | child: ListView.builder( 434 | scrollDirection: Axis.horizontal, 435 | itemCount: colors.length, 436 | itemBuilder: (context, index) { 437 | return GestureDetector( 438 | onTap: () { 439 | setState(() { 440 | _selectedColor = index; 441 | }); 442 | }, 443 | child: AnimatedContainer( 444 | duration: Duration(milliseconds: 300), 445 | margin: EdgeInsets.only(right: 10), 446 | decoration: BoxDecoration( 447 | color: _selectedColor == index ? colors[index] : colors[index].withOpacity(0.5), 448 | shape: BoxShape.circle 449 | ), 450 | width: 40, 451 | height: 40, 452 | child: Center( 453 | child: _selectedColor == index ? Icon(Icons.check, color: Colors.white,) : Container(), 454 | ), 455 | ), 456 | ); 457 | }, 458 | ), 459 | ), 460 | SizedBox(height: 20,), 461 | Text('Size', style: TextStyle(color: Colors.black, fontSize: 18, fontWeight: FontWeight.bold),), 462 | SizedBox(height: 10,), 463 | Container( 464 | height: 60, 465 | child: ListView.builder( 466 | scrollDirection: Axis.horizontal, 467 | itemCount: size.length, 468 | itemBuilder: (context, index) { 469 | return GestureDetector( 470 | onTap: () { 471 | setState(() { 472 | _selectedSize = index; 473 | }); 474 | }, 475 | child: AnimatedContainer( 476 | duration: Duration(milliseconds: 500), 477 | margin: EdgeInsets.only(right: 10), 478 | decoration: BoxDecoration( 479 | color: _selectedSize == index ? Colors.yellow[800] : Colors.grey.shade200, 480 | shape: BoxShape.circle 481 | ), 482 | width: 40, 483 | height: 40, 484 | child: Center( 485 | child: Text(size[index], style: TextStyle(color: _selectedSize == index ? Colors.white : Colors.black, fontSize: 15),), 486 | ), 487 | ), 488 | ); 489 | }, 490 | ), 491 | ), 492 | // Slider Price Renge filter 493 | SizedBox(height: 20,), 494 | Row( 495 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 496 | children: [ 497 | Text('Price Range', style: TextStyle(color: Colors.black, fontSize: 18, fontWeight: FontWeight.bold),), 498 | Row( 499 | mainAxisAlignment: MainAxisAlignment.end, 500 | children: [ 501 | Text('\$ ${selectedRange.start.toStringAsFixed(2)}', style: TextStyle(color: Colors.grey.shade500, fontSize: 12),), 502 | Text(" - ", style: TextStyle(color: Colors.grey.shade500)), 503 | Text('\$ ${selectedRange.end.toStringAsFixed(2)}', style: TextStyle(color: Colors.grey.shade500, fontSize: 12),), 504 | ], 505 | ), 506 | ], 507 | ), 508 | SizedBox(height: 10,), 509 | RangeSlider( 510 | values: selectedRange, 511 | min: 0.00, 512 | max: 2000.00, 513 | divisions: 100, 514 | inactiveColor: Colors.grey.shade300, 515 | activeColor: Colors.yellow[800], 516 | labels: RangeLabels('\$ ${selectedRange.start.toStringAsFixed(2)}', '\$ ${selectedRange.end.toStringAsFixed(2)}',), 517 | onChanged: (RangeValues values) { 518 | setState(() => selectedRange = values); 519 | } 520 | ), 521 | SizedBox(height: 20,), 522 | button('Filter', () {}) 523 | ], 524 | ), 525 | ); 526 | } 527 | ); 528 | }, 529 | ); 530 | } 531 | 532 | addToCartModal() { 533 | return showModalBottomSheet( 534 | context: context, 535 | transitionAnimationController: AnimationController(duration: Duration(milliseconds: 400), vsync: this), 536 | builder: (context) => StatefulBuilder( 537 | builder: (context, setState) { 538 | return Container( 539 | height: 350, 540 | padding: EdgeInsets.all(20), 541 | decoration: BoxDecoration( 542 | color: Colors.white, 543 | ), 544 | child: Column( 545 | crossAxisAlignment: CrossAxisAlignment.start, 546 | children: [ 547 | Text("Color", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),), 548 | SizedBox(height: 10,), 549 | Container( 550 | height: 60, 551 | child: ListView.builder( 552 | scrollDirection: Axis.horizontal, 553 | itemCount: colors.length, 554 | itemBuilder: (context, index) { 555 | return GestureDetector( 556 | onTap: () { 557 | setState(() { 558 | _selectedColor = index; 559 | }); 560 | }, 561 | child: AnimatedContainer( 562 | duration: Duration(milliseconds: 300), 563 | margin: EdgeInsets.only(right: 10), 564 | decoration: BoxDecoration( 565 | color: _selectedColor == index ? colors[index] : colors[index].withOpacity(0.5), 566 | shape: BoxShape.circle 567 | ), 568 | width: 40, 569 | height: 40, 570 | child: Center( 571 | child: _selectedColor == index ? Icon(Icons.check, color: Colors.white,) : Container(), 572 | ), 573 | ), 574 | ); 575 | }, 576 | ), 577 | ), 578 | SizedBox(height: 20,), 579 | Text("Size", style: TextStyle(fontWeight: FontWeight.bold, fontSize: 20),), 580 | SizedBox(height: 10,), 581 | Container( 582 | height: 60, 583 | child: ListView.builder( 584 | scrollDirection: Axis.horizontal, 585 | itemCount: size.length, 586 | itemBuilder: (context, index) { 587 | return GestureDetector( 588 | onTap: () { 589 | setState(() { 590 | _selectedSize = index; 591 | }); 592 | }, 593 | child: AnimatedContainer( 594 | duration: Duration(milliseconds: 500), 595 | margin: EdgeInsets.only(right: 10), 596 | decoration: BoxDecoration( 597 | color: _selectedSize == index ? Colors.yellow[800] : Colors.grey.shade200, 598 | shape: BoxShape.circle 599 | ), 600 | width: 40, 601 | height: 40, 602 | child: Center( 603 | child: Text(size[index], style: TextStyle(color: _selectedSize == index ? Colors.white : Colors.black, fontSize: 15),), 604 | ), 605 | ), 606 | ); 607 | }, 608 | ), 609 | ), 610 | SizedBox(height: 20,), 611 | button('Add to Cart', () { 612 | Navigator.pop(context); 613 | 614 | // Let's show a snackbar when an item is added to the cart 615 | final snackbar = SnackBar( 616 | content: Text("Item added to cart"), 617 | duration: Duration(seconds: 5), 618 | action: SnackBarAction( 619 | label: 'Undo', 620 | onPressed: () {}, 621 | ), 622 | ); 623 | 624 | ScaffoldMessenger.of(context).showSnackBar(snackbar); 625 | }) 626 | ], 627 | ), 628 | ); 629 | }, 630 | ) 631 | ); 632 | } 633 | 634 | button(String text, Function onPressed) { 635 | return MaterialButton( 636 | onPressed: () => onPressed(), 637 | height: 50, 638 | elevation: 0, 639 | splashColor: Colors.yellow[700], 640 | shape: RoundedRectangleBorder( 641 | borderRadius: BorderRadius.circular(10) 642 | ), 643 | color: Colors.yellow[800], 644 | child: Center( 645 | child: Text(text, style: TextStyle(color: Colors.white, fontSize: 18),), 646 | ), 647 | ); 648 | } 649 | } 650 | -------------------------------------------------------------------------------- /lib/pages/notification.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class NotificationPage extends StatefulWidget { 4 | const NotificationPage({ Key? key }) : super(key: key); 5 | 6 | @override 7 | _NotificationPageState createState() => _NotificationPageState(); 8 | } 9 | 10 | class _NotificationPageState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar( 15 | elevation: 0, 16 | backgroundColor: Colors.transparent, 17 | title: Text('Notification Page', style: TextStyle(color: Colors.black)), 18 | ), 19 | body: Center( 20 | child: Text('Notification Page') 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/pages/payment.dart: -------------------------------------------------------------------------------- 1 | import 'dart:async'; 2 | 3 | import 'package:day34/animation/FadeAnimation.dart'; 4 | import 'package:day34/pages/payment_success.dart'; 5 | import 'package:flutter/material.dart'; 6 | 7 | class PaymentPage extends StatefulWidget { 8 | const PaymentPage({ Key? key }) : super(key: key); 9 | 10 | @override 11 | _PaymentPageState createState() => _PaymentPageState(); 12 | } 13 | 14 | class _PaymentPageState extends State { 15 | int activeCard = 0; 16 | bool _isLoading = false; 17 | late Timer _timer; 18 | 19 | pay() { 20 | setState(() { 21 | _isLoading = true; 22 | }); 23 | 24 | const oneSec = const Duration(seconds: 2); 25 | _timer = new Timer.periodic( 26 | oneSec, 27 | (Timer timer) { 28 | setState(() { 29 | _isLoading = false; 30 | timer.cancel(); 31 | Navigator.push(context, MaterialPageRoute(builder: (context) => PaymentSuccess())); 32 | }); 33 | }, 34 | ); 35 | } 36 | 37 | @override 38 | Widget build(BuildContext context) { 39 | return Scaffold( 40 | appBar: AppBar( 41 | backgroundColor: Colors.transparent, 42 | elevation: 0, 43 | title: Text('Payment', style: TextStyle(color: Colors.black),), 44 | leading: BackButton(color: Colors.black,), 45 | ), 46 | body: SingleChildScrollView( 47 | child: Padding( 48 | padding: EdgeInsets.all(20.0), 49 | child: Column( 50 | crossAxisAlignment: CrossAxisAlignment.start, 51 | children: [ 52 | activeCard == 0 ? 53 | FadeAnimation(1.2, AnimatedOpacity( 54 | duration: Duration(milliseconds: 500), 55 | opacity: activeCard == 0 ? 1 : 0, 56 | child: Container( 57 | width: double.infinity, 58 | height: 200, 59 | padding: EdgeInsets.all(20.0), 60 | decoration: BoxDecoration( 61 | borderRadius: BorderRadius.circular(30), 62 | gradient: LinearGradient( 63 | colors: [ 64 | Colors.orange, 65 | Colors.yellow.shade800, 66 | Colors.yellow.shade900, 67 | ], 68 | begin: Alignment.topLeft, 69 | end: Alignment.bottomRight, 70 | ) 71 | ), 72 | child: Column( 73 | crossAxisAlignment: CrossAxisAlignment.start, 74 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 75 | children: [ 76 | Text("Credit Card", style: TextStyle(color: Colors.white),), 77 | Column( 78 | crossAxisAlignment: CrossAxisAlignment.start, 79 | children: [ 80 | Text("**** **** **** 7890", style: TextStyle(color: Colors.white, fontSize: 30),), 81 | SizedBox(height: 5,), 82 | Row( 83 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 84 | children: [ 85 | Text("theflutterlover", style: TextStyle(color: Colors.white),), 86 | Image.network('https://img.icons8.com/color/2x/mastercard-logo.png', height: 50), 87 | ], 88 | ) 89 | ], 90 | ) 91 | ] 92 | ), 93 | ), 94 | )) : 95 | FadeAnimation(1.2, AnimatedOpacity( 96 | duration: Duration(milliseconds: 500), 97 | opacity: activeCard == 1 ? 1 : 0, 98 | child: Container( 99 | width: double.infinity, 100 | height: 200, 101 | padding: EdgeInsets.all(30.0), 102 | decoration: BoxDecoration( 103 | borderRadius: BorderRadius.circular(30), 104 | // color: Colors.grey.shade200 105 | gradient: LinearGradient( 106 | colors: [ 107 | Colors.grey.shade200, 108 | Colors.grey.shade100, 109 | Colors.grey.shade200, 110 | Colors.grey.shade300, 111 | ], 112 | begin: Alignment.topLeft, 113 | end: Alignment.bottomRight, 114 | ) 115 | ), 116 | child: Column( 117 | crossAxisAlignment: CrossAxisAlignment.start, 118 | children: [ 119 | Column( 120 | crossAxisAlignment: CrossAxisAlignment.start, 121 | children: [ 122 | Image.network('https://img.icons8.com/ios/2x/mac-os.png', height: 50), 123 | SizedBox(height: 30,), 124 | Row( 125 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 126 | crossAxisAlignment: CrossAxisAlignment.end, 127 | children: [ 128 | Text("The Flutter Lover", style: TextStyle(color: Colors.black, fontSize: 18),), 129 | Image.network('https://img.icons8.com/ios/2x/sim-card-chip.png', height: 35,), 130 | ], 131 | ) 132 | ], 133 | ) 134 | ] 135 | ), 136 | ), 137 | )), 138 | SizedBox(height: 50,), 139 | FadeAnimation(1.2, Text("Payment Method", style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold),)), 140 | SizedBox(height: 20,), 141 | FadeAnimation(1.3, Row( 142 | children: [ 143 | GestureDetector( 144 | onTap: () { 145 | setState(() { 146 | activeCard = 0; 147 | }); 148 | }, 149 | child: AnimatedContainer( 150 | duration: Duration(milliseconds: 300), 151 | margin: EdgeInsets.only(right: 10), 152 | padding: EdgeInsets.symmetric(horizontal: 20), 153 | decoration: BoxDecoration( 154 | borderRadius: BorderRadius.circular(18), 155 | border: activeCard == 0 ? Border.all(color: Colors.grey.shade300, width: 1) 156 | : Border.all(color: Colors.grey.shade300.withOpacity(0), width: 1), 157 | ), 158 | child: Image.network('https://img.icons8.com/color/2x/mastercard-logo.png', height: 50,), 159 | ), 160 | ), 161 | GestureDetector( 162 | onTap: () { 163 | setState(() { 164 | activeCard = 1; 165 | }); 166 | }, 167 | child: AnimatedContainer( 168 | duration: Duration(milliseconds: 300), 169 | margin: EdgeInsets.only(right: 10), 170 | padding: EdgeInsets.symmetric(horizontal: 20), 171 | decoration: BoxDecoration( 172 | borderRadius: BorderRadius.circular(18), 173 | border: activeCard == 1 ? Border.all(color: Colors.grey.shade300, width: 1) 174 | : Border.all(color: Colors.grey.shade300.withOpacity(0), width: 1), 175 | ), 176 | child: Image.network('https://img.icons8.com/ios-filled/2x/apple-pay.png', height: 50,), 177 | ), 178 | ), 179 | ] 180 | )), 181 | SizedBox(height: 30,), 182 | FadeAnimation(1.4, Container( 183 | height: 50, 184 | padding: EdgeInsets.only(left: 20,), 185 | width: double.infinity, 186 | decoration: BoxDecoration( 187 | borderRadius: BorderRadius.circular(10), 188 | color: Colors.white 189 | ), 190 | child: Row( 191 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 192 | children: [ 193 | Text("Offers", style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600),), 194 | TextButton( 195 | onPressed: () {}, 196 | child: Text("Add a code") 197 | ) 198 | ], 199 | ), 200 | )), 201 | SizedBox(height: 20,), 202 | FadeAnimation(1.5, Container( 203 | height: 50, 204 | padding: EdgeInsets.only(left: 20,), 205 | width: double.infinity, 206 | decoration: BoxDecoration( 207 | borderRadius: BorderRadius.circular(10), 208 | color: Colors.white 209 | ), 210 | child: Row( 211 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 212 | children: [ 213 | Text("Address", style: TextStyle(fontSize: 15, fontWeight: FontWeight.w600),), 214 | TextButton( 215 | onPressed: () {}, 216 | child: Row( 217 | children: [ 218 | Text("E-75, Diamond Dis..."), 219 | Icon(Icons.keyboard_arrow_down, size: 20,) 220 | ], 221 | ) 222 | ) 223 | ], 224 | ), 225 | )), 226 | SizedBox(height: 100,), 227 | FadeAnimation(1.5, Row( 228 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 229 | children: [ 230 | Text("Total Payment", style: TextStyle(fontSize: 20, fontWeight: FontWeight.w600),), 231 | Text("\$240.00", style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold)) 232 | ], 233 | )), 234 | SizedBox(height: 30), 235 | FadeAnimation(1.4, 236 | MaterialButton( 237 | onPressed: _isLoading ? null : () { pay(); }, 238 | height: 50, 239 | elevation: 0, 240 | splashColor: Colors.yellow[700], 241 | shape: RoundedRectangleBorder( 242 | borderRadius: BorderRadius.circular(10) 243 | ), 244 | color: Colors.yellow[800], 245 | child: Center( 246 | child: _isLoading ? Container( 247 | width: 20, 248 | height: 20, 249 | child: CircularProgressIndicator( 250 | backgroundColor: Colors.white, 251 | strokeWidth: 3, 252 | color: Colors.black, 253 | ), 254 | ) : Text("Pay", style: TextStyle(color: Colors.white, fontSize: 18),), 255 | ), 256 | ), 257 | ), 258 | SizedBox(height: 100), 259 | ], 260 | ), 261 | ), 262 | ) 263 | ); 264 | } 265 | } -------------------------------------------------------------------------------- /lib/pages/payment_success.dart: -------------------------------------------------------------------------------- 1 | import 'package:day34/animation/FadeAnimation.dart'; 2 | import 'package:day34/main.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class PaymentSuccess extends StatefulWidget { 6 | const PaymentSuccess({ Key? key }) : super(key: key); 7 | 8 | @override 9 | _PaymentSuccessState createState() => _PaymentSuccessState(); 10 | } 11 | 12 | class _PaymentSuccessState extends State { 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | backgroundColor: Colors.white, 17 | body: Container( 18 | padding: EdgeInsets.all(40.0), 19 | width: double.infinity, 20 | child: Column( 21 | crossAxisAlignment: CrossAxisAlignment.center, 22 | mainAxisAlignment: MainAxisAlignment.center, 23 | children: [ 24 | FadeAnimation(1, Image.network('https://ouch-cdn2.icons8.com/7fkWk5J2YcodnqGn62xOYYfkl6qhmsCfT2033W-FjaA/rs:fit:784:784/czM6Ly9pY29uczgu/b3VjaC1wcm9kLmFz/c2V0cy9zdmcvMjU5/LzRkM2MyNzJlLWFh/MmQtNDA3Ni04YzU0/LTY0YjNiMzQ4NzQw/OS5zdmc.png', 25 | width: 250,)), 26 | SizedBox(height: 50.0,), 27 | FadeAnimation(1.2, Text('Payment Success! 🥳', style: TextStyle(fontSize: 25.0, fontWeight: FontWeight.bold),)), 28 | SizedBox(height: 20.0,), 29 | FadeAnimation(1.3, Text('Hooray! Your payment proccess has \n been completed successfully..', textAlign: TextAlign.center, style: TextStyle(fontSize: 16.0, color: Colors.grey.shade700),)), 30 | SizedBox(height: 140.0,), 31 | FadeAnimation(1.4, 32 | MaterialButton( 33 | onPressed: () { 34 | Navigator.push(context, MaterialPageRoute(builder: (context) => HomePage())); 35 | }, 36 | height: 50, 37 | elevation: 0, 38 | splashColor: Colors.yellow[700], 39 | shape: RoundedRectangleBorder( 40 | borderRadius: BorderRadius.circular(10) 41 | ), 42 | color: Colors.yellow[800], 43 | child: Center( 44 | child: Text("Back to Home", style: TextStyle(color: Colors.white, fontSize: 16),), 45 | ), 46 | ), 47 | ), 48 | SizedBox(height: 20.0,), 49 | FadeAnimation(1.4, Text('Thank you for shopping with us.', style: TextStyle(fontSize: 14.0, color: Colors.grey),)), 50 | ], 51 | ), 52 | ) 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/pages/product_view.dart: -------------------------------------------------------------------------------- 1 | import 'package:day34/models/product.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class ProductViewPage extends StatefulWidget { 5 | final Product product; 6 | const ProductViewPage({ Key? key, required this.product }) : super(key: key); 7 | 8 | @override 9 | _ProductViewPageState createState() => _ProductViewPageState(); 10 | } 11 | 12 | class _ProductViewPageState extends State { 13 | List productList = []; 14 | List size = [ 15 | "S", 16 | "M", 17 | "L", 18 | "XL", 19 | ]; 20 | 21 | List colors = [ 22 | Colors.black, 23 | Colors.purple, 24 | Colors.orange.shade200, 25 | Colors.blueGrey, 26 | Color(0xFFFFC1D9), 27 | ]; 28 | 29 | int _selectedColor = 0; 30 | int _selectedSize = 1; 31 | 32 | @override 33 | Widget build(BuildContext context) { 34 | return Scaffold( 35 | backgroundColor: Colors.white, 36 | body: CustomScrollView( 37 | slivers: [ 38 | SliverAppBar( 39 | expandedHeight: MediaQuery.of(context).size.height * 0.6, 40 | elevation: 0, 41 | snap: true, 42 | floating: true, 43 | stretch: true, 44 | backgroundColor: Colors.grey.shade50, 45 | flexibleSpace: FlexibleSpaceBar( 46 | stretchModes: [ 47 | StretchMode.zoomBackground, 48 | ], 49 | background: Image.network(widget.product.imageURL, fit: BoxFit.cover,) 50 | ), 51 | bottom: PreferredSize( 52 | preferredSize: Size.fromHeight(45), 53 | child: Transform.translate( 54 | offset: Offset(0, 1), 55 | child: Container( 56 | height: 45, 57 | decoration: BoxDecoration( 58 | color: Colors.white, 59 | borderRadius: BorderRadius.only( 60 | topLeft: Radius.circular(30), 61 | topRight: Radius.circular(30), 62 | ), 63 | ), 64 | child: Center( 65 | child: Container( 66 | width: 50, 67 | height: 8, 68 | decoration: BoxDecoration( 69 | color: Colors.grey.shade300, 70 | borderRadius: BorderRadius.circular(10), 71 | ), 72 | ) 73 | ), 74 | ), 75 | ) 76 | ), 77 | ), 78 | SliverList( 79 | delegate: SliverChildListDelegate([ 80 | Container( 81 | height: MediaQuery.of(context).size.height * 0.55, 82 | color: Colors.white, 83 | padding: EdgeInsets.symmetric(horizontal: 20, vertical: 5), 84 | child: Column( 85 | crossAxisAlignment: CrossAxisAlignment.start, 86 | children: [ 87 | Row( 88 | crossAxisAlignment: CrossAxisAlignment.start, 89 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 90 | children: [ 91 | Column( 92 | crossAxisAlignment: CrossAxisAlignment.start, 93 | children: [ 94 | Text(widget.product.name, 95 | style: TextStyle(color: Colors.black, fontSize: 22, fontWeight: FontWeight.bold,), 96 | ), 97 | SizedBox(height: 5,), 98 | Text(widget.product.brand, style: TextStyle(color: Colors.orange.shade400, fontSize: 14,),), 99 | ], 100 | ), 101 | Text("\$ " +widget.product.price.toString() + '.00', 102 | style: TextStyle(color: Colors.black, fontSize: 16), 103 | ), 104 | ], 105 | ), 106 | SizedBox(height: 20,), 107 | Text("Take a break from jeans with the parker long straight pant. These lightweight, pleat front pants feature a flattering high waist and loose, straight legs.", 108 | style: TextStyle(height: 1.5, color: Colors.grey.shade800, fontSize: 15,), 109 | ), 110 | SizedBox(height: 30,), 111 | Text("Color", style: TextStyle(color: Colors.grey.shade400, fontSize: 18),), 112 | SizedBox(height: 10,), 113 | Container( 114 | height: 60, 115 | child: ListView.builder( 116 | scrollDirection: Axis.horizontal, 117 | itemCount: colors.length, 118 | itemBuilder: (context, index) { 119 | return GestureDetector( 120 | onTap: () { 121 | setState(() { 122 | _selectedColor = index; 123 | }); 124 | }, 125 | child: AnimatedContainer( 126 | duration: Duration(milliseconds: 300), 127 | margin: EdgeInsets.only(right: 10), 128 | decoration: BoxDecoration( 129 | color: _selectedColor == index ? colors[index] : colors[index].withOpacity(0.5), 130 | shape: BoxShape.circle 131 | ), 132 | width: 40, 133 | height: 40, 134 | child: Center( 135 | child: _selectedColor == index ? Icon(Icons.check, color: Colors.white,) : Container(), 136 | ), 137 | ), 138 | ); 139 | }, 140 | ), 141 | ), 142 | SizedBox(height: 20,), 143 | Text('Size', style: TextStyle(color: Colors.grey.shade400, fontSize: 18),), 144 | SizedBox(height: 10,), 145 | Container( 146 | height: 60, 147 | child: ListView.builder( 148 | scrollDirection: Axis.horizontal, 149 | itemCount: size.length, 150 | itemBuilder: (context, index) { 151 | return GestureDetector( 152 | onTap: () { 153 | setState(() { 154 | _selectedSize = index; 155 | }); 156 | }, 157 | child: AnimatedContainer( 158 | duration: Duration(milliseconds: 500), 159 | margin: EdgeInsets.only(right: 10), 160 | decoration: BoxDecoration( 161 | color: _selectedSize == index ? Colors.yellow[800] : Colors.grey.shade200, 162 | shape: BoxShape.circle 163 | ), 164 | width: 40, 165 | height: 40, 166 | child: Center( 167 | child: Text(size[index], style: TextStyle(color: _selectedSize == index ? Colors.white : Colors.black, fontSize: 15),), 168 | ), 169 | ), 170 | ); 171 | }, 172 | ), 173 | ), 174 | SizedBox(height: 20,), 175 | MaterialButton( 176 | onPressed: () { 177 | Navigator.pop(context); 178 | }, 179 | height: 50, 180 | elevation: 0, 181 | splashColor: Colors.yellow[700], 182 | shape: RoundedRectangleBorder( 183 | borderRadius: BorderRadius.circular(10) 184 | ), 185 | color: Colors.yellow[800], 186 | child: Center( 187 | child: Text("Add to Cart", style: TextStyle(color: Colors.white, fontSize: 18),), 188 | ), 189 | ) 190 | ], 191 | ) 192 | ) 193 | ]) 194 | ), 195 | ] 196 | ), 197 | ); 198 | } 199 | } -------------------------------------------------------------------------------- /lib/pages/profile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ProfilePage extends StatefulWidget { 4 | const ProfilePage({ Key? key }) : super(key: key); 5 | 6 | @override 7 | _ProfilePageState createState() => _ProfilePageState(); 8 | } 9 | 10 | class _ProfilePageState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar( 15 | elevation: 0, 16 | backgroundColor: Colors.transparent, 17 | title: Text('Profile Page', style: TextStyle(color: Colors.black)), 18 | ), 19 | body: Center( 20 | child: Text('Profile Page') 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/pages/search.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SearchPage extends StatefulWidget { 4 | const SearchPage({ Key? key }) : super(key: key); 5 | 6 | @override 7 | _SearchPageState createState() => _SearchPageState(); 8 | } 9 | 10 | class _SearchPageState extends State { 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar( 15 | backgroundColor: Colors.transparent, 16 | elevation: 0, 17 | title: Container( 18 | height: 45, 19 | child: TextField( 20 | autofocus: true, 21 | cursorColor: Colors.grey, 22 | decoration: InputDecoration( 23 | contentPadding: EdgeInsets.symmetric(horizontal: 20, vertical: 0), 24 | filled: true, 25 | fillColor: Colors.white, 26 | prefixIcon: Icon(Icons.search, color: Colors.black), 27 | border: OutlineInputBorder( 28 | borderRadius: BorderRadius.circular(50), 29 | borderSide: BorderSide.none 30 | ), 31 | hintText: "Search e.g Sweatshirt", 32 | hintStyle: TextStyle(fontSize: 14, color: Colors.black), 33 | 34 | ), 35 | ), 36 | ), 37 | ), 38 | body: Column( 39 | mainAxisAlignment: MainAxisAlignment.center, 40 | children: [ 41 | Opacity( 42 | opacity: .7, 43 | child: Container( 44 | width: double.infinity, 45 | height: 250, 46 | child: Image( image: AssetImage("assets/images/search.png")), 47 | ) 48 | ), 49 | SizedBox(height: 40,), 50 | Text("Type to search ...", style: TextStyle(fontSize: 20),) 51 | ], 52 | ) 53 | ); 54 | } 55 | } -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.6.1" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.1.0" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.1.0" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.2.0" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.1.0" 39 | collection: 40 | dependency: transitive 41 | description: 42 | name: collection 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "1.15.0" 46 | cupertino_icons: 47 | dependency: "direct main" 48 | description: 49 | name: cupertino_icons 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.0.3" 53 | fake_async: 54 | dependency: transitive 55 | description: 56 | name: fake_async 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.2.0" 60 | flutter: 61 | dependency: "direct main" 62 | description: flutter 63 | source: sdk 64 | version: "0.0.0" 65 | flutter_test: 66 | dependency: "direct dev" 67 | description: flutter 68 | source: sdk 69 | version: "0.0.0" 70 | matcher: 71 | dependency: transitive 72 | description: 73 | name: matcher 74 | url: "https://pub.dartlang.org" 75 | source: hosted 76 | version: "0.12.10" 77 | meta: 78 | dependency: transitive 79 | description: 80 | name: meta 81 | url: "https://pub.dartlang.org" 82 | source: hosted 83 | version: "1.3.0" 84 | path: 85 | dependency: transitive 86 | description: 87 | name: path 88 | url: "https://pub.dartlang.org" 89 | source: hosted 90 | version: "1.8.0" 91 | sky_engine: 92 | dependency: transitive 93 | description: flutter 94 | source: sdk 95 | version: "0.0.99" 96 | source_span: 97 | dependency: transitive 98 | description: 99 | name: source_span 100 | url: "https://pub.dartlang.org" 101 | source: hosted 102 | version: "1.8.1" 103 | stack_trace: 104 | dependency: transitive 105 | description: 106 | name: stack_trace 107 | url: "https://pub.dartlang.org" 108 | source: hosted 109 | version: "1.10.0" 110 | stream_channel: 111 | dependency: transitive 112 | description: 113 | name: stream_channel 114 | url: "https://pub.dartlang.org" 115 | source: hosted 116 | version: "2.1.0" 117 | string_scanner: 118 | dependency: transitive 119 | description: 120 | name: string_scanner 121 | url: "https://pub.dartlang.org" 122 | source: hosted 123 | version: "1.1.0" 124 | term_glyph: 125 | dependency: transitive 126 | description: 127 | name: term_glyph 128 | url: "https://pub.dartlang.org" 129 | source: hosted 130 | version: "1.2.0" 131 | test_api: 132 | dependency: transitive 133 | description: 134 | name: test_api 135 | url: "https://pub.dartlang.org" 136 | source: hosted 137 | version: "0.3.0" 138 | typed_data: 139 | dependency: transitive 140 | description: 141 | name: typed_data 142 | url: "https://pub.dartlang.org" 143 | source: hosted 144 | version: "1.3.0" 145 | vector_math: 146 | dependency: transitive 147 | description: 148 | name: vector_math 149 | url: "https://pub.dartlang.org" 150 | source: hosted 151 | version: "2.1.0" 152 | sdks: 153 | dart: ">=2.12.0 <3.0.0" 154 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: day34 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.12.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | 27 | 28 | # The following adds the Cupertino Icons font to your application. 29 | # Use with the CupertinoIcons class for iOS style icons. 30 | cupertino_icons: ^1.0.2 31 | flashy_tab_bar: ^0.0.3 32 | simple_animations: ^1.3.3 33 | dotted_border: ^2.0.0+1 34 | flutter_slidable: ^0.6.0 35 | 36 | dev_dependencies: 37 | flutter_test: 38 | sdk: flutter 39 | 40 | # For information on the generic Dart part of this file, see the 41 | # following page: https://dart.dev/tools/pub/pubspec 42 | 43 | # The following section is specific to Flutter. 44 | flutter: 45 | 46 | # The following line ensures that the Material Icons font is 47 | # included with your application, so that you can use the icons in 48 | # the material Icons class. 49 | uses-material-design: true 50 | 51 | # To add assets to your application, add an assets section, like this: 52 | assets: 53 | - assets/ 54 | - assets/images/ 55 | # - images/a_dot_ham.jpeg 56 | 57 | # An image asset can refer to one or more resolution-specific "variants", see 58 | # https://flutter.dev/assets-and-images/#resolution-aware. 59 | 60 | # For details regarding adding assets from package dependencies, see 61 | # https://flutter.dev/assets-and-images/#from-packages 62 | 63 | # To add custom fonts to your application, add a fonts section here, 64 | # in this "flutter" section. Each entry in this list should have a 65 | # "family" key with the font family name, and a "fonts" key with a 66 | # list giving the asset and other descriptors for the font. For 67 | # example: 68 | # fonts: 69 | # - family: Schyler 70 | # fonts: 71 | # - asset: fonts/Schyler-Regular.ttf 72 | # - asset: fonts/Schyler-Italic.ttf 73 | # style: italic 74 | # - family: Trajan Pro 75 | # fonts: 76 | # - asset: fonts/TrajanPro.ttf 77 | # - asset: fonts/TrajanPro_Bold.ttf 78 | # weight: 700 79 | # 80 | # For details regarding fonts from package dependencies, 81 | # see https://flutter.dev/custom-fonts/#from-packages 82 | -------------------------------------------------------------------------------- /test/widget_test.dart: -------------------------------------------------------------------------------- 1 | // This is a basic Flutter widget test. 2 | // 3 | // To perform an interaction with a widget in your test, use the WidgetTester 4 | // utility that Flutter provides. For example, you can send tap and scroll 5 | // gestures. You can also use WidgetTester to find child widgets in the widget 6 | // tree, read text, and verify that the values of widget properties are correct. 7 | 8 | import 'package:flutter/material.dart'; 9 | import 'package:flutter_test/flutter_test.dart'; 10 | 11 | import 'package:day34/main.dart'; 12 | 13 | void main() { 14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async { 15 | // Build our app and trigger a frame. 16 | await tester.pumpWidget(MyApp()); 17 | 18 | // Verify that our counter starts at 0. 19 | expect(find.text('0'), findsOneWidget); 20 | expect(find.text('1'), findsNothing); 21 | 22 | // Tap the '+' icon and trigger a frame. 23 | await tester.tap(find.byIcon(Icons.add)); 24 | await tester.pump(); 25 | 26 | // Verify that our counter has incremented. 27 | expect(find.text('0'), findsNothing); 28 | expect(find.text('1'), findsOneWidget); 29 | }); 30 | } 31 | -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/web/favicon.png -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/afgprogrammer/Flutter-e-commerce-app-example/2d070ae295869684df127020e1631a8da1ca7b39/web/icons/Icon-512.png -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | day34 27 | 28 | 29 | 30 | 33 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "day34", 3 | "short_name": "day34", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | --------------------------------------------------------------------------------