├── .gitignore ├── .metadata ├── README.md ├── android ├── .gitignore ├── app │ ├── build.gradle │ ├── google-services.json │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── e_commerce │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-hdpi │ │ │ ├── ic_launcher_foreground.png │ │ │ └── splash_icon.png │ │ │ ├── drawable-mdpi │ │ │ └── ic_launcher_foreground.png │ │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher_foreground.png │ │ │ ├── drawable-xxhdpi │ │ │ └── ic_launcher_foreground.png │ │ │ ├── drawable-xxxhdpi │ │ │ └── ic_launcher_foreground.png │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-anydpi-v26 │ │ │ └── ic_launcher.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 │ │ │ ├── colors.xml │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── dev_assets ├── logo.png └── logo_adaptive.png ├── images ├── about.png ├── camera.jpg ├── man.jpg ├── shopping.png ├── userImage.png └── women.jpg ├── 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-50x50@1x.png │ │ ├── Icon-App-50x50@2x.png │ │ ├── Icon-App-57x57@1x.png │ │ ├── Icon-App-57x57@2x.png │ │ ├── Icon-App-60x60@2x.png │ │ ├── Icon-App-60x60@3x.png │ │ ├── Icon-App-72x72@1x.png │ │ ├── Icon-App-72x72@2x.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 ├── main.dart ├── model │ ├── cartmodel.dart │ ├── categoryicon.dart │ ├── product.dart │ └── usermodel.dart ├── provider │ ├── category_provider.dart │ └── product_provider.dart ├── screens │ ├── about.dart │ ├── checkout.dart │ ├── contactus.dart │ ├── detailscreen.dart │ ├── homepage.dart │ ├── listproduct.dart │ ├── login.dart │ ├── profilescreen.dart │ ├── search_category.dart │ ├── search_product.dart │ ├── signup.dart │ └── welcomescreen.dart └── widgets │ ├── changescreen.dart │ ├── checkout_singleproduct.dart │ ├── mybutton.dart │ ├── mytextformField.dart │ ├── notification_button.dart │ ├── passwordtextformfield.dart │ └── singeproduct.dart ├── pubspec.lock ├── pubspec.yaml └── test └── widget_test.dart /.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 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | -------------------------------------------------------------------------------- /.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: 2ae34518b87dd891355ed6c6ea8cb68c4d52bb9d 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # E-commerce-app 2 | 3 | 4 | - [Check Youtube](https://www.youtube.com/watch?v=6sZWlMhh-EU&list=PLQrn8asEsczpy2AxA3sKSD99wMMWXeAlL) 5 | 6 | ![e commerce Coures ](https://user-images.githubusercontent.com/67558182/120945504-b0a85680-c752-11eb-9de0-1799ea786193.jpg) 7 | -------------------------------------------------------------------------------- /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: 'com.google.gms.google-services' 26 | apply plugin: 'kotlin-android' 27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 28 | 29 | android { 30 | compileSdkVersion 28 31 | 32 | sourceSets { 33 | main.java.srcDirs += 'src/main/kotlin' 34 | } 35 | 36 | lintOptions { 37 | disable 'InvalidPackage' 38 | } 39 | 40 | defaultConfig { 41 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 42 | applicationId "com.example.e_commerce" 43 | minSdkVersion 16 44 | targetSdkVersion 28 45 | versionCode flutterVersionCode.toInteger() 46 | versionName flutterVersionName 47 | multiDexEnabled true 48 | } 49 | 50 | buildTypes { 51 | release { 52 | // TODO: Add your own signing config for the release build. 53 | // Signing with the debug keys for now, so `flutter run --release` works. 54 | signingConfig signingConfigs.debug 55 | } 56 | } 57 | } 58 | 59 | flutter { 60 | source '../..' 61 | } 62 | 63 | dependencies { 64 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 65 | implementation 'com.google.firebase:firebase-analytics:17.5.0' 66 | } 67 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "424436729581", 4 | "firebase_url": "https://my-e-commercial-app.firebaseio.com", 5 | "project_id": "my-e-commercial-app", 6 | "storage_bucket": "my-e-commercial-app.appspot.com" 7 | }, 8 | "client": [ 9 | { 10 | "client_info": { 11 | "mobilesdk_app_id": "1:424436729581:android:06f5271025618615a42ee4", 12 | "android_client_info": { 13 | "package_name": "com.example.e_commerce" 14 | } 15 | }, 16 | "oauth_client": [ 17 | { 18 | "client_id": "424436729581-dp3p0kiion19vm6q6tsbrqs0c3s3s2v6.apps.googleusercontent.com", 19 | "client_type": 3 20 | } 21 | ], 22 | "api_key": [ 23 | { 24 | "current_key": "AIzaSyDTOFvwyRRCVcBIQKdpokL4zvuNnFkT4gM" 25 | } 26 | ], 27 | "services": { 28 | "appinvite_service": { 29 | "other_platform_oauth_client": [ 30 | { 31 | "client_id": "424436729581-dp3p0kiion19vm6q6tsbrqs0c3s3s2v6.apps.googleusercontent.com", 32 | "client_type": 3 33 | } 34 | ] 35 | } 36 | } 37 | } 38 | ], 39 | "configuration_version": "1" 40 | } -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 27 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 46 | 47 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/e_commerce/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.e_commerce 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-hdpi/splash_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/android/app/src/main/res/drawable-hdpi/splash_icon.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values/colors.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | #f8f8f8 4 | #f8f8f8 5 | -------------------------------------------------------------------------------- /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:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.gms:google-services:4.3.3' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(':app') 28 | } 29 | 30 | task clean(type: Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /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-5.6.2-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 | -------------------------------------------------------------------------------- /dev_assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/dev_assets/logo.png -------------------------------------------------------------------------------- /dev_assets/logo_adaptive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/dev_assets/logo_adaptive.png -------------------------------------------------------------------------------- /images/about.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/images/about.png -------------------------------------------------------------------------------- /images/camera.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/images/camera.jpg -------------------------------------------------------------------------------- /images/man.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/images/man.jpg -------------------------------------------------------------------------------- /images/shopping.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/images/shopping.png -------------------------------------------------------------------------------- /images/userImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/images/userImage.png -------------------------------------------------------------------------------- /images/women.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/images/women.jpg -------------------------------------------------------------------------------- /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/app.flx 22 | Flutter/app.zip 23 | Flutter/flutter_assets/ 24 | Flutter/flutter_export_environment.sh 25 | ServiceDefinitions.json 26 | Runner/GeneratedPluginRegistrant.* 27 | 28 | # Exceptions to above rules. 29 | !default.mode1v3 30 | !default.mode2v3 31 | !default.pbxuser 32 | !default.perspectivev3 33 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 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 = 8.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 | FRAMEWORK_SEARCH_PATHS = ( 293 | "$(inherited)", 294 | "$(PROJECT_DIR)/Flutter", 295 | ); 296 | INFOPLIST_FILE = Runner/Info.plist; 297 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 298 | LIBRARY_SEARCH_PATHS = ( 299 | "$(inherited)", 300 | "$(PROJECT_DIR)/Flutter", 301 | ); 302 | PRODUCT_BUNDLE_IDENTIFIER = com.example.eCommerce; 303 | PRODUCT_NAME = "$(TARGET_NAME)"; 304 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 305 | SWIFT_VERSION = 5.0; 306 | VERSIONING_SYSTEM = "apple-generic"; 307 | }; 308 | name = Profile; 309 | }; 310 | 97C147031CF9000F007C117D /* Debug */ = { 311 | isa = XCBuildConfiguration; 312 | buildSettings = { 313 | ALWAYS_SEARCH_USER_PATHS = NO; 314 | CLANG_ANALYZER_NONNULL = YES; 315 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 316 | CLANG_CXX_LIBRARY = "libc++"; 317 | CLANG_ENABLE_MODULES = YES; 318 | CLANG_ENABLE_OBJC_ARC = YES; 319 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 320 | CLANG_WARN_BOOL_CONVERSION = YES; 321 | CLANG_WARN_COMMA = YES; 322 | CLANG_WARN_CONSTANT_CONVERSION = YES; 323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 325 | CLANG_WARN_EMPTY_BODY = YES; 326 | CLANG_WARN_ENUM_CONVERSION = YES; 327 | CLANG_WARN_INFINITE_RECURSION = YES; 328 | CLANG_WARN_INT_CONVERSION = YES; 329 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 330 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 334 | CLANG_WARN_STRICT_PROTOTYPES = YES; 335 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 336 | CLANG_WARN_UNREACHABLE_CODE = YES; 337 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 338 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 339 | COPY_PHASE_STRIP = NO; 340 | DEBUG_INFORMATION_FORMAT = dwarf; 341 | ENABLE_STRICT_OBJC_MSGSEND = YES; 342 | ENABLE_TESTABILITY = YES; 343 | GCC_C_LANGUAGE_STANDARD = gnu99; 344 | GCC_DYNAMIC_NO_PIC = NO; 345 | GCC_NO_COMMON_BLOCKS = YES; 346 | GCC_OPTIMIZATION_LEVEL = 0; 347 | GCC_PREPROCESSOR_DEFINITIONS = ( 348 | "DEBUG=1", 349 | "$(inherited)", 350 | ); 351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 353 | GCC_WARN_UNDECLARED_SELECTOR = YES; 354 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 355 | GCC_WARN_UNUSED_FUNCTION = YES; 356 | GCC_WARN_UNUSED_VARIABLE = YES; 357 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 358 | MTL_ENABLE_DEBUG_INFO = YES; 359 | ONLY_ACTIVE_ARCH = YES; 360 | SDKROOT = iphoneos; 361 | TARGETED_DEVICE_FAMILY = "1,2"; 362 | }; 363 | name = Debug; 364 | }; 365 | 97C147041CF9000F007C117D /* Release */ = { 366 | isa = XCBuildConfiguration; 367 | buildSettings = { 368 | ALWAYS_SEARCH_USER_PATHS = NO; 369 | CLANG_ANALYZER_NONNULL = YES; 370 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 371 | CLANG_CXX_LIBRARY = "libc++"; 372 | CLANG_ENABLE_MODULES = YES; 373 | CLANG_ENABLE_OBJC_ARC = YES; 374 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 375 | CLANG_WARN_BOOL_CONVERSION = YES; 376 | CLANG_WARN_COMMA = YES; 377 | CLANG_WARN_CONSTANT_CONVERSION = YES; 378 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 380 | CLANG_WARN_EMPTY_BODY = YES; 381 | CLANG_WARN_ENUM_CONVERSION = YES; 382 | CLANG_WARN_INFINITE_RECURSION = YES; 383 | CLANG_WARN_INT_CONVERSION = YES; 384 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 385 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 386 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 387 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 388 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 389 | CLANG_WARN_STRICT_PROTOTYPES = YES; 390 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 391 | CLANG_WARN_UNREACHABLE_CODE = YES; 392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 393 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 394 | COPY_PHASE_STRIP = NO; 395 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 396 | ENABLE_NS_ASSERTIONS = NO; 397 | ENABLE_STRICT_OBJC_MSGSEND = YES; 398 | GCC_C_LANGUAGE_STANDARD = gnu99; 399 | GCC_NO_COMMON_BLOCKS = YES; 400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 401 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 402 | GCC_WARN_UNDECLARED_SELECTOR = YES; 403 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 404 | GCC_WARN_UNUSED_FUNCTION = YES; 405 | GCC_WARN_UNUSED_VARIABLE = YES; 406 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 407 | MTL_ENABLE_DEBUG_INFO = NO; 408 | SDKROOT = iphoneos; 409 | SUPPORTED_PLATFORMS = iphoneos; 410 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 411 | TARGETED_DEVICE_FAMILY = "1,2"; 412 | VALIDATE_PRODUCT = YES; 413 | }; 414 | name = Release; 415 | }; 416 | 97C147061CF9000F007C117D /* Debug */ = { 417 | isa = XCBuildConfiguration; 418 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 419 | buildSettings = { 420 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 421 | CLANG_ENABLE_MODULES = YES; 422 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 423 | ENABLE_BITCODE = NO; 424 | FRAMEWORK_SEARCH_PATHS = ( 425 | "$(inherited)", 426 | "$(PROJECT_DIR)/Flutter", 427 | ); 428 | INFOPLIST_FILE = Runner/Info.plist; 429 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 430 | LIBRARY_SEARCH_PATHS = ( 431 | "$(inherited)", 432 | "$(PROJECT_DIR)/Flutter", 433 | ); 434 | PRODUCT_BUNDLE_IDENTIFIER = com.example.eCommerce; 435 | PRODUCT_NAME = "$(TARGET_NAME)"; 436 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 437 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 438 | SWIFT_VERSION = 5.0; 439 | VERSIONING_SYSTEM = "apple-generic"; 440 | }; 441 | name = Debug; 442 | }; 443 | 97C147071CF9000F007C117D /* Release */ = { 444 | isa = XCBuildConfiguration; 445 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 446 | buildSettings = { 447 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 448 | CLANG_ENABLE_MODULES = YES; 449 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 450 | ENABLE_BITCODE = NO; 451 | FRAMEWORK_SEARCH_PATHS = ( 452 | "$(inherited)", 453 | "$(PROJECT_DIR)/Flutter", 454 | ); 455 | INFOPLIST_FILE = Runner/Info.plist; 456 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 457 | LIBRARY_SEARCH_PATHS = ( 458 | "$(inherited)", 459 | "$(PROJECT_DIR)/Flutter", 460 | ); 461 | PRODUCT_BUNDLE_IDENTIFIER = com.example.eCommerce; 462 | PRODUCT_NAME = "$(TARGET_NAME)"; 463 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 464 | SWIFT_VERSION = 5.0; 465 | VERSIONING_SYSTEM = "apple-generic"; 466 | }; 467 | name = Release; 468 | }; 469 | /* End XCBuildConfiguration section */ 470 | 471 | /* Begin XCConfigurationList section */ 472 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 473 | isa = XCConfigurationList; 474 | buildConfigurations = ( 475 | 97C147031CF9000F007C117D /* Debug */, 476 | 97C147041CF9000F007C117D /* Release */, 477 | 249021D3217E4FDB00AE95B9 /* Profile */, 478 | ); 479 | defaultConfigurationIsVisible = 0; 480 | defaultConfigurationName = Release; 481 | }; 482 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 483 | isa = XCConfigurationList; 484 | buildConfigurations = ( 485 | 97C147061CF9000F007C117D /* Debug */, 486 | 97C147071CF9000F007C117D /* Release */, 487 | 249021D4217E4FDB00AE95B9 /* Profile */, 488 | ); 489 | defaultConfigurationIsVisible = 0; 490 | defaultConfigurationName = Release; 491 | }; 492 | /* End XCConfigurationList section */ 493 | }; 494 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 495 | } 496 | -------------------------------------------------------------------------------- /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/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/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/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/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/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/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/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/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/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/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/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/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/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/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/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/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/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/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/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/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/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/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/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/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/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/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/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/theflutterhub/E-commerce-app/619b3230af69b1154bbcc60e16acab66fe093721/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 | e_commerce 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/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:e_commerce/provider/category_provider.dart'; 2 | import 'package:e_commerce/provider/product_provider.dart'; 3 | import 'package:e_commerce/screens/homepage.dart'; 4 | import 'package:e_commerce/screens/login.dart'; 5 | import 'package:e_commerce/screens/welcomescreen.dart'; 6 | 7 | import 'package:firebase_auth/firebase_auth.dart'; 8 | import 'package:flutter/material.dart'; 9 | import 'package:provider/provider.dart'; 10 | import 'package:firebase_core/firebase_core.dart'; 11 | 12 | void main() async { 13 | WidgetsFlutterBinding.ensureInitialized(); 14 | await Firebase.initializeApp(); 15 | runApp(MyApp()); 16 | } 17 | 18 | class MyApp extends StatelessWidget { 19 | @override 20 | Widget build(BuildContext context) { 21 | return MultiProvider( 22 | providers: [ 23 | ChangeNotifierProvider( 24 | create: (context) => CategoryProvider(), 25 | ), 26 | ChangeNotifierProvider( 27 | create: (context) => ProductProvider(), 28 | ), 29 | ], 30 | child: MaterialApp( 31 | theme: ThemeData( 32 | primaryColor: Color(0xff746bc9), 33 | iconTheme: IconThemeData(color: Colors.black), 34 | ), 35 | debugShowCheckedModeBanner: false, 36 | home: StreamBuilder( 37 | stream: FirebaseAuth.instance.authStateChanges(), 38 | builder: (context, snapshot) { 39 | if (snapshot.hasData) { 40 | return HomePage(); 41 | } else { 42 | return Login(); 43 | } 44 | }, 45 | ), 46 | ), 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/model/cartmodel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class CartModel { 4 | final String name; 5 | final String image; 6 | final double price; 7 | final int quentity; 8 | final String color; 9 | final String size; 10 | CartModel({ 11 | @required this.price, 12 | @required this.name, 13 | @required this.image, 14 | @required this.size, 15 | @required this.color, 16 | @required this.quentity, 17 | }); 18 | } 19 | -------------------------------------------------------------------------------- /lib/model/categoryicon.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | 4 | class CategoryIcon { 5 | final String image; 6 | CategoryIcon({@required this.image}); 7 | } 8 | -------------------------------------------------------------------------------- /lib/model/product.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Product { 4 | final String name; 5 | final String image; 6 | final double price; 7 | Product({@required this.image, @required this.name, @required this.price}); 8 | } 9 | -------------------------------------------------------------------------------- /lib/model/usermodel.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class UserModel { 4 | String userName, 5 | userEmail, 6 | userGender, 7 | userPhoneNumber, 8 | userImage, 9 | userAddress; 10 | UserModel( 11 | {@required this.userEmail, 12 | @required this.userImage, 13 | @required this.userAddress, 14 | @required this.userGender, 15 | @required this.userName, 16 | @required this.userPhoneNumber}); 17 | } 18 | -------------------------------------------------------------------------------- /lib/provider/category_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:e_commerce/model/categoryicon.dart'; 3 | import 'package:e_commerce/model/product.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | class CategoryProvider with ChangeNotifier { 7 | List shirt = []; 8 | Product shirtData; 9 | List dress = []; 10 | Product dressData; 11 | List shoes = []; 12 | Product shoesData; 13 | List pant = []; 14 | Product pantData; 15 | List tie = []; 16 | Product tieData; 17 | List dressIcon = []; 18 | CategoryIcon dressiconData; 19 | 20 | Future getDressIconData() async { 21 | List newList = []; 22 | QuerySnapshot dressSnapShot = await FirebaseFirestore.instance 23 | .collection("categoryicon") 24 | .doc("SiNJYcU8RRVrXaLUL9v3") 25 | .collection("dress") 26 | .get(); 27 | dressSnapShot.docs.forEach( 28 | (element) { 29 | dressiconData = CategoryIcon(image: element.data()["image"]); 30 | newList.add(dressiconData); 31 | }, 32 | ); 33 | dressIcon = newList; 34 | notifyListeners(); 35 | } 36 | 37 | List get getDressIcon { 38 | return dressIcon; 39 | } 40 | 41 | List shirtIcon = []; 42 | CategoryIcon shirticonData; 43 | Future getShirtIcon() async { 44 | List newList = []; 45 | QuerySnapshot shirtSnapShot = await FirebaseFirestore.instance 46 | .collection("categoryicon") 47 | .doc("SiNJYcU8RRVrXaLUL9v3") 48 | .collection("shirt") 49 | .get(); 50 | shirtSnapShot.docs.forEach( 51 | (element) { 52 | shirticonData = CategoryIcon(image: element.data()["image"]); 53 | newList.add(shirticonData); 54 | }, 55 | ); 56 | shirtIcon = newList; 57 | notifyListeners(); 58 | } 59 | 60 | List get getShirtIconData { 61 | return shirtIcon; 62 | } 63 | 64 | List shoesIcon = []; 65 | CategoryIcon shoesiconData; 66 | Future getshoesIconData() async { 67 | List newList = []; 68 | QuerySnapshot shoesSnapShot = await FirebaseFirestore.instance 69 | .collection("categoryicon") 70 | .doc("SiNJYcU8RRVrXaLUL9v3") 71 | .collection("shoe") 72 | .get(); 73 | shoesSnapShot.docs.forEach( 74 | (element) { 75 | shoesiconData = CategoryIcon(image: element.data()["image"]); 76 | newList.add(shoesiconData); 77 | }, 78 | ); 79 | shoesIcon = newList; 80 | notifyListeners(); 81 | } 82 | 83 | List get getShoeIcon { 84 | return shoesIcon; 85 | } 86 | 87 | List pantIcon = []; 88 | CategoryIcon panticonData; 89 | Future getPantIconData() async { 90 | List newList = []; 91 | QuerySnapshot pantSnapShot = await FirebaseFirestore.instance 92 | .collection("categoryicon") 93 | .doc("SiNJYcU8RRVrXaLUL9v3") 94 | .collection("pant") 95 | .get(); 96 | pantSnapShot.docs.forEach( 97 | (element) { 98 | panticonData = CategoryIcon(image: element.data()["image"]); 99 | newList.add(panticonData); 100 | }, 101 | ); 102 | pantIcon = newList; 103 | notifyListeners(); 104 | } 105 | 106 | List get getPantIcon { 107 | return pantIcon; 108 | } 109 | 110 | List tieIcon = []; 111 | CategoryIcon tieIconData; 112 | Future getTieIconData() async { 113 | List newList = []; 114 | QuerySnapshot tieSnapShot = await FirebaseFirestore.instance 115 | .collection("categoryicon") 116 | .doc("SiNJYcU8RRVrXaLUL9v3") 117 | .collection("tie") 118 | .get(); 119 | tieSnapShot.docs.forEach( 120 | (element) { 121 | tieIconData = CategoryIcon(image: element.data()["image"]); 122 | newList.add(tieIconData); 123 | }, 124 | ); 125 | tieIcon = newList; 126 | notifyListeners(); 127 | } 128 | 129 | List get getTieIcon { 130 | return tieIcon; 131 | } 132 | 133 | Future getShirtData() async { 134 | List newList = []; 135 | QuerySnapshot shirtSnapShot = await FirebaseFirestore.instance 136 | .collection("category") 137 | .doc("hKyfiWV7zSLen6HYJgVf") 138 | .collection("shirt") 139 | .get(); 140 | shirtSnapShot.docs.forEach( 141 | (element) { 142 | shirtData = Product( 143 | image: element.data()["image"], 144 | name: element.data()["name"], 145 | price: element.data()["price"]); 146 | newList.add(shirtData); 147 | }, 148 | ); 149 | shirt = newList; 150 | notifyListeners(); 151 | } 152 | 153 | List get getShirtList { 154 | return shirt; 155 | } 156 | 157 | Future getDressData() async { 158 | List newList = []; 159 | QuerySnapshot shirtSnapShot = await FirebaseFirestore.instance 160 | .collection("category") 161 | .doc("hKyfiWV7zSLen6HYJgVf") 162 | .collection("dress") 163 | .get(); 164 | shirtSnapShot.docs.forEach( 165 | (element) { 166 | shirtData = Product( 167 | image: element.data()["image"], 168 | name: element.data()["name"], 169 | price: element.data()["price"]); 170 | newList.add(shirtData); 171 | }, 172 | ); 173 | dress = newList; 174 | notifyListeners(); 175 | } 176 | 177 | List get getDressList { 178 | return dress; 179 | } 180 | 181 | Future getShoesData() async { 182 | List newList = []; 183 | QuerySnapshot shirtSnapShot = await FirebaseFirestore.instance 184 | .collection("category") 185 | .doc("hKyfiWV7zSLen6HYJgVf") 186 | .collection("shoes") 187 | .get(); 188 | shirtSnapShot.docs.forEach( 189 | (element) { 190 | shirtData = Product( 191 | image: element.data()["image"], 192 | name: element.data()["name"], 193 | price: element.data()["price"]); 194 | newList.add(shirtData); 195 | }, 196 | ); 197 | shoes = newList; 198 | notifyListeners(); 199 | } 200 | 201 | List get getshoesList { 202 | return shoes; 203 | } 204 | 205 | Future getPantData() async { 206 | List newList = []; 207 | QuerySnapshot shirtSnapShot = await FirebaseFirestore.instance 208 | .collection("category") 209 | .doc("hKyfiWV7zSLen6HYJgVf") 210 | .collection("pant") 211 | .get(); 212 | shirtSnapShot.docs.forEach( 213 | (element) { 214 | shirtData = Product( 215 | image: element.data()["image"], 216 | name: element.data()["name"], 217 | price: element.data()["price"]); 218 | newList.add(shirtData); 219 | }, 220 | ); 221 | pant = newList; 222 | notifyListeners(); 223 | } 224 | 225 | List get getPantList { 226 | return pant; 227 | } 228 | 229 | Future getTieData() async { 230 | List newList = []; 231 | QuerySnapshot shirtSnapShot = await FirebaseFirestore.instance 232 | .collection("category") 233 | .doc("hKyfiWV7zSLen6HYJgVf") 234 | .collection("tie") 235 | .get(); 236 | shirtSnapShot.docs.forEach( 237 | (element) { 238 | shirtData = Product( 239 | image: element.data()["image"], 240 | name: element.data()["name"], 241 | price: element.data()["price"]); 242 | newList.add(shirtData); 243 | }, 244 | ); 245 | tie = newList; 246 | notifyListeners(); 247 | } 248 | 249 | List get getTieList { 250 | return tie; 251 | } 252 | 253 | List searchList; 254 | void getSearchList({List list}) { 255 | searchList = list; 256 | } 257 | 258 | List searchCategoryList(String query) { 259 | List searchShirt = searchList.where((element) { 260 | return element.name.toUpperCase().contains(query) || 261 | element.name.toLowerCase().contains(query); 262 | }).toList(); 263 | return searchShirt; 264 | } 265 | } 266 | -------------------------------------------------------------------------------- /lib/provider/product_provider.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:e_commerce/model/cartmodel.dart'; 3 | import 'package:e_commerce/model/product.dart'; 4 | import 'package:e_commerce/model/usermodel.dart'; 5 | import 'package:firebase_auth/firebase_auth.dart'; 6 | 7 | import 'package:flutter/material.dart'; 8 | 9 | class ProductProvider with ChangeNotifier { 10 | List feature = []; 11 | Product featureData; 12 | 13 | List checkOutModelList = []; 14 | CartModel checkOutModel; 15 | List userModelList = []; 16 | UserModel userModel; 17 | Future getUserData() async { 18 | List newList = []; 19 | User currentUser = FirebaseAuth.instance.currentUser; 20 | QuerySnapshot userSnapShot = 21 | await FirebaseFirestore.instance.collection("User").get(); 22 | userSnapShot.docs.forEach( 23 | (element) { 24 | if (currentUser.uid == element.data()["UserId"]) { 25 | userModel = UserModel( 26 | userAddress: element.data()["UserAddress"], 27 | userImage: element.data()["UserImage"], 28 | userEmail: element.data()["UserEmail"], 29 | userGender: element.data()["UserGender"], 30 | userName: element.data()["UserName"], 31 | userPhoneNumber: element.data()["UserNumber"]); 32 | newList.add(userModel); 33 | } 34 | userModelList = newList; 35 | }, 36 | ); 37 | } 38 | 39 | List get getUserModelList { 40 | return userModelList; 41 | } 42 | 43 | void deleteCheckoutProduct(int index) { 44 | checkOutModelList.removeAt(index); 45 | notifyListeners(); 46 | } 47 | 48 | void clearCheckoutProduct() { 49 | checkOutModelList.clear(); 50 | notifyListeners(); 51 | } 52 | 53 | void getCheckOutData({ 54 | int quentity, 55 | double price, 56 | String name, 57 | String color, 58 | String size, 59 | String image, 60 | }) { 61 | checkOutModel = CartModel( 62 | color: color, 63 | size: size, 64 | price: price, 65 | name: name, 66 | image: image, 67 | quentity: quentity, 68 | ); 69 | checkOutModelList.add(checkOutModel); 70 | } 71 | 72 | List get getCheckOutModelList { 73 | return List.from(checkOutModelList); 74 | } 75 | 76 | int get getCheckOutModelListLength { 77 | return checkOutModelList.length; 78 | } 79 | 80 | Future getFeatureData() async { 81 | List newList = []; 82 | QuerySnapshot featureSnapShot = await FirebaseFirestore.instance 83 | .collection("products") 84 | .doc("hfPmMokn0tbAuGZvRMy1") 85 | .collection("featureproduct") 86 | .get(); 87 | featureSnapShot.docs.forEach( 88 | (element) { 89 | featureData = Product( 90 | image: element.data()["image"], 91 | name: element.data()["name"], 92 | price: element.data()["price"]); 93 | newList.add(featureData); 94 | }, 95 | ); 96 | feature = newList; 97 | } 98 | 99 | List get getFeatureList { 100 | return feature; 101 | } 102 | 103 | List homeFeature = []; 104 | 105 | Future getHomeFeatureData() async { 106 | List newList = []; 107 | QuerySnapshot featureSnapShot = 108 | await FirebaseFirestore.instance.collection("homefeature").get(); 109 | featureSnapShot.docs.forEach( 110 | (element) { 111 | featureData = Product( 112 | image: element.data()["image"], 113 | name: element.data()["name"], 114 | price: element.data()["price"]); 115 | newList.add(featureData); 116 | }, 117 | ); 118 | homeFeature = newList; 119 | notifyListeners(); 120 | } 121 | 122 | List get getHomeFeatureList { 123 | return homeFeature; 124 | } 125 | 126 | List homeAchive = []; 127 | 128 | Future getHomeAchiveData() async { 129 | List newList = []; 130 | QuerySnapshot featureSnapShot = 131 | await FirebaseFirestore.instance.collection("homeachive").get(); 132 | featureSnapShot.docs.forEach( 133 | (element) { 134 | featureData = Product( 135 | image: element.data()["image"], 136 | name: element.data()["name"], 137 | price: element.data()["price"]); 138 | newList.add(featureData); 139 | }, 140 | ); 141 | homeAchive = newList; 142 | notifyListeners(); 143 | } 144 | 145 | List get getHomeAchiveList { 146 | return homeAchive; 147 | } 148 | 149 | List newAchives = []; 150 | Product newAchivesData; 151 | Future getNewAchiveData() async { 152 | List newList = []; 153 | QuerySnapshot achivesSnapShot = await FirebaseFirestore.instance 154 | .collection("products") 155 | .doc("hfPmMokn0tbAuGZvRMy1") 156 | .collection("newachives") 157 | .get(); 158 | achivesSnapShot.docs.forEach( 159 | (element) { 160 | newAchivesData = Product( 161 | image: element.data()["image"], 162 | name: element.data()["name"], 163 | price: element.data()["price"]); 164 | newList.add(newAchivesData); 165 | }, 166 | ); 167 | newAchives = newList; 168 | notifyListeners(); 169 | } 170 | 171 | List get getNewAchiesList { 172 | return newAchives; 173 | } 174 | 175 | List notificationList = []; 176 | 177 | void addNotification(String notification) { 178 | notificationList.add(notification); 179 | } 180 | 181 | int get getNotificationIndex { 182 | return notificationList.length; 183 | } 184 | 185 | get getNotificationList { 186 | return notificationList; 187 | } 188 | 189 | List searchList; 190 | void getSearchList({List list}) { 191 | searchList = list; 192 | } 193 | 194 | List searchProductList(String query) { 195 | List searchShirt = searchList.where((element) { 196 | return element.name.toUpperCase().contains(query) || 197 | element.name.toLowerCase().contains(query); 198 | }).toList(); 199 | return searchShirt; 200 | } 201 | } 202 | -------------------------------------------------------------------------------- /lib/screens/about.dart: -------------------------------------------------------------------------------- 1 | import 'package:e_commerce/screens/homepage.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | class About extends StatelessWidget { 5 | @override 6 | Widget build(BuildContext context) { 7 | return WillPopScope( 8 | onWillPop: () async { 9 | return Navigator.of(context) 10 | .pushReplacement(MaterialPageRoute(builder: (ctx) => HomePage())); 11 | }, 12 | child: Scaffold( 13 | appBar: AppBar( 14 | elevation: 0.0, 15 | backgroundColor: Color(0xfff8f8f8), 16 | title: IconButton( 17 | icon: Icon( 18 | Icons.arrow_back, 19 | color: Color(0xff746bc9), 20 | size: 35, 21 | ), 22 | onPressed: () { 23 | Navigator.of(context).pushReplacement( 24 | MaterialPageRoute(builder: (ctx) => HomePage())); 25 | }, 26 | ), 27 | ), 28 | body: Container( 29 | padding: EdgeInsets.symmetric(horizontal: 27), 30 | height: double.infinity, 31 | width: double.infinity, 32 | child: Column( 33 | mainAxisAlignment: MainAxisAlignment.center, 34 | crossAxisAlignment: CrossAxisAlignment.start, 35 | children: [ 36 | Text( 37 | "About", 38 | style: TextStyle( 39 | fontSize: 40, 40 | color: Color(0xff746bc9), 41 | ), 42 | ), 43 | Image( 44 | image: AssetImage("images/about.png"), 45 | ), 46 | SizedBox( 47 | height: 20, 48 | ), 49 | Container( 50 | height: 280, 51 | width: 360, 52 | child: Wrap( 53 | children: [ 54 | Text( 55 | "Neru My Black Directionary,This App You Can Buy Dress Shirt Shoes Pant And Tie And Many Other Product In Cheap Price, Now Its Time Buy SomeThing", 56 | style: TextStyle(fontSize: 22, color: Colors.grey), 57 | ), 58 | ], 59 | ), 60 | ), 61 | ], 62 | ), 63 | ), 64 | ), 65 | ); 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /lib/screens/checkout.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:e_commerce/model/cartmodel.dart'; 3 | 4 | import 'package:e_commerce/provider/product_provider.dart'; 5 | import 'package:e_commerce/screens/homepage.dart'; 6 | import 'package:e_commerce/widgets/checkout_singleproduct.dart'; 7 | import 'package:e_commerce/widgets/mybutton.dart'; 8 | import 'package:e_commerce/widgets/notification_button.dart'; 9 | import 'package:firebase_auth/firebase_auth.dart'; 10 | import 'package:flutter/material.dart'; 11 | import 'package:provider/provider.dart'; 12 | 13 | class CheckOut extends StatefulWidget { 14 | @override 15 | _CheckOutState createState() => _CheckOutState(); 16 | } 17 | 18 | class _CheckOutState extends State { 19 | TextStyle myStyle = TextStyle( 20 | fontSize: 18, 21 | ); 22 | final GlobalKey _scaffoldKey = GlobalKey(); 23 | 24 | ProductProvider productProvider; 25 | 26 | Widget _buildBottomSingleDetail({String startName, String endName}) { 27 | return Row( 28 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 29 | children: [ 30 | Text( 31 | startName, 32 | style: myStyle, 33 | ), 34 | Text( 35 | endName, 36 | style: myStyle, 37 | ), 38 | ], 39 | ); 40 | } 41 | 42 | User user; 43 | double total; 44 | List myList; 45 | 46 | Widget _buildButton() { 47 | return Column( 48 | children: productProvider.userModelList.map((e) { 49 | return Container( 50 | height: 50, 51 | child: MyButton( 52 | name: "Buy", 53 | onPressed: () { 54 | if (productProvider.getCheckOutModelList.isNotEmpty) { 55 | FirebaseFirestore.instance.collection("Order").add({ 56 | "Product": productProvider.getCheckOutModelList 57 | .map((c) => { 58 | "ProductName": c.name, 59 | "ProductPrice": c.price, 60 | "ProductQuetity": c.quentity, 61 | "ProductImage": c.image, 62 | "Product Color": c.color, 63 | "Product Size": c.size, 64 | }) 65 | .toList(), 66 | "TotalPrice": total.toStringAsFixed(2), 67 | "UserName": e.userName, 68 | "UserEmail": e.userEmail, 69 | "UserNumber": e.userPhoneNumber, 70 | "UserAddress": e.userAddress, 71 | "UserId": user.uid, 72 | }); 73 | setState(() { 74 | myList.clear(); 75 | }); 76 | 77 | productProvider.addNotification("Notification"); 78 | } else { 79 | _scaffoldKey.currentState.showSnackBar( 80 | SnackBar( 81 | content: Text("No Item Yet"), 82 | ), 83 | ); 84 | } 85 | }, 86 | ), 87 | ); 88 | }).toList()); 89 | } 90 | 91 | @override 92 | void initState() { 93 | productProvider = Provider.of(context, listen: false); 94 | myList = productProvider.checkOutModelList; 95 | super.initState(); 96 | } 97 | 98 | @override 99 | Widget build(BuildContext context) { 100 | user = FirebaseAuth.instance.currentUser; 101 | double subTotal = 0; 102 | double discount = 3; 103 | double discountRupees; 104 | double shipping = 60; 105 | 106 | productProvider = Provider.of(context); 107 | productProvider.getCheckOutModelList.forEach((element) { 108 | subTotal += element.price * element.quentity; 109 | }); 110 | 111 | discountRupees = discount / 100 * subTotal; 112 | total = subTotal + shipping - discountRupees; 113 | if (productProvider.checkOutModelList.isEmpty) { 114 | total = 0.0; 115 | discount = 0.0; 116 | shipping = 0.0; 117 | } 118 | 119 | return WillPopScope( 120 | onWillPop: () async { 121 | return Navigator.of(context).pushReplacement( 122 | MaterialPageRoute( 123 | builder: (ctx) => HomePage(), 124 | ), 125 | ); 126 | }, 127 | child: Scaffold( 128 | key: _scaffoldKey, 129 | appBar: AppBar( 130 | centerTitle: true, 131 | title: Text("CheckOut Page", style: TextStyle(color: Colors.black)), 132 | backgroundColor: Colors.transparent, 133 | elevation: 0.0, 134 | leading: IconButton( 135 | icon: Icon( 136 | Icons.arrow_back, 137 | color: Colors.black, 138 | ), 139 | onPressed: () { 140 | Navigator.of(context).pushReplacement( 141 | MaterialPageRoute( 142 | builder: (ctx) => HomePage(), 143 | ), 144 | ); 145 | }, 146 | ), 147 | actions: [ 148 | NotificationButton(), 149 | ], 150 | ), 151 | bottomNavigationBar: Container( 152 | height: 70, 153 | width: 100, 154 | margin: EdgeInsets.symmetric(horizontal: 10), 155 | padding: EdgeInsets.only(bottom: 15), 156 | child: _buildButton(), 157 | ), 158 | body: Container( 159 | padding: EdgeInsets.symmetric(horizontal: 15, vertical: 15), 160 | child: Column( 161 | crossAxisAlignment: CrossAxisAlignment.start, 162 | children: [ 163 | Expanded( 164 | flex: 2, 165 | child: Container( 166 | child: ListView.builder( 167 | itemCount: myList.length, 168 | itemBuilder: (ctx, myIndex) { 169 | return CheckOutSingleProduct( 170 | index: myIndex, 171 | color: myList[myIndex].color, 172 | size: myList[myIndex].size, 173 | image: myList[myIndex].image, 174 | name: myList[myIndex].name, 175 | price: myList[myIndex].price, 176 | quentity: myList[myIndex].quentity, 177 | ); 178 | }, 179 | ), 180 | ), 181 | ), 182 | Expanded( 183 | child: Container( 184 | child: Column( 185 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 186 | children: [ 187 | _buildBottomSingleDetail( 188 | startName: "Subtotal", 189 | endName: "\$ ${subTotal.toStringAsFixed(2)}", 190 | ), 191 | _buildBottomSingleDetail( 192 | startName: "Discount", 193 | endName: "${discount.toStringAsFixed(2)}%", 194 | ), 195 | _buildBottomSingleDetail( 196 | startName: "Shipping", 197 | endName: "\$ ${shipping.toStringAsFixed(2)}", 198 | ), 199 | _buildBottomSingleDetail( 200 | startName: "Total", 201 | endName: "\$ ${total.toStringAsFixed(2)}", 202 | ), 203 | ], 204 | ), 205 | ), 206 | ) 207 | ], 208 | ), 209 | ), 210 | ), 211 | ); 212 | } 213 | } 214 | -------------------------------------------------------------------------------- /lib/screens/contactus.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | 3 | import 'package:e_commerce/model/usermodel.dart'; 4 | import 'package:e_commerce/provider/product_provider.dart'; 5 | import 'package:e_commerce/screens/homepage.dart'; 6 | import 'package:e_commerce/widgets/mybutton.dart'; 7 | import 'package:firebase_auth/firebase_auth.dart'; 8 | import 'package:flutter/material.dart'; 9 | import 'package:provider/provider.dart'; 10 | 11 | class ContactUs extends StatefulWidget { 12 | @override 13 | _ContactUsState createState() => _ContactUsState(); 14 | } 15 | 16 | class _ContactUsState extends State { 17 | final TextEditingController message = TextEditingController(); 18 | 19 | String name, email; 20 | 21 | final GlobalKey _scaffoldKey = GlobalKey(); 22 | 23 | void vaildation() async { 24 | if (message.text.isEmpty) { 25 | _scaffoldKey.currentState.showSnackBar( 26 | SnackBar( 27 | content: Text("Please Fill Message"), 28 | ), 29 | ); 30 | } else { 31 | User user = FirebaseAuth.instance.currentUser; 32 | FirebaseFirestore.instance.collection("Message").doc(user.uid).set({ 33 | "Name": name, 34 | "Email": email, 35 | "Message": message.text, 36 | }); 37 | } 38 | } 39 | 40 | Widget _buildSingleFlied({String name}) { 41 | return Container( 42 | height: 60, 43 | width: double.infinity, 44 | decoration: BoxDecoration( 45 | color: Colors.white, 46 | borderRadius: BorderRadius.circular(5), 47 | border: Border.all(color: Colors.grey), 48 | ), 49 | padding: EdgeInsets.only(left: 10), 50 | child: Column( 51 | crossAxisAlignment: CrossAxisAlignment.start, 52 | mainAxisAlignment: MainAxisAlignment.center, 53 | children: [ 54 | Text( 55 | name, 56 | style: TextStyle(fontSize: 18, fontWeight: FontWeight.bold), 57 | ), 58 | ], 59 | ), 60 | ); 61 | } 62 | 63 | @override 64 | void initState() { 65 | ProductProvider provider; 66 | provider = Provider.of(context, listen: false); 67 | List user = provider.userModelList; 68 | user.map((e) { 69 | name = e.userName; 70 | email = e.userEmail; 71 | 72 | return Container(); 73 | }).toList(); 74 | 75 | super.initState(); 76 | } 77 | 78 | @override 79 | Widget build(BuildContext context) { 80 | print(name); 81 | return WillPopScope( 82 | onWillPop: () { 83 | return Navigator.of(context) 84 | .pushReplacement(MaterialPageRoute(builder: (ctx) => HomePage())); 85 | }, 86 | child: Scaffold( 87 | key: _scaffoldKey, 88 | appBar: AppBar( 89 | elevation: 0.0, 90 | backgroundColor: Color(0xfff8f8f8), 91 | title: IconButton( 92 | icon: Icon( 93 | Icons.arrow_back, 94 | color: Color(0xff746bc9), 95 | size: 35, 96 | ), 97 | onPressed: () { 98 | Navigator.of(context).pushReplacement( 99 | MaterialPageRoute(builder: (ctx) => HomePage())); 100 | }, 101 | ), 102 | ), 103 | body: Container( 104 | padding: EdgeInsets.symmetric(horizontal: 27), 105 | height: 600, 106 | width: double.infinity, 107 | child: Column( 108 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 109 | children: [ 110 | Text( 111 | "Sent Us Your Message", 112 | style: TextStyle( 113 | color: Color(0xff746bc9), 114 | fontSize: 28, 115 | ), 116 | ), 117 | _buildSingleFlied(name: name), 118 | _buildSingleFlied(name: email), 119 | Container( 120 | height: 200, 121 | child: TextFormField( 122 | controller: message, 123 | expands: true, 124 | maxLines: null, 125 | textAlignVertical: TextAlignVertical.top, 126 | decoration: InputDecoration( 127 | border: OutlineInputBorder(), 128 | hintText: " Message", 129 | ), 130 | ), 131 | ), 132 | MyButton( 133 | name: "Submit", 134 | onPressed: () { 135 | vaildation(); 136 | }, 137 | ) 138 | ], 139 | ), 140 | ), 141 | ), 142 | ); 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /lib/screens/detailscreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:e_commerce/screens/checkout.dart'; 2 | import 'package:e_commerce/screens/homepage.dart'; 3 | import 'package:e_commerce/widgets/mybutton.dart'; 4 | import 'package:e_commerce/widgets/notification_button.dart'; 5 | 6 | import 'package:flutter/material.dart'; 7 | import '../provider/product_provider.dart'; 8 | import 'package:provider/provider.dart'; 9 | 10 | class DetailScreen extends StatefulWidget { 11 | final String image; 12 | final String name; 13 | final double price; 14 | DetailScreen({this.image, this.name, this.price}); 15 | @override 16 | _DetailScreenState createState() => _DetailScreenState(); 17 | } 18 | 19 | class _DetailScreenState extends State { 20 | int count = 1; 21 | ProductProvider productProvider; 22 | 23 | Widget _buildColorProduct({Color color}) { 24 | return Container( 25 | height: 40, 26 | width: 40, 27 | color: color, 28 | ); 29 | } 30 | 31 | final TextStyle myStyle = TextStyle( 32 | fontSize: 18, 33 | ); 34 | Widget _buildImage() { 35 | return Center( 36 | child: Container( 37 | width: 380, 38 | child: Card( 39 | child: Container( 40 | padding: EdgeInsets.all(13), 41 | child: Container( 42 | height: 260, 43 | decoration: BoxDecoration( 44 | image: DecorationImage( 45 | fit: BoxFit.fill, 46 | image: NetworkImage(widget.image), 47 | ), 48 | ), 49 | ), 50 | ), 51 | ), 52 | ), 53 | ); 54 | } 55 | 56 | Widget _buildNameToDescriptionPart() { 57 | return Container( 58 | height: 100, 59 | child: Row( 60 | children: [ 61 | Column( 62 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 63 | crossAxisAlignment: CrossAxisAlignment.start, 64 | children: [ 65 | Text(widget.name, style: myStyle), 66 | Text( 67 | "\$ ${widget.price.toString()}", 68 | style: TextStyle( 69 | color: Color(0xff9b96d6), 70 | fontSize: 18, 71 | fontWeight: FontWeight.bold), 72 | ), 73 | Text("Description", style: myStyle), 74 | ], 75 | ), 76 | ], 77 | ), 78 | ); 79 | } 80 | 81 | Widget _buildDiscription() { 82 | return Container( 83 | height: 170, 84 | child: Wrap( 85 | children: [ 86 | Text( 87 | "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. ", 88 | style: TextStyle(fontSize: 16), 89 | ) 90 | ], 91 | ), 92 | ); 93 | } 94 | 95 | List sized = [true, false, false, false]; 96 | List colored = [true, false, false, false]; 97 | int sizeIndex = 0; 98 | String size; 99 | void getSize() { 100 | if (sizeIndex == 0) { 101 | setState(() { 102 | size = "S"; 103 | }); 104 | } else if (sizeIndex == 1) { 105 | setState(() { 106 | size = "M"; 107 | }); 108 | } else if (sizeIndex == 2) { 109 | setState(() { 110 | size = "L"; 111 | }); 112 | } else if (sizeIndex == 3) { 113 | setState(() { 114 | size = "XL"; 115 | }); 116 | } 117 | } 118 | 119 | int colorIndex = 0; 120 | String color; 121 | void getColor() { 122 | if (colorIndex == 0) { 123 | setState(() { 124 | color = "Light Blue"; 125 | }); 126 | } else if (colorIndex == 1) { 127 | setState(() { 128 | color = "Light Green"; 129 | }); 130 | } else if (colorIndex == 2) { 131 | setState(() { 132 | color = "Light Yellow"; 133 | }); 134 | } else if (colorIndex == 3) { 135 | setState(() { 136 | color = "Cyan"; 137 | }); 138 | } 139 | } 140 | 141 | Widget _buildSizePart() { 142 | return Column( 143 | crossAxisAlignment: CrossAxisAlignment.start, 144 | children: [ 145 | Text( 146 | "Size", 147 | style: myStyle, 148 | ), 149 | SizedBox( 150 | height: 15, 151 | ), 152 | Container( 153 | width: 265, 154 | child: ToggleButtons( 155 | children: [ 156 | Text("S"), 157 | Text("M"), 158 | Text("L"), 159 | Text("XL"), 160 | ], 161 | onPressed: (int index) { 162 | setState(() { 163 | for (int indexBtn = 0; indexBtn < sized.length; indexBtn++) { 164 | if (indexBtn == index) { 165 | sized[indexBtn] = true; 166 | } else { 167 | sized[indexBtn] = false; 168 | } 169 | } 170 | }); 171 | setState(() { 172 | sizeIndex = index; 173 | }); 174 | }, 175 | isSelected: sized, 176 | ), 177 | ), 178 | ], 179 | ); 180 | } 181 | 182 | Widget _buildColorPart() { 183 | return Column( 184 | crossAxisAlignment: CrossAxisAlignment.start, 185 | children: [ 186 | SizedBox( 187 | height: 10, 188 | ), 189 | Text( 190 | "Color", 191 | style: myStyle, 192 | ), 193 | SizedBox( 194 | height: 15, 195 | ), 196 | Container( 197 | width: 265, 198 | child: ToggleButtons( 199 | fillColor: Color(0xff746bc9), 200 | renderBorder: false, 201 | children: [ 202 | _buildColorProduct(color: Colors.blue[200]), 203 | _buildColorProduct(color: Colors.green[200]), 204 | _buildColorProduct(color: Colors.yellow[200]), 205 | _buildColorProduct(color: Colors.cyan[300]), 206 | ], 207 | onPressed: (int index) { 208 | setState(() { 209 | for (int indexBtn = 0; indexBtn < colored.length; indexBtn++) { 210 | if (indexBtn == index) { 211 | colored[indexBtn] = true; 212 | } else { 213 | colored[indexBtn] = false; 214 | } 215 | } 216 | }); 217 | setState(() { 218 | colorIndex = index; 219 | }); 220 | }, 221 | isSelected: colored, 222 | ), 223 | ), 224 | ], 225 | ); 226 | } 227 | 228 | Widget _buildQuentityPart() { 229 | return Column( 230 | crossAxisAlignment: CrossAxisAlignment.start, 231 | children: [ 232 | SizedBox( 233 | height: 10, 234 | ), 235 | Text( 236 | "Quentity", 237 | style: myStyle, 238 | ), 239 | SizedBox( 240 | height: 10, 241 | ), 242 | Container( 243 | height: 40, 244 | width: 130, 245 | decoration: BoxDecoration( 246 | color: Color(0xff746bc9), 247 | ), 248 | child: Row( 249 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 250 | children: [ 251 | GestureDetector( 252 | child: Icon( 253 | Icons.remove, 254 | color: Colors.white, 255 | ), 256 | onTap: () { 257 | setState(() { 258 | if (count > 1) { 259 | count--; 260 | } 261 | }); 262 | }, 263 | ), 264 | Text( 265 | count.toString(), 266 | style: TextStyle(fontSize: 18, color: Colors.white), 267 | ), 268 | GestureDetector( 269 | child: Icon( 270 | Icons.add, 271 | color: Colors.white, 272 | ), 273 | onTap: () { 274 | setState(() { 275 | count++; 276 | }); 277 | }, 278 | ), 279 | ], 280 | ), 281 | ), 282 | ], 283 | ); 284 | } 285 | 286 | Widget _buildButtonPart() { 287 | return Container( 288 | height: 60, 289 | child: MyButton( 290 | name: "Add To Cart", 291 | onPressed: () { 292 | getSize(); 293 | getColor(); 294 | productProvider.getCheckOutData( 295 | image: widget.image, 296 | color: color, 297 | size: size, 298 | name: widget.name, 299 | price: widget.price, 300 | quentity: count, 301 | ); 302 | Navigator.of(context).pushReplacement( 303 | MaterialPageRoute( 304 | builder: (ctx) => CheckOut(), 305 | ), 306 | ); 307 | }, 308 | ), 309 | ); 310 | } 311 | 312 | @override 313 | Widget build(BuildContext context) { 314 | productProvider = Provider.of(context); 315 | return WillPopScope( 316 | onWillPop: () async { 317 | return Navigator.of(context).pushReplacement( 318 | MaterialPageRoute( 319 | builder: (ctx) => HomePage(), 320 | ), 321 | ); 322 | }, 323 | child: Scaffold( 324 | appBar: AppBar( 325 | centerTitle: true, 326 | title: Text("Detail Page", style: TextStyle(color: Colors.black)), 327 | backgroundColor: Colors.transparent, 328 | elevation: 0.0, 329 | leading: IconButton( 330 | icon: Icon( 331 | Icons.arrow_back, 332 | color: Colors.black, 333 | ), 334 | onPressed: () { 335 | Navigator.of(context).pushReplacement( 336 | MaterialPageRoute( 337 | builder: (ctx) => HomePage(), 338 | ), 339 | ); 340 | }, 341 | ), 342 | actions: [ 343 | NotificationButton(), 344 | ], 345 | ), 346 | body: Container( 347 | child: ListView( 348 | children: [ 349 | _buildImage(), 350 | Container( 351 | padding: EdgeInsets.symmetric(vertical: 20, horizontal: 20), 352 | child: Column( 353 | crossAxisAlignment: CrossAxisAlignment.start, 354 | children: [ 355 | _buildNameToDescriptionPart(), 356 | _buildDiscription(), 357 | _buildSizePart(), 358 | _buildColorPart(), 359 | _buildQuentityPart(), 360 | SizedBox( 361 | height: 15, 362 | ), 363 | _buildButtonPart(), 364 | ], 365 | ), 366 | ), 367 | ], 368 | ), 369 | ), 370 | ), 371 | ); 372 | } 373 | } 374 | -------------------------------------------------------------------------------- /lib/screens/homepage.dart: -------------------------------------------------------------------------------- 1 | import 'package:e_commerce/model/categoryicon.dart'; 2 | import 'package:e_commerce/model/usermodel.dart'; 3 | import 'package:e_commerce/screens/about.dart'; 4 | import 'package:e_commerce/screens/checkout.dart'; 5 | 6 | import 'package:e_commerce/screens/contactus.dart'; 7 | import 'package:e_commerce/screens/login.dart'; 8 | 9 | import 'package:e_commerce/screens/profilescreen.dart'; 10 | 11 | import '../provider/product_provider.dart'; 12 | import '../provider/category_provider.dart'; 13 | import 'package:e_commerce/screens/detailscreen.dart'; 14 | import 'package:e_commerce/screens/listproduct.dart'; 15 | import 'package:e_commerce/widgets/singeproduct.dart'; 16 | import 'package:firebase_auth/firebase_auth.dart'; 17 | import 'package:flutter/material.dart'; 18 | import 'package:carousel_pro/carousel_pro.dart'; 19 | import 'package:provider/provider.dart'; 20 | import '../model/product.dart'; 21 | import '../widgets/notification_button.dart'; 22 | 23 | class HomePage extends StatefulWidget { 24 | @override 25 | _HomePageState createState() => _HomePageState(); 26 | } 27 | 28 | Product menData; 29 | CategoryProvider categoryProvider; 30 | ProductProvider productProvider; 31 | 32 | Product womenData; 33 | 34 | Product bulbData; 35 | 36 | Product smartPhoneData; 37 | 38 | class _HomePageState extends State { 39 | Widget _buildCategoryProduct({String image, int color}) { 40 | return CircleAvatar( 41 | maxRadius: height * 0.1 / 2.1, 42 | backgroundColor: Color(color), 43 | child: Container( 44 | height: 40, 45 | child: Image( 46 | color: Colors.white, 47 | image: NetworkImage(image), 48 | ), 49 | ), 50 | ); 51 | } 52 | 53 | double height, width; 54 | bool homeColor = true; 55 | 56 | bool checkoutColor = false; 57 | 58 | bool aboutColor = false; 59 | 60 | bool contactUsColor = false; 61 | bool profileColor = false; 62 | MediaQueryData mediaQuery; 63 | Widget _buildUserAccountsDrawerHeader() { 64 | List userModel = productProvider.userModelList; 65 | return Column( 66 | children: userModel.map((e) { 67 | return UserAccountsDrawerHeader( 68 | accountName: Text( 69 | e.userName, 70 | style: TextStyle(color: Colors.black), 71 | ), 72 | currentAccountPicture: CircleAvatar( 73 | backgroundColor: Colors.white, 74 | backgroundImage: e.userImage == null 75 | ? AssetImage("images/userImage.png") 76 | : NetworkImage(e.userImage), 77 | ), 78 | decoration: BoxDecoration(color: Color(0xfff2f2f2)), 79 | accountEmail: Text(e.userEmail, style: TextStyle(color: Colors.black)), 80 | ); 81 | }).toList()); 82 | } 83 | 84 | Widget _buildMyDrawer() { 85 | return Drawer( 86 | child: ListView( 87 | children: [ 88 | _buildUserAccountsDrawerHeader(), 89 | ListTile( 90 | selected: homeColor, 91 | onTap: () { 92 | setState(() { 93 | homeColor = true; 94 | contactUsColor = false; 95 | checkoutColor = false; 96 | aboutColor = false; 97 | profileColor = false; 98 | }); 99 | }, 100 | leading: Icon(Icons.home), 101 | title: Text("Home"), 102 | ), 103 | ListTile( 104 | selected: checkoutColor, 105 | onTap: () { 106 | setState(() { 107 | checkoutColor = true; 108 | contactUsColor = false; 109 | homeColor = false; 110 | profileColor = false; 111 | aboutColor = false; 112 | }); 113 | Navigator.of(context).pushReplacement( 114 | MaterialPageRoute(builder: (ctx) => CheckOut())); 115 | }, 116 | leading: Icon(Icons.shopping_cart), 117 | title: Text("Checkout"), 118 | ), 119 | ListTile( 120 | selected: aboutColor, 121 | onTap: () { 122 | setState(() { 123 | aboutColor = true; 124 | contactUsColor = false; 125 | homeColor = false; 126 | profileColor = false; 127 | checkoutColor = false; 128 | }); 129 | Navigator.of(context).pushReplacement( 130 | MaterialPageRoute(builder: (ctx) => About())); 131 | }, 132 | leading: Icon(Icons.info), 133 | title: Text("About"), 134 | ), 135 | ListTile( 136 | selected: profileColor, 137 | onTap: () { 138 | setState(() { 139 | aboutColor = false; 140 | contactUsColor = false; 141 | homeColor = false; 142 | profileColor = true; 143 | checkoutColor = false; 144 | }); 145 | Navigator.of(context).pushReplacement( 146 | MaterialPageRoute( 147 | builder: (ctx) => ProfileScreen(), 148 | ), 149 | ); 150 | }, 151 | leading: Icon(Icons.info), 152 | title: Text("Profile"), 153 | ), 154 | ListTile( 155 | selected: contactUsColor, 156 | onTap: () { 157 | setState(() { 158 | contactUsColor = true; 159 | checkoutColor = false; 160 | profileColor = false; 161 | homeColor = false; 162 | aboutColor = false; 163 | }); 164 | Navigator.of(context).pushReplacement( 165 | MaterialPageRoute(builder: (ctx) => ContactUs())); 166 | }, 167 | leading: Icon(Icons.phone), 168 | title: Text("Contant Us"), 169 | ), 170 | ListTile( 171 | onTap: () { 172 | FirebaseAuth.instance.signOut(); 173 | }, 174 | leading: Icon(Icons.exit_to_app), 175 | title: Text("Logout"), 176 | ), 177 | ], 178 | ), 179 | ); 180 | } 181 | 182 | Widget _buildImageSlider() { 183 | return Container( 184 | height: height * 0.3, 185 | child: Carousel( 186 | autoplay: true, 187 | showIndicator: false, 188 | images: [ 189 | AssetImage("images/man.jpg"), 190 | AssetImage("images/women.jpg"), 191 | AssetImage("images/camera.jpg"), 192 | ], 193 | ), 194 | ); 195 | } 196 | 197 | Widget _buildDressIcon() { 198 | List dressIcon = categoryProvider.getDressIcon; 199 | List dress = categoryProvider.getDressList; 200 | return Row( 201 | children: dressIcon.map((e) { 202 | return GestureDetector( 203 | onTap: () { 204 | Navigator.of(context).push( 205 | MaterialPageRoute( 206 | builder: (ctx) => ListProduct( 207 | name: "Dress", 208 | snapShot: dress, 209 | ), 210 | ), 211 | ); 212 | }, 213 | child: _buildCategoryProduct(image: e.image, color: 0xff33dcfd), 214 | ); 215 | }).toList()); 216 | } 217 | 218 | Widget _buildShirtIcon() { 219 | List shirts = categoryProvider.getShirtList; 220 | List shirtIcon = categoryProvider.getShirtIconData; 221 | return Row( 222 | children: shirtIcon.map((e) { 223 | return GestureDetector( 224 | onTap: () { 225 | Navigator.of(context).push( 226 | MaterialPageRoute( 227 | builder: (ctx) => ListProduct( 228 | name: "Shirt", 229 | snapShot: shirts, 230 | ), 231 | ), 232 | ); 233 | }, 234 | child: _buildCategoryProduct(image: e.image, color: 0xfff38cdd), 235 | ); 236 | }).toList()); 237 | } 238 | 239 | Widget _buildShoeIcon() { 240 | List shoeIcon = categoryProvider.getShoeIcon; 241 | List shoes = categoryProvider.getshoesList; 242 | return Row( 243 | children: shoeIcon.map((e) { 244 | return GestureDetector( 245 | onTap: () { 246 | Navigator.of(context).push( 247 | MaterialPageRoute( 248 | builder: (ctx) => ListProduct( 249 | name: "Shoes", 250 | snapShot: shoes, 251 | ), 252 | ), 253 | ); 254 | }, 255 | child: _buildCategoryProduct( 256 | image: e.image, 257 | color: 0xff4ff2af, 258 | ), 259 | ); 260 | }).toList()); 261 | } 262 | 263 | Widget _buildPantIcon() { 264 | List pantIcon = categoryProvider.getPantIcon; 265 | List pant = categoryProvider.getPantList; 266 | return Row( 267 | children: pantIcon.map((e) { 268 | return GestureDetector( 269 | onTap: () { 270 | Navigator.of(context).push( 271 | MaterialPageRoute( 272 | builder: (ctx) => ListProduct( 273 | name: "Pant", 274 | snapShot: pant, 275 | ), 276 | ), 277 | ); 278 | }, 279 | child: _buildCategoryProduct( 280 | image: e.image, 281 | color: 0xff74acf7, 282 | ), 283 | ); 284 | }).toList()); 285 | } 286 | 287 | Widget _buildTieIcon() { 288 | List tieIcon = categoryProvider.getTieIcon; 289 | List tie = categoryProvider.getTieList; 290 | return Row( 291 | children: tieIcon.map((e) { 292 | return GestureDetector( 293 | onTap: () { 294 | Navigator.of(context).push( 295 | MaterialPageRoute( 296 | builder: (ctx) => ListProduct( 297 | name: "Tie", 298 | snapShot: tie, 299 | ), 300 | ), 301 | ); 302 | }, 303 | child: _buildCategoryProduct( 304 | image: e.image, 305 | color: 0xfffc6c8d, 306 | ), 307 | ); 308 | }).toList()); 309 | } 310 | 311 | Widget _buildCategory() { 312 | return Column( 313 | children: [ 314 | Container( 315 | height: height * 0.1 - 30, 316 | child: Row( 317 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 318 | children: [ 319 | Text( 320 | "Categorie", 321 | style: TextStyle(fontSize: 17, fontWeight: FontWeight.bold), 322 | ), 323 | ], 324 | ), 325 | ), 326 | Container( 327 | height: 60, 328 | child: Row( 329 | children: [ 330 | _buildDressIcon(), 331 | _buildShirtIcon(), 332 | _buildShoeIcon(), 333 | _buildPantIcon(), 334 | _buildTieIcon(), 335 | ], 336 | ), 337 | ), 338 | ], 339 | ); 340 | } 341 | 342 | Widget _buildFeature() { 343 | List featureProduct; 344 | 345 | featureProduct = productProvider.getFeatureList; 346 | 347 | return Column( 348 | children: [ 349 | Row( 350 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 351 | children: [ 352 | Text( 353 | "Featured", 354 | style: TextStyle(fontSize: 17, fontWeight: FontWeight.bold), 355 | ), 356 | GestureDetector( 357 | onTap: () { 358 | Navigator.of(context).pushReplacement( 359 | MaterialPageRoute( 360 | builder: (ctx) => ListProduct( 361 | name: "Featured", 362 | isCategory: false, 363 | snapShot: featureProduct, 364 | ), 365 | ), 366 | ); 367 | }, 368 | child: Text( 369 | "View more", 370 | style: TextStyle(fontSize: 17, fontWeight: FontWeight.bold), 371 | ), 372 | ) 373 | ], 374 | ), 375 | Row( 376 | children: productProvider.getHomeFeatureList.map((e) { 377 | return Expanded( 378 | child: Row( 379 | children: [ 380 | Expanded( 381 | child: GestureDetector( 382 | onTap: () { 383 | Navigator.of(context).pushReplacement( 384 | MaterialPageRoute( 385 | builder: (ctx) => DetailScreen( 386 | image: e.image, 387 | price: e.price, 388 | name: e.name, 389 | ), 390 | ), 391 | ); 392 | }, 393 | child: SingleProduct( 394 | image: e.image, 395 | price: e.price, 396 | name: e.name, 397 | ), 398 | ), 399 | ), 400 | GestureDetector( 401 | onTap: () { 402 | Navigator.of(context).pushReplacement( 403 | MaterialPageRoute( 404 | builder: (ctx) => DetailScreen( 405 | image: e.image, price: e.price, name: e.name), 406 | ), 407 | ); 408 | }, 409 | child: SingleProduct( 410 | image: e.image, 411 | price: e.price, 412 | name: e.name, 413 | ), 414 | ), 415 | ], 416 | ), 417 | ); 418 | }).toList(), 419 | ), 420 | ], 421 | ); 422 | } 423 | 424 | Widget _buildNewAchives() { 425 | List newAchivesProduct = productProvider.getNewAchiesList; 426 | return Column( 427 | children: [ 428 | Container( 429 | height: height * 0.1 - 30, 430 | child: Column( 431 | mainAxisAlignment: MainAxisAlignment.end, 432 | children: [ 433 | Row( 434 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 435 | children: [ 436 | Text( 437 | "New Achives", 438 | style: TextStyle(fontSize: 17, fontWeight: FontWeight.bold), 439 | ), 440 | GestureDetector( 441 | onTap: () { 442 | Navigator.of(context).pushReplacement( 443 | MaterialPageRoute( 444 | builder: (ctx) => ListProduct( 445 | name: "NewAchvies", 446 | isCategory: false, 447 | snapShot: newAchivesProduct, 448 | ), 449 | ), 450 | ); 451 | }, 452 | child: Text( 453 | "View more", 454 | style: 455 | TextStyle(fontSize: 17, fontWeight: FontWeight.bold), 456 | ), 457 | ) 458 | ], 459 | ), 460 | ], 461 | ), 462 | ), 463 | Row( 464 | children: productProvider.getHomeAchiveList.map((e) { 465 | return Expanded( 466 | child: Column( 467 | crossAxisAlignment: CrossAxisAlignment.start, 468 | children: [ 469 | Row( 470 | children: [ 471 | Expanded( 472 | child: Row( 473 | children: [ 474 | Expanded( 475 | child: GestureDetector( 476 | onTap: () { 477 | Navigator.of(context).pushReplacement( 478 | MaterialPageRoute( 479 | builder: (ctx) => DetailScreen( 480 | image: e.image, 481 | price: e.price, 482 | name: e.name, 483 | ), 484 | ), 485 | ); 486 | }, 487 | child: SingleProduct( 488 | image: e.image, price: e.price, name: e.name), 489 | ), 490 | ), 491 | GestureDetector( 492 | onTap: () { 493 | Navigator.of(context).pushReplacement( 494 | MaterialPageRoute( 495 | builder: (ctx) => DetailScreen( 496 | image: e.image, 497 | price: e.price, 498 | name: e.name, 499 | ), 500 | ), 501 | ); 502 | }, 503 | child: SingleProduct( 504 | image: e.image, price: e.price, name: e.name), 505 | ) 506 | ], 507 | ), 508 | ) 509 | ], 510 | ), 511 | ], 512 | ), 513 | ); 514 | }).toList()), 515 | ], 516 | ); 517 | } 518 | 519 | final GlobalKey _key = GlobalKey(); 520 | void getCallAllFunction() { 521 | categoryProvider.getShirtData(); 522 | categoryProvider.getDressData(); 523 | categoryProvider.getShoesData(); 524 | categoryProvider.getPantData(); 525 | categoryProvider.getTieData(); 526 | categoryProvider.getDressIconData(); 527 | productProvider.getNewAchiveData(); 528 | productProvider.getFeatureData(); 529 | productProvider.getHomeFeatureData(); 530 | productProvider.getHomeAchiveData(); 531 | categoryProvider.getShirtIcon(); 532 | categoryProvider.getshoesIconData(); 533 | categoryProvider.getPantIconData(); 534 | categoryProvider.getTieIconData(); 535 | productProvider.getUserData(); 536 | } 537 | 538 | @override 539 | Widget build(BuildContext context) { 540 | categoryProvider = Provider.of(context); 541 | productProvider = Provider.of(context); 542 | getCallAllFunction(); 543 | height = MediaQuery.of(context).size.height; 544 | width = MediaQuery.of(context).size.width; 545 | 546 | return Scaffold( 547 | key: _key, 548 | drawer: _buildMyDrawer(), 549 | appBar: AppBar( 550 | title: Text( 551 | "HomePage", 552 | style: TextStyle(color: Colors.black), 553 | ), 554 | centerTitle: true, 555 | elevation: 0.0, 556 | backgroundColor: Colors.grey[100], 557 | leading: IconButton( 558 | icon: Icon( 559 | Icons.menu, 560 | color: Colors.black, 561 | ), 562 | onPressed: () { 563 | _key.currentState.openDrawer(); 564 | }), 565 | actions: [ 566 | NotificationButton(), 567 | ], 568 | ), 569 | body: Container( 570 | height: double.infinity, 571 | width: double.infinity, 572 | margin: EdgeInsets.symmetric(horizontal: 20), 573 | child: ListView( 574 | children: [ 575 | Container( 576 | width: double.infinity, 577 | child: Column( 578 | crossAxisAlignment: CrossAxisAlignment.start, 579 | children: [ 580 | _buildImageSlider(), 581 | _buildCategory(), 582 | SizedBox( 583 | height: 20, 584 | ), 585 | _buildFeature(), 586 | _buildNewAchives() 587 | ], 588 | ), 589 | ) 590 | ], 591 | ), 592 | ), 593 | ); 594 | } 595 | } 596 | -------------------------------------------------------------------------------- /lib/screens/listproduct.dart: -------------------------------------------------------------------------------- 1 | import 'package:e_commerce/model/product.dart'; 2 | import 'package:e_commerce/provider/category_provider.dart'; 3 | import 'package:e_commerce/provider/product_provider.dart'; 4 | import 'package:e_commerce/screens/detailscreen.dart'; 5 | 6 | import 'package:e_commerce/screens/homepage.dart'; 7 | import 'package:e_commerce/screens/search_category.dart'; 8 | import 'package:e_commerce/screens/search_product.dart'; 9 | import 'package:e_commerce/widgets/notification_button.dart'; 10 | 11 | import 'package:e_commerce/widgets/singeproduct.dart'; 12 | 13 | import 'package:flutter/material.dart'; 14 | import 'package:provider/provider.dart'; 15 | 16 | class ListProduct extends StatelessWidget { 17 | final String name; 18 | bool isCategory = true; 19 | final List snapShot; 20 | ListProduct({ 21 | this.name, 22 | this.isCategory, 23 | this.snapShot, 24 | }); 25 | 26 | Widget _buildTopName() { 27 | return Column( 28 | children: [ 29 | Container( 30 | height: 50, 31 | child: Column( 32 | mainAxisAlignment: MainAxisAlignment.end, 33 | children: [ 34 | Row( 35 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 36 | children: [ 37 | Text( 38 | name, 39 | style: TextStyle(fontSize: 17, fontWeight: FontWeight.bold), 40 | ), 41 | ], 42 | ), 43 | ], 44 | ), 45 | ) 46 | ], 47 | ); 48 | } 49 | 50 | Widget _buildMyGridView(context) { 51 | final Orientation orientation = MediaQuery.of(context).orientation; 52 | 53 | return Container( 54 | height: 700, 55 | child: GridView.count( 56 | crossAxisCount: orientation == Orientation.portrait ? 2 : 3, 57 | childAspectRatio: orientation == Orientation.portrait ? 0.8 : 0.9, 58 | scrollDirection: Axis.vertical, 59 | children: snapShot 60 | .map( 61 | (e) => GestureDetector( 62 | onTap: () { 63 | Navigator.of(context).pushReplacement(MaterialPageRoute( 64 | builder: (ctx) => DetailScreen( 65 | image: e.image, 66 | name: e.name, 67 | price: e.price, 68 | ))); 69 | }, 70 | child: SingleProduct( 71 | price: e.price, 72 | image: e.image, 73 | name: e.name, 74 | ), 75 | ), 76 | ) 77 | .toList(), 78 | ), 79 | ); 80 | } 81 | 82 | CategoryProvider categoryProvider; 83 | ProductProvider productProvider; 84 | Widget _buildSearchBar(context) { 85 | return isCategory == true 86 | ? IconButton( 87 | icon: Icon( 88 | Icons.search, 89 | color: Colors.black, 90 | ), 91 | onPressed: () { 92 | categoryProvider.getSearchList(list: snapShot); 93 | showSearch(context: context, delegate: SearchCategory()); 94 | }, 95 | ) 96 | : IconButton( 97 | icon: Icon( 98 | Icons.search, 99 | color: Colors.black, 100 | ), 101 | onPressed: () { 102 | productProvider.getSearchList(list: snapShot); 103 | showSearch(context: context, delegate: SearchProduct()); 104 | }, 105 | ); 106 | } 107 | 108 | @override 109 | Widget build(BuildContext context) { 110 | categoryProvider = Provider.of(context); 111 | productProvider = Provider.of(context); 112 | return Scaffold( 113 | appBar: AppBar( 114 | backgroundColor: Colors.transparent, 115 | elevation: 0.0, 116 | leading: IconButton( 117 | icon: Icon( 118 | Icons.arrow_back, 119 | color: Colors.black, 120 | ), 121 | onPressed: () { 122 | Navigator.of(context).pushReplacement( 123 | MaterialPageRoute( 124 | builder: (ctx) => HomePage(), 125 | ), 126 | ); 127 | }), 128 | actions: [ 129 | _buildSearchBar(context), 130 | NotificationButton(), 131 | ], 132 | ), 133 | body: Container( 134 | margin: EdgeInsets.symmetric(horizontal: 20), 135 | child: ListView( 136 | children: [ 137 | _buildTopName(), 138 | SizedBox( 139 | height: 10, 140 | ), 141 | _buildMyGridView(context), 142 | ], 143 | ), 144 | ), 145 | ); 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /lib/screens/login.dart: -------------------------------------------------------------------------------- 1 | import 'package:e_commerce/screens/signup.dart'; 2 | import 'package:e_commerce/widgets/changescreen.dart'; 3 | import 'package:e_commerce/widgets/mytextformField.dart'; 4 | import 'package:e_commerce/widgets/passwordtextformfield.dart'; 5 | import 'package:firebase_auth/firebase_auth.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:flutter/services.dart'; 8 | import '../widgets/mybutton.dart'; 9 | 10 | class Login extends StatefulWidget { 11 | @override 12 | _LoginState createState() => _LoginState(); 13 | } 14 | 15 | final GlobalKey _formKey = GlobalKey(); 16 | bool isLoading = false; 17 | String p = 18 | r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$'; 19 | 20 | RegExp regExp = new RegExp(p); 21 | final TextEditingController email = TextEditingController(); 22 | final TextEditingController userName = TextEditingController(); 23 | final GlobalKey _scaffoldKey = GlobalKey(); 24 | final TextEditingController password = TextEditingController(); 25 | 26 | bool obserText = true; 27 | 28 | class _LoginState extends State { 29 | void submit(context) async { 30 | try { 31 | setState(() { 32 | isLoading = true; 33 | }); 34 | UserCredential result = await FirebaseAuth.instance 35 | .signInWithEmailAndPassword( 36 | email: email.text, password: password.text); 37 | print(result); 38 | } on PlatformException catch (error) { 39 | var message = "Please Check Your Internet Connection "; 40 | if (error.message != null) { 41 | message = error.message; 42 | } 43 | _scaffoldKey.currentState.showSnackBar( 44 | SnackBar( 45 | content: Text(message.toString()), 46 | duration: Duration(milliseconds: 800), 47 | backgroundColor: Theme.of(context).primaryColor, 48 | ), 49 | ); 50 | setState(() { 51 | isLoading = false; 52 | }); 53 | } catch (error) { 54 | setState(() { 55 | isLoading = false; 56 | }); 57 | _scaffoldKey.currentState.showSnackBar(SnackBar( 58 | content: Text(error.toString()), 59 | duration: Duration(milliseconds: 800), 60 | backgroundColor: Theme.of(context).primaryColor, 61 | )); 62 | } 63 | 64 | setState(() { 65 | isLoading = false; 66 | }); 67 | } 68 | 69 | void vaildation() async { 70 | if (email.text.isEmpty && password.text.isEmpty) { 71 | _scaffoldKey.currentState.showSnackBar( 72 | SnackBar( 73 | content: Text("Both Flied Are Empty"), 74 | ), 75 | ); 76 | } else if (email.text.isEmpty) { 77 | _scaffoldKey.currentState.showSnackBar( 78 | SnackBar( 79 | content: Text("Email Is Empty"), 80 | ), 81 | ); 82 | } else if (!regExp.hasMatch(email.text)) { 83 | _scaffoldKey.currentState.showSnackBar( 84 | SnackBar( 85 | content: Text("Please Try Vaild Email"), 86 | ), 87 | ); 88 | } else if (password.text.isEmpty) { 89 | _scaffoldKey.currentState.showSnackBar( 90 | SnackBar( 91 | content: Text("Password Is Empty"), 92 | ), 93 | ); 94 | } else if (password.text.length < 8) { 95 | _scaffoldKey.currentState.showSnackBar( 96 | SnackBar( 97 | content: Text("Password Is Too Short"), 98 | ), 99 | ); 100 | } else { 101 | submit(context); 102 | } 103 | } 104 | 105 | Widget _buildAllPart() { 106 | return Expanded( 107 | flex: 3, 108 | child: Container( 109 | width: double.infinity, 110 | child: Column( 111 | mainAxisAlignment: MainAxisAlignment.center, 112 | children: [ 113 | Column( 114 | children: [ 115 | Text( 116 | "Login", 117 | style: TextStyle(fontSize: 40, fontWeight: FontWeight.bold), 118 | ), 119 | SizedBox( 120 | height: 10, 121 | ), 122 | MyTextFormField( 123 | name: "Email", 124 | controller: email, 125 | ), 126 | SizedBox( 127 | height: 10, 128 | ), 129 | PasswordTextFormField( 130 | obserText: obserText, 131 | name: "Password", 132 | controller: password, 133 | onTap: () { 134 | FocusScope.of(context).unfocus(); 135 | setState(() { 136 | obserText = !obserText; 137 | }); 138 | }, 139 | ), 140 | SizedBox( 141 | height: 10, 142 | ), 143 | isLoading == false 144 | ? MyButton( 145 | onPressed: () { 146 | vaildation(); 147 | }, 148 | name: "Login", 149 | ) 150 | : Center( 151 | child: CircularProgressIndicator(), 152 | ), 153 | SizedBox( 154 | height: 10, 155 | ), 156 | ChangeScreen( 157 | name: "SignUp", 158 | whichAccount: "I Have Not Account!", 159 | onTap: () { 160 | Navigator.of(context).pushReplacement( 161 | MaterialPageRoute( 162 | builder: (ctx) => SignUp(), 163 | ), 164 | ); 165 | }), 166 | ], 167 | ), 168 | ], 169 | ), 170 | ), 171 | ); 172 | } 173 | 174 | @override 175 | Widget build(BuildContext context) { 176 | return Scaffold( 177 | key: _scaffoldKey, 178 | body: Form( 179 | key: _formKey, 180 | child: Container( 181 | margin: EdgeInsets.symmetric(horizontal: 10), 182 | child: Column( 183 | mainAxisAlignment: MainAxisAlignment.center, 184 | children: [ 185 | _buildAllPart(), 186 | ], 187 | ), 188 | ), 189 | ), 190 | ); 191 | } 192 | } 193 | -------------------------------------------------------------------------------- /lib/screens/profilescreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:e_commerce/model/usermodel.dart'; 3 | import 'package:e_commerce/screens/homepage.dart'; 4 | import 'package:e_commerce/widgets/mybutton.dart'; 5 | import 'package:e_commerce/widgets/mytextformField.dart'; 6 | import 'package:e_commerce/widgets/notification_button.dart'; 7 | import 'package:firebase_auth/firebase_auth.dart'; 8 | 9 | import 'package:flutter/material.dart'; 10 | 11 | import 'package:image_picker/image_picker.dart'; 12 | import 'dart:io'; 13 | import 'package:firebase_storage/firebase_storage.dart'; 14 | 15 | class ProfileScreen extends StatefulWidget { 16 | @override 17 | _ProfileScreenState createState() => _ProfileScreenState(); 18 | } 19 | 20 | class _ProfileScreenState extends State { 21 | UserModel userModel; 22 | TextEditingController phoneNumber; 23 | TextEditingController address; 24 | TextEditingController userName; 25 | final GlobalKey _scaffoldKey = GlobalKey(); 26 | static String p = 27 | r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$'; 28 | RegExp regExp = new RegExp(p); 29 | bool isMale = false; 30 | void vaildation() async { 31 | if (userName.text.isEmpty && phoneNumber.text.isEmpty) { 32 | _scaffoldKey.currentState.showSnackBar( 33 | SnackBar( 34 | content: Text("All Flied Are Empty"), 35 | ), 36 | ); 37 | } else if (userName.text.isEmpty) { 38 | _scaffoldKey.currentState.showSnackBar( 39 | SnackBar( 40 | content: Text("Name Is Empty "), 41 | ), 42 | ); 43 | } else if (userName.text.length < 6) { 44 | _scaffoldKey.currentState.showSnackBar( 45 | SnackBar( 46 | content: Text("Name Must Be 6 "), 47 | ), 48 | ); 49 | } else if (phoneNumber.text.length < 11 || phoneNumber.text.length > 11) { 50 | _scaffoldKey.currentState.showSnackBar( 51 | SnackBar( 52 | content: Text("Phone Number Must Be 11 "), 53 | ), 54 | ); 55 | } else { 56 | userDetailUpdate(); 57 | } 58 | } 59 | 60 | File _pickedImage; 61 | 62 | PickedFile _image; 63 | Future getImage({ImageSource source}) async { 64 | _image = await ImagePicker().getImage(source: source); 65 | if (_image != null) { 66 | setState(() { 67 | _pickedImage = File(_image.path); 68 | }); 69 | } 70 | } 71 | 72 | String userUid; 73 | 74 | Future _uploadImage({File image}) async { 75 | StorageReference storageReference = 76 | FirebaseStorage.instance.ref().child("UserImage/$userUid"); 77 | StorageUploadTask uploadTask = storageReference.putFile(image); 78 | StorageTaskSnapshot snapshot = await uploadTask.onComplete; 79 | String imageUrl = await snapshot.ref.getDownloadURL(); 80 | return imageUrl; 81 | } 82 | 83 | void getUserUid() { 84 | User myUser = FirebaseAuth.instance.currentUser; 85 | userUid = myUser.uid; 86 | } 87 | 88 | bool centerCircle = false; 89 | var imageMap; 90 | void userDetailUpdate() async { 91 | setState(() { 92 | centerCircle = true; 93 | }); 94 | _pickedImage != null 95 | ? imageMap = await _uploadImage(image: _pickedImage) 96 | : Container(); 97 | FirebaseFirestore.instance.collection("User").doc(userUid).update({ 98 | "UserName": userName.text, 99 | "UserGender": isMale == true ? "Male" : "Female", 100 | "UserNumber": phoneNumber.text, 101 | "UserImage": imageMap, 102 | "UserAddress": address.text 103 | }); 104 | setState(() { 105 | centerCircle = false; 106 | }); 107 | setState(() { 108 | edit = false; 109 | }); 110 | } 111 | 112 | Widget _buildSingleContainer( 113 | {Color color, String startText, String endText}) { 114 | return Card( 115 | shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(30)), 116 | child: Container( 117 | height: 55, 118 | padding: EdgeInsets.symmetric(horizontal: 20), 119 | decoration: BoxDecoration( 120 | color: edit == true ? color : Colors.white, 121 | borderRadius: edit == false 122 | ? BorderRadius.circular(30) 123 | : BorderRadius.circular(0), 124 | ), 125 | width: double.infinity, 126 | child: Row( 127 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 128 | children: [ 129 | Text( 130 | startText, 131 | style: TextStyle(fontSize: 17, color: Colors.black45), 132 | ), 133 | Text( 134 | endText, 135 | style: TextStyle( 136 | fontSize: 16, 137 | fontWeight: FontWeight.bold, 138 | ), 139 | ), 140 | ], 141 | ), 142 | ), 143 | ); 144 | } 145 | 146 | String userImage; 147 | bool edit = false; 148 | Widget _buildContainerPart() { 149 | address = TextEditingController(text: userModel.userAddress); 150 | userName = TextEditingController(text: userModel.userName); 151 | phoneNumber = TextEditingController(text: userModel.userPhoneNumber); 152 | if (userModel.userGender == "Male") { 153 | isMale = true; 154 | } else { 155 | isMale = false; 156 | } 157 | return Container( 158 | height: double.infinity, 159 | width: double.infinity, 160 | child: Column( 161 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 162 | children: [ 163 | _buildSingleContainer( 164 | endText: userModel.userName, 165 | startText: "Name", 166 | ), 167 | _buildSingleContainer( 168 | endText: userModel.userEmail, 169 | startText: "Email", 170 | ), 171 | _buildSingleContainer( 172 | endText: userModel.userGender, 173 | startText: "Gender", 174 | ), 175 | _buildSingleContainer( 176 | endText: userModel.userPhoneNumber, 177 | startText: "Phone Number", 178 | ), 179 | _buildSingleContainer( 180 | endText: userModel.userAddress, 181 | startText: "Address", 182 | ), 183 | ], 184 | ), 185 | ); 186 | } 187 | 188 | Future myDialogBox(context) { 189 | return showDialog( 190 | context: context, 191 | barrierDismissible: false, 192 | builder: (BuildContext context) { 193 | return AlertDialog( 194 | content: SingleChildScrollView( 195 | child: ListBody( 196 | children: [ 197 | ListTile( 198 | leading: Icon(Icons.camera_alt), 199 | title: Text("Pick Form Camera"), 200 | onTap: () { 201 | getImage(source: ImageSource.camera); 202 | Navigator.of(context).pop(); 203 | }, 204 | ), 205 | ListTile( 206 | leading: Icon(Icons.photo_library), 207 | title: Text("Pick Form Gallery"), 208 | onTap: () { 209 | getImage(source: ImageSource.gallery); 210 | Navigator.of(context).pop(); 211 | }, 212 | ), 213 | ], 214 | ), 215 | ), 216 | ); 217 | }); 218 | } 219 | 220 | Widget _buildTextFormFliedPart() { 221 | return Container( 222 | height: double.infinity, 223 | width: double.infinity, 224 | child: Column( 225 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 226 | children: [ 227 | MyTextFormField( 228 | name: "UserName", 229 | controller: userName, 230 | ), 231 | _buildSingleContainer( 232 | color: Colors.grey[300], 233 | endText: userModel.userEmail, 234 | startText: "Email", 235 | ), 236 | GestureDetector( 237 | onTap: () { 238 | setState(() { 239 | isMale = !isMale; 240 | }); 241 | }, 242 | child: _buildSingleContainer( 243 | color: Colors.white, 244 | endText: isMale == true ? "Male" : "Female", 245 | startText: "Gender", 246 | ), 247 | ), 248 | MyTextFormField( 249 | name: "Phone Number", 250 | controller: phoneNumber, 251 | ), 252 | MyTextFormField( 253 | name: "Address", 254 | controller: address, 255 | ), 256 | ], 257 | ), 258 | ); 259 | } 260 | 261 | @override 262 | Widget build(BuildContext context) { 263 | getUserUid(); 264 | return Scaffold( 265 | resizeToAvoidBottomInset: true, 266 | key: _scaffoldKey, 267 | backgroundColor: Color(0xfff8f8f8), 268 | appBar: AppBar( 269 | leading: edit == true 270 | ? IconButton( 271 | icon: Icon( 272 | Icons.close, 273 | color: Colors.redAccent, 274 | size: 30, 275 | ), 276 | onPressed: () { 277 | setState(() { 278 | edit = false; 279 | }); 280 | }, 281 | ) 282 | : IconButton( 283 | icon: Icon( 284 | Icons.arrow_back, 285 | color: Colors.black45, 286 | size: 30, 287 | ), 288 | onPressed: () { 289 | setState(() { 290 | Navigator.of(context).pushReplacement( 291 | MaterialPageRoute( 292 | builder: (ctx) => HomePage(), 293 | ), 294 | ); 295 | }); 296 | }, 297 | ), 298 | backgroundColor: Colors.white, 299 | actions: [ 300 | edit == false 301 | ? NotificationButton() 302 | : IconButton( 303 | icon: Icon( 304 | Icons.check, 305 | size: 30, 306 | color: Color(0xff746bc9), 307 | ), 308 | onPressed: () { 309 | vaildation(); 310 | }, 311 | ), 312 | ], 313 | ), 314 | body: centerCircle == false 315 | ? ListView( 316 | children: [ 317 | StreamBuilder( 318 | stream: FirebaseFirestore.instance 319 | .collection("User") 320 | .snapshots(), 321 | builder: (context, snapshot) { 322 | if (snapshot.connectionState == ConnectionState.waiting) { 323 | return Center( 324 | child: CircularProgressIndicator(), 325 | ); 326 | } 327 | var myDoc = snapshot.data.docs; 328 | myDoc.forEach((checkDocs) { 329 | if (checkDocs.data()["UserId"] == userUid) { 330 | userModel = UserModel( 331 | userEmail: checkDocs.data()["UserEmail"], 332 | userImage: checkDocs.data()["UserImage"], 333 | userAddress: checkDocs.data()["UserAddress"], 334 | userGender: checkDocs.data()["UserGender"], 335 | userName: checkDocs.data()["UserName"], 336 | userPhoneNumber: checkDocs.data()["UserNumber"], 337 | ); 338 | } 339 | }); 340 | return Container( 341 | height: 603, 342 | width: double.infinity, 343 | padding: EdgeInsets.symmetric(horizontal: 20), 344 | child: Column( 345 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 346 | children: [ 347 | Stack( 348 | children: [ 349 | Container( 350 | height: 200, 351 | width: double.infinity, 352 | child: Column( 353 | mainAxisAlignment: MainAxisAlignment.center, 354 | children: [ 355 | CircleAvatar( 356 | maxRadius: 65, 357 | backgroundImage: _pickedImage == null 358 | ? userModel.userImage == null 359 | ? AssetImage( 360 | "images/userImage.png") 361 | : NetworkImage( 362 | userModel.userImage) 363 | : FileImage(_pickedImage)), 364 | ], 365 | ), 366 | ), 367 | edit == true 368 | ? Padding( 369 | padding: EdgeInsets.only( 370 | left: MediaQuery.of(context) 371 | .viewPadding 372 | .left + 373 | 220, 374 | top: MediaQuery.of(context) 375 | .viewPadding 376 | .left + 377 | 110), 378 | child: Card( 379 | shape: RoundedRectangleBorder( 380 | borderRadius: 381 | BorderRadius.circular(20), 382 | ), 383 | child: GestureDetector( 384 | onTap: () { 385 | myDialogBox(context); 386 | }, 387 | child: CircleAvatar( 388 | backgroundColor: 389 | Colors.transparent, 390 | child: Icon( 391 | Icons.camera_alt, 392 | color: Color(0xff746bc9), 393 | ), 394 | ), 395 | ), 396 | ), 397 | ) 398 | : Container(), 399 | ], 400 | ), 401 | Container( 402 | height: 350, 403 | width: double.infinity, 404 | child: Column( 405 | mainAxisAlignment: MainAxisAlignment.center, 406 | children: [ 407 | Expanded( 408 | child: Container( 409 | child: edit == true 410 | ? _buildTextFormFliedPart() 411 | : _buildContainerPart(), 412 | ), 413 | ), 414 | ], 415 | ), 416 | ), 417 | Card( 418 | shape: RoundedRectangleBorder( 419 | borderRadius: BorderRadius.circular(30)), 420 | child: Container( 421 | decoration: BoxDecoration( 422 | borderRadius: BorderRadius.circular(20)), 423 | child: edit == false 424 | ? MyButton( 425 | name: "Edit Profile", 426 | onPressed: () { 427 | setState(() { 428 | edit = true; 429 | }); 430 | }, 431 | ) 432 | : Container(), 433 | ), 434 | ), 435 | ], 436 | ), 437 | ); 438 | }), 439 | ], 440 | ) 441 | : Center( 442 | child: CircularProgressIndicator(), 443 | ), 444 | ); 445 | } 446 | } 447 | -------------------------------------------------------------------------------- /lib/screens/search_category.dart: -------------------------------------------------------------------------------- 1 | import 'package:e_commerce/model/product.dart'; 2 | import 'package:e_commerce/provider/category_provider.dart'; 3 | import 'package:e_commerce/screens/detailscreen.dart'; 4 | 5 | import 'package:e_commerce/widgets/singeproduct.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:provider/provider.dart'; 8 | 9 | class SearchCategory extends SearchDelegate { 10 | @override 11 | List buildActions(BuildContext context) { 12 | return [ 13 | IconButton( 14 | icon: Icon(Icons.close), 15 | onPressed: () { 16 | query = ""; 17 | }, 18 | ), 19 | ]; 20 | } 21 | 22 | @override 23 | Widget buildLeading(BuildContext context) { 24 | return IconButton( 25 | icon: Icon(Icons.arrow_back), 26 | onPressed: () { 27 | close(context, null); 28 | }, 29 | ); 30 | } 31 | 32 | @override 33 | Widget buildResults(BuildContext context) { 34 | CategoryProvider categoryProvider = Provider.of(context); 35 | List searchCategory = categoryProvider.searchCategoryList(query); 36 | 37 | return GridView.count( 38 | childAspectRatio: 0.76, 39 | crossAxisCount: 2, 40 | crossAxisSpacing: 10, 41 | mainAxisSpacing: 10, 42 | children: searchCategory 43 | .map((e) => GestureDetector( 44 | onTap: () { 45 | Navigator.of(context).push( 46 | MaterialPageRoute( 47 | builder: (ctx) => DetailScreen( 48 | image: e.image, 49 | name: e.name, 50 | price: e.price, 51 | ), 52 | ), 53 | ); 54 | }, 55 | child: SingleProduct( 56 | image: e.image, 57 | name: e.name, 58 | price: e.price, 59 | ), 60 | )) 61 | .toList()); 62 | } 63 | 64 | void getProduct() {} 65 | @override 66 | Widget buildSuggestions(BuildContext context) { 67 | CategoryProvider categoryProvider = Provider.of(context); 68 | List searchCategory = categoryProvider.searchCategoryList(query); 69 | return GridView.count( 70 | childAspectRatio: 0.87, 71 | crossAxisCount: 2, 72 | crossAxisSpacing: 10, 73 | mainAxisSpacing: 10, 74 | children: searchCategory 75 | .map((e) => GestureDetector( 76 | onTap: () { 77 | Navigator.of(context).push( 78 | MaterialPageRoute( 79 | builder: (ctx) => DetailScreen( 80 | image: e.image, 81 | name: e.name, 82 | price: e.price, 83 | ), 84 | ), 85 | ); 86 | }, 87 | child: SingleProduct( 88 | image: e.image, 89 | name: e.name, 90 | price: e.price, 91 | ), 92 | )) 93 | .toList()); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /lib/screens/search_product.dart: -------------------------------------------------------------------------------- 1 | import 'package:e_commerce/model/product.dart'; 2 | import 'package:e_commerce/provider/product_provider.dart'; 3 | import 'package:e_commerce/screens/detailscreen.dart'; 4 | 5 | import 'package:e_commerce/widgets/singeproduct.dart'; 6 | import 'package:flutter/material.dart'; 7 | import 'package:provider/provider.dart'; 8 | 9 | class SearchProduct extends SearchDelegate { 10 | @override 11 | List buildActions(BuildContext context) { 12 | return [ 13 | IconButton( 14 | icon: Icon(Icons.close), 15 | onPressed: () { 16 | query = ""; 17 | }, 18 | ), 19 | ]; 20 | } 21 | 22 | @override 23 | Widget buildLeading(BuildContext context) { 24 | return IconButton( 25 | icon: Icon(Icons.arrow_back), 26 | onPressed: () { 27 | close(context, null); 28 | }, 29 | ); 30 | } 31 | 32 | @override 33 | Widget buildResults(BuildContext context) { 34 | ProductProvider providerProvider = Provider.of(context); 35 | List searchCategory = providerProvider.searchProductList(query); 36 | 37 | return GridView.count( 38 | crossAxisCount: 2, 39 | crossAxisSpacing: 10, 40 | mainAxisSpacing: 10, 41 | children: searchCategory 42 | .map((e) => GestureDetector( 43 | onTap: () { 44 | Navigator.of(context).push( 45 | MaterialPageRoute( 46 | builder: (ctx) => DetailScreen( 47 | image: e.image, 48 | name: e.name, 49 | price: e.price, 50 | ), 51 | ), 52 | ); 53 | }, 54 | child: SingleProduct( 55 | image: e.image, 56 | name: e.name, 57 | price: e.price, 58 | ), 59 | )) 60 | .toList()); 61 | } 62 | 63 | @override 64 | Widget buildSuggestions(BuildContext context) { 65 | ProductProvider providerProvider = Provider.of(context); 66 | List searchCategory = providerProvider.searchProductList(query); 67 | return GridView.count( 68 | childAspectRatio: 0.76, 69 | crossAxisCount: 2, 70 | crossAxisSpacing: 10, 71 | mainAxisSpacing: 10, 72 | children: searchCategory 73 | .map((e) => GestureDetector( 74 | onTap: () { 75 | Navigator.of(context).push( 76 | MaterialPageRoute( 77 | builder: (ctx) => DetailScreen( 78 | image: e.image, 79 | name: e.name, 80 | price: e.price, 81 | ), 82 | ), 83 | ); 84 | }, 85 | child: SingleProduct( 86 | image: e.image, 87 | name: e.name, 88 | price: e.price, 89 | ), 90 | )) 91 | .toList()); 92 | } 93 | } 94 | -------------------------------------------------------------------------------- /lib/screens/signup.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:e_commerce/screens/homepage.dart'; 3 | import 'package:e_commerce/screens/login.dart'; 4 | import 'package:e_commerce/widgets/changescreen.dart'; 5 | import 'package:e_commerce/widgets/mybutton.dart'; 6 | import 'package:e_commerce/widgets/mytextformField.dart'; 7 | import 'package:e_commerce/widgets/passwordtextformfield.dart'; 8 | import 'package:firebase_auth/firebase_auth.dart'; 9 | import 'package:flutter/material.dart'; 10 | import 'package:flutter/services.dart'; 11 | 12 | class SignUp extends StatefulWidget { 13 | @override 14 | _SignUpState createState() => _SignUpState(); 15 | } 16 | 17 | final GlobalKey _formKey = GlobalKey(); 18 | final GlobalKey _scaffoldKey = GlobalKey(); 19 | String p = 20 | r'^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$'; 21 | 22 | RegExp regExp = new RegExp(p); 23 | bool obserText = true; 24 | final TextEditingController email = TextEditingController(); 25 | final TextEditingController userName = TextEditingController(); 26 | final TextEditingController phoneNumber = TextEditingController(); 27 | final TextEditingController password = TextEditingController(); 28 | final TextEditingController address = TextEditingController(); 29 | 30 | bool isMale = true; 31 | bool isLoading = false; 32 | 33 | class _SignUpState extends State { 34 | void submit() async { 35 | UserCredential result; 36 | try { 37 | setState(() { 38 | isLoading = true; 39 | }); 40 | result = await FirebaseAuth.instance.createUserWithEmailAndPassword( 41 | email: email.text, password: password.text); 42 | print(result); 43 | } on PlatformException catch (error) { 44 | var message = "Please Check Your Internet Connection "; 45 | if (error.message != null) { 46 | message = error.message; 47 | } 48 | _scaffoldKey.currentState.showSnackBar(SnackBar( 49 | content: Text(message.toString()), 50 | duration: Duration(milliseconds: 600), 51 | backgroundColor: Theme.of(context).primaryColor, 52 | )); 53 | setState(() { 54 | isLoading = false; 55 | }); 56 | } catch (error) { 57 | setState(() { 58 | isLoading = false; 59 | }); 60 | _scaffoldKey.currentState.showSnackBar(SnackBar( 61 | content: Text(error.toString()), 62 | duration: Duration(milliseconds: 600), 63 | backgroundColor: Theme.of(context).primaryColor, 64 | )); 65 | 66 | print(error); 67 | } 68 | FirebaseFirestore.instance.collection("User").doc(result.user.uid).set({ 69 | "UserName": userName.text, 70 | "UserId": result.user.uid, 71 | "UserEmail": email.text, 72 | "UserAddress": address.text, 73 | "UserGender": isMale == true ? "Male" : "Female", 74 | "UserNumber": phoneNumber.text, 75 | }); 76 | Navigator.of(context) 77 | .pushReplacement(MaterialPageRoute(builder: (ctx) => HomePage())); 78 | setState(() { 79 | isLoading = false; 80 | }); 81 | } 82 | 83 | void vaildation() async { 84 | if (userName.text.isEmpty && 85 | email.text.isEmpty && 86 | password.text.isEmpty && 87 | phoneNumber.text.isEmpty && 88 | address.text.isEmpty) { 89 | _scaffoldKey.currentState.showSnackBar( 90 | SnackBar( 91 | content: Text("All Flied Are Empty"), 92 | ), 93 | ); 94 | } else if (userName.text.length < 6) { 95 | _scaffoldKey.currentState.showSnackBar( 96 | SnackBar( 97 | content: Text("Name Must Be 6 "), 98 | ), 99 | ); 100 | } else if (email.text.isEmpty) { 101 | _scaffoldKey.currentState.showSnackBar( 102 | SnackBar( 103 | content: Text("Email Is Empty"), 104 | ), 105 | ); 106 | } else if (!regExp.hasMatch(email.text)) { 107 | _scaffoldKey.currentState.showSnackBar( 108 | SnackBar( 109 | content: Text("Please Try Vaild Email"), 110 | ), 111 | ); 112 | } else if (password.text.isEmpty) { 113 | _scaffoldKey.currentState.showSnackBar( 114 | SnackBar( 115 | content: Text("Password Is Empty"), 116 | ), 117 | ); 118 | } else if (password.text.length < 8) { 119 | _scaffoldKey.currentState.showSnackBar( 120 | SnackBar( 121 | content: Text("Password Is Too Short"), 122 | ), 123 | ); 124 | } else if (phoneNumber.text.length < 11 || phoneNumber.text.length > 11) { 125 | _scaffoldKey.currentState.showSnackBar( 126 | SnackBar( 127 | content: Text("Phone Number Must Be 11 "), 128 | ), 129 | ); 130 | } else if (address.text.isEmpty) { 131 | _scaffoldKey.currentState.showSnackBar( 132 | SnackBar( 133 | content: Text("Adress Is Empty "), 134 | ), 135 | ); 136 | } else { 137 | submit(); 138 | } 139 | } 140 | 141 | Widget _buildAllTextFormField() { 142 | return Container( 143 | child: Column( 144 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 145 | children: [ 146 | MyTextFormField( 147 | name: "UserName", 148 | controller: userName, 149 | ), 150 | SizedBox( 151 | height: 10, 152 | ), 153 | MyTextFormField( 154 | name: "Email", 155 | controller: email, 156 | ), 157 | SizedBox( 158 | height: 10, 159 | ), 160 | PasswordTextFormField( 161 | obserText: obserText, 162 | controller: password, 163 | name: "Password", 164 | onTap: () { 165 | FocusScope.of(context).unfocus(); 166 | setState(() { 167 | obserText = !obserText; 168 | }); 169 | }, 170 | ), 171 | SizedBox( 172 | height: 10, 173 | ), 174 | GestureDetector( 175 | onTap: () { 176 | setState(() { 177 | isMale = !isMale; 178 | }); 179 | }, 180 | child: Container( 181 | height: 60, 182 | padding: EdgeInsets.only(left: 10), 183 | width: double.infinity, 184 | decoration: BoxDecoration(border: Border.all(color: Colors.grey)), 185 | child: Center( 186 | child: Row( 187 | children: [ 188 | Text( 189 | isMale == true ? "Male" : "Female", 190 | style: TextStyle(color: Colors.black87, fontSize: 18), 191 | ), 192 | ], 193 | ), 194 | ), 195 | ), 196 | ), 197 | SizedBox( 198 | height: 10, 199 | ), 200 | MyTextFormField( 201 | name: "Phone Number", 202 | controller: phoneNumber, 203 | ), 204 | SizedBox( 205 | height: 10, 206 | ), 207 | MyTextFormField( 208 | name: "Address", 209 | controller: address, 210 | ), 211 | ], 212 | ), 213 | ); 214 | } 215 | 216 | Widget _buildBottomPart() { 217 | return Container( 218 | margin: EdgeInsets.symmetric(horizontal: 10), 219 | width: double.infinity, 220 | child: Column( 221 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 222 | children: [ 223 | _buildAllTextFormField(), 224 | SizedBox( 225 | height: 10, 226 | ), 227 | isLoading == false 228 | ? MyButton( 229 | name: "SignUp", 230 | onPressed: () { 231 | vaildation(); 232 | }, 233 | ) 234 | : Center( 235 | child: CircularProgressIndicator(), 236 | ), 237 | ChangeScreen( 238 | name: "Login", 239 | whichAccount: "I Have Already An Account!", 240 | onTap: () { 241 | Navigator.of(context).pushReplacement( 242 | MaterialPageRoute( 243 | builder: (ctx) => Login(), 244 | ), 245 | ); 246 | }, 247 | ), 248 | ], 249 | ), 250 | ); 251 | } 252 | 253 | @override 254 | Widget build(BuildContext context) { 255 | return Scaffold( 256 | key: _scaffoldKey, 257 | body: ListView( 258 | children: [ 259 | Container( 260 | height: 200, 261 | 262 | child: Column( 263 | mainAxisAlignment: MainAxisAlignment.center, 264 | children: [ 265 | Text( 266 | "Register", 267 | style: TextStyle( 268 | fontSize: 40, 269 | fontWeight: FontWeight.bold, 270 | ), 271 | ), 272 | ], 273 | ), 274 | ), 275 | Container( 276 | height: 500, 277 | child: _buildBottomPart(), 278 | ), 279 | ], 280 | ), 281 | ); 282 | } 283 | } 284 | -------------------------------------------------------------------------------- /lib/screens/welcomescreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:e_commerce/screens/login.dart'; 2 | import 'package:e_commerce/screens/signup.dart'; 3 | import 'package:flutter/material.dart'; 4 | 5 | class WelcomeScreen extends StatelessWidget { 6 | @override 7 | Widget build(BuildContext context) { 8 | return Scaffold( 9 | body: Center( 10 | child: Container( 11 | padding: EdgeInsets.symmetric(horizontal: 80), 12 | child: Column( 13 | mainAxisAlignment: MainAxisAlignment.center, 14 | children: [ 15 | Container( 16 | height: 600, 17 | width: double.infinity, 18 | child: Column( 19 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 20 | children: [ 21 | Container( 22 | height: 350, 23 | width: double.infinity, 24 | decoration: BoxDecoration( 25 | image: DecorationImage( 26 | fit: BoxFit.cover, 27 | image: AssetImage("images/shopping.png"))), 28 | ), 29 | Text( 30 | "Welcome", 31 | style: TextStyle( 32 | fontSize: 35, 33 | fontWeight: FontWeight.bold, 34 | color: Colors.black, 35 | ), 36 | ), 37 | Container( 38 | height: 60, 39 | width: double.infinity, 40 | child: Column( 41 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 42 | 43 | children: [ 44 | Text( 45 | "Ready To Start Shopping Sign Up", 46 | style: TextStyle(fontSize: 18), 47 | ), 48 | Text( 49 | "To get Started", 50 | style: TextStyle(fontSize: 18), 51 | ), 52 | ], 53 | ), 54 | ), 55 | Container( 56 | height: 45, 57 | width: double.infinity, 58 | child: RaisedButton( 59 | shape: RoundedRectangleBorder( 60 | borderRadius: BorderRadius.circular(10)), 61 | child: Text( 62 | "Sign Up", 63 | style: TextStyle(fontSize: 18, color: Colors.white), 64 | ), 65 | color: Color(0xff746bc9), 66 | onPressed: () { 67 | Navigator.of(context).pushReplacement( 68 | MaterialPageRoute( 69 | builder: (ctx) => SignUp(), 70 | ), 71 | ); 72 | }, 73 | ), 74 | ), 75 | Row( 76 | crossAxisAlignment: CrossAxisAlignment.start, 77 | children: [ 78 | Text( 79 | "Already have an account?", 80 | style: TextStyle( 81 | fontSize: 18, 82 | ), 83 | ), 84 | GestureDetector( 85 | onTap: () { 86 | Navigator.of(context).pushReplacement( 87 | MaterialPageRoute( 88 | builder: (ctx) => Login(), 89 | ), 90 | ); 91 | }, 92 | child: Text( 93 | "Login", 94 | style: TextStyle( 95 | fontSize: 18, 96 | color: Color(0xff7746bc9), 97 | ), 98 | ), 99 | ) 100 | ], 101 | ), 102 | ], 103 | ), 104 | ) 105 | ], 106 | ), 107 | ), 108 | ), 109 | ); 110 | } 111 | } 112 | -------------------------------------------------------------------------------- /lib/widgets/changescreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ChangeScreen extends StatelessWidget { 4 | final String whichAccount; 5 | final Function onTap; 6 | final String name; 7 | ChangeScreen({this.name, this.onTap,this.whichAccount}); 8 | @override 9 | Widget build(BuildContext context) { 10 | return Row( 11 | children: [ 12 | Text(whichAccount), 13 | SizedBox( 14 | width: 10, 15 | ), 16 | GestureDetector( 17 | onTap: onTap, 18 | child: Text( 19 | name, 20 | style: TextStyle( 21 | color: Colors.cyan, 22 | fontSize: 20, 23 | ), 24 | ), 25 | ), 26 | ], 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/widgets/checkout_singleproduct.dart: -------------------------------------------------------------------------------- 1 | import 'package:e_commerce/provider/product_provider.dart'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:provider/provider.dart'; 5 | 6 | class CheckOutSingleProduct extends StatefulWidget { 7 | final String name; 8 | final String image; 9 | final int index; 10 | final String color; 11 | final String size; 12 | final quentity; 13 | final double price; 14 | CheckOutSingleProduct({ 15 | this.index, 16 | this.color, 17 | this.size, 18 | this.quentity, 19 | this.image, 20 | this.name, 21 | this.price, 22 | }); 23 | @override 24 | _CheckOutSingleProductState createState() => _CheckOutSingleProductState(); 25 | } 26 | 27 | TextStyle myStyle = TextStyle(fontSize: 18); 28 | ProductProvider productProvider; 29 | 30 | class _CheckOutSingleProductState extends State { 31 | double height, width; 32 | Widget _buildImage() { 33 | return Container( 34 | height: height * 0.1 + 50, 35 | width: width * 0.3, 36 | decoration: BoxDecoration( 37 | image: DecorationImage( 38 | fit: BoxFit.fill, 39 | image: NetworkImage(widget.image), 40 | ), 41 | ), 42 | ); 43 | } 44 | 45 | Widget _buildNameAndClosePart() { 46 | return Container( 47 | height: 30, 48 | child: Row( 49 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 50 | children: [ 51 | Text( 52 | widget.name, 53 | style: myStyle, 54 | ), 55 | IconButton( 56 | icon: Icon(Icons.close), 57 | onPressed: () { 58 | productProvider.deleteCheckoutProduct(widget.index); 59 | }, 60 | ), 61 | ], 62 | ), 63 | ); 64 | } 65 | 66 | Widget _buildColorAndSizePart() { 67 | return Container( 68 | width: width * 0.4, 69 | child: Row( 70 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 71 | children: [ 72 | Text( 73 | widget.color, 74 | style: myStyle, 75 | ), 76 | Text( 77 | widget.size, 78 | style: myStyle, 79 | ) 80 | ], 81 | ), 82 | ); 83 | } 84 | 85 | Widget _buildCountOrNot() { 86 | return Container( 87 | height: 35, 88 | width: width * 0.2 + 20, 89 | color: Color(0xfff2f2f2), 90 | child: Row( 91 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 92 | children: [ 93 | Text("Quentity"), 94 | Padding( 95 | padding: const EdgeInsets.only(right: 5), 96 | child: Text( 97 | widget.quentity.toString(), 98 | style: TextStyle(fontSize: 18), 99 | ), 100 | ), 101 | ], 102 | ), 103 | ); 104 | } 105 | 106 | @override 107 | Widget build(BuildContext context) { 108 | productProvider = Provider.of(context); 109 | 110 | height = MediaQuery.of(context).size.height; 111 | width = MediaQuery.of(context).size.width; 112 | return Container( 113 | height: height * 0.2, 114 | width: double.infinity, 115 | child: Card( 116 | child: Column( 117 | crossAxisAlignment: CrossAxisAlignment.start, 118 | children: [ 119 | Row( 120 | children: [ 121 | _buildImage(), 122 | Container( 123 | height: height * 0.1 + 50, 124 | width: width * 0.6, 125 | child: ListTile( 126 | title: Column( 127 | mainAxisAlignment: MainAxisAlignment.spaceEvenly, 128 | crossAxisAlignment: CrossAxisAlignment.start, 129 | children: [ 130 | _buildNameAndClosePart(), 131 | _buildColorAndSizePart(), 132 | Text( 133 | "\$${widget.price.toStringAsFixed(2)}", 134 | style: TextStyle( 135 | color: Color(0xff9b96d6), 136 | fontSize: 18, 137 | fontWeight: FontWeight.bold), 138 | ), 139 | _buildCountOrNot(), 140 | ], 141 | ), 142 | ), 143 | ) 144 | ], 145 | ), 146 | ], 147 | ), 148 | ), 149 | ); 150 | } 151 | } 152 | -------------------------------------------------------------------------------- /lib/widgets/mybutton.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MyButton extends StatelessWidget { 4 | final Function onPressed; 5 | final String name; 6 | MyButton({this.name, this.onPressed}); 7 | @override 8 | Widget build(BuildContext context) { 9 | return Container( 10 | height: 45, 11 | width: double.infinity, 12 | child: RaisedButton( 13 | child: Text( 14 | name, 15 | style: TextStyle(color: Colors.white), 16 | ), 17 | color: Color(0xff746bc9), 18 | onPressed: onPressed, 19 | ), 20 | ); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /lib/widgets/mytextformField.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class MyTextFormField extends StatelessWidget { 4 | final TextEditingController controller; 5 | final String name; 6 | 7 | MyTextFormField({ 8 | this.controller, 9 | this.name, 10 | }); 11 | @override 12 | Widget build(BuildContext context) { 13 | return TextFormField( 14 | controller: controller, 15 | decoration: InputDecoration( 16 | border: OutlineInputBorder(), 17 | hintText: name, 18 | ), 19 | ); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/widgets/notification_button.dart: -------------------------------------------------------------------------------- 1 | 2 | import 'package:flutter/material.dart'; 3 | import 'package:badges/badges.dart'; 4 | import 'package:provider/provider.dart'; 5 | import '../provider/product_provider.dart'; 6 | 7 | class NotificationButton extends StatefulWidget { 8 | @override 9 | _NotificationButtonState createState() => _NotificationButtonState(); 10 | } 11 | 12 | class _NotificationButtonState extends State { 13 | ProductProvider productProvider; 14 | Future myDialogBox(context) { 15 | return showDialog( 16 | context: context, 17 | barrierDismissible: false, 18 | builder: (BuildContext context) { 19 | return AlertDialog( 20 | title: Text("Alert"), 21 | actions: [ 22 | FlatButton( 23 | child: Text("Clear Notification"), 24 | onPressed: () { 25 | Navigator.of(context).pop(); 26 | setState(() { 27 | productProvider.notificationList.clear(); 28 | }); 29 | }, 30 | ), 31 | FlatButton( 32 | child: Text("Okey"), 33 | onPressed: () { 34 | Navigator.of(context).pop(); 35 | }, 36 | ), 37 | ], 38 | content: SingleChildScrollView( 39 | child: ListBody( 40 | children: [ 41 | Text(productProvider.notificationList.isNotEmpty 42 | ? "Your Product On Way" 43 | : "No Notification At Yet"), 44 | ], 45 | ), 46 | ), 47 | ); 48 | }); 49 | } 50 | 51 | @override 52 | Widget build(BuildContext context) { 53 | productProvider = Provider.of(context); 54 | return Badge( 55 | position: BadgePosition(left: 25, top: 8), 56 | badgeContent: Text( 57 | productProvider.getNotificationIndex.toString(), 58 | style: TextStyle(color: Colors.white, fontWeight: FontWeight.bold), 59 | ), 60 | badgeColor: Colors.red, 61 | child: IconButton( 62 | icon: Icon( 63 | Icons.notifications_none, 64 | color: Colors.black, 65 | ), 66 | onPressed: () { 67 | myDialogBox(context); 68 | }, 69 | ), 70 | ); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /lib/widgets/passwordtextformfield.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class PasswordTextFormField extends StatelessWidget { 4 | final bool obserText; 5 | final TextEditingController controller; 6 | final String name; 7 | 8 | final Function onTap; 9 | PasswordTextFormField({ 10 | this.controller, 11 | this.onTap, 12 | this.name, 13 | this.obserText, 14 | }); 15 | @override 16 | Widget build(BuildContext context) { 17 | return TextFormField( 18 | controller: controller, 19 | obscureText: obserText, 20 | decoration: InputDecoration( 21 | border: OutlineInputBorder(), 22 | hintText: name, 23 | suffixIcon: GestureDetector( 24 | onTap: onTap, 25 | child: Icon( 26 | obserText == true ? Icons.visibility : Icons.visibility_off, 27 | color: Colors.black, 28 | ), 29 | ), 30 | hintStyle: TextStyle(color: Colors.black), 31 | ), 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/widgets/singeproduct.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SingleProduct extends StatelessWidget { 4 | final String image; 5 | final double price; 6 | final String name; 7 | SingleProduct({this.image, this.name, this.price}); 8 | @override 9 | Widget build(BuildContext context) { 10 | double width, height; 11 | width = MediaQuery.of(context).size.width; 12 | height = MediaQuery.of(context).size.height; 13 | return Card( 14 | child: Container( 15 | height: height * 0.3, 16 | width: width * 0.2 * 2 + 10, 17 | child: Column( 18 | children: [ 19 | Expanded( 20 | flex: 3, 21 | child: Container( 22 | padding: EdgeInsets.symmetric(vertical: 10), 23 | child: Container( 24 | width: 160, 25 | decoration: BoxDecoration( 26 | image: DecorationImage( 27 | fit: BoxFit.fill, 28 | image: NetworkImage(image), 29 | ), 30 | ), 31 | ), 32 | ), 33 | ), 34 | Expanded( 35 | child: Column( 36 | children: [ 37 | Text( 38 | "\$ ${price.toString()}", 39 | style: TextStyle( 40 | fontWeight: FontWeight.bold, 41 | fontSize: 17, 42 | color: Color(0xff9b96d6)), 43 | ), 44 | Container( 45 | child: Text( 46 | name, 47 | style: TextStyle(fontSize: 15), 48 | ), 49 | ) 50 | ], 51 | ), 52 | ), 53 | ], 54 | ), 55 | ), 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | archive: 5 | dependency: transitive 6 | description: 7 | name: archive 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.0.13" 11 | args: 12 | dependency: transitive 13 | description: 14 | name: args 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "1.6.0" 18 | async: 19 | dependency: transitive 20 | description: 21 | name: async 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "2.4.2" 25 | badges: 26 | dependency: "direct main" 27 | description: 28 | name: badges 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.1.1" 32 | boolean_selector: 33 | dependency: transitive 34 | description: 35 | name: boolean_selector 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "2.0.0" 39 | bottom_navy_bar: 40 | dependency: "direct main" 41 | description: 42 | name: bottom_navy_bar 43 | url: "https://pub.dartlang.org" 44 | source: hosted 45 | version: "5.5.0" 46 | carousel_pro: 47 | dependency: "direct main" 48 | description: 49 | name: carousel_pro 50 | url: "https://pub.dartlang.org" 51 | source: hosted 52 | version: "1.0.0" 53 | characters: 54 | dependency: transitive 55 | description: 56 | name: characters 57 | url: "https://pub.dartlang.org" 58 | source: hosted 59 | version: "1.0.0" 60 | charcode: 61 | dependency: transitive 62 | description: 63 | name: charcode 64 | url: "https://pub.dartlang.org" 65 | source: hosted 66 | version: "1.1.3" 67 | clock: 68 | dependency: transitive 69 | description: 70 | name: clock 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "1.0.1" 74 | cloud_firestore: 75 | dependency: "direct main" 76 | description: 77 | name: cloud_firestore 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "0.14.0+2" 81 | cloud_firestore_platform_interface: 82 | dependency: transitive 83 | description: 84 | name: cloud_firestore_platform_interface 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "2.0.1" 88 | cloud_firestore_web: 89 | dependency: transitive 90 | description: 91 | name: cloud_firestore_web 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "0.2.0+1" 95 | collection: 96 | dependency: transitive 97 | description: 98 | name: collection 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "1.14.13" 102 | convert: 103 | dependency: transitive 104 | description: 105 | name: convert 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "2.1.1" 109 | crypto: 110 | dependency: transitive 111 | description: 112 | name: crypto 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "2.1.5" 116 | cupertino_icons: 117 | dependency: "direct main" 118 | description: 119 | name: cupertino_icons 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "0.1.3" 123 | fake_async: 124 | dependency: transitive 125 | description: 126 | name: fake_async 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "1.1.0" 130 | file_picker: 131 | dependency: transitive 132 | description: 133 | name: file_picker 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "1.13.3" 137 | file_picker_platform_interface: 138 | dependency: transitive 139 | description: 140 | name: file_picker_platform_interface 141 | url: "https://pub.dartlang.org" 142 | source: hosted 143 | version: "1.3.1" 144 | file_picker_web: 145 | dependency: transitive 146 | description: 147 | name: file_picker_web 148 | url: "https://pub.dartlang.org" 149 | source: hosted 150 | version: "1.0.2+1" 151 | firebase: 152 | dependency: transitive 153 | description: 154 | name: firebase 155 | url: "https://pub.dartlang.org" 156 | source: hosted 157 | version: "7.3.0" 158 | firebase_auth: 159 | dependency: "direct main" 160 | description: 161 | name: firebase_auth 162 | url: "https://pub.dartlang.org" 163 | source: hosted 164 | version: "0.18.0+1" 165 | firebase_auth_platform_interface: 166 | dependency: transitive 167 | description: 168 | name: firebase_auth_platform_interface 169 | url: "https://pub.dartlang.org" 170 | source: hosted 171 | version: "2.0.1" 172 | firebase_auth_web: 173 | dependency: transitive 174 | description: 175 | name: firebase_auth_web 176 | url: "https://pub.dartlang.org" 177 | source: hosted 178 | version: "0.3.0+1" 179 | firebase_core: 180 | dependency: "direct main" 181 | description: 182 | name: firebase_core 183 | url: "https://pub.dartlang.org" 184 | source: hosted 185 | version: "0.5.0" 186 | firebase_core_platform_interface: 187 | dependency: transitive 188 | description: 189 | name: firebase_core_platform_interface 190 | url: "https://pub.dartlang.org" 191 | source: hosted 192 | version: "2.0.0" 193 | firebase_core_web: 194 | dependency: transitive 195 | description: 196 | name: firebase_core_web 197 | url: "https://pub.dartlang.org" 198 | source: hosted 199 | version: "0.2.0" 200 | firebase_storage: 201 | dependency: "direct main" 202 | description: 203 | name: firebase_storage 204 | url: "https://pub.dartlang.org" 205 | source: hosted 206 | version: "4.0.0" 207 | flutter: 208 | dependency: "direct main" 209 | description: flutter 210 | source: sdk 211 | version: "0.0.0" 212 | flutter_colorpicker: 213 | dependency: transitive 214 | description: 215 | name: flutter_colorpicker 216 | url: "https://pub.dartlang.org" 217 | source: hosted 218 | version: "0.3.4" 219 | flutter_launcher_icons: 220 | dependency: "direct dev" 221 | description: 222 | name: flutter_launcher_icons 223 | url: "https://pub.dartlang.org" 224 | source: hosted 225 | version: "0.7.5" 226 | flutter_material_pickers: 227 | dependency: "direct main" 228 | description: 229 | name: flutter_material_pickers 230 | url: "https://pub.dartlang.org" 231 | source: hosted 232 | version: "1.7.2" 233 | flutter_plugin_android_lifecycle: 234 | dependency: transitive 235 | description: 236 | name: flutter_plugin_android_lifecycle 237 | url: "https://pub.dartlang.org" 238 | source: hosted 239 | version: "1.0.8" 240 | flutter_test: 241 | dependency: "direct dev" 242 | description: flutter 243 | source: sdk 244 | version: "0.0.0" 245 | flutter_web_plugins: 246 | dependency: transitive 247 | description: flutter 248 | source: sdk 249 | version: "0.0.0" 250 | http: 251 | dependency: transitive 252 | description: 253 | name: http 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "0.12.2" 257 | http_parser: 258 | dependency: transitive 259 | description: 260 | name: http_parser 261 | url: "https://pub.dartlang.org" 262 | source: hosted 263 | version: "3.1.4" 264 | image: 265 | dependency: transitive 266 | description: 267 | name: image 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "2.1.14" 271 | image_picker: 272 | dependency: "direct main" 273 | description: 274 | name: image_picker 275 | url: "https://pub.dartlang.org" 276 | source: hosted 277 | version: "0.6.7+7" 278 | image_picker_platform_interface: 279 | dependency: transitive 280 | description: 281 | name: image_picker_platform_interface 282 | url: "https://pub.dartlang.org" 283 | source: hosted 284 | version: "1.1.0" 285 | intl: 286 | dependency: transitive 287 | description: 288 | name: intl 289 | url: "https://pub.dartlang.org" 290 | source: hosted 291 | version: "0.16.1" 292 | js: 293 | dependency: transitive 294 | description: 295 | name: js 296 | url: "https://pub.dartlang.org" 297 | source: hosted 298 | version: "0.6.2" 299 | matcher: 300 | dependency: transitive 301 | description: 302 | name: matcher 303 | url: "https://pub.dartlang.org" 304 | source: hosted 305 | version: "0.12.8" 306 | meta: 307 | dependency: transitive 308 | description: 309 | name: meta 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "1.1.8" 313 | nested: 314 | dependency: transitive 315 | description: 316 | name: nested 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "0.0.4" 320 | path: 321 | dependency: transitive 322 | description: 323 | name: path 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "1.7.0" 327 | pedantic: 328 | dependency: transitive 329 | description: 330 | name: pedantic 331 | url: "https://pub.dartlang.org" 332 | source: hosted 333 | version: "1.9.0" 334 | petitparser: 335 | dependency: transitive 336 | description: 337 | name: petitparser 338 | url: "https://pub.dartlang.org" 339 | source: hosted 340 | version: "3.0.4" 341 | plugin_platform_interface: 342 | dependency: transitive 343 | description: 344 | name: plugin_platform_interface 345 | url: "https://pub.dartlang.org" 346 | source: hosted 347 | version: "1.0.2" 348 | provider: 349 | dependency: "direct main" 350 | description: 351 | name: provider 352 | url: "https://pub.dartlang.org" 353 | source: hosted 354 | version: "4.3.2+1" 355 | quiver: 356 | dependency: transitive 357 | description: 358 | name: quiver 359 | url: "https://pub.dartlang.org" 360 | source: hosted 361 | version: "2.1.3" 362 | sky_engine: 363 | dependency: transitive 364 | description: flutter 365 | source: sdk 366 | version: "0.0.99" 367 | source_span: 368 | dependency: transitive 369 | description: 370 | name: source_span 371 | url: "https://pub.dartlang.org" 372 | source: hosted 373 | version: "1.7.0" 374 | stack_trace: 375 | dependency: transitive 376 | description: 377 | name: stack_trace 378 | url: "https://pub.dartlang.org" 379 | source: hosted 380 | version: "1.9.5" 381 | stream_channel: 382 | dependency: transitive 383 | description: 384 | name: stream_channel 385 | url: "https://pub.dartlang.org" 386 | source: hosted 387 | version: "2.0.0" 388 | string_scanner: 389 | dependency: transitive 390 | description: 391 | name: string_scanner 392 | url: "https://pub.dartlang.org" 393 | source: hosted 394 | version: "1.0.5" 395 | term_glyph: 396 | dependency: transitive 397 | description: 398 | name: term_glyph 399 | url: "https://pub.dartlang.org" 400 | source: hosted 401 | version: "1.1.0" 402 | test_api: 403 | dependency: transitive 404 | description: 405 | name: test_api 406 | url: "https://pub.dartlang.org" 407 | source: hosted 408 | version: "0.2.17" 409 | typed_data: 410 | dependency: transitive 411 | description: 412 | name: typed_data 413 | url: "https://pub.dartlang.org" 414 | source: hosted 415 | version: "1.2.0" 416 | vector_math: 417 | dependency: transitive 418 | description: 419 | name: vector_math 420 | url: "https://pub.dartlang.org" 421 | source: hosted 422 | version: "2.0.8" 423 | xml: 424 | dependency: transitive 425 | description: 426 | name: xml 427 | url: "https://pub.dartlang.org" 428 | source: hosted 429 | version: "4.2.0" 430 | yaml: 431 | dependency: transitive 432 | description: 433 | name: yaml 434 | url: "https://pub.dartlang.org" 435 | source: hosted 436 | version: "2.2.1" 437 | sdks: 438 | dart: ">=2.9.0-14.0.dev <3.0.0" 439 | flutter: ">=1.16.0 <2.0.0" 440 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: e_commerce 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.7.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: ^0.1.3 31 | cloud_firestore: ^0.14.0+2 32 | firebase_auth: ^0.18.0+1 33 | carousel_pro: ^1.0.0 34 | provider: ^4.3.2+1 35 | flutter_material_pickers: ^1.7.2 36 | firebase_core: ^0.5.0 37 | bottom_navy_bar: ^5.5.0 38 | image_picker: ^0.6.7+7 39 | firebase_storage: ^4.0.0 40 | badges: ^1.1.1 41 | 42 | 43 | 44 | 45 | 46 | dev_dependencies: 47 | flutter_test: 48 | sdk: flutter 49 | flutter_launcher_icons: ^0.7.5 50 | 51 | flutter_icons: 52 | android: true 53 | ios: true 54 | image_path: "dev_assets/logo.png" 55 | adaptive_icon_background: "#f8f8f8" 56 | adaptive_icon_foreground: "dev_assets/logo_adaptive.png" 57 | 58 | # For information on the generic Dart part of this file, see the 59 | # following page: https://dart.dev/tools/pub/pubspec 60 | 61 | # The following section is specific to Flutter. 62 | flutter: 63 | 64 | # The following line ensures that the Material Icons font is 65 | # included with your application, so that you can use the icons in 66 | # the material Icons class. 67 | uses-material-design: true 68 | 69 | # To add assets to your application, add an assets section, like this: 70 | assets: 71 | - images/ 72 | # - images/a_dot_ham.jpeg 73 | 74 | # An image asset can refer to one or more resolution-specific "variants", see 75 | # https://flutter.dev/assets-and-images/#resolution-aware. 76 | 77 | # For details regarding adding assets from package dependencies, see 78 | # https://flutter.dev/assets-and-images/#from-packages 79 | 80 | # To add custom fonts to your application, add a fonts section here, 81 | # in this "flutter" section. Each entry in this list should have a 82 | # "family" key with the font family name, and a "fonts" key with a 83 | # list giving the asset and other descriptors for the font. For 84 | # example: 85 | # fonts: 86 | # - family: Schyler 87 | # fonts: 88 | # - asset: fonts/Schyler-Regular.ttf 89 | # - asset: fonts/Schyler-Italic.ttf 90 | # style: italic 91 | # - family: Trajan Pro 92 | # fonts: 93 | # - asset: fonts/TrajanPro.ttf 94 | # - asset: fonts/TrajanPro_Bold.ttf 95 | # weight: 700 96 | # 97 | # For details regarding fonts from package dependencies, 98 | # see https://flutter.dev/custom-fonts/#from-packages 99 | -------------------------------------------------------------------------------- /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:e_commerce/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 | --------------------------------------------------------------------------------