├── lib ├── services │ ├── handelimages.dart │ ├── auth.dart │ └── store.dart ├── Models │ ├── order.dart │ └── product.dart ├── Provider │ ├── adminmode.dart │ ├── modelhud.dart │ └── cartItems.dart ├── functions.dart ├── widgets │ ├── cusomMenu.dart │ ├── logostack.dart │ ├── cusomtextfield.dart │ └── productView.dart ├── const.dart ├── Screens │ ├── Admin │ │ ├── AdminHome │ │ │ └── adminhome.dart │ │ ├── addproduct.dart │ │ ├── orderScreen.dart │ │ ├── editProduct.dart │ │ ├── orderDetails.dart │ │ └── mangeProducts.dart │ ├── signupScree.dart │ ├── users.dart │ │ ├── productinfo.dart │ │ ├── cartScreen.dart │ │ └── homepage.dart │ └── loginScreen.dart ├── main.dart └── TestFiles │ └── testHomeage.dart ├── ios ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.plist ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── _ │ │ │ │ ├── 114.png │ │ │ │ ├── 120.png │ │ │ │ ├── 180.png │ │ │ │ ├── 29.png │ │ │ │ ├── 40.png │ │ │ │ ├── 57.png │ │ │ │ ├── 58.png │ │ │ │ ├── 60.png │ │ │ │ ├── 80.png │ │ │ │ ├── 87.png │ │ │ │ └── 1024.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-1024x1024@1x.png │ │ │ ├── Icon-App-83.5x83.5@2x.png │ │ │ └── Contents.json │ │ └── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── WorkspaceSettings.xcsettings │ │ └── IDEWorkspaceChecks.plist ├── Runner.xcodeproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── WorkspaceSettings.xcsettings │ │ │ └── IDEWorkspaceChecks.plist │ ├── xcshareddata │ │ └── xcschemes │ │ │ └── Runner.xcscheme │ └── project.pbxproj └── .gitignore ├── icons └── AppIcons │ ├── Assets.xcassets │ └── AppIcon.appiconset │ │ └── Contents.json │ ├── appstore.png │ ├── playstore.png │ └── android │ ├── 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 ├── images ├── res │ ├── kss.jpg │ ├── lw7.jpg │ ├── fawry.png │ ├── games.jpg │ ├── pens.jpg │ ├── serv.jpg │ ├── fawrylo.jpeg │ ├── pencils.jpg │ ├── kidsplays.jpg │ ├── notebooks.jpg │ ├── servrased.jpg │ └── kids accsse.jpg └── Icons │ └── mainicon.png ├── resources └── fonts │ ├── Rakkas.zip │ ├── Rakkas-Regular.ttf │ └── OFL.txt ├── android ├── app │ ├── src │ │ ├── main │ │ │ ├── res │ │ │ │ ├── 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 │ │ │ │ ├── drawable │ │ │ │ │ └── launch_background.xml │ │ │ │ └── values │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── mycontact │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ ├── google-services.json │ └── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── .gitignore ├── build.gradle └── settings.gradle ├── .metadata ├── .vscode └── launch.json ├── README.md ├── .gitignore ├── test └── widget_test.dart ├── pubspec.yaml └── pubspec.lock /lib/services/handelimages.dart: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /icons/AppIcons/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | {"images":[]} -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /images/res/kss.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/images/res/kss.jpg -------------------------------------------------------------------------------- /images/res/lw7.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/images/res/lw7.jpg -------------------------------------------------------------------------------- /images/res/fawry.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/images/res/fawry.png -------------------------------------------------------------------------------- /images/res/games.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/images/res/games.jpg -------------------------------------------------------------------------------- /images/res/pens.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/images/res/pens.jpg -------------------------------------------------------------------------------- /images/res/serv.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/images/res/serv.jpg -------------------------------------------------------------------------------- /images/res/fawrylo.jpeg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/images/res/fawrylo.jpeg -------------------------------------------------------------------------------- /images/res/pencils.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/images/res/pencils.jpg -------------------------------------------------------------------------------- /images/Icons/mainicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/images/Icons/mainicon.png -------------------------------------------------------------------------------- /images/res/kidsplays.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/images/res/kidsplays.jpg -------------------------------------------------------------------------------- /images/res/notebooks.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/images/res/notebooks.jpg -------------------------------------------------------------------------------- /images/res/servrased.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/images/res/servrased.jpg -------------------------------------------------------------------------------- /icons/AppIcons/appstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/icons/AppIcons/appstore.png -------------------------------------------------------------------------------- /icons/AppIcons/playstore.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/icons/AppIcons/playstore.png -------------------------------------------------------------------------------- /images/res/kids accsse.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/images/res/kids accsse.jpg -------------------------------------------------------------------------------- /resources/fonts/Rakkas.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/resources/fonts/Rakkas.zip -------------------------------------------------------------------------------- /resources/fonts/Rakkas-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/resources/fonts/Rakkas-Regular.ttf -------------------------------------------------------------------------------- /icons/AppIcons/android/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/icons/AppIcons/android/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /icons/AppIcons/android/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/icons/AppIcons/android/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /icons/AppIcons/android/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/icons/AppIcons/android/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /icons/AppIcons/android/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/icons/AppIcons/android/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /icons/AppIcons/android/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/icons/AppIcons/android/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/114.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/114.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/120.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/120.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/180.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/180.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/29.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/40.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/57.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/57.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/58.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/58.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/60.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/80.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/87.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/87.png -------------------------------------------------------------------------------- /lib/Models/order.dart: -------------------------------------------------------------------------------- 1 | class Order { 2 | int totalPrice; 3 | String address; 4 | String documentID; 5 | Order({this.totalPrice, this.address, this.documentID}); 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/_/1024.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/_/1024.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | org.gradle.jvmargs=-Xmx1512m -XX:MaxPermSize=1512m -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/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/ElNumany/Ecommerce-with-Flutter/HEAD/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/ElNumany/Ecommerce-with-Flutter/HEAD/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/ElNumany/Ecommerce-with-Flutter/HEAD/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/ElNumany/Ecommerce-with-Flutter/HEAD/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/ElNumany/Ecommerce-with-Flutter/HEAD/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/ElNumany/Ecommerce-with-Flutter/HEAD/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/ElNumany/Ecommerce-with-Flutter/HEAD/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/ElNumany/Ecommerce-with-Flutter/HEAD/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/ElNumany/Ecommerce-with-Flutter/HEAD/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/ElNumany/Ecommerce-with-Flutter/HEAD/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/ElNumany/Ecommerce-with-Flutter/HEAD/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/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ElNumany/Ecommerce-with-Flutter/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/mycontact/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.mycontact 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /lib/Provider/adminmode.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | 3 | class AdminMode extends ChangeNotifier { 4 | bool isAdmin = false; 5 | changeIsAdmin(bool value) { 6 | isAdmin = value; 7 | notifyListeners(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /lib/Provider/modelhud.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | 3 | class Modelhud extends ChangeNotifier { 4 | bool isLoading = false; 5 | changeisLoading(bool value) { 6 | isLoading = value; 7 | notifyListeners(); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /.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: fba99f6cf9a14512e461e3122c8ddfaa25394e89 8 | channel: stable 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /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 | 10 | Product({ 11 | this.pName, 12 | this.pCategory, 13 | this.pDescription, 14 | this.pLocation, 15 | this.pPrice, 16 | this.pID, 17 | this.pQuantity, 18 | }); 19 | } 20 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "elhafidth", 9 | "request": "launch", 10 | "type": "dart" 11 | } 12 | ] 13 | } -------------------------------------------------------------------------------- /lib/Provider/cartItems.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/widgets.dart'; 2 | import 'package:mycontact/Models/product.dart'; 3 | 4 | class CartItem extends ChangeNotifier { 5 | List products = []; 6 | addproduct(Product product) { 7 | products.add(product); 8 | 9 | notifyListeners(); 10 | } 11 | 12 | deleteProduct(Product product) { 13 | products.remove(product); 14 | notifyListeners(); 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/functions.dart: -------------------------------------------------------------------------------- 1 | // import 'Models/product.dart'; 2 | 3 | // List getProductCategory( 4 | // String kProductCategoryStudentsTools, List allProducts) { 5 | // List products = []; 6 | // try { 7 | // for (var product in allProducts) { 8 | // if (product.pCategory == kProductCategoryStudentsTools) { 9 | // products.add(product); 10 | // } 11 | // } 12 | // } on Error catch (ex) { 13 | // print(ex); 14 | // } 15 | // return products; 16 | // } 17 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # mycontact 2 | 3 | A new Flutter project. 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 | -------------------------------------------------------------------------------- /lib/widgets/cusomMenu.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.onClick, @required this.child}) 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 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/widgets/logostack.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class Logostack extends StatelessWidget { 4 | const Logostack({ 5 | Key key, 6 | }) : super(key: key); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Stack( 11 | alignment: Alignment.center, 12 | children: [ 13 | Image( 14 | image: AssetImage( 15 | 'images/icons/mainicon.png', 16 | )), 17 | Positioned( 18 | top: 150, 19 | child: Text( 20 | 'الحفيد', 21 | style: TextStyle( 22 | fontFamily: 'Rakkas', fontSize: 50.0, color: Colors.black), 23 | ), 24 | ), 25 | ], 26 | ); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.3.50' 3 | repositories { 4 | google() 5 | jcenter() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:3.5.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | classpath 'com.google.gms:google-services:4.3.3' 12 | } 13 | } 14 | 15 | allprojects { 16 | repositories { 17 | google() 18 | jcenter() 19 | } 20 | } 21 | 22 | rootProject.buildDir = '../build' 23 | subprojects { 24 | project.buildDir = "${rootProject.buildDir}/${project.name}" 25 | } 26 | subprojects { 27 | project.evaluationDependsOn(':app') 28 | } 29 | 30 | task clean(type: Delete) { 31 | delete rootProject.buildDir 32 | } 33 | -------------------------------------------------------------------------------- /lib/const.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | const kMainColor = Colors.blueGrey; 4 | const kTextboxColor = Colors.grey; 5 | const KProductName = "ProductName"; 6 | const KProductPrice = "ProductPrice"; 7 | const KProductDescription = "ProductDescription"; 8 | const KProductLocation = "ProductLocation"; 9 | const KProductCategory = "ProductCategory"; 10 | const KProductCollection = "Products"; 11 | const kUnActiveColor = Colors.white; 12 | const kProductCategoryStudentsTools = "StudentsTools"; 13 | const kProductCategoryStudentsActivity = "StudentsActivity"; 14 | const kProductCategoryStudentsPlays = "StudentsPlays"; 15 | const kProductCategoryServices = "Services"; 16 | const kOrders = "Orders"; 17 | const kOrdersDetails = "OrderDetails"; 18 | const kTotalPrice = "TotalPrice"; 19 | const kAddress = "Adress"; 20 | const kQuantity = "Quantity"; 21 | const kkeepmeLoggerIn = "KeepMeLoggedIn"; 22 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | 12 | # IntelliJ related 13 | *.iml 14 | *.ipr 15 | *.iws 16 | .idea/ 17 | 18 | # The .vscode folder contains launch configuration and tasks you configure in 19 | # VS Code which you may wish to be included in version control, so this line 20 | # is commented out by default. 21 | #.vscode/ 22 | 23 | # Flutter/Dart/Pub related 24 | **/doc/api/ 25 | **/ios/Flutter/.last_build_id 26 | .dart_tool/ 27 | .flutter-plugins 28 | .flutter-plugins-dependencies 29 | .packages 30 | .pub-cache/ 31 | .pub/ 32 | /build/ 33 | 34 | # Web related 35 | lib/generated_plugin_registrant.dart 36 | 37 | # Symbolication related 38 | app.*.symbols 39 | 40 | # Obfuscation related 41 | app.*.map.json 42 | 43 | # Exceptions to above rules. 44 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages 45 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /lib/services/auth.dart: -------------------------------------------------------------------------------- 1 | import 'package:firebase_auth/firebase_auth.dart'; 2 | 3 | class Auth { 4 | final _auth = FirebaseAuth.instance; 5 | 6 | //signup method :3 7 | //start signup method! 8 | Future signUp(String email, String password) async { 9 | final authresult = await _auth.createUserWithEmailAndPassword( 10 | email: email, password: password); 11 | return authresult; 12 | } 13 | 14 | //end signup method! 15 | // 16 | //signin method :3 17 | // 18 | //start Signin method ! :3 19 | Future signIn(String email, String password) async { 20 | final authresult = await _auth.signInWithEmailAndPassword( 21 | email: email, password: password); 22 | return authresult; 23 | } 24 | 25 | //end Signin method! :3 26 | // 27 | //Signout method :3 28 | // 29 | //start Signout method ! :3 30 | Future signOutt() async { 31 | await _auth.signOut(); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | 13 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 14 | 15 | def plugins = new Properties() 16 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 17 | if (pluginsFile.exists()) { 18 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 19 | } 20 | 21 | plugins.each { name, path -> 22 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 23 | include ":$name" 24 | project(":$name").projectDir = pluginDirectory 25 | } -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /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:mycontact/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 | -------------------------------------------------------------------------------- /android/app/google-services.json: -------------------------------------------------------------------------------- 1 | { 2 | "project_info": { 3 | "project_number": "334930678725", 4 | "firebase_url": "https://elhafidth-3eae7.firebaseio.com", 5 | "project_id": "elhafidth-3eae7", 6 | "storage_bucket": "elhafidth-3eae7.appspot.com" 7 | }, 8 | "client": [ 9 | { 10 | "client_info": { 11 | "mobilesdk_app_id": "1:334930678725:android:ff44788d5e97856b4871ac", 12 | "android_client_info": { 13 | "package_name": "com.example.mycontact" 14 | } 15 | }, 16 | "oauth_client": [ 17 | { 18 | "client_id": "334930678725-66tb7dd857v2su19mulpp8jqidqo5vke.apps.googleusercontent.com", 19 | "client_type": 3 20 | } 21 | ], 22 | "api_key": [ 23 | { 24 | "current_key": "AIzaSyCs00ReRvKe0ziVVBMliTpX-wKZranj8Ag" 25 | } 26 | ], 27 | "services": { 28 | "appinvite_service": { 29 | "other_platform_oauth_client": [ 30 | { 31 | "client_id": "334930678725-66tb7dd857v2su19mulpp8jqidqo5vke.apps.googleusercontent.com", 32 | "client_type": 3 33 | } 34 | ] 35 | } 36 | } 37 | } 38 | ], 39 | "configuration_version": "1" 40 | } -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | {"images":[{"size":"60x60","expected-size":"180","filename":"180.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"40x40","expected-size":"80","filename":"80.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"40x40","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"60x60","expected-size":"120","filename":"120.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"57x57","expected-size":"57","filename":"57.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"58","filename":"58.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"29x29","expected-size":"29","filename":"29.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"1x"},{"size":"29x29","expected-size":"87","filename":"87.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"57x57","expected-size":"114","filename":"114.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"40","filename":"40.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"2x"},{"size":"20x20","expected-size":"60","filename":"60.png","folder":"Assets.xcassets/AppIcon.appiconset/","idiom":"iphone","scale":"3x"},{"size":"1024x1024","filename":"1024.png","expected-size":"1024","idiom":"ios-marketing","folder":"Assets.xcassets/AppIcon.appiconset/","scale":"1x"}]} -------------------------------------------------------------------------------- /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 | mycontact 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 | -------------------------------------------------------------------------------- /lib/Screens/Admin/AdminHome/adminhome.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:mycontact/Screens/Admin/addproduct.dart'; 3 | import 'package:mycontact/Screens/Admin/mangeProducts.dart'; 4 | import 'package:mycontact/Screens/Admin/orderScreen.dart'; 5 | import 'package:mycontact/const.dart'; 6 | 7 | class AdminHome extends StatelessWidget { 8 | static String id = 'AdminHome'; 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | // double heigt = MediaQuery.of(context).size.height; 13 | return Scaffold( 14 | backgroundColor: kMainColor, 15 | body: Column( 16 | crossAxisAlignment: CrossAxisAlignment.center, 17 | mainAxisAlignment: MainAxisAlignment.center, 18 | children: [ 19 | SizedBox( 20 | width: double.infinity, 21 | ), 22 | RaisedButton( 23 | color: kTextboxColor, 24 | onPressed: () { 25 | Navigator.pushNamed(context, AddProduct.id); 26 | }, 27 | child: Text( 28 | "Add Product", 29 | style: TextStyle(color: Colors.white), 30 | ), 31 | ), 32 | RaisedButton( 33 | color: kTextboxColor, 34 | onPressed: () { 35 | Navigator.pushNamed(context, MangeProduct.id); 36 | }, 37 | child: Text("Edit Product", style: TextStyle(color: Colors.white)), 38 | ), 39 | RaisedButton( 40 | color: kTextboxColor, 41 | onPressed: () { 42 | Navigator.pushNamed(context, OrderScreen.id); 43 | }, 44 | child: Text("View Orders", style: TextStyle(color: Colors.white)), 45 | ), 46 | ], 47 | ), 48 | ); 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /lib/widgets/cusomtextfield.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import '../const.dart'; 5 | 6 | class CustomTextField extends StatelessWidget { 7 | final String hint; 8 | final IconData icon; 9 | final Function onClick; 10 | 11 | String _error(String str) { 12 | switch (hint) { 13 | case 'Enter Name!': 14 | return 'Name is empty!'; 15 | case 'Enter Email!': 16 | return 'Email is empty!'; 17 | case 'Enter Password!': 18 | return 'Password is empty!'; 19 | } 20 | return ''; 21 | } 22 | 23 | CustomTextField( 24 | { 25 | // @required this.onClick, 26 | @required this.hint, 27 | @required this.icon, 28 | @required this.onClick}); 29 | @override 30 | Widget build(BuildContext context) { 31 | return TextFormField( 32 | validator: (value) { 33 | if (value.isEmpty) { 34 | return _error(hint); 35 | } 36 | }, 37 | onSaved: onClick, 38 | obscureText: hint == 'Enter Password!' ? true : false, 39 | cursorColor: kMainColor, 40 | decoration: InputDecoration( 41 | hintText: hint, 42 | prefixIcon: Icon( 43 | icon, 44 | color: kMainColor, 45 | size: 20, 46 | ), 47 | filled: true, 48 | fillColor: kTextboxColor, 49 | enabledBorder: OutlineInputBorder( 50 | borderRadius: BorderRadius.circular(20), 51 | borderSide: BorderSide(color: Colors.white)), 52 | focusedBorder: OutlineInputBorder( 53 | borderRadius: BorderRadius.circular(20), 54 | borderSide: BorderSide(color: Colors.white)), 55 | border: OutlineInputBorder( 56 | borderRadius: BorderRadius.circular(20), 57 | borderSide: BorderSide(color: Colors.white)), 58 | )); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/widgets/productView.dart: -------------------------------------------------------------------------------- 1 | // import "package:flutter/material.dart"; 2 | // import 'package:mycontact/Models/product.dart'; 3 | 4 | // import '../const.dart'; 5 | // import '../functions.dart'; 6 | 7 | // Widget ProductsMethod(String pCategory, List allProducts) { 8 | // List products; 9 | // products = getProductCategory(pCategory, allProducts); 10 | // return GridView.builder( 11 | // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 12 | // crossAxisCount: 2, childAspectRatio: .8), 13 | // itemBuilder: (context, index) => Padding( 14 | // padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10), 15 | // child: GestureDetector( 16 | // child: Stack( 17 | // children: [ 18 | // Positioned.fill( 19 | // child: Image( 20 | // fit: BoxFit.fill, 21 | // image: AssetImage(products[index].pLocation), 22 | // ), 23 | // ), 24 | // Positioned( 25 | // bottom: 0, 26 | // child: Opacity( 27 | // opacity: 0.6, 28 | // child: Container( 29 | // width: MediaQuery.of(context).size.width, 30 | // color: Colors.white, 31 | // height: 60, 32 | // child: Padding( 33 | // padding: const EdgeInsets.all(8.0), 34 | // child: Column( 35 | // crossAxisAlignment: CrossAxisAlignment.start, 36 | // children: [ 37 | // Text(products[index].pName, 38 | // style: TextStyle(color: kMainColor, fontSize: 15)), 39 | // Text("\$ ${products[index].pPrice}", 40 | // style: TextStyle(color: Colors.red, fontSize: 15)), 41 | // ], 42 | // ), 43 | // ), 44 | // ), 45 | // ), 46 | // ) 47 | // ], 48 | // ), 49 | // ), 50 | // ), 51 | // itemCount: products.length, 52 | // ); 53 | // } 54 | -------------------------------------------------------------------------------- /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.example.mycontact" 42 | minSdkVersion 16 43 | targetSdkVersion 28 44 | versionCode flutterVersionCode.toInteger() 45 | versionName flutterVersionName 46 | } 47 | 48 | buildTypes { 49 | release { 50 | // TODO: Add your own signing config for the release build. 51 | // Signing with the debug keys for now, so `flutter run --release` works. 52 | signingConfig signingConfigs.debug 53 | } 54 | debug{ 55 | minifyEnabled true 56 | } 57 | 58 | } 59 | } 60 | 61 | flutter { 62 | source '../..' 63 | } 64 | 65 | dependencies { 66 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 67 | implementation 'com.google.firebase:firebase-analytics:17.5.0' 68 | } 69 | -------------------------------------------------------------------------------- /lib/services/store.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:mycontact/Models/product.dart'; 3 | import 'package:mycontact/const.dart'; 4 | 5 | class Store { 6 | final Firestore _fireStore = Firestore.instance; 7 | /////////***************///////////////////// 8 | //Add Product To Firebase! 9 | 10 | addProduct(Product product) { 11 | _fireStore.collection(KProductCollection).add({ 12 | KProductName: product.pName, 13 | KProductPrice: product.pPrice, 14 | KProductDescription: product.pDescription, 15 | KProductLocation: product.pLocation, 16 | KProductCategory: product.pCategory, 17 | }); 18 | } 19 | 20 | /////////***************///////////////////// 21 | //Load Product from firebase 22 | 23 | Stream loadProduct() { 24 | return _fireStore.collection(KProductCollection).snapshots(); 25 | } 26 | 27 | /////////***************///////////////////// 28 | //Edit Product from firebase 29 | editProduct(data, documentid) { 30 | _fireStore 31 | .collection(KProductCollection) 32 | .document(documentid) 33 | .updateData(data); 34 | } 35 | 36 | /////////***************///////////////////// 37 | //Delete Product from firebase 38 | deleteProduct(documentid) { 39 | _fireStore.collection(KProductCollection).document(documentid).delete(); 40 | } 41 | 42 | /////////***************///////////////////// 43 | //Store Orders To firebase 44 | storeOrders(data, List products) { 45 | var documentRef = _fireStore.collection(kOrders).document(); 46 | documentRef.setData(data); 47 | for (var product in products) { 48 | documentRef.collection(kOrdersDetails).document().setData({ 49 | KProductName: product.pName, 50 | KProductPrice: product.pPrice, 51 | KProductLocation: product.pLocation, 52 | kQuantity: product.pQuantity, 53 | KProductCategory: product.pCategory, 54 | }); 55 | } 56 | } 57 | 58 | /////////***************///////////////////// 59 | //Load Orders From firebase 60 | Stream loadOrders() { 61 | return _fireStore.collection(kOrders).snapshots(); 62 | } 63 | 64 | /////////***************///////////////////// 65 | //Load Orders Details From firebase 66 | Stream loadOrderDetails(documentId) { 67 | return _fireStore 68 | .collection(kOrders) 69 | .document(documentId) 70 | .collection(kOrdersDetails) 71 | .snapshots(); 72 | } 73 | } 74 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 3 | 8 | 12 | 19 | 23 | 27 | 32 | 36 | 37 | 38 | 39 | 40 | 41 | 43 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /lib/Screens/Admin/addproduct.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'package:mycontact/Models/product.dart'; 4 | import 'package:mycontact/const.dart'; 5 | import 'package:mycontact/services/store.dart'; 6 | import 'package:mycontact/widgets/cusomtextfield.dart'; 7 | 8 | class AddProduct extends StatelessWidget { 9 | static String id = "AddProduct"; 10 | final GlobalKey _globalKey = GlobalKey(); 11 | String _name, _price, _description, _category, _imageLocation; 12 | final _store = Store(); 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | backgroundColor: kMainColor, 17 | body: Form( 18 | key: _globalKey, 19 | child: Column( 20 | mainAxisAlignment: MainAxisAlignment.center, 21 | children: [ 22 | CustomTextField( 23 | hint: "Product Name", 24 | icon: null, 25 | onClick: (value) { 26 | _name = value; 27 | }), 28 | SizedBox( 29 | height: 10, 30 | ), 31 | CustomTextField( 32 | hint: "Product Price", 33 | icon: null, 34 | onClick: (value) { 35 | _price = value; 36 | }), 37 | SizedBox( 38 | height: 10, 39 | ), 40 | CustomTextField( 41 | hint: "Product Description", 42 | icon: null, 43 | onClick: (value) { 44 | _description = value; 45 | }), 46 | SizedBox( 47 | height: 10, 48 | ), 49 | CustomTextField( 50 | hint: "Product Category", 51 | icon: null, 52 | onClick: (value) { 53 | _category = value.trim(); 54 | }), 55 | SizedBox( 56 | height: 10, 57 | ), 58 | CustomTextField( 59 | hint: "Product Location", 60 | icon: null, 61 | onClick: (value) { 62 | _imageLocation = value.trim(); 63 | }), 64 | SizedBox( 65 | height: 20, 66 | ), 67 | RaisedButton( 68 | color: kTextboxColor, 69 | child: Text( 70 | "Add proudct", 71 | style: TextStyle(color: Colors.white), 72 | ), 73 | onPressed: () { 74 | if (_globalKey.currentState.validate()) { 75 | _globalKey.currentState.save(); 76 | _store.addProduct(Product( 77 | pName: _name, 78 | pPrice: _price, 79 | pCategory: _category, 80 | pDescription: _description, 81 | pLocation: _imageLocation, 82 | )); 83 | } 84 | }), 85 | ], 86 | ), 87 | ), 88 | ); 89 | } 90 | } 91 | -------------------------------------------------------------------------------- /lib/Screens/Admin/orderScreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:mycontact/Models/order.dart'; 4 | import 'package:mycontact/Screens/Admin/orderDetails.dart'; 5 | import 'package:mycontact/const.dart'; 6 | import 'package:mycontact/services/store.dart'; 7 | 8 | class OrderScreen extends StatelessWidget { 9 | static String id = "Order Screen"; 10 | final Store _store = Store(); 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | body: StreamBuilder( 15 | stream: _store.loadOrders(), 16 | builder: (context, snapshot) { 17 | if (!snapshot.hasData) { 18 | return Center( 19 | child: Text("There Is No Orders"), 20 | ); 21 | } else { 22 | List order = []; 23 | for (var doc in snapshot.data.documents) { 24 | order.add(Order( 25 | documentID: doc.documentID, 26 | totalPrice: doc.data[kTotalPrice], 27 | address: doc.data[kAddress], 28 | )); 29 | } 30 | return ListView.builder( 31 | itemBuilder: (context, index) => Padding( 32 | padding: const EdgeInsets.all(20), 33 | child: Container( 34 | height: MediaQuery.of(context).size.height * 0.2, 35 | color: kTextboxColor, 36 | child: Padding( 37 | padding: const EdgeInsets.all(10), 38 | child: GestureDetector( 39 | onTap: () { 40 | Navigator.pushNamed(context, OrderDetails.id, 41 | arguments: order[index].documentID); 42 | }, 43 | child: Column( 44 | crossAxisAlignment: CrossAxisAlignment.center, 45 | mainAxisAlignment: MainAxisAlignment.center, 46 | children: [ 47 | Text( 48 | "Total Price = \$${order[index].totalPrice}", 49 | style: TextStyle( 50 | fontSize: 18, 51 | fontWeight: FontWeight.bold, 52 | ), 53 | ), 54 | SizedBox( 55 | height: 10, 56 | ), 57 | Text( 58 | "Address = ${order[index].address}", 59 | style: TextStyle( 60 | fontSize: 18, 61 | fontWeight: FontWeight.bold, 62 | ), 63 | ), 64 | ], 65 | ), 66 | ), 67 | ), 68 | ), 69 | ), 70 | itemCount: order.length, 71 | ); 72 | } 73 | }, 74 | ), 75 | ); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:mycontact/Provider/cartItems.dart'; 4 | import 'package:mycontact/Provider/modelhud.dart'; 5 | import 'package:mycontact/Screens/Admin/AdminHome/adminhome.dart'; 6 | import 'package:mycontact/Screens/Admin/addproduct.dart'; 7 | import 'package:mycontact/Screens/Admin/editproduct.dart'; 8 | import 'package:mycontact/Screens/Admin/mangeProducts.dart'; 9 | import 'package:mycontact/Screens/Admin/orderDetails.dart'; 10 | import 'package:mycontact/Screens/Admin/orderScreen.dart'; 11 | import 'package:mycontact/Screens/signupScree.dart'; 12 | import 'package:mycontact/Screens/users.dart/cartScreen.dart'; 13 | import 'package:mycontact/Screens/users.dart/homepage.dart'; 14 | import 'package:mycontact/Screens/users.dart/productinfo.dart'; 15 | import 'package:mycontact/const.dart'; 16 | import 'package:provider/provider.dart'; 17 | import 'package:shared_preferences/shared_preferences.dart'; 18 | import 'Provider/adminmode.dart'; 19 | import 'Screens/loginScreen.dart'; 20 | 21 | void main() => runApp(MyApp()); 22 | 23 | class MyApp extends StatelessWidget { 24 | bool isUserLoggedIn = false; 25 | @override 26 | Widget build(BuildContext context) { 27 | return FutureBuilder( 28 | future: SharedPreferences.getInstance(), 29 | builder: (context, snapshot) { 30 | if (!snapshot.hasData) { 31 | return MaterialApp( 32 | home: Scaffold( 33 | body: Center( 34 | child: Text("Wait!"), 35 | ), 36 | ), 37 | ); 38 | } else { 39 | isUserLoggedIn = snapshot.data.getBool(kkeepmeLoggerIn) ?? false; 40 | return MultiProvider( 41 | providers: [ 42 | ChangeNotifierProvider( 43 | create: (context) => Modelhud(), 44 | ), 45 | ChangeNotifierProvider( 46 | create: (context) => AdminMode(), 47 | ), 48 | ChangeNotifierProvider( 49 | create: (context) => CartItem(), 50 | ), 51 | ], 52 | child: MaterialApp( 53 | debugShowCheckedModeBanner: false, 54 | initialRoute: isUserLoggedIn ? HomePage.id : LoginScreen.id, 55 | routes: { 56 | LoginScreen.id: (context) => LoginScreen(), 57 | Signup.id: (context) => Signup(), 58 | AdminHome.id: (context) => AdminHome(), 59 | HomePage.id: (context) => HomePage(), 60 | AddProduct.id: (context) => AddProduct(), 61 | MangeProduct.id: (context) => MangeProduct(), 62 | EditProduct.id: (context) => EditProduct(), 63 | ProductInfo.id: (context) => ProductInfo(), 64 | CartScreen.id: (context) => CartScreen(), 65 | OrderScreen.id: (context) => OrderScreen(), 66 | OrderDetails.id: (context) => OrderDetails(), 67 | }), 68 | ); 69 | } 70 | }); 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: mycontact 2 | description: A new Flutter project. 3 | 4 | # The following line prevents the package from being accidentally published to 5 | # pub.dev using `pub publish`. This is preferred for private packages. 6 | publish_to: 'none' # Remove this line if you wish to publish to pub.dev 7 | 8 | # The following defines the version and build number for your application. 9 | # A version number is three numbers separated by dots, like 1.2.43 10 | # followed by an optional build number separated by a +. 11 | # Both the version and the builder number may be overridden in flutter 12 | # build by specifying --build-name and --build-number, respectively. 13 | # In Android, build-name is used as versionName while build-number used as versionCode. 14 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 15 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. 16 | # Read more about iOS versioning at 17 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 18 | version: 1.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.7.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | 27 | 28 | # The following adds the Cupertino Icons font to your application. 29 | # Use with the CupertinoIcons class for iOS style icons. 30 | cupertino_icons: ^0.1.3 31 | firebase_auth: ^0.16.0 32 | modal_progress_hud: ^0.1.3 33 | provider: ^4.0.5 34 | cloud_firestore: ^0.13.5 35 | image_picker: ^0.6.6+1 36 | firebase_storage: ^3.1.5 37 | shared_preferences: ^0.5.7+3 38 | 39 | path: ^1.7.0 40 | dev_dependencies: 41 | flutter_test: 42 | sdk: flutter 43 | 44 | # For information on the generic Dart part of this file, see the 45 | # following page: https://dart.dev/tools/pub/pubspec 46 | 47 | # The following section is specific to Flutter. 48 | flutter: 49 | 50 | # The following line ensures that the Material Icons font is 51 | # included with your application, so that you can use the icons in 52 | # the material Icons class. 53 | uses-material-design: true 54 | 55 | # To add assets to your application, add an assets section, like this: 56 | assets: 57 | - images/icons/mainicon.png 58 | - images/res/fawry.png 59 | - images/res/fawrylo.jpeg 60 | - images/res/games.jpg 61 | - images/res/notebooks.jpg 62 | - images/res/pencils.jpg 63 | - images/res/pens.jpg 64 | - images/res/serv.jpg 65 | - images/res/kids accsse.jpg 66 | - images/res/KidsPLays.jpg 67 | - images/res/kss.jpg 68 | - images/res/lw7.jpg 69 | - images/res/servrased.jpg 70 | 71 | 72 | # An image asset can refer to one or more resolution-specific "variants", see 73 | # https://flutter.dev/assets-and-images/#resolution-aware. 74 | 75 | # For details regarding adding assets from package dependencies, see 76 | # https://flutter.dev/assets-and-images/#from-packages 77 | 78 | # To add custom fonts to your application, add a fonts section here, 79 | # in this "flutter" section. Each entry in this list should have a 80 | # "family" key with the font family name, and a "fonts" key with a 81 | # list giving the asset and other descriptors for the font. For 82 | # example: 83 | fonts: 84 | - family: Rakkas 85 | fonts: 86 | - asset: resources/fonts/Rakkas-Regular.ttf 87 | # style: italic 88 | # - family: Trajan Pro 89 | # fonts: 90 | # - asset: fonts/TrajanPro.ttf 91 | # - asset: fonts/TrajanPro_Bold.ttf 92 | # weight: 700 93 | # 94 | # For details regarding fonts from package dependencies, 95 | # see https://flutter.dev/custom-fonts/#from-packages 96 | -------------------------------------------------------------------------------- /lib/Screens/Admin/editProduct.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:mycontact/Models/product.dart'; 3 | import 'package:mycontact/services/store.dart'; 4 | import 'package:mycontact/widgets/cusomtextfield.dart'; 5 | 6 | import '../../const.dart'; 7 | 8 | class EditProduct extends StatelessWidget { 9 | static String id = 'EditProduct'; 10 | final GlobalKey _globalKey = GlobalKey(); 11 | String _name, _price, _description, _category, _imageLocation; 12 | final _store = Store(); 13 | @override 14 | Widget build(BuildContext context) { 15 | Product products = ModalRoute.of(context).settings.arguments; 16 | return Scaffold( 17 | backgroundColor: Colors.black, 18 | body: Form( 19 | key: _globalKey, 20 | child: ListView( 21 | children: [ 22 | SizedBox(height: MediaQuery.of(context).size.height * .2), 23 | Column( 24 | mainAxisAlignment: MainAxisAlignment.center, 25 | children: [ 26 | CustomTextField( 27 | hint: "Product Name", 28 | icon: null, 29 | onClick: (value) { 30 | _name = value; 31 | }), 32 | SizedBox( 33 | height: 10, 34 | ), 35 | CustomTextField( 36 | hint: "Product Price", 37 | icon: null, 38 | onClick: (value) { 39 | _price = value; 40 | }), 41 | SizedBox( 42 | height: 10, 43 | ), 44 | CustomTextField( 45 | hint: "Product Description", 46 | icon: null, 47 | onClick: (value) { 48 | _description = value; 49 | }), 50 | SizedBox( 51 | height: 10, 52 | ), 53 | CustomTextField( 54 | hint: "Product Category", 55 | icon: null, 56 | onClick: (value) { 57 | _category = value; 58 | }), 59 | SizedBox( 60 | height: 10, 61 | ), 62 | CustomTextField( 63 | hint: "Product Location", 64 | icon: null, 65 | onClick: (value) { 66 | _imageLocation = value; 67 | }), 68 | SizedBox( 69 | height: 20, 70 | ), 71 | RaisedButton( 72 | color: kTextboxColor, 73 | child: Text( 74 | "Edit proudct", 75 | style: TextStyle(color: Colors.white), 76 | ), 77 | onPressed: () { 78 | if (_globalKey.currentState.validate()) { 79 | _globalKey.currentState.save(); 80 | _store.editProduct( 81 | ({ 82 | KProductName: _name, 83 | KProductLocation: _imageLocation, 84 | KProductCategory: _category, 85 | KProductDescription: _description, 86 | KProductPrice: _price, 87 | }), 88 | products.pID); 89 | } 90 | }), 91 | ], 92 | ), 93 | ], 94 | )), 95 | ); 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /resources/fonts/OFL.txt: -------------------------------------------------------------------------------- 1 | Copyright 2016 Zeynep Akay 2 | 3 | This Font Software is licensed under the SIL Open Font License, Version 1.1. 4 | This license is copied below, and is also available with a FAQ at: 5 | http://scripts.sil.org/OFL 6 | 7 | 8 | ----------------------------------------------------------- 9 | SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007 10 | ----------------------------------------------------------- 11 | 12 | PREAMBLE 13 | The goals of the Open Font License (OFL) are to stimulate worldwide 14 | development of collaborative font projects, to support the font creation 15 | efforts of academic and linguistic communities, and to provide a free and 16 | open framework in which fonts may be shared and improved in partnership 17 | with others. 18 | 19 | The OFL allows the licensed fonts to be used, studied, modified and 20 | redistributed freely as long as they are not sold by themselves. The 21 | fonts, including any derivative works, can be bundled, embedded, 22 | redistributed and/or sold with any software provided that any reserved 23 | names are not used by derivative works. The fonts and derivatives, 24 | however, cannot be released under any other type of license. The 25 | requirement for fonts to remain under this license does not apply 26 | to any document created using the fonts or their derivatives. 27 | 28 | DEFINITIONS 29 | "Font Software" refers to the set of files released by the Copyright 30 | Holder(s) under this license and clearly marked as such. This may 31 | include source files, build scripts and documentation. 32 | 33 | "Reserved Font Name" refers to any names specified as such after the 34 | copyright statement(s). 35 | 36 | "Original Version" refers to the collection of Font Software components as 37 | distributed by the Copyright Holder(s). 38 | 39 | "Modified Version" refers to any derivative made by adding to, deleting, 40 | or substituting -- in part or in whole -- any of the components of the 41 | Original Version, by changing formats or by porting the Font Software to a 42 | new environment. 43 | 44 | "Author" refers to any designer, engineer, programmer, technical 45 | writer or other person who contributed to the Font Software. 46 | 47 | PERMISSION & CONDITIONS 48 | Permission is hereby granted, free of charge, to any person obtaining 49 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 50 | redistribute, and sell modified and unmodified copies of the Font 51 | Software, subject to the following conditions: 52 | 53 | 1) Neither the Font Software nor any of its individual components, 54 | in Original or Modified Versions, may be sold by itself. 55 | 56 | 2) Original or Modified Versions of the Font Software may be bundled, 57 | redistributed and/or sold with any software, provided that each copy 58 | contains the above copyright notice and this license. These can be 59 | included either as stand-alone text files, human-readable headers or 60 | in the appropriate machine-readable metadata fields within text or 61 | binary files as long as those fields can be easily viewed by the user. 62 | 63 | 3) No Modified Version of the Font Software may use the Reserved Font 64 | Name(s) unless explicit written permission is granted by the corresponding 65 | Copyright Holder. This restriction only applies to the primary font name as 66 | presented to the users. 67 | 68 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 69 | Software shall not be used to promote, endorse or advertise any 70 | Modified Version, except to acknowledge the contribution(s) of the 71 | Copyright Holder(s) and the Author(s) or with their explicit written 72 | permission. 73 | 74 | 5) The Font Software, modified or unmodified, in part or in whole, 75 | must be distributed entirely under this license, and must not be 76 | distributed under any other license. The requirement for fonts to 77 | remain under this license does not apply to any document created 78 | using the Font Software. 79 | 80 | TERMINATION 81 | This license becomes null and void if any of the above conditions are 82 | not met. 83 | 84 | DISCLAIMER 85 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 86 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 87 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 88 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 89 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 90 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 91 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 92 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 93 | OTHER DEALINGS IN THE FONT SOFTWARE. 94 | -------------------------------------------------------------------------------- /lib/Screens/Admin/orderDetails.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:mycontact/Models/product.dart'; 4 | import 'package:mycontact/const.dart'; 5 | import 'package:mycontact/services/store.dart'; 6 | 7 | class OrderDetails extends StatelessWidget { 8 | static String id = "OrderDetails"; 9 | Store _store = Store(); 10 | @override 11 | Widget build(BuildContext context) { 12 | String documentId = ModalRoute.of(context).settings.arguments; 13 | return Scaffold( 14 | body: StreamBuilder( 15 | stream: _store.loadOrderDetails(documentId), 16 | builder: (context, snapshot) { 17 | if (snapshot.hasData) { 18 | List products = []; 19 | for (var doc in snapshot.data.documents) { 20 | products.add(Product( 21 | pName: doc.data[KProductName], 22 | pQuantity: doc.data[kQuantity], 23 | pCategory: doc.data[KProductCategory], 24 | )); 25 | } 26 | return Column(children: [ 27 | Expanded( 28 | child: ListView.builder( 29 | itemBuilder: (context, index) => Padding( 30 | padding: const EdgeInsets.all(20), 31 | child: Container( 32 | height: MediaQuery.of(context).size.height * .2, 33 | color: kTextboxColor, 34 | child: Padding( 35 | padding: const EdgeInsets.all(10), 36 | child: Column( 37 | crossAxisAlignment: CrossAxisAlignment.start, 38 | mainAxisAlignment: MainAxisAlignment.center, 39 | children: [ 40 | Text('product name : ${products[index].pName}', 41 | style: TextStyle( 42 | fontSize: 18, 43 | fontWeight: FontWeight.bold)), 44 | SizedBox( 45 | height: 10, 46 | ), 47 | Text( 48 | 'Quantity : ${products[index].pQuantity}', 49 | style: TextStyle( 50 | fontSize: 18, fontWeight: FontWeight.bold), 51 | ), 52 | SizedBox( 53 | height: 10, 54 | ), 55 | Text( 56 | 'product Category : ${products[index].pCategory}', 57 | style: TextStyle( 58 | fontSize: 18, fontWeight: FontWeight.bold), 59 | ) 60 | ], 61 | ), 62 | ), 63 | ), 64 | ), 65 | itemCount: products.length, 66 | ), 67 | ), 68 | Padding( 69 | padding: const EdgeInsets.symmetric(horizontal: 20), 70 | child: Row( 71 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 72 | children: [ 73 | Expanded( 74 | child: ButtonTheme( 75 | buttonColor: kMainColor, 76 | child: RaisedButton( 77 | onPressed: () {}, 78 | child: Text("Confirm Order!"), 79 | ), 80 | ), 81 | ), 82 | SizedBox( 83 | width: 10, 84 | ), 85 | Expanded( 86 | child: ButtonTheme( 87 | buttonColor: kMainColor, 88 | child: RaisedButton( 89 | onPressed: () {}, 90 | child: Text("Delete Order!"), 91 | ), 92 | ), 93 | ), 94 | ], 95 | ), 96 | ) 97 | ]); 98 | } else { 99 | return Center( 100 | child: Text("Loading Orders .. please wait!"), 101 | ); 102 | } 103 | }), 104 | ); 105 | } 106 | } 107 | -------------------------------------------------------------------------------- /lib/Screens/Admin/mangeProducts.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:mycontact/Models/product.dart'; 4 | import 'package:mycontact/Screens/Admin/editProduct.dart'; 5 | import 'package:mycontact/const.dart'; 6 | import 'package:mycontact/services/store.dart'; 7 | import 'package:mycontact/widgets/cusomMenu.dart'; 8 | 9 | class MangeProduct extends StatefulWidget { 10 | static String id = 'MangeProduct'; 11 | 12 | @override 13 | _MangeProductState createState() => _MangeProductState(); 14 | } 15 | 16 | class _MangeProductState extends State { 17 | final _store = Store(); 18 | @override 19 | Widget build(BuildContext context) { 20 | return Scaffold( 21 | body: StreamBuilder( 22 | stream: _store.loadProduct(), 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 | pCategory: data[KProductCategory], 33 | pDescription: data[KProductDescription], 34 | pLocation: data[KProductLocation], 35 | )); 36 | } 37 | return GridView.builder( 38 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 39 | crossAxisCount: 2, childAspectRatio: .8), 40 | itemBuilder: (context, index) => Padding( 41 | padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10), 42 | child: GestureDetector( 43 | onTapUp: (details) async { 44 | double dx = details.globalPosition.dx; 45 | double dy = details.globalPosition.dy; 46 | double dx1 = MediaQuery.of(context).size.width - dx; 47 | double dy1 = MediaQuery.of(context).size.width - dy; 48 | 49 | showMenu( 50 | context: context, 51 | position: RelativeRect.fromLTRB(dx, dy, dx1, dy1), 52 | items: [ 53 | MyPopupMenuItem( 54 | child: Text("Edit"), 55 | onClick: () { 56 | Navigator.pushNamed(context, EditProduct.id, 57 | arguments: products[index]); 58 | }, 59 | ), 60 | MyPopupMenuItem( 61 | onClick: () async { 62 | await _store.deleteProduct(products[index].pID); 63 | }, 64 | child: Text('delete'), 65 | ), 66 | ]); 67 | }, 68 | child: Stack( 69 | children: [ 70 | Positioned.fill( 71 | child: Image( 72 | fit: BoxFit.fill, 73 | image: AssetImage(products[index].pLocation), 74 | ), 75 | ), 76 | Positioned( 77 | bottom: 0, 78 | child: Opacity( 79 | opacity: 0.6, 80 | child: Container( 81 | width: MediaQuery.of(context).size.width, 82 | color: Colors.white, 83 | height: 60, 84 | child: Padding( 85 | padding: const EdgeInsets.all(8.0), 86 | child: Column( 87 | crossAxisAlignment: CrossAxisAlignment.start, 88 | children: [ 89 | Text(products[index].pName, 90 | style: TextStyle( 91 | color: kMainColor, fontSize: 15)), 92 | Text("\$ ${products[index].pPrice}", 93 | style: TextStyle( 94 | color: Colors.red, fontSize: 15)), 95 | ], 96 | ), 97 | ), 98 | ), 99 | ), 100 | ) 101 | ], 102 | ), 103 | ), 104 | ), 105 | itemCount: products.length, 106 | ); 107 | } else { 108 | return Text("Wait! .. Your have bad connection! "); 109 | } 110 | }), 111 | ); 112 | } 113 | } 114 | -------------------------------------------------------------------------------- /lib/Screens/signupScree.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:modal_progress_hud/modal_progress_hud.dart'; 4 | import 'package:mycontact/Provider/modelhud.dart'; 5 | import 'package:mycontact/Screens/loginScreen.dart'; 6 | import 'package:mycontact/Screens/users.dart/homepage.dart'; 7 | import 'package:mycontact/services/auth.dart'; 8 | import 'package:mycontact/widgets/cusomtextfield.dart'; 9 | import '../const.dart'; 10 | import '../widgets/logostack.dart'; 11 | import 'package:provider/provider.dart'; 12 | 13 | class Signup extends StatelessWidget { 14 | final GlobalKey _globalKey = GlobalKey(); 15 | static String id = 'signup'; 16 | String _email, _password; 17 | final _auth = Auth(); 18 | @override 19 | Widget build(BuildContext context) { 20 | double height = MediaQuery.of(context).size.height * .01; 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 | Padding( 30 | padding: EdgeInsets.only(top: 3), 31 | child: Container( 32 | height: MediaQuery.of(context).size.height * .3, 33 | child: Logostack(), 34 | ), 35 | ), 36 | SizedBox( 37 | height: height * .01, 38 | ), 39 | Padding( 40 | padding: const EdgeInsets.symmetric(horizontal: 20), 41 | child: CustomTextField( 42 | // onClick: () {}, 43 | hint: 'Enter Name!', 44 | icon: Icons.person_outline, 45 | ), 46 | ), 47 | SizedBox( 48 | height: height * 3, 49 | ), 50 | Padding( 51 | padding: const EdgeInsets.symmetric(horizontal: 20), 52 | child: CustomTextField( 53 | onClick: (value) { 54 | _email = value; 55 | }, 56 | hint: 'Enter Email!', 57 | icon: Icons.email, 58 | ), 59 | ), 60 | SizedBox( 61 | height: height * 3, 62 | ), 63 | Padding( 64 | padding: const EdgeInsets.symmetric(horizontal: 20), 65 | child: Container( 66 | padding: EdgeInsets.all(1), 67 | child: CustomTextField( 68 | onClick: (value) { 69 | _password = value; 70 | }, 71 | hint: 'Enter Password!', 72 | icon: Icons.lock, 73 | )), 74 | ), 75 | SizedBox( 76 | height: height, 77 | ), 78 | Padding( 79 | padding: const EdgeInsets.symmetric(horizontal: 140), 80 | child: Builder( 81 | builder: (context) => RaisedButton( 82 | padding: EdgeInsets.all(1), 83 | onPressed: () async { 84 | final modelhud = 85 | Provider.of(context, listen: false); 86 | modelhud.changeisLoading(true); 87 | if (_globalKey.currentState.validate()) { 88 | _globalKey.currentState.save(); 89 | try { 90 | final authResult = await _auth.signUp( 91 | _email.trim(), _password.trim()); 92 | modelhud.changeisLoading(false); 93 | Navigator.pushNamed(context, HomePage.id); 94 | } catch (e) { 95 | modelhud.changeisLoading(false); 96 | Scaffold.of(context).showSnackBar(SnackBar( 97 | backgroundColor: kTextboxColor, 98 | content: Text(e.message))); 99 | } 100 | modelhud.changeisLoading(false); 101 | 102 | //do Something 103 | } 104 | }, 105 | color: Colors.black, 106 | child: Text( 107 | 'Register', 108 | style: TextStyle(color: Colors.orange, fontSize: 20), 109 | ), 110 | ), 111 | ), 112 | ), 113 | SizedBox( 114 | height: height * .01, 115 | ), 116 | Padding( 117 | padding: const EdgeInsets.all(100), 118 | child: Row( 119 | mainAxisAlignment: MainAxisAlignment.center, 120 | children: [ 121 | Text( 122 | 'Do have an account ?', 123 | style: TextStyle(color: Colors.white, fontSize: 15), 124 | ), 125 | GestureDetector( 126 | onTap: () { 127 | Navigator.pushNamed(context, LoginScreen.id); 128 | }, 129 | child: Text( 130 | 'Login', 131 | style: TextStyle(color: Colors.black, fontSize: 15), 132 | ), 133 | ), 134 | ], 135 | ), 136 | ), 137 | SizedBox( 138 | height: height * .01, 139 | ), 140 | ], 141 | ), 142 | ), 143 | ), 144 | ); 145 | } 146 | } 147 | -------------------------------------------------------------------------------- /lib/Screens/users.dart/productinfo.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:mycontact/Models/product.dart'; 3 | import 'package:mycontact/Provider/cartItems.dart'; 4 | import 'package:mycontact/Screens/users.dart/cartScreen.dart'; 5 | import 'package:mycontact/const.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: const EdgeInsets.all(0.0001), 32 | child: Material( 33 | color: kMainColor, 34 | child: Padding( 35 | padding: const EdgeInsets.fromLTRB(20, 20, 20, 0), 36 | child: Container( 37 | color: kMainColor, 38 | height: MediaQuery.of(context).size.height * .1, 39 | child: Row( 40 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 41 | children: [ 42 | GestureDetector( 43 | onTap: () { 44 | Navigator.pop(context); 45 | }, 46 | child: Icon(Icons.arrow_back_ios)), 47 | GestureDetector( 48 | onTap: () { 49 | Navigator.pushNamed(context, CartScreen.id); 50 | }, 51 | child: Icon(Icons.shopping_cart)), 52 | ], 53 | ), 54 | ), 55 | ), 56 | ), 57 | ), 58 | Positioned( 59 | bottom: 0, 60 | child: Column( 61 | children: [ 62 | Opacity( 63 | opacity: .5, 64 | child: Container( 65 | color: Colors.white, 66 | height: MediaQuery.of(context).size.height * .3, 67 | width: MediaQuery.of(context).size.width, 68 | child: Padding( 69 | padding: const EdgeInsets.all(20), 70 | child: Column( 71 | crossAxisAlignment: CrossAxisAlignment.start, 72 | children: [ 73 | Text( 74 | product.pName, 75 | style: TextStyle( 76 | fontSize: 30, fontWeight: FontWeight.bold), 77 | ), 78 | SizedBox( 79 | height: 10, 80 | ), 81 | Text( 82 | product.pDescription, 83 | style: TextStyle( 84 | fontSize: 30, fontWeight: FontWeight.bold), 85 | ), 86 | SizedBox( 87 | height: 15, 88 | ), 89 | Text( 90 | product.pPrice, 91 | style: TextStyle( 92 | fontSize: 40, 93 | fontWeight: FontWeight.w900, 94 | color: Colors.red), 95 | ), 96 | SizedBox( 97 | height: 10, 98 | ), 99 | Row( 100 | mainAxisAlignment: MainAxisAlignment.center, 101 | children: [ 102 | Padding( 103 | padding: const EdgeInsets.all(8.0), 104 | child: ClipOval( 105 | child: Material( 106 | color: kMainColor, 107 | child: GestureDetector( 108 | onTap: add, 109 | child: SizedBox( 110 | height: 25, 111 | width: 25, 112 | child: Icon(Icons.add), 113 | ), 114 | ), 115 | ), 116 | ), 117 | ), 118 | Text( 119 | _quantity.toString(), 120 | style: TextStyle(fontSize: 50), 121 | ), 122 | Padding( 123 | padding: const EdgeInsets.all(8.0), 124 | child: ClipOval( 125 | child: Material( 126 | color: kMainColor, 127 | child: GestureDetector( 128 | onTap: subtract, 129 | child: SizedBox( 130 | height: 25, 131 | width: 25, 132 | child: Icon(Icons.remove), 133 | ), 134 | ), 135 | ), 136 | ), 137 | ), 138 | ], 139 | ), 140 | ], 141 | ), 142 | ), 143 | ), 144 | ), 145 | ButtonTheme( 146 | shape: RoundedRectangleBorder( 147 | borderRadius: BorderRadius.only( 148 | topLeft: Radius.circular(20), 149 | topRight: Radius.circular(20))), 150 | minWidth: MediaQuery.of(context).size.width, 151 | height: MediaQuery.of(context).size.height * 0.1, 152 | child: Builder( 153 | builder: (context) => RaisedButton( 154 | onPressed: () { 155 | addTocart(context, product); 156 | }, 157 | child: Text( 158 | 'Add To Cart'.toUpperCase(), 159 | style: TextStyle( 160 | color: Colors.black, 161 | fontSize: 20, 162 | fontWeight: FontWeight.bold), 163 | ), 164 | color: kMainColor, 165 | ), 166 | ), 167 | ), 168 | ], 169 | ), 170 | ), 171 | ], 172 | )); 173 | } 174 | 175 | subtract() { 176 | if (_quantity > 1) { 177 | setState(() { 178 | _quantity--; 179 | }); 180 | } 181 | } 182 | 183 | add() { 184 | setState(() { 185 | _quantity++; 186 | }); 187 | } 188 | 189 | void addTocart(context, product) { 190 | CartItem cartitem = Provider.of(context, listen: false); 191 | product.pQuantity = _quantity; 192 | bool exist = false; 193 | var productsInCart = cartitem.products; 194 | for (var productsInCart in productsInCart) { 195 | if (productsInCart.pName == product.pName) { 196 | exist = true; 197 | } 198 | } 199 | if (exist) { 200 | cartitem.addproduct(product); 201 | Scaffold.of(context) 202 | .showSnackBar(SnackBar(content: Text('This item added Before!'))); 203 | } else { 204 | cartitem.addproduct(product); 205 | Scaffold.of(context) 206 | .showSnackBar(SnackBar(content: Text('Added To Cart'))); 207 | } 208 | } 209 | } 210 | -------------------------------------------------------------------------------- /lib/Screens/users.dart/cartScreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:mycontact/Models/product.dart'; 3 | import 'package:mycontact/Provider/cartItems.dart'; 4 | import 'package:mycontact/Screens/users.dart/productinfo.dart'; 5 | import 'package:mycontact/const.dart'; 6 | import 'package:mycontact/services/store.dart'; 7 | import 'package:mycontact/widgets/cusomMenu.dart'; 8 | import 'package:provider/provider.dart'; 9 | 10 | class CartScreen extends StatelessWidget { 11 | static String id = 'CartScreen'; 12 | @override 13 | Widget build(BuildContext context) { 14 | List products = Provider.of(context).products; 15 | final double screenHeight = MediaQuery.of(context).size.height; 16 | final double screenwidth = MediaQuery.of(context).size.height; 17 | final double appBarHeight = AppBar().preferredSize.height; 18 | final double statusbarHeight = MediaQuery.of(context).padding.top; 19 | return Scaffold( 20 | resizeToAvoidBottomPadding: false, 21 | appBar: AppBar( 22 | leading: Icon(Icons.arrow_back), 23 | title: Text( 24 | 'My Cart', 25 | style: TextStyle(fontSize: 20), 26 | ), 27 | backgroundColor: kMainColor, 28 | ), 29 | body: Column( 30 | children: [ 31 | LayoutBuilder(builder: (context, constraints) { 32 | if (products.isNotEmpty) { 33 | return Container( 34 | height: screenHeight - 35 | statusbarHeight - 36 | appBarHeight - 37 | (screenHeight * .08), 38 | child: ListView.builder( 39 | itemBuilder: (context, index) { 40 | return Padding( 41 | padding: const EdgeInsets.all(15), 42 | child: GestureDetector( 43 | onTapUp: (details) { 44 | showCustomMenu(details, context, products[index]); 45 | }, 46 | child: Container( 47 | height: screenHeight * .15, 48 | color: kTextboxColor, 49 | child: Row( 50 | children: [ 51 | CircleAvatar( 52 | backgroundImage: 53 | AssetImage(products[index].pLocation), 54 | radius: screenHeight * .15 / 2, 55 | ), 56 | Expanded( 57 | child: Row( 58 | mainAxisAlignment: 59 | MainAxisAlignment.spaceBetween, 60 | children: [ 61 | Padding( 62 | padding: const EdgeInsets.only(left: 10), 63 | child: Column( 64 | children: [ 65 | Text( 66 | products[index].pName, 67 | style: TextStyle( 68 | fontSize: 20, 69 | fontWeight: FontWeight.bold), 70 | ), 71 | SizedBox( 72 | height: 10, 73 | ), 74 | Text( 75 | '\$ ${products[index].pPrice}', 76 | style: TextStyle( 77 | fontSize: 20, 78 | fontWeight: FontWeight.bold), 79 | ), 80 | ], 81 | ), 82 | ), 83 | Padding( 84 | padding: const EdgeInsets.only(right: 20), 85 | child: Text( 86 | products[index].pQuantity.toString(), 87 | style: TextStyle( 88 | fontSize: 20, 89 | fontWeight: FontWeight.bold), 90 | ), 91 | ), 92 | ], 93 | ), 94 | ) 95 | ], 96 | ), 97 | ), 98 | ), 99 | ); 100 | }, 101 | itemCount: products.length, 102 | ), 103 | ); 104 | } else { 105 | return Container( 106 | height: screenHeight - 107 | (screenHeight * .08) - 108 | statusbarHeight - 109 | appBarHeight, 110 | child: Center( 111 | child: Text("Cart Is Empty".toUpperCase()), 112 | ), 113 | ); 114 | } 115 | }), 116 | Builder( 117 | builder: (context) => ButtonTheme( 118 | minWidth: screenwidth * .5, 119 | shape: RoundedRectangleBorder( 120 | borderRadius: BorderRadius.only( 121 | topRight: Radius.circular(20), 122 | topLeft: Radius.circular(20))), 123 | child: RaisedButton( 124 | onPressed: () { 125 | showCastomDialog(products, context); 126 | }, 127 | child: Text('Order'.toUpperCase()), 128 | color: kMainColor, 129 | ), 130 | ), 131 | ) 132 | ], 133 | ), 134 | ); 135 | } 136 | 137 | void showCustomMenu(details, context, product) async { 138 | { 139 | double dx = details.globalPosition.dx; 140 | double dy = details.globalPosition.dy; 141 | double dx1 = MediaQuery.of(context).size.width - dx; 142 | double dy1 = MediaQuery.of(context).size.width - dy; 143 | 144 | showMenu( 145 | context: context, 146 | position: RelativeRect.fromLTRB(dx, dy, dx1, dy1), 147 | items: [ 148 | MyPopupMenuItem( 149 | child: Text("Edit"), 150 | onClick: () { 151 | Navigator.pop(context); 152 | Provider.of(context, listen: false) 153 | .deleteProduct(product); 154 | Navigator.pushNamed(context, ProductInfo.id, 155 | arguments: product); 156 | }, 157 | ), 158 | MyPopupMenuItem( 159 | onClick: () async { 160 | Navigator.pop(context); 161 | Provider.of(context, listen: false) 162 | .deleteProduct(product); 163 | }, 164 | child: Text('delete'), 165 | ), 166 | ]); 167 | } 168 | } 169 | 170 | void showCastomDialog(List products, context) async { 171 | var price = getTotalPrice(products); 172 | var address; 173 | AlertDialog alertDialog = AlertDialog( 174 | actions: [ 175 | MaterialButton( 176 | onPressed: () { 177 | try { 178 | Store _store = Store(); 179 | _store.storeOrders( 180 | {kTotalPrice: price, kAddress: address}, products); 181 | Scaffold.of(context).showSnackBar( 182 | SnackBar(content: Text("Order Successfully added"))); 183 | Navigator.pop(context); 184 | } catch (e) { 185 | Scaffold.of(context).showSnackBar(SnackBar( 186 | content: Text("Theres Error please reorder Correctly!! $e"))); 187 | Navigator.pop(context); 188 | } 189 | }, 190 | child: Text('Order now'), 191 | ) 192 | ], 193 | content: TextField( 194 | onChanged: (value) { 195 | address = value; 196 | }, 197 | decoration: InputDecoration(hintText: "Write your Address!"), 198 | ), 199 | title: Text("Total Price = $price"), 200 | ); 201 | await showDialog( 202 | context: context, 203 | builder: (context) { 204 | return alertDialog; 205 | }); 206 | } 207 | 208 | getTotalPrice(List products) { 209 | var price = 0; 210 | for (var product in products) { 211 | price += product.pQuantity * int.parse(product.pPrice); 212 | } 213 | return price; 214 | } 215 | } 216 | -------------------------------------------------------------------------------- /lib/Screens/loginScreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:modal_progress_hud/modal_progress_hud.dart'; 4 | import 'package:mycontact/Provider/adminmode.dart'; 5 | import 'package:mycontact/Provider/modelhud.dart'; 6 | import 'package:mycontact/Screens/users.dart/homepage.dart'; 7 | import 'package:mycontact/services/auth.dart'; 8 | import 'package:mycontact/widgets/logostack.dart'; 9 | import 'package:mycontact/Screens/signupScree.dart'; 10 | import 'package:mycontact/const.dart'; 11 | import 'package:mycontact/widgets/cusomtextfield.dart'; 12 | import 'package:provider/provider.dart'; 13 | import 'package:shared_preferences/shared_preferences.dart'; 14 | import 'Admin/AdminHome/adminhome.dart'; 15 | 16 | class LoginScreen extends StatefulWidget { 17 | static String id = 'LoginScreen'; 18 | 19 | @override 20 | _LoginScreenState createState() => _LoginScreenState(); 21 | } 22 | 23 | class _LoginScreenState extends State { 24 | GlobalKey _globalKey = GlobalKey(); 25 | bool isAdmin = false; 26 | String _email, _password; 27 | final _auth = Auth(); 28 | final adminPassword = 'admin12345'; 29 | bool keepMeLoggedin = false; 30 | @override 31 | Widget build(BuildContext context) { 32 | double height = MediaQuery.of(context).size.height; 33 | return Scaffold( 34 | backgroundColor: kMainColor, 35 | body: ModalProgressHUD( 36 | inAsyncCall: Provider.of(context).isLoading, 37 | child: Form( 38 | key: _globalKey, 39 | child: ListView( 40 | children: [ 41 | Padding( 42 | padding: EdgeInsets.only(top: 1), 43 | child: Container( 44 | height: MediaQuery.of(context).size.height * .3, 45 | child: Logostack()), 46 | ), 47 | SizedBox( 48 | height: height * .01, 49 | ), 50 | Padding( 51 | padding: const EdgeInsets.symmetric(horizontal: 25), 52 | child: CustomTextField( 53 | hint: 'Enter Email!', 54 | icon: Icons.email, 55 | onClick: (value) { 56 | _email = value; 57 | }, 58 | ), 59 | ), 60 | Padding( 61 | padding: const EdgeInsets.only(left: 20), 62 | child: Row( 63 | children: [ 64 | Theme( 65 | data: ThemeData(unselectedWidgetColor: Colors.white), 66 | child: Checkbox( 67 | checkColor: kTextboxColor, 68 | activeColor: kMainColor, 69 | value: keepMeLoggedin, 70 | onChanged: (value) { 71 | setState(() { 72 | keepMeLoggedin = value; 73 | }); 74 | }), 75 | ), 76 | Text( 77 | "Remember Me", 78 | style: TextStyle(color: Colors.white), 79 | ) 80 | ], 81 | ), 82 | ), 83 | Padding( 84 | padding: const EdgeInsets.symmetric(horizontal: 25), 85 | child: Container( 86 | padding: EdgeInsets.all(1), 87 | child: CustomTextField( 88 | onClick: (value) { 89 | _password = value; 90 | }, 91 | hint: 'Enter Password!', 92 | icon: Icons.lock, 93 | )), 94 | ), 95 | SizedBox( 96 | height: height * .01, 97 | ), 98 | Padding( 99 | padding: const EdgeInsets.symmetric(horizontal: 140), 100 | child: Builder( 101 | builder: (context) => RaisedButton( 102 | padding: EdgeInsets.all(1), 103 | onPressed: () async { 104 | if (keepMeLoggedin == true) { 105 | keepUserLoggedIn(); 106 | } 107 | _validate(context); 108 | }, 109 | color: Colors.black, 110 | child: Text( 111 | 'Login', 112 | style: TextStyle(color: Colors.orange, fontSize: 20), 113 | ), 114 | ), 115 | ), 116 | ), 117 | SizedBox( 118 | height: height * .01, 119 | ), 120 | Padding( 121 | padding: const EdgeInsets.all(100), 122 | child: Row( 123 | mainAxisAlignment: MainAxisAlignment.center, 124 | children: [ 125 | Text( 126 | 'Don\'t have an account ?', 127 | style: TextStyle(color: Colors.white, fontSize: 15), 128 | ), 129 | GestureDetector( 130 | onTap: () { 131 | Navigator.pushNamed(context, Signup.id); 132 | }, 133 | child: Text( 134 | 'Register', 135 | style: TextStyle(color: Colors.black, fontSize: 15), 136 | ), 137 | ), 138 | ], 139 | ), 140 | ), 141 | SizedBox( 142 | height: height * .01, 143 | ), 144 | Padding( 145 | padding: 146 | const EdgeInsets.symmetric(horizontal: 30, vertical: 10), 147 | child: Row( 148 | children: [ 149 | Expanded( 150 | child: GestureDetector( 151 | onTap: () { 152 | Provider.of(context, listen: false) 153 | .changeIsAdmin(true); 154 | }, 155 | child: Text( 156 | 'i\'m admin', 157 | textAlign: TextAlign.center, 158 | style: TextStyle( 159 | color: Provider.of(context).isAdmin 160 | ? kMainColor 161 | : Colors.white), 162 | ), 163 | ), 164 | ), 165 | Expanded( 166 | child: GestureDetector( 167 | onTap: () { 168 | Provider.of(context, listen: false) 169 | .changeIsAdmin(false); 170 | }, 171 | child: Text( 172 | 'i\'m user', 173 | textAlign: TextAlign.center, 174 | style: TextStyle( 175 | color: Provider.of(context).isAdmin 176 | ? Colors.white 177 | : kMainColor), 178 | ), 179 | )), 180 | ], 181 | ), 182 | ) 183 | ], 184 | ), 185 | ), 186 | )); 187 | } 188 | 189 | void _validate(BuildContext context) async { 190 | final modelhud = Provider.of(context, listen: false); 191 | modelhud.changeisLoading(true); 192 | if (_globalKey.currentState.validate()) { 193 | _globalKey.currentState.save(); 194 | if (Provider.of(context, listen: false).isAdmin) { 195 | if (_password == adminPassword) { 196 | try { 197 | _auth.signIn(_email, _password); 198 | Navigator.pushNamed(context, AdminHome.id); 199 | } catch (e) { 200 | modelhud.changeisLoading(false); 201 | Scaffold.of(context).showSnackBar(SnackBar( 202 | content: Text(e.message), 203 | )); 204 | } 205 | } else { 206 | modelhud.changeisLoading(false); 207 | Scaffold.of(context).showSnackBar(SnackBar( 208 | content: Text("Something went wrong"), 209 | )); 210 | } 211 | } else { 212 | try { 213 | await _auth.signIn(_email.trim(), _password.trim()); 214 | Navigator.pushNamed(context, HomePage.id); 215 | } catch (e) { 216 | Scaffold.of(context).showSnackBar(SnackBar( 217 | content: Text(e.message), 218 | )); 219 | } 220 | } 221 | } 222 | modelhud.changeisLoading(false); 223 | } 224 | 225 | void keepUserLoggedIn() async { 226 | SharedPreferences preferences = await SharedPreferences.getInstance(); 227 | preferences.setBool(kkeepmeLoggerIn, keepMeLoggedin); 228 | } 229 | } 230 | -------------------------------------------------------------------------------- /lib/TestFiles/testHomeage.dart: -------------------------------------------------------------------------------- 1 | // import 'package:cloud_firestore/cloud_firestore.dart'; 2 | // import 'package:flutter/material.dart'; 3 | // import 'package:mycontact/Models/product.dart'; 4 | // import 'package:mycontact/const.dart'; 5 | // import 'package:mycontact/services/auth.dart'; 6 | // import 'package:mycontact/services/store.dart'; 7 | // import 'package:mycontact/widgets/productView.dart'; 8 | 9 | // import '../functions.dart'; 10 | 11 | // class HomePage extends StatefulWidget { 12 | // static String id = 'HomePage'; 13 | 14 | // @override 15 | // _HomePageState createState() => _HomePageState(); 16 | // } 17 | 18 | // class _HomePageState extends State { 19 | // final _auth = Auth(); 20 | // final _store = Store(); 21 | // int _tabBarIndex = 0; 22 | // int _bottomBarIndex = 0; 23 | // List _products; 24 | // @override 25 | // Widget build(BuildContext context) { 26 | // return Stack( 27 | // children: [ 28 | // DefaultTabController( 29 | // length: 4, 30 | // child: Scaffold( 31 | // bottomNavigationBar: BottomNavigationBar( 32 | // currentIndex: _bottomBarIndex, 33 | // fixedColor: kTextboxColor, 34 | // unselectedItemColor: kMainColor, 35 | // onTap: (value) { 36 | // setState(() { 37 | // _bottomBarIndex = value; 38 | // }); 39 | // }, 40 | // items: [ 41 | // BottomNavigationBarItem( 42 | // title: Text('data'), icon: Icon(Icons.person)), 43 | // BottomNavigationBarItem( 44 | // title: Text('data'), icon: Icon(Icons.person)), 45 | // BottomNavigationBarItem( 46 | // title: Text('data'), icon: Icon(Icons.person)), 47 | // BottomNavigationBarItem( 48 | // title: Text('data'), icon: Icon(Icons.person)), 49 | // ]), 50 | // appBar: AppBar( 51 | // backgroundColor: kMainColor, 52 | // elevation: 0, 53 | // bottom: TabBar( 54 | // indicatorColor: kTextboxColor, 55 | // onTap: (value) { 56 | // setState(() { 57 | // _tabBarIndex = value; 58 | // }); 59 | // }, 60 | // tabs: [ 61 | // Padding( 62 | // padding: const EdgeInsets.all(1), 63 | // child: Text( 64 | // 'ٍStudents Tools', 65 | // style: TextStyle( 66 | // color: 67 | // _tabBarIndex == 0 ? Colors.black : kUnActiveColor, 68 | // fontSize: (_tabBarIndex == 0 ? 16 : null), 69 | // ), 70 | // ), 71 | // ), 72 | // Text( 73 | // 'Students Activity', 74 | // style: TextStyle( 75 | // color: _tabBarIndex == 1 ? Colors.black : kUnActiveColor, 76 | // fontSize: _tabBarIndex == 1 ? 14 : null, 77 | // ), 78 | // ), 79 | // Text( 80 | // 'Plays', 81 | // style: TextStyle( 82 | // color: _tabBarIndex == 2 ? Colors.black : kUnActiveColor, 83 | // fontSize: _tabBarIndex == 2 ? 16 : null, 84 | // ), 85 | // ), 86 | // Text( 87 | // 'Another Services', 88 | // style: TextStyle( 89 | // color: _tabBarIndex == 3 ? Colors.black : kUnActiveColor, 90 | // fontSize: _tabBarIndex == 3 ? 16 : null, 91 | // ), 92 | // ), 93 | // ], 94 | // ), 95 | // ), 96 | // body: TabBarView(children: [ 97 | // studentsToolsMethod(), 98 | // studentsActivityMethod(), 99 | // ProductsMethod(kProductCategoryStudentsPlays, _products), 100 | // ProductsMethod(kProductCategoryServices, _products), 101 | // ]), 102 | // ), 103 | // ), 104 | // Material( 105 | // color: kMainColor, 106 | // child: Padding( 107 | // padding: const EdgeInsets.fromLTRB(20, 20, 20, 0), 108 | // child: Container( 109 | // color: kMainColor, 110 | // height: MediaQuery.of(context).size.height * .1, 111 | // child: Row( 112 | // mainAxisAlignment: MainAxisAlignment.spaceBetween, 113 | // children: [ 114 | // Text( 115 | // 'Discover'.toUpperCase(), 116 | // style: TextStyle( 117 | // fontSize: 20, 118 | // fontWeight: FontWeight.bold, 119 | // ), 120 | // ), 121 | // Icon(Icons.shopping_cart), 122 | // ], 123 | // ), 124 | // ), 125 | // ), 126 | // ), 127 | // ], 128 | // ); 129 | // } 130 | 131 | // Widget studentsToolsMethod() { 132 | // return StreamBuilder( 133 | // stream: _store.loadProduct(), 134 | // builder: (context, snapshot) { 135 | // if (snapshot.hasData) { 136 | // List products = []; 137 | // for (var doc in snapshot.data.documents) { 138 | // var data = doc.data; 139 | 140 | // products.add(Product( 141 | // pID: doc.documentID, 142 | // pPrice: data[KProductPrice], 143 | // pName: data[KProductName], 144 | // pDescription: data[KProductDescription], 145 | // pLocation: data[KProductLocation], 146 | // pCategory: data[KProductDescription])); 147 | // } 148 | // _products = [...products]; 149 | // products.clear(); 150 | // products = 151 | // getProductCategory(kProductCategoryStudentsTools, _products); 152 | // return GridView.builder( 153 | // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 154 | // crossAxisCount: 2, childAspectRatio: .8), 155 | // itemBuilder: (context, index) => Padding( 156 | // padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10), 157 | // child: GestureDetector( 158 | // child: Stack( 159 | // children: [ 160 | // Positioned.fill( 161 | // child: Image( 162 | // fit: BoxFit.fill, 163 | // image: AssetImage(products[index].pLocation), 164 | // ), 165 | // ), 166 | // Positioned( 167 | // bottom: 0, 168 | // child: Opacity( 169 | // opacity: 0.6, 170 | // child: Container( 171 | // width: MediaQuery.of(context).size.width, 172 | // color: Colors.white, 173 | // height: 60, 174 | // child: Padding( 175 | // padding: const EdgeInsets.all(8.0), 176 | // child: Column( 177 | // crossAxisAlignment: CrossAxisAlignment.start, 178 | // children: [ 179 | // Text(products[index].pName, 180 | // style: TextStyle( 181 | // color: kMainColor, fontSize: 15)), 182 | // Text("\$ ${products[index].pPrice}", 183 | // style: TextStyle( 184 | // color: Colors.red, fontSize: 15)), 185 | // ], 186 | // ), 187 | // ), 188 | // ), 189 | // ), 190 | // ) 191 | // ], 192 | // ), 193 | // ), 194 | // ), 195 | // itemCount: products.length, 196 | // ); 197 | // } else { 198 | // return Text("Wait! .. Your have bad connection! "); 199 | // } 200 | // }); 201 | // } 202 | 203 | // Widget studentsActivityMethod() { 204 | // List products; 205 | // products = getProductCategory(kProductCategoryStudentsActivity, products); 206 | // return GridView.builder( 207 | // gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 208 | // crossAxisCount: 2, childAspectRatio: .8), 209 | // itemBuilder: (context, index) => Padding( 210 | // padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10), 211 | // child: GestureDetector( 212 | // child: Stack( 213 | // children: [ 214 | // Positioned.fill( 215 | // child: Image( 216 | // fit: BoxFit.fill, 217 | // image: AssetImage(products[index].pLocation), 218 | // ), 219 | // ), 220 | // Positioned( 221 | // bottom: 0, 222 | // child: Opacity( 223 | // opacity: 0.6, 224 | // child: Container( 225 | // width: MediaQuery.of(context).size.width, 226 | // color: Colors.white, 227 | // height: 60, 228 | // child: Padding( 229 | // padding: const EdgeInsets.all(8.0), 230 | // child: Column( 231 | // crossAxisAlignment: CrossAxisAlignment.start, 232 | // children: [ 233 | // Text(products[index].pName, 234 | // style: 235 | // TextStyle(color: kMainColor, fontSize: 15)), 236 | // Text("\$ ${products[index].pPrice}", 237 | // style: 238 | // TextStyle(color: Colors.red, fontSize: 15)), 239 | // ], 240 | // ), 241 | // ), 242 | // ), 243 | // ), 244 | // ) 245 | // ], 246 | // ), 247 | // ), 248 | // ), 249 | // itemCount: products.length, 250 | // ); 251 | // } 252 | // } 253 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | async: 5 | dependency: transitive 6 | description: 7 | name: async 8 | url: "https://pub.dartlang.org" 9 | source: hosted 10 | version: "2.4.2" 11 | boolean_selector: 12 | dependency: transitive 13 | description: 14 | name: boolean_selector 15 | url: "https://pub.dartlang.org" 16 | source: hosted 17 | version: "2.0.0" 18 | characters: 19 | dependency: transitive 20 | description: 21 | name: characters 22 | url: "https://pub.dartlang.org" 23 | source: hosted 24 | version: "1.0.0" 25 | charcode: 26 | dependency: transitive 27 | description: 28 | name: charcode 29 | url: "https://pub.dartlang.org" 30 | source: hosted 31 | version: "1.1.3" 32 | clock: 33 | dependency: transitive 34 | description: 35 | name: clock 36 | url: "https://pub.dartlang.org" 37 | source: hosted 38 | version: "1.0.1" 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.7" 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.2" 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.13" 67 | cupertino_icons: 68 | dependency: "direct main" 69 | description: 70 | name: cupertino_icons 71 | url: "https://pub.dartlang.org" 72 | source: hosted 73 | version: "0.1.3" 74 | fake_async: 75 | dependency: transitive 76 | description: 77 | name: fake_async 78 | url: "https://pub.dartlang.org" 79 | source: hosted 80 | version: "1.1.0" 81 | ffi: 82 | dependency: transitive 83 | description: 84 | name: ffi 85 | url: "https://pub.dartlang.org" 86 | source: hosted 87 | version: "0.1.3" 88 | file: 89 | dependency: transitive 90 | description: 91 | name: file 92 | url: "https://pub.dartlang.org" 93 | source: hosted 94 | version: "5.2.1" 95 | firebase: 96 | dependency: transitive 97 | description: 98 | name: firebase 99 | url: "https://pub.dartlang.org" 100 | source: hosted 101 | version: "7.3.0" 102 | firebase_auth: 103 | dependency: "direct main" 104 | description: 105 | name: firebase_auth 106 | url: "https://pub.dartlang.org" 107 | source: hosted 108 | version: "0.16.1" 109 | firebase_auth_platform_interface: 110 | dependency: transitive 111 | description: 112 | name: firebase_auth_platform_interface 113 | url: "https://pub.dartlang.org" 114 | source: hosted 115 | version: "1.1.8" 116 | firebase_auth_web: 117 | dependency: transitive 118 | description: 119 | name: firebase_auth_web 120 | url: "https://pub.dartlang.org" 121 | source: hosted 122 | version: "0.1.3+1" 123 | firebase_core: 124 | dependency: transitive 125 | description: 126 | name: firebase_core 127 | url: "https://pub.dartlang.org" 128 | source: hosted 129 | version: "0.4.5" 130 | firebase_core_platform_interface: 131 | dependency: transitive 132 | description: 133 | name: firebase_core_platform_interface 134 | url: "https://pub.dartlang.org" 135 | source: hosted 136 | version: "1.0.4" 137 | firebase_core_web: 138 | dependency: transitive 139 | description: 140 | name: firebase_core_web 141 | url: "https://pub.dartlang.org" 142 | source: hosted 143 | version: "0.1.1+2" 144 | firebase_storage: 145 | dependency: "direct main" 146 | description: 147 | name: firebase_storage 148 | url: "https://pub.dartlang.org" 149 | source: hosted 150 | version: "3.1.6" 151 | flutter: 152 | dependency: "direct main" 153 | description: flutter 154 | source: sdk 155 | version: "0.0.0" 156 | flutter_plugin_android_lifecycle: 157 | dependency: transitive 158 | description: 159 | name: flutter_plugin_android_lifecycle 160 | url: "https://pub.dartlang.org" 161 | source: hosted 162 | version: "1.0.9" 163 | flutter_test: 164 | dependency: "direct dev" 165 | description: flutter 166 | source: sdk 167 | version: "0.0.0" 168 | flutter_web_plugins: 169 | dependency: transitive 170 | description: flutter 171 | source: sdk 172 | version: "0.0.0" 173 | http: 174 | dependency: transitive 175 | description: 176 | name: http 177 | url: "https://pub.dartlang.org" 178 | source: hosted 179 | version: "0.12.2" 180 | http_parser: 181 | dependency: transitive 182 | description: 183 | name: http_parser 184 | url: "https://pub.dartlang.org" 185 | source: hosted 186 | version: "3.1.4" 187 | image_picker: 188 | dependency: "direct main" 189 | description: 190 | name: image_picker 191 | url: "https://pub.dartlang.org" 192 | source: hosted 193 | version: "0.6.7+10" 194 | image_picker_platform_interface: 195 | dependency: transitive 196 | description: 197 | name: image_picker_platform_interface 198 | url: "https://pub.dartlang.org" 199 | source: hosted 200 | version: "1.1.1" 201 | intl: 202 | dependency: transitive 203 | description: 204 | name: intl 205 | url: "https://pub.dartlang.org" 206 | source: hosted 207 | version: "0.16.1" 208 | js: 209 | dependency: transitive 210 | description: 211 | name: js 212 | url: "https://pub.dartlang.org" 213 | source: hosted 214 | version: "0.6.2" 215 | matcher: 216 | dependency: transitive 217 | description: 218 | name: matcher 219 | url: "https://pub.dartlang.org" 220 | source: hosted 221 | version: "0.12.8" 222 | meta: 223 | dependency: transitive 224 | description: 225 | name: meta 226 | url: "https://pub.dartlang.org" 227 | source: hosted 228 | version: "1.1.8" 229 | modal_progress_hud: 230 | dependency: "direct main" 231 | description: 232 | name: modal_progress_hud 233 | url: "https://pub.dartlang.org" 234 | source: hosted 235 | version: "0.1.3" 236 | nested: 237 | dependency: transitive 238 | description: 239 | name: nested 240 | url: "https://pub.dartlang.org" 241 | source: hosted 242 | version: "0.0.4" 243 | path: 244 | dependency: "direct main" 245 | description: 246 | name: path 247 | url: "https://pub.dartlang.org" 248 | source: hosted 249 | version: "1.7.0" 250 | path_provider_linux: 251 | dependency: transitive 252 | description: 253 | name: path_provider_linux 254 | url: "https://pub.dartlang.org" 255 | source: hosted 256 | version: "0.0.1+2" 257 | path_provider_platform_interface: 258 | dependency: transitive 259 | description: 260 | name: path_provider_platform_interface 261 | url: "https://pub.dartlang.org" 262 | source: hosted 263 | version: "1.0.3" 264 | path_provider_windows: 265 | dependency: transitive 266 | description: 267 | name: path_provider_windows 268 | url: "https://pub.dartlang.org" 269 | source: hosted 270 | version: "0.0.4+1" 271 | pedantic: 272 | dependency: transitive 273 | description: 274 | name: pedantic 275 | url: "https://pub.dartlang.org" 276 | source: hosted 277 | version: "1.9.0" 278 | platform: 279 | dependency: transitive 280 | description: 281 | name: platform 282 | url: "https://pub.dartlang.org" 283 | source: hosted 284 | version: "2.2.1" 285 | plugin_platform_interface: 286 | dependency: transitive 287 | description: 288 | name: plugin_platform_interface 289 | url: "https://pub.dartlang.org" 290 | source: hosted 291 | version: "1.0.2" 292 | process: 293 | dependency: transitive 294 | description: 295 | name: process 296 | url: "https://pub.dartlang.org" 297 | source: hosted 298 | version: "3.0.13" 299 | provider: 300 | dependency: "direct main" 301 | description: 302 | name: provider 303 | url: "https://pub.dartlang.org" 304 | source: hosted 305 | version: "4.3.2+2" 306 | quiver: 307 | dependency: transitive 308 | description: 309 | name: quiver 310 | url: "https://pub.dartlang.org" 311 | source: hosted 312 | version: "2.1.3" 313 | shared_preferences: 314 | dependency: "direct main" 315 | description: 316 | name: shared_preferences 317 | url: "https://pub.dartlang.org" 318 | source: hosted 319 | version: "0.5.12" 320 | shared_preferences_linux: 321 | dependency: transitive 322 | description: 323 | name: shared_preferences_linux 324 | url: "https://pub.dartlang.org" 325 | source: hosted 326 | version: "0.0.2+2" 327 | shared_preferences_macos: 328 | dependency: transitive 329 | description: 330 | name: shared_preferences_macos 331 | url: "https://pub.dartlang.org" 332 | source: hosted 333 | version: "0.0.1+10" 334 | shared_preferences_platform_interface: 335 | dependency: transitive 336 | description: 337 | name: shared_preferences_platform_interface 338 | url: "https://pub.dartlang.org" 339 | source: hosted 340 | version: "1.0.4" 341 | shared_preferences_web: 342 | dependency: transitive 343 | description: 344 | name: shared_preferences_web 345 | url: "https://pub.dartlang.org" 346 | source: hosted 347 | version: "0.1.2+7" 348 | shared_preferences_windows: 349 | dependency: transitive 350 | description: 351 | name: shared_preferences_windows 352 | url: "https://pub.dartlang.org" 353 | source: hosted 354 | version: "0.0.1+1" 355 | sky_engine: 356 | dependency: transitive 357 | description: flutter 358 | source: sdk 359 | version: "0.0.99" 360 | source_span: 361 | dependency: transitive 362 | description: 363 | name: source_span 364 | url: "https://pub.dartlang.org" 365 | source: hosted 366 | version: "1.7.0" 367 | stack_trace: 368 | dependency: transitive 369 | description: 370 | name: stack_trace 371 | url: "https://pub.dartlang.org" 372 | source: hosted 373 | version: "1.9.5" 374 | stream_channel: 375 | dependency: transitive 376 | description: 377 | name: stream_channel 378 | url: "https://pub.dartlang.org" 379 | source: hosted 380 | version: "2.0.0" 381 | string_scanner: 382 | dependency: transitive 383 | description: 384 | name: string_scanner 385 | url: "https://pub.dartlang.org" 386 | source: hosted 387 | version: "1.0.5" 388 | term_glyph: 389 | dependency: transitive 390 | description: 391 | name: term_glyph 392 | url: "https://pub.dartlang.org" 393 | source: hosted 394 | version: "1.1.0" 395 | test_api: 396 | dependency: transitive 397 | description: 398 | name: test_api 399 | url: "https://pub.dartlang.org" 400 | source: hosted 401 | version: "0.2.17" 402 | typed_data: 403 | dependency: transitive 404 | description: 405 | name: typed_data 406 | url: "https://pub.dartlang.org" 407 | source: hosted 408 | version: "1.2.0" 409 | vector_math: 410 | dependency: transitive 411 | description: 412 | name: vector_math 413 | url: "https://pub.dartlang.org" 414 | source: hosted 415 | version: "2.0.8" 416 | win32: 417 | dependency: transitive 418 | description: 419 | name: win32 420 | url: "https://pub.dartlang.org" 421 | source: hosted 422 | version: "1.7.3" 423 | xdg_directories: 424 | dependency: transitive 425 | description: 426 | name: xdg_directories 427 | url: "https://pub.dartlang.org" 428 | source: hosted 429 | version: "0.1.0" 430 | sdks: 431 | dart: ">=2.9.0-14.0.dev <3.0.0" 432 | flutter: ">=1.16.0 <2.0.0" 433 | -------------------------------------------------------------------------------- /lib/Screens/users.dart/homepage.dart: -------------------------------------------------------------------------------- 1 | import 'package:cloud_firestore/cloud_firestore.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:mycontact/Models/product.dart'; 4 | import 'package:mycontact/Screens/loginScreen.dart'; 5 | import 'package:mycontact/Screens/users.dart/cartScreen.dart'; 6 | import 'package:mycontact/Screens/users.dart/productinfo.dart'; 7 | import 'package:mycontact/const.dart'; 8 | import 'package:mycontact/services/auth.dart'; 9 | import 'package:mycontact/services/store.dart'; 10 | import 'package:shared_preferences/shared_preferences.dart'; 11 | 12 | class HomePage extends StatefulWidget { 13 | static String id = 'HomePage'; 14 | 15 | @override 16 | _HomePageState createState() => _HomePageState(); 17 | } 18 | 19 | class _HomePageState extends State { 20 | final _auth = Auth(); 21 | final _store = Store(); 22 | int _tabBarIndex = 0; 23 | int _bottomBarIndex = 0; 24 | @override 25 | Widget build(BuildContext context) { 26 | return Stack( 27 | children: [ 28 | DefaultTabController( 29 | length: 4, 30 | child: Scaffold( 31 | bottomNavigationBar: BottomNavigationBar( 32 | currentIndex: _bottomBarIndex, 33 | fixedColor: kTextboxColor, 34 | unselectedItemColor: kMainColor, 35 | onTap: (value) async { 36 | if (value == 2) { 37 | SharedPreferences pref = 38 | await SharedPreferences.getInstance(); 39 | pref.clear(); 40 | await _auth.signOutt(); 41 | Navigator.popAndPushNamed(context, LoginScreen.id); 42 | } 43 | setState(() { 44 | _bottomBarIndex = value; 45 | }); 46 | }, 47 | items: [ 48 | BottomNavigationBarItem( 49 | title: Text('Home Page'), icon: Icon(Icons.person)), 50 | BottomNavigationBarItem( 51 | title: Text('data'), icon: Icon(Icons.person)), 52 | BottomNavigationBarItem( 53 | title: Text( 54 | 'Sign out', 55 | style: TextStyle(color: Colors.red), 56 | ), 57 | icon: Icon(Icons.close, color: Colors.red)), 58 | ]), 59 | appBar: AppBar( 60 | backgroundColor: kMainColor, 61 | elevation: 0, 62 | bottom: TabBar( 63 | indicatorColor: kTextboxColor, 64 | onTap: (value) { 65 | setState(() { 66 | _tabBarIndex = value; 67 | }); 68 | }, 69 | tabs: [ 70 | Padding( 71 | padding: const EdgeInsets.all(1), 72 | child: Text( 73 | 'ٍStudents Tools', 74 | style: TextStyle( 75 | color: 76 | _tabBarIndex == 0 ? Colors.black : kUnActiveColor, 77 | fontSize: (_tabBarIndex == 0 ? 16 : null), 78 | ), 79 | ), 80 | ), 81 | Text( 82 | 'Students Activity', 83 | style: TextStyle( 84 | color: _tabBarIndex == 1 ? Colors.black : kUnActiveColor, 85 | fontSize: _tabBarIndex == 1 ? 14 : null, 86 | ), 87 | ), 88 | Text( 89 | 'Plays', 90 | style: TextStyle( 91 | color: _tabBarIndex == 2 ? Colors.black : kUnActiveColor, 92 | fontSize: _tabBarIndex == 2 ? 16 : null, 93 | ), 94 | ), 95 | Text( 96 | 'Another Services', 97 | style: TextStyle( 98 | color: _tabBarIndex == 3 ? Colors.black : kUnActiveColor, 99 | fontSize: _tabBarIndex == 3 ? 16 : null, 100 | ), 101 | ), 102 | ], 103 | ), 104 | ), 105 | body: TabBarView(children: [ 106 | studentsToolsMethod(), 107 | studentsActivityMethod(), 108 | playsMethod(), 109 | anotherServices(), 110 | ]), 111 | ), 112 | ), 113 | Material( 114 | color: kMainColor, 115 | child: Padding( 116 | padding: const EdgeInsets.fromLTRB(20, 20, 20, 0), 117 | child: Container( 118 | color: kMainColor, 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( 126 | fontSize: 20, 127 | fontWeight: FontWeight.bold, 128 | ), 129 | ), 130 | GestureDetector( 131 | onTap: () { 132 | Navigator.pushNamed(context, CartScreen.id); 133 | }, 134 | child: Icon(Icons.shopping_cart)), 135 | ], 136 | ), 137 | ), 138 | ), 139 | ), 140 | ], 141 | ); 142 | } 143 | 144 | Widget studentsToolsMethod() { 145 | return StreamBuilder( 146 | stream: _store.loadProduct(), 147 | builder: (context, snapshot) { 148 | if (snapshot.hasData) { 149 | List products = []; 150 | for (var doc in snapshot.data.documents) { 151 | var data = doc.data; 152 | if (doc[KProductCategory] == kProductCategoryStudentsTools) { 153 | products.add(Product( 154 | pID: doc.documentID, 155 | pPrice: data[KProductPrice], 156 | pName: data[KProductName], 157 | pDescription: data[KProductDescription], 158 | pLocation: data[KProductLocation], 159 | pCategory: data[KProductDescription])); 160 | } 161 | } 162 | return GridView.builder( 163 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 164 | crossAxisCount: 2, childAspectRatio: .8), 165 | itemBuilder: (context, index) => Padding( 166 | padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10), 167 | child: GestureDetector( 168 | onTap: () { 169 | Navigator.pushNamed(context, ProductInfo.id, 170 | arguments: products[index]); 171 | }, 172 | child: Stack( 173 | children: [ 174 | Positioned.fill( 175 | child: Image( 176 | fit: BoxFit.fill, 177 | image: AssetImage(products[index].pLocation), 178 | ), 179 | ), 180 | Positioned( 181 | bottom: 0, 182 | child: Opacity( 183 | opacity: 0.6, 184 | child: Container( 185 | width: MediaQuery.of(context).size.width, 186 | color: Colors.white, 187 | height: 60, 188 | child: Padding( 189 | padding: const EdgeInsets.all(8.0), 190 | child: Column( 191 | crossAxisAlignment: CrossAxisAlignment.start, 192 | children: [ 193 | Text(products[index].pName, 194 | style: TextStyle( 195 | color: kMainColor, fontSize: 15)), 196 | Text("\$ ${products[index].pPrice}", 197 | style: TextStyle( 198 | color: Colors.red, fontSize: 15)), 199 | ], 200 | ), 201 | ), 202 | ), 203 | ), 204 | ) 205 | ], 206 | ), 207 | ), 208 | ), 209 | itemCount: products.length, 210 | ); 211 | } else { 212 | return Text("Wait! .. Your have bad connection! "); 213 | } 214 | }); 215 | } 216 | 217 | studentsActivityMethod() { 218 | return StreamBuilder( 219 | stream: _store.loadProduct(), 220 | builder: (context, snapshot) { 221 | if (snapshot.hasData) { 222 | List products = []; 223 | for (var doc in snapshot.data.documents) { 224 | var data = doc.data; 225 | if (doc[KProductCategory] == kProductCategoryStudentsActivity) { 226 | products.add(Product( 227 | pID: doc.documentID, 228 | pPrice: data[KProductPrice], 229 | pName: data[KProductName], 230 | pDescription: data[KProductDescription], 231 | pLocation: data[KProductLocation], 232 | pCategory: data[KProductDescription])); 233 | } 234 | } 235 | return GridView.builder( 236 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 237 | crossAxisCount: 2, childAspectRatio: .8), 238 | itemBuilder: (context, index) => Padding( 239 | padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10), 240 | child: GestureDetector( 241 | onTap: () { 242 | Navigator.pushNamed(context, ProductInfo.id, 243 | arguments: products[index]); 244 | }, 245 | child: Stack( 246 | children: [ 247 | Positioned.fill( 248 | child: Image( 249 | fit: BoxFit.fill, 250 | image: AssetImage(products[index].pLocation), 251 | ), 252 | ), 253 | Positioned( 254 | bottom: 0, 255 | child: Opacity( 256 | opacity: 0.6, 257 | child: Container( 258 | width: MediaQuery.of(context).size.width, 259 | color: Colors.white, 260 | height: 60, 261 | child: Padding( 262 | padding: const EdgeInsets.all(8.0), 263 | child: Column( 264 | crossAxisAlignment: CrossAxisAlignment.start, 265 | children: [ 266 | Text(products[index].pName, 267 | style: TextStyle( 268 | color: kMainColor, fontSize: 15)), 269 | Text("\$ ${products[index].pPrice}", 270 | style: TextStyle( 271 | color: Colors.red, fontSize: 15)), 272 | ], 273 | ), 274 | ), 275 | ), 276 | ), 277 | ) 278 | ], 279 | ), 280 | ), 281 | ), 282 | itemCount: products.length, 283 | ); 284 | } else { 285 | return Text("Wait! .. Your have bad connection! "); 286 | } 287 | }); 288 | } 289 | 290 | playsMethod() { 291 | return StreamBuilder( 292 | stream: _store.loadProduct(), 293 | builder: (context, snapshot) { 294 | if (snapshot.hasData) { 295 | List products = []; 296 | for (var doc in snapshot.data.documents) { 297 | var data = doc.data; 298 | if (doc[KProductCategory] == kProductCategoryStudentsPlays) { 299 | products.add(Product( 300 | pID: doc.documentID, 301 | pPrice: data[KProductPrice], 302 | pName: data[KProductName], 303 | pDescription: data[KProductDescription], 304 | pLocation: data[KProductLocation], 305 | pCategory: data[KProductDescription])); 306 | } 307 | } 308 | return GridView.builder( 309 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 310 | crossAxisCount: 2, childAspectRatio: .8), 311 | itemBuilder: (context, index) => Padding( 312 | padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10), 313 | child: GestureDetector( 314 | onTap: () { 315 | Navigator.pushNamed(context, ProductInfo.id, 316 | arguments: products[index]); 317 | }, 318 | child: Stack( 319 | children: [ 320 | Positioned.fill( 321 | child: Image( 322 | fit: BoxFit.fill, 323 | image: AssetImage(products[index].pLocation), 324 | ), 325 | ), 326 | Positioned( 327 | bottom: 0, 328 | child: Opacity( 329 | opacity: 0.6, 330 | child: Container( 331 | width: MediaQuery.of(context).size.width, 332 | color: Colors.white, 333 | height: 60, 334 | child: Padding( 335 | padding: const EdgeInsets.all(8.0), 336 | child: Column( 337 | crossAxisAlignment: CrossAxisAlignment.start, 338 | children: [ 339 | Text(products[index].pName, 340 | style: TextStyle( 341 | color: kMainColor, fontSize: 15)), 342 | Text("\$ ${products[index].pPrice}", 343 | style: TextStyle( 344 | color: Colors.red, fontSize: 15)), 345 | ], 346 | ), 347 | ), 348 | ), 349 | ), 350 | ) 351 | ], 352 | ), 353 | ), 354 | ), 355 | itemCount: products.length, 356 | ); 357 | } else { 358 | return Text("Wait! .. Your have bad connection! "); 359 | } 360 | }); 361 | } 362 | 363 | anotherServices() { 364 | return StreamBuilder( 365 | stream: _store.loadProduct(), 366 | builder: (context, snapshot) { 367 | if (snapshot.hasData) { 368 | List products = []; 369 | for (var doc in snapshot.data.documents) { 370 | var data = doc.data; 371 | if (doc[KProductCategory] == kProductCategoryServices) { 372 | products.add(Product( 373 | pID: doc.documentID, 374 | pPrice: data[KProductPrice], 375 | pName: data[KProductName], 376 | pDescription: data[KProductDescription], 377 | pLocation: data[KProductLocation], 378 | pCategory: data[KProductDescription])); 379 | } 380 | } 381 | return GridView.builder( 382 | gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( 383 | crossAxisCount: 2, childAspectRatio: .8), 384 | itemBuilder: (context, index) => Padding( 385 | padding: EdgeInsets.symmetric(horizontal: 10, vertical: 10), 386 | child: GestureDetector( 387 | onTap: () { 388 | Navigator.pushNamed(context, ProductInfo.id, 389 | arguments: products[index]); 390 | }, 391 | child: Stack( 392 | children: [ 393 | Positioned.fill( 394 | child: Image( 395 | fit: BoxFit.fill, 396 | image: AssetImage(products[index].pLocation), 397 | ), 398 | ), 399 | Positioned( 400 | bottom: 0, 401 | child: Opacity( 402 | opacity: 0.6, 403 | child: Container( 404 | width: MediaQuery.of(context).size.width, 405 | color: Colors.white, 406 | height: 60, 407 | child: Padding( 408 | padding: const EdgeInsets.all(8.0), 409 | child: Column( 410 | crossAxisAlignment: CrossAxisAlignment.start, 411 | children: [ 412 | Text(products[index].pName, 413 | style: TextStyle( 414 | color: kMainColor, fontSize: 15)), 415 | Text("\$ ${products[index].pPrice}", 416 | style: TextStyle( 417 | color: Colors.red, fontSize: 15)), 418 | ], 419 | ), 420 | ), 421 | ), 422 | ), 423 | ) 424 | ], 425 | ), 426 | ), 427 | ), 428 | itemCount: products.length, 429 | ); 430 | } else { 431 | return Text("Wait! .. Your have bad connection! "); 432 | } 433 | }); 434 | } 435 | } 436 | 437 | // @override 438 | // void initState() { 439 | // getCurrentUser(); 440 | // } 441 | 442 | // getCurrentUser() async { 443 | // _loggedUser = await _auth.getUser(); 444 | // } 445 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.pbxproj: -------------------------------------------------------------------------------- 1 | // !$*UTF8*$! 2 | { 3 | archiveVersion = 1; 4 | classes = { 5 | }; 6 | objectVersion = 46; 7 | objects = { 8 | 9 | /* Begin PBXBuildFile section */ 10 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; 11 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 12 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 13 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 14 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 15 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; 16 | /* End PBXBuildFile section */ 17 | 18 | /* Begin PBXCopyFilesBuildPhase section */ 19 | 9705A1C41CF9048500538489 /* Embed Frameworks */ = { 20 | isa = PBXCopyFilesBuildPhase; 21 | buildActionMask = 2147483647; 22 | dstPath = ""; 23 | dstSubfolderSpec = 10; 24 | files = ( 25 | ); 26 | name = "Embed Frameworks"; 27 | runOnlyForDeploymentPostprocessing = 0; 28 | }; 29 | /* End PBXCopyFilesBuildPhase section */ 30 | 31 | /* Begin PBXFileReference section */ 32 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 33 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; 34 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 35 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 36 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 37 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; 38 | 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; 39 | 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; 40 | 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; 41 | 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 42 | 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 43 | 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 44 | 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 45 | /* End PBXFileReference section */ 46 | 47 | /* Begin PBXFrameworksBuildPhase section */ 48 | 97C146EB1CF9000F007C117D /* Frameworks */ = { 49 | isa = PBXFrameworksBuildPhase; 50 | buildActionMask = 2147483647; 51 | files = ( 52 | ); 53 | runOnlyForDeploymentPostprocessing = 0; 54 | }; 55 | /* End PBXFrameworksBuildPhase section */ 56 | 57 | /* Begin PBXGroup section */ 58 | 9740EEB11CF90186004384FC /* Flutter */ = { 59 | isa = PBXGroup; 60 | children = ( 61 | 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, 62 | 9740EEB21CF90195004384FC /* Debug.xcconfig */, 63 | 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, 64 | 9740EEB31CF90195004384FC /* Generated.xcconfig */, 65 | ); 66 | name = Flutter; 67 | sourceTree = ""; 68 | }; 69 | 97C146E51CF9000F007C117D = { 70 | isa = PBXGroup; 71 | children = ( 72 | 9740EEB11CF90186004384FC /* Flutter */, 73 | 97C146F01CF9000F007C117D /* Runner */, 74 | 97C146EF1CF9000F007C117D /* Products */, 75 | ); 76 | sourceTree = ""; 77 | }; 78 | 97C146EF1CF9000F007C117D /* Products */ = { 79 | isa = PBXGroup; 80 | children = ( 81 | 97C146EE1CF9000F007C117D /* Runner.app */, 82 | ); 83 | name = Products; 84 | sourceTree = ""; 85 | }; 86 | 97C146F01CF9000F007C117D /* Runner */ = { 87 | isa = PBXGroup; 88 | children = ( 89 | 97C146FA1CF9000F007C117D /* Main.storyboard */, 90 | 97C146FD1CF9000F007C117D /* Assets.xcassets */, 91 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, 92 | 97C147021CF9000F007C117D /* Info.plist */, 93 | 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, 94 | 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, 95 | 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, 96 | 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, 97 | ); 98 | path = Runner; 99 | sourceTree = ""; 100 | }; 101 | /* End PBXGroup section */ 102 | 103 | /* Begin PBXNativeTarget section */ 104 | 97C146ED1CF9000F007C117D /* Runner */ = { 105 | isa = PBXNativeTarget; 106 | buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; 107 | buildPhases = ( 108 | 9740EEB61CF901F6004384FC /* Run Script */, 109 | 97C146EA1CF9000F007C117D /* Sources */, 110 | 97C146EB1CF9000F007C117D /* Frameworks */, 111 | 97C146EC1CF9000F007C117D /* Resources */, 112 | 9705A1C41CF9048500538489 /* Embed Frameworks */, 113 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 114 | ); 115 | buildRules = ( 116 | ); 117 | dependencies = ( 118 | ); 119 | name = Runner; 120 | productName = Runner; 121 | productReference = 97C146EE1CF9000F007C117D /* Runner.app */; 122 | productType = "com.apple.product-type.application"; 123 | }; 124 | /* End PBXNativeTarget section */ 125 | 126 | /* Begin PBXProject section */ 127 | 97C146E61CF9000F007C117D /* Project object */ = { 128 | isa = PBXProject; 129 | attributes = { 130 | LastUpgradeCheck = 1020; 131 | ORGANIZATIONNAME = ""; 132 | TargetAttributes = { 133 | 97C146ED1CF9000F007C117D = { 134 | CreatedOnToolsVersion = 7.3.1; 135 | LastSwiftMigration = 1100; 136 | }; 137 | }; 138 | }; 139 | buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; 140 | compatibilityVersion = "Xcode 9.3"; 141 | developmentRegion = en; 142 | hasScannedForEncodings = 0; 143 | knownRegions = ( 144 | en, 145 | Base, 146 | ); 147 | mainGroup = 97C146E51CF9000F007C117D; 148 | productRefGroup = 97C146EF1CF9000F007C117D /* Products */; 149 | projectDirPath = ""; 150 | projectRoot = ""; 151 | targets = ( 152 | 97C146ED1CF9000F007C117D /* Runner */, 153 | ); 154 | }; 155 | /* End PBXProject section */ 156 | 157 | /* Begin PBXResourcesBuildPhase section */ 158 | 97C146EC1CF9000F007C117D /* Resources */ = { 159 | isa = PBXResourcesBuildPhase; 160 | buildActionMask = 2147483647; 161 | files = ( 162 | 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, 163 | 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, 164 | 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, 165 | 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, 166 | ); 167 | runOnlyForDeploymentPostprocessing = 0; 168 | }; 169 | /* End PBXResourcesBuildPhase section */ 170 | 171 | /* Begin PBXShellScriptBuildPhase section */ 172 | 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { 173 | isa = PBXShellScriptBuildPhase; 174 | buildActionMask = 2147483647; 175 | files = ( 176 | ); 177 | inputPaths = ( 178 | ); 179 | name = "Thin Binary"; 180 | outputPaths = ( 181 | ); 182 | runOnlyForDeploymentPostprocessing = 0; 183 | shellPath = /bin/sh; 184 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; 185 | }; 186 | 9740EEB61CF901F6004384FC /* Run Script */ = { 187 | isa = PBXShellScriptBuildPhase; 188 | buildActionMask = 2147483647; 189 | files = ( 190 | ); 191 | inputPaths = ( 192 | ); 193 | name = "Run Script"; 194 | outputPaths = ( 195 | ); 196 | runOnlyForDeploymentPostprocessing = 0; 197 | shellPath = /bin/sh; 198 | shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; 199 | }; 200 | /* End PBXShellScriptBuildPhase section */ 201 | 202 | /* Begin PBXSourcesBuildPhase section */ 203 | 97C146EA1CF9000F007C117D /* Sources */ = { 204 | isa = PBXSourcesBuildPhase; 205 | buildActionMask = 2147483647; 206 | files = ( 207 | 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, 208 | 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, 209 | ); 210 | runOnlyForDeploymentPostprocessing = 0; 211 | }; 212 | /* End PBXSourcesBuildPhase section */ 213 | 214 | /* Begin PBXVariantGroup section */ 215 | 97C146FA1CF9000F007C117D /* Main.storyboard */ = { 216 | isa = PBXVariantGroup; 217 | children = ( 218 | 97C146FB1CF9000F007C117D /* Base */, 219 | ); 220 | name = Main.storyboard; 221 | sourceTree = ""; 222 | }; 223 | 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { 224 | isa = PBXVariantGroup; 225 | children = ( 226 | 97C147001CF9000F007C117D /* Base */, 227 | ); 228 | name = LaunchScreen.storyboard; 229 | sourceTree = ""; 230 | }; 231 | /* End PBXVariantGroup section */ 232 | 233 | /* Begin XCBuildConfiguration section */ 234 | 249021D3217E4FDB00AE95B9 /* Profile */ = { 235 | isa = XCBuildConfiguration; 236 | buildSettings = { 237 | ALWAYS_SEARCH_USER_PATHS = NO; 238 | CLANG_ANALYZER_NONNULL = YES; 239 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 240 | CLANG_CXX_LIBRARY = "libc++"; 241 | CLANG_ENABLE_MODULES = YES; 242 | CLANG_ENABLE_OBJC_ARC = YES; 243 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 244 | CLANG_WARN_BOOL_CONVERSION = YES; 245 | CLANG_WARN_COMMA = YES; 246 | CLANG_WARN_CONSTANT_CONVERSION = YES; 247 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 248 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 249 | CLANG_WARN_EMPTY_BODY = YES; 250 | CLANG_WARN_ENUM_CONVERSION = YES; 251 | CLANG_WARN_INFINITE_RECURSION = YES; 252 | CLANG_WARN_INT_CONVERSION = YES; 253 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 254 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 255 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 256 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 257 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 258 | CLANG_WARN_STRICT_PROTOTYPES = YES; 259 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 260 | CLANG_WARN_UNREACHABLE_CODE = YES; 261 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 262 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 263 | COPY_PHASE_STRIP = NO; 264 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 265 | ENABLE_NS_ASSERTIONS = NO; 266 | ENABLE_STRICT_OBJC_MSGSEND = YES; 267 | GCC_C_LANGUAGE_STANDARD = gnu99; 268 | GCC_NO_COMMON_BLOCKS = YES; 269 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 270 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 271 | GCC_WARN_UNDECLARED_SELECTOR = YES; 272 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 273 | GCC_WARN_UNUSED_FUNCTION = YES; 274 | GCC_WARN_UNUSED_VARIABLE = YES; 275 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 276 | MTL_ENABLE_DEBUG_INFO = NO; 277 | SDKROOT = iphoneos; 278 | SUPPORTED_PLATFORMS = iphoneos; 279 | TARGETED_DEVICE_FAMILY = "1,2"; 280 | VALIDATE_PRODUCT = YES; 281 | }; 282 | name = Profile; 283 | }; 284 | 249021D4217E4FDB00AE95B9 /* Profile */ = { 285 | isa = XCBuildConfiguration; 286 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 287 | buildSettings = { 288 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 289 | CLANG_ENABLE_MODULES = YES; 290 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 291 | ENABLE_BITCODE = NO; 292 | FRAMEWORK_SEARCH_PATHS = ( 293 | "$(inherited)", 294 | "$(PROJECT_DIR)/Flutter", 295 | ); 296 | INFOPLIST_FILE = Runner/Info.plist; 297 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 298 | LIBRARY_SEARCH_PATHS = ( 299 | "$(inherited)", 300 | "$(PROJECT_DIR)/Flutter", 301 | ); 302 | PRODUCT_BUNDLE_IDENTIFIER = com.example.mycontact; 303 | PRODUCT_NAME = "$(TARGET_NAME)"; 304 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 305 | SWIFT_VERSION = 5.0; 306 | VERSIONING_SYSTEM = "apple-generic"; 307 | }; 308 | name = Profile; 309 | }; 310 | 97C147031CF9000F007C117D /* Debug */ = { 311 | isa = XCBuildConfiguration; 312 | buildSettings = { 313 | ALWAYS_SEARCH_USER_PATHS = NO; 314 | CLANG_ANALYZER_NONNULL = YES; 315 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 316 | CLANG_CXX_LIBRARY = "libc++"; 317 | CLANG_ENABLE_MODULES = YES; 318 | CLANG_ENABLE_OBJC_ARC = YES; 319 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 320 | CLANG_WARN_BOOL_CONVERSION = YES; 321 | CLANG_WARN_COMMA = YES; 322 | CLANG_WARN_CONSTANT_CONVERSION = YES; 323 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 324 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 325 | CLANG_WARN_EMPTY_BODY = YES; 326 | CLANG_WARN_ENUM_CONVERSION = YES; 327 | CLANG_WARN_INFINITE_RECURSION = YES; 328 | CLANG_WARN_INT_CONVERSION = YES; 329 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 330 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 331 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 332 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 333 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 334 | CLANG_WARN_STRICT_PROTOTYPES = YES; 335 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 336 | CLANG_WARN_UNREACHABLE_CODE = YES; 337 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 338 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 339 | COPY_PHASE_STRIP = NO; 340 | DEBUG_INFORMATION_FORMAT = dwarf; 341 | ENABLE_STRICT_OBJC_MSGSEND = YES; 342 | ENABLE_TESTABILITY = YES; 343 | GCC_C_LANGUAGE_STANDARD = gnu99; 344 | GCC_DYNAMIC_NO_PIC = NO; 345 | GCC_NO_COMMON_BLOCKS = YES; 346 | GCC_OPTIMIZATION_LEVEL = 0; 347 | GCC_PREPROCESSOR_DEFINITIONS = ( 348 | "DEBUG=1", 349 | "$(inherited)", 350 | ); 351 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 352 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 353 | GCC_WARN_UNDECLARED_SELECTOR = YES; 354 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 355 | GCC_WARN_UNUSED_FUNCTION = YES; 356 | GCC_WARN_UNUSED_VARIABLE = YES; 357 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 358 | MTL_ENABLE_DEBUG_INFO = YES; 359 | ONLY_ACTIVE_ARCH = YES; 360 | SDKROOT = iphoneos; 361 | TARGETED_DEVICE_FAMILY = "1,2"; 362 | }; 363 | name = Debug; 364 | }; 365 | 97C147041CF9000F007C117D /* Release */ = { 366 | isa = XCBuildConfiguration; 367 | buildSettings = { 368 | ALWAYS_SEARCH_USER_PATHS = NO; 369 | CLANG_ANALYZER_NONNULL = YES; 370 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; 371 | CLANG_CXX_LIBRARY = "libc++"; 372 | CLANG_ENABLE_MODULES = YES; 373 | CLANG_ENABLE_OBJC_ARC = YES; 374 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; 375 | CLANG_WARN_BOOL_CONVERSION = YES; 376 | CLANG_WARN_COMMA = YES; 377 | CLANG_WARN_CONSTANT_CONVERSION = YES; 378 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; 379 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; 380 | CLANG_WARN_EMPTY_BODY = YES; 381 | CLANG_WARN_ENUM_CONVERSION = YES; 382 | CLANG_WARN_INFINITE_RECURSION = YES; 383 | CLANG_WARN_INT_CONVERSION = YES; 384 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; 385 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; 386 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; 387 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; 388 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; 389 | CLANG_WARN_STRICT_PROTOTYPES = YES; 390 | CLANG_WARN_SUSPICIOUS_MOVE = YES; 391 | CLANG_WARN_UNREACHABLE_CODE = YES; 392 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; 393 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; 394 | COPY_PHASE_STRIP = NO; 395 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; 396 | ENABLE_NS_ASSERTIONS = NO; 397 | ENABLE_STRICT_OBJC_MSGSEND = YES; 398 | GCC_C_LANGUAGE_STANDARD = gnu99; 399 | GCC_NO_COMMON_BLOCKS = YES; 400 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES; 401 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; 402 | GCC_WARN_UNDECLARED_SELECTOR = YES; 403 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; 404 | GCC_WARN_UNUSED_FUNCTION = YES; 405 | GCC_WARN_UNUSED_VARIABLE = YES; 406 | IPHONEOS_DEPLOYMENT_TARGET = 8.0; 407 | MTL_ENABLE_DEBUG_INFO = NO; 408 | SDKROOT = iphoneos; 409 | SUPPORTED_PLATFORMS = iphoneos; 410 | SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; 411 | TARGETED_DEVICE_FAMILY = "1,2"; 412 | VALIDATE_PRODUCT = YES; 413 | }; 414 | name = Release; 415 | }; 416 | 97C147061CF9000F007C117D /* Debug */ = { 417 | isa = XCBuildConfiguration; 418 | baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; 419 | buildSettings = { 420 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 421 | CLANG_ENABLE_MODULES = YES; 422 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 423 | ENABLE_BITCODE = NO; 424 | FRAMEWORK_SEARCH_PATHS = ( 425 | "$(inherited)", 426 | "$(PROJECT_DIR)/Flutter", 427 | ); 428 | INFOPLIST_FILE = Runner/Info.plist; 429 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 430 | LIBRARY_SEARCH_PATHS = ( 431 | "$(inherited)", 432 | "$(PROJECT_DIR)/Flutter", 433 | ); 434 | PRODUCT_BUNDLE_IDENTIFIER = com.example.mycontact; 435 | PRODUCT_NAME = "$(TARGET_NAME)"; 436 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 437 | SWIFT_OPTIMIZATION_LEVEL = "-Onone"; 438 | SWIFT_VERSION = 5.0; 439 | VERSIONING_SYSTEM = "apple-generic"; 440 | }; 441 | name = Debug; 442 | }; 443 | 97C147071CF9000F007C117D /* Release */ = { 444 | isa = XCBuildConfiguration; 445 | baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; 446 | buildSettings = { 447 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; 448 | CLANG_ENABLE_MODULES = YES; 449 | CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; 450 | ENABLE_BITCODE = NO; 451 | FRAMEWORK_SEARCH_PATHS = ( 452 | "$(inherited)", 453 | "$(PROJECT_DIR)/Flutter", 454 | ); 455 | INFOPLIST_FILE = Runner/Info.plist; 456 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; 457 | LIBRARY_SEARCH_PATHS = ( 458 | "$(inherited)", 459 | "$(PROJECT_DIR)/Flutter", 460 | ); 461 | PRODUCT_BUNDLE_IDENTIFIER = com.example.mycontact; 462 | PRODUCT_NAME = "$(TARGET_NAME)"; 463 | SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; 464 | SWIFT_VERSION = 5.0; 465 | VERSIONING_SYSTEM = "apple-generic"; 466 | }; 467 | name = Release; 468 | }; 469 | /* End XCBuildConfiguration section */ 470 | 471 | /* Begin XCConfigurationList section */ 472 | 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { 473 | isa = XCConfigurationList; 474 | buildConfigurations = ( 475 | 97C147031CF9000F007C117D /* Debug */, 476 | 97C147041CF9000F007C117D /* Release */, 477 | 249021D3217E4FDB00AE95B9 /* Profile */, 478 | ); 479 | defaultConfigurationIsVisible = 0; 480 | defaultConfigurationName = Release; 481 | }; 482 | 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { 483 | isa = XCConfigurationList; 484 | buildConfigurations = ( 485 | 97C147061CF9000F007C117D /* Debug */, 486 | 97C147071CF9000F007C117D /* Release */, 487 | 249021D4217E4FDB00AE95B9 /* Profile */, 488 | ); 489 | defaultConfigurationIsVisible = 0; 490 | defaultConfigurationName = Release; 491 | }; 492 | /* End XCConfigurationList section */ 493 | }; 494 | rootObject = 97C146E61CF9000F007C117D /* Project object */; 495 | } 496 | --------------------------------------------------------------------------------