├── .gitignore
├── .metadata
├── README.md
├── android
├── .gitignore
├── app
│ ├── build.gradle
│ ├── google-services.json
│ └── src
│ │ ├── debug
│ │ └── AndroidManifest.xml
│ │ ├── main
│ │ ├── AndroidManifest.xml
│ │ ├── kotlin
│ │ │ └── com
│ │ │ │ └── tharwatsamy
│ │ │ │ └── buy_it
│ │ │ │ └── MainActivity.kt
│ │ └── res
│ │ │ ├── drawable
│ │ │ └── launch_background.xml
│ │ │ ├── mipmap-hdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-mdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxhdpi
│ │ │ └── ic_launcher.png
│ │ │ ├── mipmap-xxxhdpi
│ │ │ └── ic_launcher.png
│ │ │ └── values
│ │ │ └── styles.xml
│ │ └── profile
│ │ └── AndroidManifest.xml
├── build.gradle
├── gradle.properties
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
└── settings.gradle
├── fonts
└── Pacifico-Regular.ttf
├── images
├── icons
│ └── buyicon.png
├── jackets
│ ├── jacket1.jpg
│ ├── jacket10.jpg
│ ├── jacket2.jpg
│ ├── jacket3.jpg
│ ├── jacket4.jpg
│ ├── jacket5.jpg
│ ├── jacket6.jpg
│ ├── jacket7.jpg
│ ├── jacket8.png
│ └── jacket9.jpg
├── shoes
│ ├── shoe1.jpg
│ ├── shoe2.jpg
│ ├── shoe3.jpg
│ ├── shoe4.jpg
│ ├── shoe5.jpg
│ └── shoe6.jpg
├── t-shirts
│ ├── t-shirt1.jpg
│ ├── t-shirt2.jpg
│ ├── t-shirt3.jpg
│ ├── t-shirt4.jpg
│ ├── t-shirt5.jpg
│ └── t-shirt6.jpg
└── trousers
│ ├── trouser1.jpg
│ ├── trouser2.jpg
│ ├── trouser3.jpg
│ ├── trouser4.jpg
│ ├── trouser6.jpg
│ └── trouser7.jpg
├── ios
├── .gitignore
├── Flutter
│ ├── AppFrameworkInfo.plist
│ ├── Debug.xcconfig
│ └── Release.xcconfig
├── Runner.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── Runner.xcscheme
├── Runner.xcworkspace
│ └── contents.xcworkspacedata
└── Runner
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ ├── Contents.json
│ │ ├── Icon-App-1024x1024@1x.png
│ │ ├── Icon-App-20x20@1x.png
│ │ ├── Icon-App-20x20@2x.png
│ │ ├── Icon-App-20x20@3x.png
│ │ ├── Icon-App-29x29@1x.png
│ │ ├── Icon-App-29x29@2x.png
│ │ ├── Icon-App-29x29@3x.png
│ │ ├── Icon-App-40x40@1x.png
│ │ ├── Icon-App-40x40@2x.png
│ │ ├── Icon-App-40x40@3x.png
│ │ ├── Icon-App-60x60@2x.png
│ │ ├── Icon-App-60x60@3x.png
│ │ ├── Icon-App-76x76@1x.png
│ │ ├── Icon-App-76x76@2x.png
│ │ └── Icon-App-83.5x83.5@2x.png
│ └── LaunchImage.imageset
│ │ ├── Contents.json
│ │ ├── LaunchImage.png
│ │ ├── LaunchImage@2x.png
│ │ ├── LaunchImage@3x.png
│ │ └── README.md
│ ├── Base.lproj
│ ├── LaunchScreen.storyboard
│ └── Main.storyboard
│ ├── Info.plist
│ └── Runner-Bridging-Header.h
├── lib
├── constants.dart
├── functions.dart
├── main.dart
├── models
│ ├── order.dart
│ └── product.dart
├── provider
│ ├── adminMode.dart
│ ├── cartItem.dart
│ └── modelHud.dart
├── screens
│ ├── admin
│ │ ├── OrdersScreen.dart
│ │ ├── addProduct.dart
│ │ ├── adminHome.dart
│ │ ├── editProduct.dart
│ │ ├── manageProduct.dart
│ │ └── order_details.dart
│ ├── login_screen.dart
│ ├── signup_screen.dart
│ └── user
│ │ ├── CartScreen.dart
│ │ ├── homePage.dart
│ │ └── productInfo.dart
├── services
│ ├── auth.dart
│ └── store.dart
└── widgets
│ ├── custom_menu.dart
│ ├── custom_textfield.dart
│ ├── cutsom_logo.dart
│ └── productView.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 | .dart_tool/
26 | .flutter-plugins
27 | .flutter-plugins-dependencies
28 | .packages
29 | .pub-cache/
30 | .pub/
31 | /build/
32 |
33 | # Web related
34 | lib/generated_plugin_registrant.dart
35 |
36 | # Exceptions to above rules.
37 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
38 |
--------------------------------------------------------------------------------
/.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: f139b11009aeb8ed2a3a3aa8b0066e482709dde3
8 | channel: unknown
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # buy_it
2 |
3 | A new Flutter application.
4 |
5 | ## Getting Started
6 |
7 | This project is a starting point for a Flutter application.
8 |
9 | A few resources to get you started if this is your first Flutter project:
10 |
11 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
12 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
13 |
14 | For help getting started with Flutter, view our
15 | [online documentation](https://flutter.dev/docs), which offers tutorials,
16 | samples, guidance on mobile development, and a full API reference.
17 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
--------------------------------------------------------------------------------
/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 | apply plugin: 'com.google.gms.google-services'
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 28
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.tharwatsamy.buy_it"
42 | minSdkVersion 16
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
47 | }
48 |
49 | buildTypes {
50 | release {
51 | // TODO: Add your own signing config for the release build.
52 | // Signing with the debug keys for now, so `flutter run --release` works.
53 | signingConfig signingConfigs.debug
54 | }
55 | debug{
56 | minifyEnabled true
57 | }
58 |
59 | }
60 | }
61 |
62 | flutter {
63 | source '../..'
64 | }
65 |
66 | dependencies {
67 | implementation 'com.google.firebase:firebase-messaging:20.2.1'
68 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
69 | testImplementation 'junit:junit:4.12'
70 | androidTestImplementation 'androidx.test:runner:1.1.1'
71 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
72 | }
73 |
--------------------------------------------------------------------------------
/android/app/google-services.json:
--------------------------------------------------------------------------------
1 | {
2 | "project_info": {
3 | "project_number": "1014659242474",
4 | "firebase_url": "https://buy-it-2.firebaseio.com",
5 | "project_id": "buy-it-2",
6 | "storage_bucket": "buy-it-2.appspot.com"
7 | },
8 | "client": [
9 | {
10 | "client_info": {
11 | "mobilesdk_app_id": "1:1014659242474:android:f6bb53f885b0a02d497a93",
12 | "android_client_info": {
13 | "package_name": "com.tharwatsamy.buy_it"
14 | }
15 | },
16 | "oauth_client": [
17 | {
18 | "client_id": "1014659242474-5allvmfdjp6n5062origv7tmdpoejro9.apps.googleusercontent.com",
19 | "client_type": 3
20 | }
21 | ],
22 | "api_key": [
23 | {
24 | "current_key": "AIzaSyDaMsvbNnp9eF_dcktW8S9mQLKTy4FZkeQ"
25 | }
26 | ],
27 | "services": {
28 | "appinvite_service": {
29 | "other_platform_oauth_client": [
30 | {
31 | "client_id": "1014659242474-5allvmfdjp6n5062origv7tmdpoejro9.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 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
34 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/tharwatsamy/buy_it/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.tharwatsamy.buy_it
2 |
3 | import androidx.annotation.NonNull;
4 | import io.flutter.embedding.android.FlutterActivity
5 | import io.flutter.embedding.engine.FlutterEngine
6 | import io.flutter.plugins.GeneratedPluginRegistrant
7 |
8 | class MainActivity: FlutterActivity() {
9 | override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
10 | GeneratedPluginRegistrant.registerWith(flutterEngine);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/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.google.gms:google-services:4.3.3'
10 | classpath 'com.android.tools.build:gradle:3.5.0'
11 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
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 flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/fonts/Pacifico-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/fonts/Pacifico-Regular.ttf
--------------------------------------------------------------------------------
/images/icons/buyicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/icons/buyicon.png
--------------------------------------------------------------------------------
/images/jackets/jacket1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/jackets/jacket1.jpg
--------------------------------------------------------------------------------
/images/jackets/jacket10.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/jackets/jacket10.jpg
--------------------------------------------------------------------------------
/images/jackets/jacket2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/jackets/jacket2.jpg
--------------------------------------------------------------------------------
/images/jackets/jacket3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/jackets/jacket3.jpg
--------------------------------------------------------------------------------
/images/jackets/jacket4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/jackets/jacket4.jpg
--------------------------------------------------------------------------------
/images/jackets/jacket5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/jackets/jacket5.jpg
--------------------------------------------------------------------------------
/images/jackets/jacket6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/jackets/jacket6.jpg
--------------------------------------------------------------------------------
/images/jackets/jacket7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/jackets/jacket7.jpg
--------------------------------------------------------------------------------
/images/jackets/jacket8.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/jackets/jacket8.png
--------------------------------------------------------------------------------
/images/jackets/jacket9.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/jackets/jacket9.jpg
--------------------------------------------------------------------------------
/images/shoes/shoe1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/shoes/shoe1.jpg
--------------------------------------------------------------------------------
/images/shoes/shoe2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/shoes/shoe2.jpg
--------------------------------------------------------------------------------
/images/shoes/shoe3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/shoes/shoe3.jpg
--------------------------------------------------------------------------------
/images/shoes/shoe4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/shoes/shoe4.jpg
--------------------------------------------------------------------------------
/images/shoes/shoe5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/shoes/shoe5.jpg
--------------------------------------------------------------------------------
/images/shoes/shoe6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/shoes/shoe6.jpg
--------------------------------------------------------------------------------
/images/t-shirts/t-shirt1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/t-shirts/t-shirt1.jpg
--------------------------------------------------------------------------------
/images/t-shirts/t-shirt2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/t-shirts/t-shirt2.jpg
--------------------------------------------------------------------------------
/images/t-shirts/t-shirt3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/t-shirts/t-shirt3.jpg
--------------------------------------------------------------------------------
/images/t-shirts/t-shirt4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/t-shirts/t-shirt4.jpg
--------------------------------------------------------------------------------
/images/t-shirts/t-shirt5.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/t-shirts/t-shirt5.jpg
--------------------------------------------------------------------------------
/images/t-shirts/t-shirt6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/t-shirts/t-shirt6.jpg
--------------------------------------------------------------------------------
/images/trousers/trouser1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/trousers/trouser1.jpg
--------------------------------------------------------------------------------
/images/trousers/trouser2.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/trousers/trouser2.jpg
--------------------------------------------------------------------------------
/images/trousers/trouser3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/trousers/trouser3.jpg
--------------------------------------------------------------------------------
/images/trousers/trouser4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/trousers/trouser4.jpg
--------------------------------------------------------------------------------
/images/trousers/trouser6.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/trousers/trouser6.jpg
--------------------------------------------------------------------------------
/images/trousers/trouser7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/images/trousers/trouser7.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 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
13 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
14 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
15 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
16 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
17 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
18 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
19 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXCopyFilesBuildPhase section */
23 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
24 | isa = PBXCopyFilesBuildPhase;
25 | buildActionMask = 2147483647;
26 | dstPath = "";
27 | dstSubfolderSpec = 10;
28 | files = (
29 | 3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
30 | 9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
31 | );
32 | name = "Embed Frameworks";
33 | runOnlyForDeploymentPostprocessing = 0;
34 | };
35 | /* End PBXCopyFilesBuildPhase section */
36 |
37 | /* Begin PBXFileReference section */
38 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
39 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
40 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
41 | 3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = ""; };
42 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
43 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
44 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
45 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
46 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
47 | 9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = ""; };
48 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
49 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
50 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
51 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
52 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
53 | /* End PBXFileReference section */
54 |
55 | /* Begin PBXFrameworksBuildPhase section */
56 | 97C146EB1CF9000F007C117D /* Frameworks */ = {
57 | isa = PBXFrameworksBuildPhase;
58 | buildActionMask = 2147483647;
59 | files = (
60 | 9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
61 | 3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
62 | );
63 | runOnlyForDeploymentPostprocessing = 0;
64 | };
65 | /* End PBXFrameworksBuildPhase section */
66 |
67 | /* Begin PBXGroup section */
68 | 9740EEB11CF90186004384FC /* Flutter */ = {
69 | isa = PBXGroup;
70 | children = (
71 | 3B80C3931E831B6300D905FE /* App.framework */,
72 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
73 | 9740EEBA1CF902C7004384FC /* Flutter.framework */,
74 | 9740EEB21CF90195004384FC /* Debug.xcconfig */,
75 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
76 | 9740EEB31CF90195004384FC /* Generated.xcconfig */,
77 | );
78 | name = Flutter;
79 | sourceTree = "";
80 | };
81 | 97C146E51CF9000F007C117D = {
82 | isa = PBXGroup;
83 | children = (
84 | 9740EEB11CF90186004384FC /* Flutter */,
85 | 97C146F01CF9000F007C117D /* Runner */,
86 | 97C146EF1CF9000F007C117D /* Products */,
87 | );
88 | sourceTree = "";
89 | };
90 | 97C146EF1CF9000F007C117D /* Products */ = {
91 | isa = PBXGroup;
92 | children = (
93 | 97C146EE1CF9000F007C117D /* Runner.app */,
94 | );
95 | name = Products;
96 | sourceTree = "";
97 | };
98 | 97C146F01CF9000F007C117D /* Runner */ = {
99 | isa = PBXGroup;
100 | children = (
101 | 97C146FA1CF9000F007C117D /* Main.storyboard */,
102 | 97C146FD1CF9000F007C117D /* Assets.xcassets */,
103 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
104 | 97C147021CF9000F007C117D /* Info.plist */,
105 | 97C146F11CF9000F007C117D /* Supporting Files */,
106 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
107 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
108 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
109 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
110 | );
111 | path = Runner;
112 | sourceTree = "";
113 | };
114 | 97C146F11CF9000F007C117D /* Supporting Files */ = {
115 | isa = PBXGroup;
116 | children = (
117 | );
118 | name = "Supporting Files";
119 | sourceTree = "";
120 | };
121 | /* End PBXGroup section */
122 |
123 | /* Begin PBXNativeTarget section */
124 | 97C146ED1CF9000F007C117D /* Runner */ = {
125 | isa = PBXNativeTarget;
126 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
127 | buildPhases = (
128 | 9740EEB61CF901F6004384FC /* Run Script */,
129 | 97C146EA1CF9000F007C117D /* Sources */,
130 | 97C146EB1CF9000F007C117D /* Frameworks */,
131 | 97C146EC1CF9000F007C117D /* Resources */,
132 | 9705A1C41CF9048500538489 /* Embed Frameworks */,
133 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
134 | );
135 | buildRules = (
136 | );
137 | dependencies = (
138 | );
139 | name = Runner;
140 | productName = Runner;
141 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
142 | productType = "com.apple.product-type.application";
143 | };
144 | /* End PBXNativeTarget section */
145 |
146 | /* Begin PBXProject section */
147 | 97C146E61CF9000F007C117D /* Project object */ = {
148 | isa = PBXProject;
149 | attributes = {
150 | LastUpgradeCheck = 1020;
151 | ORGANIZATIONNAME = "The Chromium Authors";
152 | TargetAttributes = {
153 | 97C146ED1CF9000F007C117D = {
154 | CreatedOnToolsVersion = 7.3.1;
155 | LastSwiftMigration = 1100;
156 | };
157 | };
158 | };
159 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
160 | compatibilityVersion = "Xcode 3.2";
161 | developmentRegion = en;
162 | hasScannedForEncodings = 0;
163 | knownRegions = (
164 | en,
165 | Base,
166 | );
167 | mainGroup = 97C146E51CF9000F007C117D;
168 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
169 | projectDirPath = "";
170 | projectRoot = "";
171 | targets = (
172 | 97C146ED1CF9000F007C117D /* Runner */,
173 | );
174 | };
175 | /* End PBXProject section */
176 |
177 | /* Begin PBXResourcesBuildPhase section */
178 | 97C146EC1CF9000F007C117D /* Resources */ = {
179 | isa = PBXResourcesBuildPhase;
180 | buildActionMask = 2147483647;
181 | files = (
182 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
183 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
184 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
185 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
186 | );
187 | runOnlyForDeploymentPostprocessing = 0;
188 | };
189 | /* End PBXResourcesBuildPhase section */
190 |
191 | /* Begin PBXShellScriptBuildPhase section */
192 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
193 | isa = PBXShellScriptBuildPhase;
194 | buildActionMask = 2147483647;
195 | files = (
196 | );
197 | inputPaths = (
198 | );
199 | name = "Thin Binary";
200 | outputPaths = (
201 | );
202 | runOnlyForDeploymentPostprocessing = 0;
203 | shellPath = /bin/sh;
204 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
205 | };
206 | 9740EEB61CF901F6004384FC /* Run Script */ = {
207 | isa = PBXShellScriptBuildPhase;
208 | buildActionMask = 2147483647;
209 | files = (
210 | );
211 | inputPaths = (
212 | );
213 | name = "Run Script";
214 | outputPaths = (
215 | );
216 | runOnlyForDeploymentPostprocessing = 0;
217 | shellPath = /bin/sh;
218 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
219 | };
220 | /* End PBXShellScriptBuildPhase section */
221 |
222 | /* Begin PBXSourcesBuildPhase section */
223 | 97C146EA1CF9000F007C117D /* Sources */ = {
224 | isa = PBXSourcesBuildPhase;
225 | buildActionMask = 2147483647;
226 | files = (
227 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
228 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
229 | );
230 | runOnlyForDeploymentPostprocessing = 0;
231 | };
232 | /* End PBXSourcesBuildPhase section */
233 |
234 | /* Begin PBXVariantGroup section */
235 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
236 | isa = PBXVariantGroup;
237 | children = (
238 | 97C146FB1CF9000F007C117D /* Base */,
239 | );
240 | name = Main.storyboard;
241 | sourceTree = "";
242 | };
243 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
244 | isa = PBXVariantGroup;
245 | children = (
246 | 97C147001CF9000F007C117D /* Base */,
247 | );
248 | name = LaunchScreen.storyboard;
249 | sourceTree = "";
250 | };
251 | /* End PBXVariantGroup section */
252 |
253 | /* Begin XCBuildConfiguration section */
254 | 249021D3217E4FDB00AE95B9 /* Profile */ = {
255 | isa = XCBuildConfiguration;
256 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
257 | buildSettings = {
258 | ALWAYS_SEARCH_USER_PATHS = NO;
259 | CLANG_ANALYZER_NONNULL = YES;
260 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
261 | CLANG_CXX_LIBRARY = "libc++";
262 | CLANG_ENABLE_MODULES = YES;
263 | CLANG_ENABLE_OBJC_ARC = YES;
264 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
265 | CLANG_WARN_BOOL_CONVERSION = YES;
266 | CLANG_WARN_COMMA = YES;
267 | CLANG_WARN_CONSTANT_CONVERSION = YES;
268 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
269 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
270 | CLANG_WARN_EMPTY_BODY = YES;
271 | CLANG_WARN_ENUM_CONVERSION = YES;
272 | CLANG_WARN_INFINITE_RECURSION = YES;
273 | CLANG_WARN_INT_CONVERSION = YES;
274 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
275 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
276 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
277 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
278 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
279 | CLANG_WARN_STRICT_PROTOTYPES = YES;
280 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
281 | CLANG_WARN_UNREACHABLE_CODE = YES;
282 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
283 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
284 | COPY_PHASE_STRIP = NO;
285 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
286 | ENABLE_NS_ASSERTIONS = NO;
287 | ENABLE_STRICT_OBJC_MSGSEND = YES;
288 | GCC_C_LANGUAGE_STANDARD = gnu99;
289 | GCC_NO_COMMON_BLOCKS = YES;
290 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
291 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
292 | GCC_WARN_UNDECLARED_SELECTOR = YES;
293 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
294 | GCC_WARN_UNUSED_FUNCTION = YES;
295 | GCC_WARN_UNUSED_VARIABLE = YES;
296 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
297 | MTL_ENABLE_DEBUG_INFO = NO;
298 | SDKROOT = iphoneos;
299 | SUPPORTED_PLATFORMS = iphoneos;
300 | TARGETED_DEVICE_FAMILY = "1,2";
301 | VALIDATE_PRODUCT = YES;
302 | };
303 | name = Profile;
304 | };
305 | 249021D4217E4FDB00AE95B9 /* Profile */ = {
306 | isa = XCBuildConfiguration;
307 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
308 | buildSettings = {
309 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
310 | CLANG_ENABLE_MODULES = YES;
311 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
312 | ENABLE_BITCODE = NO;
313 | FRAMEWORK_SEARCH_PATHS = (
314 | "$(inherited)",
315 | "$(PROJECT_DIR)/Flutter",
316 | );
317 | INFOPLIST_FILE = Runner/Info.plist;
318 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
319 | LIBRARY_SEARCH_PATHS = (
320 | "$(inherited)",
321 | "$(PROJECT_DIR)/Flutter",
322 | );
323 | PRODUCT_BUNDLE_IDENTIFIER = com.tharwatsamy.buyIt;
324 | PRODUCT_NAME = "$(TARGET_NAME)";
325 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
326 | SWIFT_VERSION = 5.0;
327 | VERSIONING_SYSTEM = "apple-generic";
328 | };
329 | name = Profile;
330 | };
331 | 97C147031CF9000F007C117D /* Debug */ = {
332 | isa = XCBuildConfiguration;
333 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
334 | buildSettings = {
335 | ALWAYS_SEARCH_USER_PATHS = NO;
336 | CLANG_ANALYZER_NONNULL = YES;
337 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
338 | CLANG_CXX_LIBRARY = "libc++";
339 | CLANG_ENABLE_MODULES = YES;
340 | CLANG_ENABLE_OBJC_ARC = YES;
341 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
342 | CLANG_WARN_BOOL_CONVERSION = YES;
343 | CLANG_WARN_COMMA = YES;
344 | CLANG_WARN_CONSTANT_CONVERSION = YES;
345 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
347 | CLANG_WARN_EMPTY_BODY = YES;
348 | CLANG_WARN_ENUM_CONVERSION = YES;
349 | CLANG_WARN_INFINITE_RECURSION = YES;
350 | CLANG_WARN_INT_CONVERSION = YES;
351 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
352 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
353 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
354 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
355 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
356 | CLANG_WARN_STRICT_PROTOTYPES = YES;
357 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
358 | CLANG_WARN_UNREACHABLE_CODE = YES;
359 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
360 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
361 | COPY_PHASE_STRIP = NO;
362 | DEBUG_INFORMATION_FORMAT = dwarf;
363 | ENABLE_STRICT_OBJC_MSGSEND = YES;
364 | ENABLE_TESTABILITY = YES;
365 | GCC_C_LANGUAGE_STANDARD = gnu99;
366 | GCC_DYNAMIC_NO_PIC = NO;
367 | GCC_NO_COMMON_BLOCKS = YES;
368 | GCC_OPTIMIZATION_LEVEL = 0;
369 | GCC_PREPROCESSOR_DEFINITIONS = (
370 | "DEBUG=1",
371 | "$(inherited)",
372 | );
373 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
374 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
375 | GCC_WARN_UNDECLARED_SELECTOR = YES;
376 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
377 | GCC_WARN_UNUSED_FUNCTION = YES;
378 | GCC_WARN_UNUSED_VARIABLE = YES;
379 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
380 | MTL_ENABLE_DEBUG_INFO = YES;
381 | ONLY_ACTIVE_ARCH = YES;
382 | SDKROOT = iphoneos;
383 | TARGETED_DEVICE_FAMILY = "1,2";
384 | };
385 | name = Debug;
386 | };
387 | 97C147041CF9000F007C117D /* Release */ = {
388 | isa = XCBuildConfiguration;
389 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
390 | buildSettings = {
391 | ALWAYS_SEARCH_USER_PATHS = NO;
392 | CLANG_ANALYZER_NONNULL = YES;
393 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
394 | CLANG_CXX_LIBRARY = "libc++";
395 | CLANG_ENABLE_MODULES = YES;
396 | CLANG_ENABLE_OBJC_ARC = YES;
397 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
398 | CLANG_WARN_BOOL_CONVERSION = YES;
399 | CLANG_WARN_COMMA = YES;
400 | CLANG_WARN_CONSTANT_CONVERSION = YES;
401 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
402 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
403 | CLANG_WARN_EMPTY_BODY = YES;
404 | CLANG_WARN_ENUM_CONVERSION = YES;
405 | CLANG_WARN_INFINITE_RECURSION = YES;
406 | CLANG_WARN_INT_CONVERSION = YES;
407 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
408 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
409 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
410 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
411 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
412 | CLANG_WARN_STRICT_PROTOTYPES = YES;
413 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
414 | CLANG_WARN_UNREACHABLE_CODE = YES;
415 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
416 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
417 | COPY_PHASE_STRIP = NO;
418 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
419 | ENABLE_NS_ASSERTIONS = NO;
420 | ENABLE_STRICT_OBJC_MSGSEND = YES;
421 | GCC_C_LANGUAGE_STANDARD = gnu99;
422 | GCC_NO_COMMON_BLOCKS = YES;
423 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
424 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
425 | GCC_WARN_UNDECLARED_SELECTOR = YES;
426 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
427 | GCC_WARN_UNUSED_FUNCTION = YES;
428 | GCC_WARN_UNUSED_VARIABLE = YES;
429 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
430 | MTL_ENABLE_DEBUG_INFO = NO;
431 | SDKROOT = iphoneos;
432 | SUPPORTED_PLATFORMS = iphoneos;
433 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
434 | TARGETED_DEVICE_FAMILY = "1,2";
435 | VALIDATE_PRODUCT = YES;
436 | };
437 | name = Release;
438 | };
439 | 97C147061CF9000F007C117D /* Debug */ = {
440 | isa = XCBuildConfiguration;
441 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
442 | buildSettings = {
443 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
444 | CLANG_ENABLE_MODULES = YES;
445 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
446 | ENABLE_BITCODE = NO;
447 | FRAMEWORK_SEARCH_PATHS = (
448 | "$(inherited)",
449 | "$(PROJECT_DIR)/Flutter",
450 | );
451 | INFOPLIST_FILE = Runner/Info.plist;
452 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
453 | LIBRARY_SEARCH_PATHS = (
454 | "$(inherited)",
455 | "$(PROJECT_DIR)/Flutter",
456 | );
457 | PRODUCT_BUNDLE_IDENTIFIER = com.tharwatsamy.buyIt;
458 | PRODUCT_NAME = "$(TARGET_NAME)";
459 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
460 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
461 | SWIFT_VERSION = 5.0;
462 | VERSIONING_SYSTEM = "apple-generic";
463 | };
464 | name = Debug;
465 | };
466 | 97C147071CF9000F007C117D /* Release */ = {
467 | isa = XCBuildConfiguration;
468 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
469 | buildSettings = {
470 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
471 | CLANG_ENABLE_MODULES = YES;
472 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
473 | ENABLE_BITCODE = NO;
474 | FRAMEWORK_SEARCH_PATHS = (
475 | "$(inherited)",
476 | "$(PROJECT_DIR)/Flutter",
477 | );
478 | INFOPLIST_FILE = Runner/Info.plist;
479 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
480 | LIBRARY_SEARCH_PATHS = (
481 | "$(inherited)",
482 | "$(PROJECT_DIR)/Flutter",
483 | );
484 | PRODUCT_BUNDLE_IDENTIFIER = com.tharwatsamy.buyIt;
485 | PRODUCT_NAME = "$(TARGET_NAME)";
486 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
487 | SWIFT_VERSION = 5.0;
488 | VERSIONING_SYSTEM = "apple-generic";
489 | };
490 | name = Release;
491 | };
492 | /* End XCBuildConfiguration section */
493 |
494 | /* Begin XCConfigurationList section */
495 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
496 | isa = XCConfigurationList;
497 | buildConfigurations = (
498 | 97C147031CF9000F007C117D /* Debug */,
499 | 97C147041CF9000F007C117D /* Release */,
500 | 249021D3217E4FDB00AE95B9 /* Profile */,
501 | );
502 | defaultConfigurationIsVisible = 0;
503 | defaultConfigurationName = Release;
504 | };
505 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
506 | isa = XCConfigurationList;
507 | buildConfigurations = (
508 | 97C147061CF9000F007C117D /* Debug */,
509 | 97C147071CF9000F007C117D /* Release */,
510 | 249021D4217E4FDB00AE95B9 /* Profile */,
511 | );
512 | defaultConfigurationIsVisible = 0;
513 | defaultConfigurationName = Release;
514 | };
515 | /* End XCConfigurationList section */
516 | };
517 | rootObject = 97C146E61CF9000F007C117D /* Project object */;
518 | }
519 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
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/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/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/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/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/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/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/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/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/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/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/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/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/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/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/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/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/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/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/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/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/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/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/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/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/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/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/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/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/tharwatsamy/E_commerce_app/514c3cd6be43e65a0abe0a2afe0074c3bb69c131/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 | buy_it
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"
--------------------------------------------------------------------------------
/lib/constants.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | const kMainColor = Color(0xFFFFC12F);
4 | const kSecondaryColor = Color(0xFFFFE6AC);
5 | const kProductName = 'productName';
6 | const kProductPrice = 'productPrice';
7 | const kProductDescription = 'productDescription';
8 | const kProductLocation = 'productLocation';
9 | const kProductCategory = 'productCategory';
10 | const kProductsCollection = 'Products';
11 | const kUnActiveColor = Color(0xFFC1BDB8);
12 | const kJackets = 'jackets';
13 | const kTrousers = 'trousers';
14 | const kTshirts = 't-shirts';
15 | const kShoes = 'shoes';
16 | const kOrders = 'Orders';
17 | const kOrderDetails = 'OrderDetails';
18 | const kTotallPrice = 'TotallPrice';
19 | const kAddress = 'Address';
20 | const kProductQuantity = 'Quantity';
21 | const kKeepMeLoggedIn = 'KeepMeLoggedIn';
22 |
--------------------------------------------------------------------------------
/lib/functions.dart:
--------------------------------------------------------------------------------
1 | import 'models/product.dart';
2 |
3 | List getProductByCategory(String kJackets, List allproducts) {
4 | List products = [];
5 | try {
6 | for (var product in allproducts) {
7 | if (product.pCategory == kJackets) {
8 | products.add(product);
9 | }
10 | }
11 | } on Error catch (ex) {
12 | print(ex);
13 | }
14 | return products;
15 | }
16 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:buy_it/constants.dart';
2 | import 'package:buy_it/models/product.dart';
3 | import 'package:buy_it/provider/adminMode.dart';
4 | import 'package:buy_it/provider/cartItem.dart';
5 | import 'package:buy_it/provider/modelHud.dart';
6 | import 'package:buy_it/screens/admin/OrdersScreen.dart';
7 | import 'package:buy_it/screens/admin/addProduct.dart';
8 | import 'package:buy_it/screens/admin/adminHome.dart';
9 | import 'package:buy_it/screens/admin/editProduct.dart';
10 | import 'package:buy_it/screens/admin/manageProduct.dart';
11 | import 'package:buy_it/screens/admin/order_details.dart';
12 | import 'package:buy_it/screens/login_screen.dart';
13 | import 'package:buy_it/screens/signup_screen.dart';
14 | import 'package:buy_it/screens/user/CartScreen.dart';
15 | import 'package:buy_it/screens/user/homePage.dart';
16 | import 'package:buy_it/screens/user/productInfo.dart';
17 | import 'package:flutter/cupertino.dart';
18 | import 'package:flutter/material.dart';
19 | import 'package:provider/provider.dart';
20 | import 'package:shared_preferences/shared_preferences.dart';
21 |
22 | main() => runApp(MyApp());
23 |
24 | class MyApp extends StatelessWidget {
25 | bool isUserLoggedIn = false;
26 | @override
27 | Widget build(BuildContext context) {
28 | return FutureBuilder(
29 | future: SharedPreferences.getInstance(),
30 | builder: (context, snapshot) {
31 | if (!snapshot.hasData) {
32 | return MaterialApp(
33 | home: Scaffold(
34 | body: Center(
35 | child: Text('Loading....'),
36 | ),
37 | ),
38 | );
39 | } else {
40 | isUserLoggedIn = snapshot.data.getBool(kKeepMeLoggedIn) ?? false;
41 | return MultiProvider(
42 | providers: [
43 | ChangeNotifierProvider(
44 | create: (context) => ModelHud(),
45 | ),
46 | ChangeNotifierProvider(
47 | create: (context) => CartItem(),
48 | ),
49 | ChangeNotifierProvider(
50 | create: (context) => AdminMode(),
51 | )
52 | ],
53 | child: MaterialApp(
54 | debugShowCheckedModeBanner: false,
55 | initialRoute: isUserLoggedIn ? HomePage.id : LoginScreen.id,
56 | routes: {
57 | OrderDetails.id: (context) => OrderDetails(),
58 | OrdersScreen.id: (context) => OrdersScreen(),
59 | CartScreen.id: (context) => CartScreen(),
60 | ProductInfo.id: (context) => ProductInfo(),
61 | EditProduct.id: (context) => EditProduct(),
62 | ManageProducts.id: (context) => ManageProducts(),
63 | LoginScreen.id: (context) => LoginScreen(),
64 | SignupScreen.id: (context) => SignupScreen(),
65 | HomePage.id: (context) => HomePage(),
66 | AdminHome.id: (context) => AdminHome(),
67 | AddProduct.id: (context) => AddProduct(),
68 | },
69 | ),
70 | );
71 | }
72 | },
73 | );
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/lib/models/order.dart:
--------------------------------------------------------------------------------
1 | class Order {
2 | String documentId;
3 | int totallPrice;
4 | String address;
5 | Order({this.totallPrice, this.address, this.documentId});
6 | }
7 |
--------------------------------------------------------------------------------
/lib/models/product.dart:
--------------------------------------------------------------------------------
1 | class Product {
2 | String pName;
3 | String pPrice;
4 | String pLocation;
5 | String pDescription;
6 | String pCategory;
7 | String pId;
8 | int pQuantity;
9 | Product(
10 | {this.pQuantity,
11 | this.pId,
12 | this.pName,
13 | this.pCategory,
14 | this.pDescription,
15 | this.pLocation,
16 | this.pPrice});
17 | }
18 |
--------------------------------------------------------------------------------
/lib/provider/adminMode.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 |
3 | class AdminMode extends ChangeNotifier
4 | {
5 | bool isAdmin =false ;
6 | changeIsAdmin(bool value )
7 | {
8 | isAdmin=value;
9 | notifyListeners();
10 | }
11 | }
--------------------------------------------------------------------------------
/lib/provider/cartItem.dart:
--------------------------------------------------------------------------------
1 | import 'package:buy_it/models/product.dart';
2 | import 'package:flutter/cupertino.dart';
3 |
4 | class CartItem extends ChangeNotifier {
5 | List products = [];
6 |
7 | addProduct(Product product) {
8 | products.add(product);
9 | notifyListeners();
10 | }
11 |
12 | deleteProduct(Product product) {
13 | products.remove(product);
14 | notifyListeners();
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/lib/provider/modelHud.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/cupertino.dart';
2 |
3 | class ModelHud extends ChangeNotifier
4 | {
5 | bool isLoading =false;
6 |
7 | changeisLoading(bool value)
8 | {
9 | isLoading=value;
10 | notifyListeners();
11 | }
12 | }
--------------------------------------------------------------------------------
/lib/screens/admin/OrdersScreen.dart:
--------------------------------------------------------------------------------
1 | import 'package:buy_it/constants.dart';
2 | import 'package:buy_it/screens/admin/order_details.dart';
3 | import 'package:buy_it/services/store.dart';
4 | import 'package:cloud_firestore/cloud_firestore.dart';
5 | import 'package:flutter/cupertino.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:buy_it/models/order.dart';
8 |
9 | class OrdersScreen extends StatelessWidget {
10 | static String id = 'OrdersScreen';
11 | final Store _store = Store();
12 | @override
13 | Widget build(BuildContext context) {
14 | return Scaffold(
15 | body: StreamBuilder(
16 | stream: _store.loadOrders(),
17 | builder: (context, snapshot) {
18 | if (!snapshot.hasData) {
19 | return Center(
20 | child: Text('there is no orders'),
21 | );
22 | } else {
23 | List orders = [];
24 | for (var doc in snapshot.data.documents) {
25 | orders.add(Order(
26 | documentId: doc.documentID,
27 | address: doc.data[kAddress],
28 | totallPrice: doc.data[kTotallPrice],
29 | ));
30 | }
31 | return ListView.builder(
32 | itemBuilder: (context, index) => Padding(
33 | padding: const EdgeInsets.all(20),
34 | child: GestureDetector(
35 | onTap: () {
36 | Navigator.pushNamed(context, OrderDetails.id,
37 | arguments: orders[index].documentId);
38 | },
39 | child: Container(
40 | height: MediaQuery.of(context).size.height * .2,
41 | color: kSecondaryColor,
42 | child: Padding(
43 | padding: const EdgeInsets.all(10),
44 | child: Column(
45 | crossAxisAlignment: CrossAxisAlignment.start,
46 | mainAxisAlignment: MainAxisAlignment.center,
47 | children: [
48 | Text('Totall Price = \$${orders[index].totallPrice}',
49 | style: TextStyle(
50 | fontSize: 18, fontWeight: FontWeight.bold)),
51 | SizedBox(
52 | height: 10,
53 | ),
54 | Text(
55 | 'Address is ${orders[index].address}',
56 | style: TextStyle(
57 | fontSize: 18, fontWeight: FontWeight.bold),
58 | )
59 | ],
60 | ),
61 | ),
62 | ),
63 | ),
64 | ),
65 | itemCount: orders.length,
66 | );
67 | }
68 | },
69 | ),
70 | );
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/lib/screens/admin/addProduct.dart:
--------------------------------------------------------------------------------
1 | import 'package:buy_it/models/product.dart';
2 | import 'package:buy_it/widgets/custom_textfield.dart';
3 | import 'package:flutter/material.dart';
4 | import 'package:buy_it/services/store.dart';
5 |
6 | class AddProduct extends StatelessWidget {
7 | static String id = 'AddProduct';
8 | String _name, _price, _description, _category, _imageLocation;
9 | final GlobalKey _globalKey = GlobalKey();
10 | final _store = Store();
11 | @override
12 | Widget build(BuildContext context) {
13 | return Scaffold(
14 | resizeToAvoidBottomPadding: false,
15 | body: Form(
16 | key: _globalKey,
17 | child: Column(
18 | mainAxisAlignment: MainAxisAlignment.center,
19 | children: [
20 | CustomTextField(
21 | hint: 'Product Name',
22 | onClick: (value) {
23 | _name = value;
24 | },
25 | ),
26 | SizedBox(
27 | height: 10,
28 | ),
29 | CustomTextField(
30 | onClick: (value) {
31 | _price = value;
32 | },
33 | hint: 'Product Price',
34 | ),
35 | SizedBox(
36 | height: 10,
37 | ),
38 | CustomTextField(
39 | onClick: (value) {
40 | _description = value;
41 | },
42 | hint: 'Product Description',
43 | ),
44 | SizedBox(
45 | height: 10,
46 | ),
47 | CustomTextField(
48 | onClick: (value) {
49 | _category = value;
50 | },
51 | hint: 'Product Category',
52 | ),
53 | SizedBox(
54 | height: 10,
55 | ),
56 | CustomTextField(
57 | onClick: (value) {
58 | _imageLocation = value;
59 | },
60 | hint: 'Product Location',
61 | ),
62 | SizedBox(
63 | height: 20,
64 | ),
65 | RaisedButton(
66 | onPressed: () {
67 | if (_globalKey.currentState.validate()) {
68 | _globalKey.currentState.save();
69 |
70 | _store.addProduct(Product(
71 | pName: _name,
72 | pPrice: _price,
73 | pDescription: _description,
74 | pLocation: _imageLocation,
75 | pCategory: _category));
76 | }
77 | },
78 | child: Text('Add Product'),
79 | )
80 | ],
81 | ),
82 | ),
83 | );
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/lib/screens/admin/adminHome.dart:
--------------------------------------------------------------------------------
1 | import 'package:buy_it/constants.dart';
2 | import 'package:buy_it/screens/admin/OrdersScreen.dart';
3 | import 'package:buy_it/screens/admin/addProduct.dart';
4 | import 'package:buy_it/screens/admin/manageProduct.dart';
5 | import 'package:flutter/material.dart';
6 |
7 | class AdminHome extends StatelessWidget {
8 | static String id = 'AdminHome';
9 | @override
10 | Widget build(BuildContext context) {
11 | return Scaffold(
12 | backgroundColor: kMainColor,
13 | body: Column(
14 | mainAxisAlignment: MainAxisAlignment.center,
15 | crossAxisAlignment: CrossAxisAlignment.center,
16 | children: [
17 | SizedBox(
18 | width: double.infinity,
19 | ),
20 | RaisedButton(
21 | onPressed: () {
22 | Navigator.pushNamed(context, AddProduct.id);
23 | },
24 | child: Text('Add Product'),
25 | ),
26 | RaisedButton(
27 | onPressed: () {
28 | Navigator.pushNamed(context, ManageProducts.id);
29 | },
30 | child: Text('Edit Product'),
31 | ),
32 | RaisedButton(
33 | onPressed: () {
34 | Navigator.pushNamed(context, OrdersScreen.id);
35 | },
36 | child: Text('View orders'),
37 | )
38 | ],
39 | ),
40 | );
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/lib/screens/admin/editProduct.dart:
--------------------------------------------------------------------------------
1 | import 'package:buy_it/constants.dart';
2 | import 'package:buy_it/models/product.dart';
3 | import 'package:buy_it/services/store.dart';
4 | import 'package:buy_it/widgets/custom_textfield.dart';
5 | import 'package:flutter/material.dart';
6 |
7 | class EditProduct extends StatelessWidget {
8 | static String id = 'EditProduct';
9 | String _name, _price, _description, _category, _imageLocation;
10 | final GlobalKey _globalKey = GlobalKey();
11 | final _store = Store();
12 | @override
13 | Widget build(BuildContext context) {
14 | Product product = ModalRoute.of(context).settings.arguments;
15 | return Scaffold(
16 | body: Form(
17 | key: _globalKey,
18 | child: ListView(
19 | children: [
20 | SizedBox(
21 | height: MediaQuery.of(context).size.height * .2,
22 | ),
23 | Column(
24 | mainAxisAlignment: MainAxisAlignment.center,
25 | children: [
26 | CustomTextField(
27 | hint: 'Product Name',
28 | onClick: (value) {
29 | _name = value;
30 | },
31 | ),
32 | SizedBox(
33 | height: 10,
34 | ),
35 | CustomTextField(
36 | onClick: (value) {
37 | _price = value;
38 | },
39 | hint: 'Product Price',
40 | ),
41 | SizedBox(
42 | height: 10,
43 | ),
44 | CustomTextField(
45 | onClick: (value) {
46 | _description = value;
47 | },
48 | hint: 'Product Description',
49 | ),
50 | SizedBox(
51 | height: 10,
52 | ),
53 | CustomTextField(
54 | onClick: (value) {
55 | _category = value;
56 | },
57 | hint: 'Product Category',
58 | ),
59 | SizedBox(
60 | height: 10,
61 | ),
62 | CustomTextField(
63 | onClick: (value) {
64 | _imageLocation = value;
65 | },
66 | hint: 'Product Location',
67 | ),
68 | SizedBox(
69 | height: 20,
70 | ),
71 | RaisedButton(
72 | onPressed: () {
73 | if (_globalKey.currentState.validate()) {
74 | _globalKey.currentState.save();
75 |
76 | _store.editProduct({
77 | kProductName: _name,
78 | kProductLocation: _imageLocation,
79 | kProductCategory: _category,
80 | kProductDescription: _description,
81 | kProductPrice: _price
82 | }, product.pId);
83 | }
84 | },
85 | child: Text('Edit Product'),
86 | )
87 | ],
88 | )
89 | ],
90 | ),
91 | ),
92 | );
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/lib/screens/admin/manageProduct.dart:
--------------------------------------------------------------------------------
1 | import 'package:buy_it/models/product.dart';
2 | import 'package:buy_it/screens/admin/editProduct.dart';
3 | import 'package:buy_it/widgets/custom_menu.dart';
4 | import 'package:cloud_firestore/cloud_firestore.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:buy_it/services/store.dart';
7 | import 'package:buy_it/constants.dart';
8 |
9 | class ManageProducts extends StatefulWidget {
10 | static String id = 'ManageProducts';
11 | @override
12 | _ManageProductsState createState() => _ManageProductsState();
13 | }
14 |
15 | class _ManageProductsState extends State {
16 | final _store = Store();
17 |
18 | @override
19 | Widget build(BuildContext context) {
20 | return Scaffold(
21 | body: StreamBuilder(
22 | stream: _store.loadProducts(),
23 | builder: (context, snapshot) {
24 | if (snapshot.hasData) {
25 | List products = [];
26 | for (var doc in snapshot.data.documents) {
27 | var data = doc.data;
28 | products.add(Product(
29 | pId: doc.documentID,
30 | pPrice: data[kProductPrice],
31 | pName: data[kProductName],
32 | pDescription: data[kProductDescription],
33 | pLocation: data[kProductLocation],
34 | pCategory: data[kProductCategory]));
35 | }
36 | return GridView.builder(
37 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
38 | crossAxisCount: 2,
39 | childAspectRatio: .8,
40 | ),
41 | itemBuilder: (context, index) => Padding(
42 | padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
43 | child: GestureDetector(
44 | onTapUp: (details) async {
45 | double dx = details.globalPosition.dx;
46 | double dy = details.globalPosition.dy;
47 | double dx2 = MediaQuery.of(context).size.width - dx;
48 | double dy2 = MediaQuery.of(context).size.width - dy;
49 | await showMenu(
50 | context: context,
51 | position: RelativeRect.fromLTRB(dx, dy, dx2, dy2),
52 | items: [
53 | MyPopupMenuItem(
54 | onClick: () {
55 | Navigator.pushNamed(context, EditProduct.id,
56 | arguments: products[index]);
57 | },
58 | child: Text('Edit'),
59 | ),
60 | MyPopupMenuItem(
61 | onClick: () {
62 | _store.deleteProduct(products[index].pId);
63 | Navigator.pop(context);
64 | },
65 | child: Text('Delete'),
66 | ),
67 | ]);
68 | },
69 | child: Stack(
70 | children: [
71 | Positioned.fill(
72 | child: Image(
73 | fit: BoxFit.fill,
74 | image: AssetImage(products[index].pLocation),
75 | ),
76 | ),
77 | Positioned(
78 | bottom: 0,
79 | child: Opacity(
80 | opacity: .6,
81 | child: Container(
82 | width: MediaQuery.of(context).size.width,
83 | height: 60,
84 | color: Colors.white,
85 | child: Padding(
86 | padding: EdgeInsets.symmetric(
87 | horizontal: 10, vertical: 5),
88 | child: Column(
89 | crossAxisAlignment: CrossAxisAlignment.start,
90 | children: [
91 | Text(
92 | products[index].pName,
93 | style:
94 | TextStyle(fontWeight: FontWeight.bold),
95 | ),
96 | Text('\$ ${products[index].pPrice}')
97 | ],
98 | ),
99 | ),
100 | ),
101 | ),
102 | )
103 | ],
104 | ),
105 | ),
106 | ),
107 | itemCount: products.length,
108 | );
109 | } else {
110 | return Center(child: Text('Loading...'));
111 | }
112 | },
113 | ),
114 | );
115 | }
116 | }
117 |
--------------------------------------------------------------------------------
/lib/screens/admin/order_details.dart:
--------------------------------------------------------------------------------
1 | import 'package:buy_it/constants.dart';
2 | import 'package:buy_it/models/order.dart';
3 | import 'package:buy_it/models/product.dart';
4 | import 'package:buy_it/services/store.dart';
5 | import 'package:cloud_firestore/cloud_firestore.dart';
6 | import 'package:flutter/material.dart';
7 |
8 | class OrderDetails extends StatelessWidget {
9 | static String id = 'OrderDetails';
10 | Store store = Store();
11 | @override
12 | Widget build(BuildContext context) {
13 | String documentId = ModalRoute.of(context).settings.arguments;
14 | return Scaffold(
15 | body: StreamBuilder(
16 | stream: store.loadOrderDetails(documentId),
17 | builder: (context, snapshot) {
18 | if (snapshot.hasData) {
19 | List products = [];
20 | for (var doc in snapshot.data.documents) {
21 | products.add(Product(
22 | pName: doc.data[kProductName],
23 | pQuantity: doc.data[kProductQuantity],
24 | pCategory: doc.data[kProductCategory],
25 | ));
26 | }
27 |
28 | return Column(
29 | children: [
30 | Expanded(
31 | child: ListView.builder(
32 | itemBuilder: (context, index) => Padding(
33 | padding: const EdgeInsets.all(20),
34 | child: Container(
35 | height: MediaQuery.of(context).size.height * .2,
36 | color: kSecondaryColor,
37 | child: Padding(
38 | padding: const EdgeInsets.all(10),
39 | child: Column(
40 | crossAxisAlignment: CrossAxisAlignment.start,
41 | mainAxisAlignment: MainAxisAlignment.center,
42 | children: [
43 | Text('product name : ${products[index].pName}',
44 | style: TextStyle(
45 | fontSize: 18,
46 | fontWeight: FontWeight.bold)),
47 | SizedBox(
48 | height: 10,
49 | ),
50 | Text(
51 | 'Quantity : ${products[index].pQuantity}',
52 | style: TextStyle(
53 | fontSize: 18,
54 | fontWeight: FontWeight.bold),
55 | ),
56 | SizedBox(
57 | height: 10,
58 | ),
59 | Text(
60 | 'product Category : ${products[index].pCategory}',
61 | style: TextStyle(
62 | fontSize: 18,
63 | fontWeight: FontWeight.bold),
64 | )
65 | ],
66 | ),
67 | ),
68 | ),
69 | ),
70 | itemCount: products.length,
71 | ),
72 | ),
73 | Padding(
74 | padding: const EdgeInsets.symmetric(horizontal: 20),
75 | child: Row(
76 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
77 | children: [
78 | Expanded(
79 | child: ButtonTheme(
80 | buttonColor: kMainColor,
81 | child: RaisedButton(
82 | onPressed: () {},
83 | child: Text('Confirm Order'),
84 | ),
85 | ),
86 | ),
87 | SizedBox(
88 | width: 10,
89 | ),
90 | Expanded(
91 | child: ButtonTheme(
92 | buttonColor: kMainColor,
93 | child: RaisedButton(
94 | onPressed: () {},
95 | child: Text('Delete Order'),
96 | ),
97 | ),
98 | )
99 | ],
100 | ),
101 | ),
102 | ],
103 | );
104 | } else {
105 | return Center(
106 | child: Text('Loading Order Details'),
107 | );
108 | }
109 | }),
110 | );
111 | }
112 | }
113 |
--------------------------------------------------------------------------------
/lib/screens/login_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:buy_it/provider/adminMode.dart';
2 | import 'package:buy_it/screens/admin/adminHome.dart';
3 | import 'package:buy_it/screens/signup_screen.dart';
4 | import 'package:buy_it/screens/user/homePage.dart';
5 | import 'package:buy_it/widgets/custom_textfield.dart';
6 | import 'package:buy_it/widgets/cutsom_logo.dart';
7 | import 'package:flutter/material.dart';
8 | import 'package:buy_it/constants.dart';
9 | import 'package:buy_it/services/auth.dart';
10 | import 'package:modal_progress_hud/modal_progress_hud.dart';
11 | import 'package:provider/provider.dart';
12 | import 'package:buy_it/provider/modelHud.dart';
13 | import 'package:shared_preferences/shared_preferences.dart';
14 |
15 | class LoginScreen extends StatefulWidget {
16 | static String id = 'LoginScreen';
17 | final GlobalKey globalKey = GlobalKey();
18 |
19 | @override
20 | _LoginScreenState createState() => _LoginScreenState();
21 | }
22 |
23 | class _LoginScreenState extends State {
24 | String _email, password;
25 |
26 | final _auth = Auth();
27 |
28 | final adminPassword = 'Admin1234';
29 |
30 | bool keepMeLoggedIn = false;
31 |
32 | @override
33 | Widget build(BuildContext context) {
34 | double height = MediaQuery.of(context).size.height;
35 | return Scaffold(
36 | backgroundColor: kMainColor,
37 | body: ModalProgressHUD(
38 | inAsyncCall: Provider.of(context).isLoading,
39 | child: Form(
40 | key: widget.globalKey,
41 | child: ListView(
42 | children: [
43 | CustomLogo(),
44 | SizedBox(
45 | height: height * .1,
46 | ),
47 | CustomTextField(
48 | onClick: (value) {
49 | _email = value;
50 | },
51 | hint: 'Enter your email',
52 | icon: Icons.email,
53 | ),
54 | Padding(
55 | padding: EdgeInsets.only(left: 20),
56 | child: Row(
57 | children: [
58 | Theme(
59 | data: ThemeData(unselectedWidgetColor: Colors.white),
60 | child: Checkbox(
61 | checkColor: kSecondaryColor,
62 | activeColor: kMainColor,
63 | value: keepMeLoggedIn,
64 | onChanged: (value) {
65 | setState(() {
66 | keepMeLoggedIn = value;
67 | });
68 | },
69 | ),
70 | ),
71 | Text(
72 | 'Remmeber Me ',
73 | style: TextStyle(color: Colors.white),
74 | )
75 | ],
76 | ),
77 | ),
78 | CustomTextField(
79 | onClick: (value) {
80 | password = value;
81 | },
82 | hint: 'Enter your password',
83 | icon: Icons.lock,
84 | ),
85 | SizedBox(
86 | height: height * .05,
87 | ),
88 | Padding(
89 | padding: const EdgeInsets.symmetric(horizontal: 120),
90 | child: Builder(
91 | builder: (context) => FlatButton(
92 | shape: RoundedRectangleBorder(
93 | borderRadius: BorderRadius.circular(20)),
94 | onPressed: () {
95 | if (keepMeLoggedIn == true) {
96 | keepUserLoggedIn();
97 | }
98 | _validate(context);
99 | },
100 | color: Colors.black,
101 | child: Text(
102 | 'Login',
103 | style: TextStyle(color: Colors.white),
104 | ),
105 | ),
106 | ),
107 | ),
108 | SizedBox(
109 | height: height * .05,
110 | ),
111 | Row(
112 | mainAxisAlignment: MainAxisAlignment.center,
113 | children: [
114 | Text(
115 | 'Don\'t have an account ? ',
116 | style: TextStyle(color: Colors.white, fontSize: 16),
117 | ),
118 | GestureDetector(
119 | onTap: () {
120 | Navigator.pushNamed(context, SignupScreen.id);
121 | },
122 | child: Text(
123 | 'Signup',
124 | style: TextStyle(fontSize: 16),
125 | ),
126 | )
127 | ],
128 | ),
129 | Padding(
130 | padding: EdgeInsets.symmetric(horizontal: 30, vertical: 10),
131 | child: Row(
132 | children: [
133 | Expanded(
134 | child: GestureDetector(
135 | onTap: () {
136 | Provider.of(context, listen: false)
137 | .changeIsAdmin(true);
138 | },
139 | child: Text(
140 | 'i\'m an admin',
141 | textAlign: TextAlign.center,
142 | style: TextStyle(
143 | color: Provider.of(context).isAdmin
144 | ? kMainColor
145 | : Colors.white),
146 | ),
147 | ),
148 | ),
149 | Expanded(
150 | child: GestureDetector(
151 | onTap: () {
152 | Provider.of(context, listen: false)
153 | .changeIsAdmin(false);
154 | },
155 | child: Text(
156 | 'i\'m a user',
157 | textAlign: TextAlign.center,
158 | style: TextStyle(
159 | color:
160 | Provider.of(context, listen: true)
161 | .isAdmin
162 | ? Colors.white
163 | : kMainColor),
164 | ),
165 | ),
166 | ),
167 | ],
168 | ),
169 | ),
170 | ],
171 | ),
172 | ),
173 | ),
174 | );
175 | }
176 |
177 | void _validate(BuildContext context) async {
178 | final modelhud = Provider.of(context, listen: false);
179 | modelhud.changeisLoading(true);
180 | if (widget.globalKey.currentState.validate()) {
181 | widget.globalKey.currentState.save();
182 | if (Provider.of(context, listen: false).isAdmin) {
183 | if (password == adminPassword) {
184 | try {
185 | await _auth.signIn(_email.trim(), password.trim());
186 | Navigator.pushNamed(context, AdminHome.id);
187 | } catch (e) {
188 | modelhud.changeisLoading(false);
189 | Scaffold.of(context).showSnackBar(SnackBar(
190 | content: Text(e.message),
191 | ));
192 | }
193 | } else {
194 | modelhud.changeisLoading(false);
195 | Scaffold.of(context).showSnackBar(SnackBar(
196 | content: Text('Something went wrong !'),
197 | ));
198 | }
199 | } else {
200 | try {
201 | await _auth.signIn(_email.trim(), password.trim());
202 | Navigator.pushNamed(context, HomePage.id);
203 | } catch (e) {
204 | Scaffold.of(context).showSnackBar(SnackBar(
205 | content: Text(e.message),
206 | ));
207 | }
208 | }
209 | }
210 | modelhud.changeisLoading(false);
211 | }
212 |
213 | void keepUserLoggedIn() async {
214 | SharedPreferences preferences = await SharedPreferences.getInstance();
215 | preferences.setBool(kKeepMeLoggedIn, keepMeLoggedIn);
216 | }
217 | }
218 |
--------------------------------------------------------------------------------
/lib/screens/signup_screen.dart:
--------------------------------------------------------------------------------
1 | import 'package:buy_it/provider/modelHud.dart';
2 | import 'package:buy_it/screens/login_screen.dart';
3 | import 'package:buy_it/screens/user/homePage.dart';
4 | import 'package:buy_it/widgets/custom_textfield.dart';
5 | import 'package:buy_it/widgets/cutsom_logo.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:flutter/services.dart';
8 | import 'package:provider/provider.dart';
9 | import '../constants.dart';
10 | import 'package:buy_it/services/auth.dart';
11 | import 'package:modal_progress_hud/modal_progress_hud.dart';
12 |
13 | class SignupScreen extends StatelessWidget {
14 | final GlobalKey _globalKey = GlobalKey();
15 | static String id = 'SignupScreen';
16 | String _email, _password;
17 | final _auth = Auth();
18 | @override
19 | Widget build(BuildContext context) {
20 | double height = MediaQuery.of(context).size.height;
21 | return Scaffold(
22 | backgroundColor: kMainColor,
23 | body: ModalProgressHUD(
24 | inAsyncCall: Provider.of(context).isLoading,
25 | child: Form(
26 | key: _globalKey,
27 | child: ListView(
28 | children: [
29 | CustomLogo(),
30 | SizedBox(
31 | height: height * .1,
32 | ),
33 | CustomTextField(
34 | onClick: (value) {},
35 | icon: Icons.perm_identity,
36 | hint: 'Enter your name',
37 | ),
38 | SizedBox(
39 | height: height * .02,
40 | ),
41 | CustomTextField(
42 | onClick: (value) {
43 | _email = value;
44 | },
45 | hint: 'Enter your email',
46 | icon: Icons.email,
47 | ),
48 | SizedBox(
49 | height: height * .02,
50 | ),
51 | CustomTextField(
52 | onClick: (value) {
53 | _password = value;
54 | },
55 | hint: 'Enter your password',
56 | icon: Icons.lock,
57 | ),
58 | SizedBox(
59 | height: height * .05,
60 | ),
61 | Padding(
62 | padding: const EdgeInsets.symmetric(horizontal: 120),
63 | child: Builder(
64 | builder: (context) => FlatButton(
65 | shape: RoundedRectangleBorder(
66 | borderRadius: BorderRadius.circular(20)),
67 | onPressed: () async {
68 | final modelhud =
69 | Provider.of(context, listen: false);
70 | modelhud.changeisLoading(true);
71 | if (_globalKey.currentState.validate()) {
72 | _globalKey.currentState.save();
73 | try {
74 | final authResult = await _auth.signUp(
75 | _email.trim(), _password.trim());
76 | modelhud.changeisLoading(false);
77 | Navigator.pushNamed(context, HomePage.id);
78 | } on PlatformException catch (e) {
79 | modelhud.changeisLoading(false);
80 | Scaffold.of(context).showSnackBar(SnackBar(
81 | content: Text(e.message),
82 | ));
83 | }
84 | }
85 | },
86 | color: Colors.black,
87 | child: Text(
88 | 'Sign up',
89 | style: TextStyle(color: Colors.white),
90 | ),
91 | ),
92 | ),
93 | ),
94 | SizedBox(
95 | height: height * .05,
96 | ),
97 | Row(
98 | mainAxisAlignment: MainAxisAlignment.center,
99 | children: [
100 | Text(
101 | 'Do have an account ? ',
102 | style: TextStyle(color: Colors.white, fontSize: 16),
103 | ),
104 | GestureDetector(
105 | onTap: () {
106 | Navigator.pop(context);
107 | },
108 | child: Text(
109 | 'Login',
110 | style: TextStyle(fontSize: 16),
111 | ),
112 | )
113 | ],
114 | )
115 | ],
116 | ),
117 | ),
118 | ),
119 | );
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/lib/screens/user/CartScreen.dart:
--------------------------------------------------------------------------------
1 | import 'dart:ui';
2 |
3 | import 'package:buy_it/constants.dart';
4 | import 'package:buy_it/models/product.dart';
5 | import 'package:buy_it/provider/cartItem.dart';
6 | import 'package:buy_it/screens/user/productInfo.dart';
7 | import 'package:buy_it/services/store.dart';
8 | import 'package:buy_it/widgets/custom_menu.dart';
9 | import 'package:flutter/cupertino.dart';
10 | import 'package:flutter/material.dart';
11 | import 'package:flutter/painting.dart';
12 | import 'package:provider/provider.dart';
13 |
14 | class CartScreen extends StatelessWidget {
15 | static String id = 'CartScreen';
16 | @override
17 | Widget build(BuildContext context) {
18 | List products = Provider.of(context).products;
19 | final double screenHeight = MediaQuery.of(context).size.height;
20 | final double screenWidth = MediaQuery.of(context).size.width;
21 | final double appBarHeight = AppBar().preferredSize.height;
22 | final double statusBarHeight = MediaQuery.of(context).padding.top;
23 | return Scaffold(
24 | resizeToAvoidBottomPadding: false,
25 | appBar: AppBar(
26 | backgroundColor: Colors.white,
27 | elevation: 0,
28 | title: Text(
29 | 'My Cart',
30 | style: TextStyle(color: Colors.black),
31 | ),
32 | leading: GestureDetector(
33 | onTap: () {
34 | Navigator.pop(context);
35 | },
36 | child: Icon(
37 | Icons.arrow_back,
38 | color: Colors.black,
39 | ),
40 | ),
41 | ),
42 | body: Column(
43 | children: [
44 | LayoutBuilder(builder: (context, constrains) {
45 | if (products.isNotEmpty) {
46 | return Container(
47 | height: screenHeight -
48 | statusBarHeight -
49 | appBarHeight -
50 | (screenHeight * .08),
51 | child: ListView.builder(
52 | itemBuilder: (context, index) {
53 | return Padding(
54 | padding: const EdgeInsets.all(15),
55 | child: GestureDetector(
56 | onTapUp: (details) {
57 | showCustomMenu(details, context, products[index]);
58 | },
59 | child: Container(
60 | height: screenHeight * .15,
61 | child: Row(
62 | children: [
63 | CircleAvatar(
64 | radius: screenHeight * .15 / 2,
65 | backgroundImage:
66 | AssetImage(products[index].pLocation),
67 | ),
68 | Expanded(
69 | child: Row(
70 | mainAxisAlignment:
71 | MainAxisAlignment.spaceBetween,
72 | children: [
73 | Padding(
74 | padding: const EdgeInsets.only(left: 10),
75 | child: Column(
76 | mainAxisAlignment:
77 | MainAxisAlignment.center,
78 | children: [
79 | Text(
80 | products[index].pName,
81 | style: TextStyle(
82 | fontSize: 18,
83 | fontWeight: FontWeight.bold),
84 | ),
85 | SizedBox(
86 | height: 10,
87 | ),
88 | Text(
89 | '\$ ${products[index].pPrice}',
90 | style: TextStyle(
91 | fontWeight: FontWeight.bold),
92 | )
93 | ],
94 | ),
95 | ),
96 | Padding(
97 | padding: const EdgeInsets.only(right: 20),
98 | child: Text(
99 | products[index].pQuantity.toString(),
100 | style: TextStyle(
101 | fontSize: 16,
102 | fontWeight: FontWeight.bold),
103 | ),
104 | )
105 | ],
106 | ),
107 | )
108 | ],
109 | ),
110 | color: kSecondaryColor,
111 | ),
112 | ),
113 | );
114 | },
115 | itemCount: products.length,
116 | ),
117 | );
118 | } else {
119 | return Container(
120 | height: screenHeight -
121 | (screenHeight * .08) -
122 | appBarHeight -
123 | statusBarHeight,
124 | child: Center(
125 | child: Text('Cart is Empty'),
126 | ),
127 | );
128 | }
129 | }),
130 | Builder(
131 | builder: (context) => ButtonTheme(
132 | minWidth: screenWidth,
133 | height: screenHeight * .08,
134 | child: RaisedButton(
135 | shape: RoundedRectangleBorder(
136 | borderRadius: BorderRadius.only(
137 | topRight: Radius.circular(10),
138 | topLeft: Radius.circular(10))),
139 | onPressed: () {
140 | showCustomDialog(products, context);
141 | },
142 | child: Text('Order'.toUpperCase()),
143 | color: kMainColor,
144 | ),
145 | ),
146 | )
147 | ],
148 | ),
149 | );
150 | }
151 |
152 | void showCustomMenu(details, context, product) async {
153 | double dx = details.globalPosition.dx;
154 | double dy = details.globalPosition.dy;
155 | double dx2 = MediaQuery.of(context).size.width - dx;
156 | double dy2 = MediaQuery.of(context).size.width - dy;
157 | await showMenu(
158 | context: context,
159 | position: RelativeRect.fromLTRB(dx, dy, dx2, dy2),
160 | items: [
161 | MyPopupMenuItem(
162 | onClick: () {
163 | Navigator.pop(context);
164 | Provider.of(context, listen: false)
165 | .deleteProduct(product);
166 | Navigator.pushNamed(context, ProductInfo.id, arguments: product);
167 | },
168 | child: Text('Edit'),
169 | ),
170 | MyPopupMenuItem(
171 | onClick: () {
172 | Navigator.pop(context);
173 | Provider.of(context, listen: false)
174 | .deleteProduct(product);
175 | },
176 | child: Text('Delete'),
177 | ),
178 | ]);
179 | }
180 |
181 | void showCustomDialog(List products, context) async {
182 | var price = getTotallPrice(products);
183 | var address;
184 | AlertDialog alertDialog = AlertDialog(
185 | actions: [
186 | MaterialButton(
187 | onPressed: () {
188 | try {
189 | Store _store = Store();
190 | _store.storeOrders(
191 | {kTotallPrice: price, kAddress: address}, products);
192 |
193 | Scaffold.of(context).showSnackBar(SnackBar(
194 | content: Text('Orderd Successfully'),
195 | ));
196 | Navigator.pop(context);
197 | } catch (ex) {
198 | print(ex.message);
199 | }
200 | },
201 | child: Text('Confirm'),
202 | )
203 | ],
204 | content: TextField(
205 | onChanged: (value) {
206 | address = value;
207 | },
208 | decoration: InputDecoration(hintText: 'Enter your Address'),
209 | ),
210 | title: Text('Totall Price = \$ $price'),
211 | );
212 | await showDialog(
213 | context: context,
214 | builder: (context) {
215 | return alertDialog;
216 | });
217 | }
218 |
219 | getTotallPrice(List products) {
220 | var price = 0;
221 | for (var product in products) {
222 | price += product.pQuantity * int.parse(product.pPrice);
223 | }
224 | return price;
225 | }
226 | }
227 |
--------------------------------------------------------------------------------
/lib/screens/user/homePage.dart:
--------------------------------------------------------------------------------
1 | import 'package:buy_it/constants.dart';
2 | import 'package:buy_it/models/product.dart';
3 | import 'package:buy_it/screens/login_screen.dart';
4 | import 'package:buy_it/screens/user/CartScreen.dart';
5 | import 'package:buy_it/screens/user/productInfo.dart';
6 | import 'package:buy_it/services/store.dart';
7 | import 'package:buy_it/widgets/productView.dart';
8 | import 'package:cloud_firestore/cloud_firestore.dart';
9 | import 'package:firebase_auth/firebase_auth.dart';
10 | import 'package:flutter/material.dart';
11 | import 'package:buy_it/services/auth.dart';
12 | import 'package:shared_preferences/shared_preferences.dart';
13 |
14 | import '../../functions.dart';
15 |
16 | class HomePage extends StatefulWidget {
17 | static String id = 'HomePage';
18 |
19 | @override
20 | _HomePageState createState() => _HomePageState();
21 | }
22 |
23 | class _HomePageState extends State {
24 | final _auth = Auth();
25 | FirebaseUser _loggedUser;
26 | int _tabBarIndex = 0;
27 | int _bottomBarIndex = 0;
28 | final _store = Store();
29 | List _products;
30 | @override
31 | Widget build(BuildContext context) {
32 | return Stack(
33 | children: [
34 | DefaultTabController(
35 | length: 4,
36 | child: Scaffold(
37 | bottomNavigationBar: BottomNavigationBar(
38 | type: BottomNavigationBarType.fixed,
39 | unselectedItemColor: kUnActiveColor,
40 | currentIndex: _bottomBarIndex,
41 | fixedColor: kMainColor,
42 | onTap: (value) async {
43 | if (value == 2) {
44 | SharedPreferences pref =
45 | await SharedPreferences.getInstance();
46 | pref.clear();
47 | await _auth.signOut();
48 | Navigator.popAndPushNamed(context, LoginScreen.id);
49 | }
50 | setState(() {
51 | _bottomBarIndex = value;
52 | });
53 | },
54 | items: [
55 | BottomNavigationBarItem(
56 | title: Text('Test'), icon: Icon(Icons.person)),
57 | BottomNavigationBarItem(
58 | title: Text('Test'), icon: Icon(Icons.person)),
59 | BottomNavigationBarItem(
60 | title: Text('Sign Out'), icon: Icon(Icons.close)),
61 | ],
62 | ),
63 | appBar: AppBar(
64 | backgroundColor: Colors.white,
65 | elevation: 0,
66 | bottom: TabBar(
67 | indicatorColor: kMainColor,
68 | onTap: (value) {
69 | setState(() {
70 | _tabBarIndex = value;
71 | });
72 | },
73 | tabs: [
74 | Text(
75 | 'Jackets',
76 | style: TextStyle(
77 | color: _tabBarIndex == 0 ? Colors.black : kUnActiveColor,
78 | fontSize: _tabBarIndex == 0 ? 16 : null,
79 | ),
80 | ),
81 | Text(
82 | 'Trouser',
83 | style: TextStyle(
84 | color: _tabBarIndex == 1 ? Colors.black : kUnActiveColor,
85 | fontSize: _tabBarIndex == 1 ? 16 : null,
86 | ),
87 | ),
88 | Text(
89 | 'T-shirts',
90 | style: TextStyle(
91 | color: _tabBarIndex == 2 ? Colors.black : kUnActiveColor,
92 | fontSize: _tabBarIndex == 2 ? 16 : null,
93 | ),
94 | ),
95 | Text(
96 | 'Shoes',
97 | style: TextStyle(
98 | color: _tabBarIndex == 3 ? Colors.black : kUnActiveColor,
99 | fontSize: _tabBarIndex == 3 ? 16 : null,
100 | ),
101 | ),
102 | ],
103 | ),
104 | ),
105 | body: TabBarView(
106 | children: [
107 | jacketView(),
108 | ProductsView(kTrousers, _products),
109 | ProductsView(kShoes, _products),
110 | ProductsView(kTshirts, _products),
111 | ],
112 | ),
113 | ),
114 | ),
115 | Material(
116 | child: Padding(
117 | padding: EdgeInsets.fromLTRB(20, 30, 20, 0),
118 | child: Container(
119 | height: MediaQuery.of(context).size.height * .1,
120 | child: Row(
121 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
122 | children: [
123 | Text(
124 | 'Discover'.toUpperCase(),
125 | style: TextStyle(fontSize: 20, fontWeight: FontWeight.bold),
126 | ),
127 | GestureDetector(
128 | onTap: () {
129 | Navigator.pushNamed(context, CartScreen.id);
130 | },
131 | child: Icon(Icons.shopping_cart))
132 | ],
133 | ),
134 | ),
135 | ),
136 | )
137 | ],
138 | );
139 | }
140 |
141 | @override
142 | void initState() {
143 | getCurrenUser();
144 | }
145 |
146 | getCurrenUser() async {
147 | _loggedUser = await _auth.getUser();
148 | }
149 |
150 | Widget jacketView() {
151 | return StreamBuilder(
152 | stream: _store.loadProducts(),
153 | builder: (context, snapshot) {
154 | if (snapshot.hasData) {
155 | List products = [];
156 | for (var doc in snapshot.data.documents) {
157 | var data = doc.data;
158 | products.add(Product(
159 | pId: doc.documentID,
160 | pPrice: data[kProductPrice],
161 | pName: data[kProductName],
162 | pDescription: data[kProductDescription],
163 | pLocation: data[kProductLocation],
164 | pCategory: data[kProductCategory]));
165 | }
166 | _products = [...products];
167 | products.clear();
168 | products = getProductByCategory(kJackets, _products);
169 | return GridView.builder(
170 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
171 | crossAxisCount: 2,
172 | childAspectRatio: .8,
173 | ),
174 | itemBuilder: (context, index) => Padding(
175 | padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
176 | child: GestureDetector(
177 | onTap: () {
178 | Navigator.pushNamed(context, ProductInfo.id,
179 | arguments: products[index]);
180 | },
181 | child: Stack(
182 | children: [
183 | Positioned.fill(
184 | child: Image(
185 | fit: BoxFit.fill,
186 | image: AssetImage(products[index].pLocation),
187 | ),
188 | ),
189 | Positioned(
190 | bottom: 0,
191 | child: Opacity(
192 | opacity: .6,
193 | child: Container(
194 | width: MediaQuery.of(context).size.width,
195 | height: 60,
196 | color: Colors.white,
197 | child: Padding(
198 | padding: EdgeInsets.symmetric(
199 | horizontal: 10, vertical: 5),
200 | child: Column(
201 | crossAxisAlignment: CrossAxisAlignment.start,
202 | children: [
203 | Text(
204 | products[index].pName,
205 | style: TextStyle(fontWeight: FontWeight.bold),
206 | ),
207 | Text('\$ ${products[index].pPrice}')
208 | ],
209 | ),
210 | ),
211 | ),
212 | ),
213 | )
214 | ],
215 | ),
216 | ),
217 | ),
218 | itemCount: products.length,
219 | );
220 | } else {
221 | return Center(child: Text('Loading...'));
222 | }
223 | },
224 | );
225 | }
226 | }
227 |
--------------------------------------------------------------------------------
/lib/screens/user/productInfo.dart:
--------------------------------------------------------------------------------
1 | import 'package:buy_it/constants.dart';
2 | import 'package:buy_it/models/product.dart';
3 | import 'package:buy_it/provider/cartItem.dart';
4 | import 'package:buy_it/screens/user/CartScreen.dart';
5 | import 'package:flutter/material.dart';
6 | import 'package:provider/provider.dart';
7 |
8 | class ProductInfo extends StatefulWidget {
9 | static String id = 'ProductInfo';
10 | @override
11 | _ProductInfoState createState() => _ProductInfoState();
12 | }
13 |
14 | class _ProductInfoState extends State {
15 | int _quantity = 1;
16 | @override
17 | Widget build(BuildContext context) {
18 | Product product = ModalRoute.of(context).settings.arguments;
19 | return Scaffold(
20 | body: Stack(
21 | children: [
22 | Container(
23 | height: MediaQuery.of(context).size.height,
24 | width: MediaQuery.of(context).size.width,
25 | child: Image(
26 | fit: BoxFit.fill,
27 | image: AssetImage(product.pLocation),
28 | ),
29 | ),
30 | Padding(
31 | padding: EdgeInsets.fromLTRB(20, 30, 20, 0),
32 | child: Container(
33 | height: MediaQuery.of(context).size.height * .1,
34 | child: Row(
35 | mainAxisAlignment: MainAxisAlignment.spaceBetween,
36 | children: [
37 | GestureDetector(
38 | onTap: () {
39 | Navigator.pop(context);
40 | },
41 | child: Icon(Icons.arrow_back_ios)),
42 | GestureDetector(
43 | onTap: () {
44 | Navigator.pushNamed(context, CartScreen.id);
45 | },
46 | child: Icon(Icons.shopping_cart))
47 | ],
48 | ),
49 | ),
50 | ),
51 | Positioned(
52 | bottom: 0,
53 | child: Column(
54 | children: [
55 | Opacity(
56 | child: Container(
57 | color: Colors.white,
58 | width: MediaQuery.of(context).size.width,
59 | height: MediaQuery.of(context).size.height * .3,
60 | child: Padding(
61 | padding: const EdgeInsets.all(20),
62 | child: Column(
63 | crossAxisAlignment: CrossAxisAlignment.start,
64 | children: [
65 | Text(
66 | product.pName,
67 | style: TextStyle(
68 | fontSize: 20, fontWeight: FontWeight.bold),
69 | ),
70 | SizedBox(
71 | height: 10,
72 | ),
73 | Text(
74 | product.pDescription,
75 | style: TextStyle(
76 | fontSize: 16, fontWeight: FontWeight.w800),
77 | ),
78 | SizedBox(
79 | height: 10,
80 | ),
81 | Text(
82 | '\$${product.pPrice}',
83 | style: TextStyle(
84 | fontSize: 20, fontWeight: FontWeight.bold),
85 | ),
86 | SizedBox(
87 | height: 10,
88 | ),
89 | Row(
90 | mainAxisAlignment: MainAxisAlignment.center,
91 | children: [
92 | ClipOval(
93 | child: Material(
94 | color: kMainColor,
95 | child: GestureDetector(
96 | onTap: add,
97 | child: SizedBox(
98 | child: Icon(Icons.add),
99 | height: 32,
100 | width: 32,
101 | ),
102 | ),
103 | ),
104 | ),
105 | Text(
106 | _quantity.toString(),
107 | style: TextStyle(fontSize: 60),
108 | ),
109 | ClipOval(
110 | child: Material(
111 | color: kMainColor,
112 | child: GestureDetector(
113 | onTap: subtract,
114 | child: SizedBox(
115 | child: Icon(Icons.remove),
116 | height: 32,
117 | width: 32,
118 | ),
119 | ),
120 | ),
121 | ),
122 | ],
123 | )
124 | ],
125 | ),
126 | ),
127 | ),
128 | opacity: .5,
129 | ),
130 | ButtonTheme(
131 | minWidth: MediaQuery.of(context).size.width,
132 | height: MediaQuery.of(context).size.height * .08,
133 | child: Builder(
134 | builder: (context) => RaisedButton(
135 | shape: RoundedRectangleBorder(
136 | borderRadius: BorderRadius.only(
137 | topRight: Radius.circular(10),
138 | topLeft: Radius.circular(10))),
139 | color: kMainColor,
140 | onPressed: () {
141 | addToCart(context, product);
142 | },
143 | child: Text(
144 | 'Add to Cart'.toUpperCase(),
145 | style: TextStyle(
146 | fontSize: 18, fontWeight: FontWeight.bold),
147 | ),
148 | ),
149 | ),
150 | ),
151 | ],
152 | ),
153 | )
154 | ],
155 | ),
156 | );
157 | }
158 |
159 | subtract() {
160 | if (_quantity > 1) {
161 | setState(() {
162 | _quantity--;
163 | print(_quantity);
164 | });
165 | }
166 | }
167 |
168 | add() {
169 | setState(() {
170 | _quantity++;
171 | print(_quantity);
172 | });
173 | }
174 |
175 | void addToCart(context, product) {
176 | CartItem cartItem = Provider.of(context, listen: false);
177 | product.pQuantity = _quantity;
178 | bool exist = false;
179 | var productsInCart = cartItem.products;
180 | for (var productInCart in productsInCart) {
181 | if (productInCart.pName == product.pName) {
182 | exist = true;
183 | }
184 | }
185 | if (exist) {
186 | Scaffold.of(context).showSnackBar(SnackBar(
187 | content: Text('you\'ve added this item before'),
188 | ));
189 | } else {
190 | cartItem.addProduct(product);
191 | Scaffold.of(context).showSnackBar(SnackBar(
192 | content: Text('Added to Cart'),
193 | ));
194 | }
195 | }
196 | }
197 |
--------------------------------------------------------------------------------
/lib/services/auth.dart:
--------------------------------------------------------------------------------
1 | import 'package:firebase_auth/firebase_auth.dart';
2 |
3 | class Auth {
4 | final _auth = FirebaseAuth.instance;
5 |
6 | Future signUp(String email, String password) async {
7 | final authResult = await _auth.createUserWithEmailAndPassword(
8 | email: email, password: password);
9 |
10 | return authResult;
11 | }
12 |
13 | Future signIn(String email, String password) async {
14 | final authResult = await _auth.signInWithEmailAndPassword(
15 | email: email, password: password);
16 | return authResult;
17 | }
18 |
19 | Future getUser() async {
20 | return await _auth.currentUser();
21 | }
22 |
23 | Future signOut() async {
24 | await _auth.signOut();
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/lib/services/store.dart:
--------------------------------------------------------------------------------
1 | import 'package:buy_it/constants.dart';
2 | import 'package:buy_it/models/product.dart';
3 | import 'package:cloud_firestore/cloud_firestore.dart';
4 |
5 | class Store {
6 | final Firestore _firestore = Firestore.instance;
7 |
8 | addProduct(Product product) {
9 | _firestore.collection(kProductsCollection).add({
10 | kProductName: product.pName,
11 | kProductDescription: product.pDescription,
12 | kProductLocation: product.pLocation,
13 | kProductCategory: product.pCategory,
14 | kProductPrice: product.pPrice
15 | });
16 | }
17 |
18 | Stream loadProducts() {
19 | return _firestore.collection(kProductsCollection).snapshots();
20 | }
21 |
22 | Stream loadOrders() {
23 | return _firestore.collection(kOrders).snapshots();
24 | }
25 |
26 | Stream loadOrderDetails(documentId) {
27 | return _firestore
28 | .collection(kOrders)
29 | .document(documentId)
30 | .collection(kOrderDetails)
31 | .snapshots();
32 | }
33 |
34 | deleteProduct(documentId) {
35 | _firestore.collection(kProductsCollection).document(documentId).delete();
36 | }
37 |
38 | editProduct(data, documentId) {
39 | _firestore
40 | .collection(kProductsCollection)
41 | .document(documentId)
42 | .updateData(data);
43 | }
44 |
45 | storeOrders(data, List products) {
46 | var documentRef = _firestore.collection(kOrders).document();
47 | documentRef.setData(data);
48 | for (var product in products) {
49 | documentRef.collection(kOrderDetails).document().setData({
50 | kProductName: product.pName,
51 | kProductPrice: product.pPrice,
52 | kProductQuantity: product.pQuantity,
53 | kProductLocation: product.pLocation,
54 | kProductCategory: product.pCategory
55 | });
56 | }
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/lib/widgets/custom_menu.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class MyPopupMenuItem extends PopupMenuItem {
4 | final Widget child;
5 | final Function onClick;
6 | MyPopupMenuItem({@required this.child, @required this.onClick})
7 | : super(child: child);
8 | @override
9 | PopupMenuItemState> createState() {
10 | return MyPopupMenuItemState();
11 | }
12 | }
13 |
14 | class MyPopupMenuItemState
15 | extends PopupMenuItemState> {
16 | @override
17 | void handleTap() {
18 | widget.onClick();
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/lib/widgets/custom_textfield.dart:
--------------------------------------------------------------------------------
1 | import 'package:buy_it/constants.dart';
2 | import 'package:flutter/material.dart';
3 |
4 | class CustomTextField extends StatelessWidget {
5 | final String hint;
6 | final IconData icon;
7 | final Function onClick;
8 | String _errorMessage(String str) {
9 | switch (hint) {
10 | case 'Enter your name':
11 | return 'Name is empty !';
12 | case 'Enter your email':
13 | return 'Email is empty !';
14 | case 'Enter your password':
15 | return 'Password is empty !';
16 | }
17 | }
18 |
19 | CustomTextField(
20 | {@required this.onClick, @required this.icon, @required this.hint});
21 | @override
22 | Widget build(BuildContext context) {
23 | return Padding(
24 | padding: const EdgeInsets.symmetric(horizontal: 30),
25 | child: TextFormField(
26 | validator: (value) {
27 | if (value.isEmpty) {
28 | return _errorMessage(hint);
29 | // ignore: missing_return
30 | }
31 | },
32 | onSaved: onClick,
33 | obscureText: hint == 'Enter your password' ? true : false,
34 | cursorColor: kMainColor,
35 | decoration: InputDecoration(
36 | hintText: hint,
37 | prefixIcon: Icon(
38 | icon,
39 | color: kMainColor,
40 | ),
41 | filled: true,
42 | fillColor: kSecondaryColor,
43 | enabledBorder: OutlineInputBorder(
44 | borderRadius: BorderRadius.circular(20),
45 | borderSide: BorderSide(color: Colors.white)),
46 | focusedBorder: OutlineInputBorder(
47 | borderRadius: BorderRadius.circular(20),
48 | borderSide: BorderSide(color: Colors.white)),
49 | border: OutlineInputBorder(
50 | borderRadius: BorderRadius.circular(20),
51 | borderSide: BorderSide(color: Colors.white)),
52 | ),
53 | ),
54 | );
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/lib/widgets/cutsom_logo.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 |
3 | class CustomLogo extends StatelessWidget {
4 | @override
5 | Widget build(BuildContext context) {
6 | return Padding(
7 | padding: EdgeInsets.only(top: 50),
8 | child: Container(
9 | height: MediaQuery.of(context).size.height * .2,
10 | child: Stack(
11 | alignment: Alignment.center,
12 | children: [
13 | Image(
14 | image: AssetImage('images/icons/buyicon.png'),
15 | ),
16 | Positioned(
17 | bottom: 0,
18 | child: Text(
19 | 'Buy it',
20 | style: TextStyle(fontFamily: 'Pacifico', fontSize: 25),
21 | ),
22 | )
23 | ],
24 | ),
25 | ),
26 | );
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/lib/widgets/productView.dart:
--------------------------------------------------------------------------------
1 | import 'package:buy_it/models/product.dart';
2 | import 'package:buy_it/screens/user/productInfo.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | import '../functions.dart';
6 |
7 | Widget ProductsView(String pCategory, List allProducts) {
8 | List products;
9 | products = getProductByCategory(pCategory, allProducts);
10 | return GridView.builder(
11 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
12 | crossAxisCount: 2,
13 | childAspectRatio: .8,
14 | ),
15 | itemBuilder: (context, index) => Padding(
16 | padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10),
17 | child: GestureDetector(
18 | onTap: () {
19 | Navigator.pushNamed(context, ProductInfo.id,
20 | arguments: products[index]);
21 | },
22 | child: Stack(
23 | children: [
24 | Positioned.fill(
25 | child: Image(
26 | fit: BoxFit.fill,
27 | image: AssetImage(products[index].pLocation),
28 | ),
29 | ),
30 | Positioned(
31 | bottom: 0,
32 | child: Opacity(
33 | opacity: .6,
34 | child: Container(
35 | width: MediaQuery.of(context).size.width,
36 | height: 60,
37 | color: Colors.white,
38 | child: Padding(
39 | padding: EdgeInsets.symmetric(horizontal: 10, vertical: 5),
40 | child: Column(
41 | crossAxisAlignment: CrossAxisAlignment.start,
42 | children: [
43 | Text(
44 | products[index].pName,
45 | style: TextStyle(fontWeight: FontWeight.bold),
46 | ),
47 | Text('\$ ${products[index].pPrice}')
48 | ],
49 | ),
50 | ),
51 | ),
52 | ),
53 | )
54 | ],
55 | ),
56 | ),
57 | ),
58 | itemCount: products.length,
59 | );
60 | }
61 |
--------------------------------------------------------------------------------
/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.11"
11 | args:
12 | dependency: transitive
13 | description:
14 | name: args
15 | url: "https://pub.dartlang.org"
16 | source: hosted
17 | version: "1.5.2"
18 | async:
19 | dependency: transitive
20 | description:
21 | name: async
22 | url: "https://pub.dartlang.org"
23 | source: hosted
24 | version: "2.4.0"
25 | boolean_selector:
26 | dependency: transitive
27 | description:
28 | name: boolean_selector
29 | url: "https://pub.dartlang.org"
30 | source: hosted
31 | version: "1.0.5"
32 | charcode:
33 | dependency: transitive
34 | description:
35 | name: charcode
36 | url: "https://pub.dartlang.org"
37 | source: hosted
38 | version: "1.1.2"
39 | cloud_firestore:
40 | dependency: "direct main"
41 | description:
42 | name: cloud_firestore
43 | url: "https://pub.dartlang.org"
44 | source: hosted
45 | version: "0.13.5"
46 | cloud_firestore_platform_interface:
47 | dependency: transitive
48 | description:
49 | name: cloud_firestore_platform_interface
50 | url: "https://pub.dartlang.org"
51 | source: hosted
52 | version: "1.1.0"
53 | cloud_firestore_web:
54 | dependency: transitive
55 | description:
56 | name: cloud_firestore_web
57 | url: "https://pub.dartlang.org"
58 | source: hosted
59 | version: "0.1.1+2"
60 | collection:
61 | dependency: transitive
62 | description:
63 | name: collection
64 | url: "https://pub.dartlang.org"
65 | source: hosted
66 | version: "1.14.11"
67 | convert:
68 | dependency: transitive
69 | description:
70 | name: convert
71 | url: "https://pub.dartlang.org"
72 | source: hosted
73 | version: "2.1.1"
74 | crypto:
75 | dependency: transitive
76 | description:
77 | name: crypto
78 | url: "https://pub.dartlang.org"
79 | source: hosted
80 | version: "2.1.3"
81 | cupertino_icons:
82 | dependency: "direct main"
83 | description:
84 | name: cupertino_icons
85 | url: "https://pub.dartlang.org"
86 | source: hosted
87 | version: "0.1.3"
88 | firebase:
89 | dependency: transitive
90 | description:
91 | name: firebase
92 | url: "https://pub.dartlang.org"
93 | source: hosted
94 | version: "7.3.0"
95 | firebase_auth:
96 | dependency: "direct main"
97 | description:
98 | name: firebase_auth
99 | url: "https://pub.dartlang.org"
100 | source: hosted
101 | version: "0.16.0"
102 | firebase_auth_platform_interface:
103 | dependency: transitive
104 | description:
105 | name: firebase_auth_platform_interface
106 | url: "https://pub.dartlang.org"
107 | source: hosted
108 | version: "1.1.7"
109 | firebase_auth_web:
110 | dependency: transitive
111 | description:
112 | name: firebase_auth_web
113 | url: "https://pub.dartlang.org"
114 | source: hosted
115 | version: "0.1.2"
116 | firebase_core:
117 | dependency: transitive
118 | description:
119 | name: firebase_core
120 | url: "https://pub.dartlang.org"
121 | source: hosted
122 | version: "0.4.4+3"
123 | firebase_core_platform_interface:
124 | dependency: transitive
125 | description:
126 | name: firebase_core_platform_interface
127 | url: "https://pub.dartlang.org"
128 | source: hosted
129 | version: "1.0.4"
130 | firebase_core_web:
131 | dependency: transitive
132 | description:
133 | name: firebase_core_web
134 | url: "https://pub.dartlang.org"
135 | source: hosted
136 | version: "0.1.1+2"
137 | flutter:
138 | dependency: "direct main"
139 | description: flutter
140 | source: sdk
141 | version: "0.0.0"
142 | flutter_test:
143 | dependency: "direct dev"
144 | description: flutter
145 | source: sdk
146 | version: "0.0.0"
147 | flutter_web_plugins:
148 | dependency: transitive
149 | description: flutter
150 | source: sdk
151 | version: "0.0.0"
152 | http:
153 | dependency: transitive
154 | description:
155 | name: http
156 | url: "https://pub.dartlang.org"
157 | source: hosted
158 | version: "0.12.1"
159 | http_parser:
160 | dependency: transitive
161 | description:
162 | name: http_parser
163 | url: "https://pub.dartlang.org"
164 | source: hosted
165 | version: "3.1.4"
166 | image:
167 | dependency: transitive
168 | description:
169 | name: image
170 | url: "https://pub.dartlang.org"
171 | source: hosted
172 | version: "2.1.4"
173 | js:
174 | dependency: transitive
175 | description:
176 | name: js
177 | url: "https://pub.dartlang.org"
178 | source: hosted
179 | version: "0.6.1+1"
180 | matcher:
181 | dependency: transitive
182 | description:
183 | name: matcher
184 | url: "https://pub.dartlang.org"
185 | source: hosted
186 | version: "0.12.6"
187 | meta:
188 | dependency: transitive
189 | description:
190 | name: meta
191 | url: "https://pub.dartlang.org"
192 | source: hosted
193 | version: "1.1.8"
194 | modal_progress_hud:
195 | dependency: "direct main"
196 | description:
197 | name: modal_progress_hud
198 | url: "https://pub.dartlang.org"
199 | source: hosted
200 | version: "0.1.3"
201 | nested:
202 | dependency: transitive
203 | description:
204 | name: nested
205 | url: "https://pub.dartlang.org"
206 | source: hosted
207 | version: "0.0.4"
208 | path:
209 | dependency: transitive
210 | description:
211 | name: path
212 | url: "https://pub.dartlang.org"
213 | source: hosted
214 | version: "1.6.4"
215 | pedantic:
216 | dependency: transitive
217 | description:
218 | name: pedantic
219 | url: "https://pub.dartlang.org"
220 | source: hosted
221 | version: "1.8.0+1"
222 | petitparser:
223 | dependency: transitive
224 | description:
225 | name: petitparser
226 | url: "https://pub.dartlang.org"
227 | source: hosted
228 | version: "2.4.0"
229 | plugin_platform_interface:
230 | dependency: transitive
231 | description:
232 | name: plugin_platform_interface
233 | url: "https://pub.dartlang.org"
234 | source: hosted
235 | version: "1.0.2"
236 | provider:
237 | dependency: "direct main"
238 | description:
239 | name: provider
240 | url: "https://pub.dartlang.org"
241 | source: hosted
242 | version: "4.0.5+1"
243 | quiver:
244 | dependency: transitive
245 | description:
246 | name: quiver
247 | url: "https://pub.dartlang.org"
248 | source: hosted
249 | version: "2.0.5"
250 | shared_preferences:
251 | dependency: "direct main"
252 | description:
253 | name: shared_preferences
254 | url: "https://pub.dartlang.org"
255 | source: hosted
256 | version: "0.5.7+3"
257 | shared_preferences_macos:
258 | dependency: transitive
259 | description:
260 | name: shared_preferences_macos
261 | url: "https://pub.dartlang.org"
262 | source: hosted
263 | version: "0.0.1+10"
264 | shared_preferences_platform_interface:
265 | dependency: transitive
266 | description:
267 | name: shared_preferences_platform_interface
268 | url: "https://pub.dartlang.org"
269 | source: hosted
270 | version: "1.0.4"
271 | shared_preferences_web:
272 | dependency: transitive
273 | description:
274 | name: shared_preferences_web
275 | url: "https://pub.dartlang.org"
276 | source: hosted
277 | version: "0.1.2+7"
278 | sky_engine:
279 | dependency: transitive
280 | description: flutter
281 | source: sdk
282 | version: "0.0.99"
283 | source_span:
284 | dependency: transitive
285 | description:
286 | name: source_span
287 | url: "https://pub.dartlang.org"
288 | source: hosted
289 | version: "1.5.5"
290 | stack_trace:
291 | dependency: transitive
292 | description:
293 | name: stack_trace
294 | url: "https://pub.dartlang.org"
295 | source: hosted
296 | version: "1.9.3"
297 | stream_channel:
298 | dependency: transitive
299 | description:
300 | name: stream_channel
301 | url: "https://pub.dartlang.org"
302 | source: hosted
303 | version: "2.0.0"
304 | string_scanner:
305 | dependency: transitive
306 | description:
307 | name: string_scanner
308 | url: "https://pub.dartlang.org"
309 | source: hosted
310 | version: "1.0.5"
311 | term_glyph:
312 | dependency: transitive
313 | description:
314 | name: term_glyph
315 | url: "https://pub.dartlang.org"
316 | source: hosted
317 | version: "1.1.0"
318 | test_api:
319 | dependency: transitive
320 | description:
321 | name: test_api
322 | url: "https://pub.dartlang.org"
323 | source: hosted
324 | version: "0.2.11"
325 | typed_data:
326 | dependency: transitive
327 | description:
328 | name: typed_data
329 | url: "https://pub.dartlang.org"
330 | source: hosted
331 | version: "1.1.6"
332 | vector_math:
333 | dependency: transitive
334 | description:
335 | name: vector_math
336 | url: "https://pub.dartlang.org"
337 | source: hosted
338 | version: "2.0.8"
339 | xml:
340 | dependency: transitive
341 | description:
342 | name: xml
343 | url: "https://pub.dartlang.org"
344 | source: hosted
345 | version: "3.5.0"
346 | sdks:
347 | dart: ">=2.7.0 <3.0.0"
348 | flutter: ">=1.12.13+hotfix.5 <2.0.0"
349 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: buy_it
2 | description: A new Flutter application.
3 |
4 | # The following defines the version and build number for your application.
5 | # A version number is three numbers separated by dots, like 1.2.43
6 | # followed by an optional build number separated by a +.
7 | # Both the version and the builder number may be overridden in flutter
8 | # build by specifying --build-name and --build-number, respectively.
9 | # In Android, build-name is used as versionName while build-number used as versionCode.
10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
12 | # Read more about iOS versioning at
13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14 | version: 1.0.0+1
15 |
16 | environment:
17 | sdk: ">=2.2.2 <3.0.0"
18 |
19 | dependencies:
20 | shared_preferences: ^0.5.7+3
21 | cloud_firestore: ^0.13.5
22 | provider: ^4.0.5
23 | modal_progress_hud: ^0.1.3
24 | firebase_auth: ^0.16.0
25 | flutter:
26 | sdk: flutter
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.2
31 |
32 | dev_dependencies:
33 | flutter_test:
34 | sdk: flutter
35 |
36 |
37 | # For information on the generic Dart part of this file, see the
38 | # following page: https://dart.dev/tools/pub/pubspec
39 |
40 | # The following section is specific to Flutter.
41 | flutter:
42 |
43 | # The following line ensures that the Material Icons font is
44 | # included with your application, so that you can use the icons in
45 | # the material Icons class.
46 | uses-material-design: true
47 |
48 |
49 | assets:
50 | - images/icons/
51 | - images/jackets/
52 | - images/trousers/
53 | - images/shoes/
54 | - images/t-shirts/
55 |
56 | # An image asset can refer to one or more resolution-specific "variants", see
57 | # https://flutter.dev/assets-and-images/#resolution-aware.
58 |
59 | # For details regarding adding assets from package dependencies, see
60 | # https://flutter.dev/assets-and-images/#from-packages
61 |
62 |
63 | fonts:
64 | - family: Pacifico
65 | fonts:
66 | - asset: fonts/Pacifico-Regular.ttf
67 |
--------------------------------------------------------------------------------
/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:buy_it/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 |
--------------------------------------------------------------------------------