├── ios ├── Runner │ ├── Runner-Bridging-Header.h │ ├── Assets.xcassets │ │ ├── LaunchImage.imageset │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ ├── README.md │ │ │ └── Contents.json │ │ └── AppIcon.appiconset │ │ │ ├── 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 │ ├── AppDelegate.swift │ ├── Base.lproj │ │ ├── Main.storyboard │ │ └── LaunchScreen.storyboard │ └── Info.plist ├── Flutter │ ├── Debug.xcconfig │ ├── Release.xcconfig │ └── AppFrameworkInfo.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 ├── .gitignore └── Podfile ├── banner.png ├── capture.jpg ├── flutter_01.png ├── flutter_02.png ├── assets └── logo.jpg ├── web ├── favicon.png ├── icons │ ├── Icon-192.png │ └── Icon-512.png ├── manifest.json └── index.html ├── .github ├── FUNDING.yml ├── ISSUE_TEMPLATE │ ├── feature_request.md │ └── issue_template.md ├── github-actions-demo.yml ├── dependabot.yml ├── workflows │ └── stale.yml.txt ├── config.yml └── pull_request_template.md ├── windows ├── runner │ ├── resources │ │ └── app_icon.ico │ ├── utils.h │ ├── resource.h │ ├── utils.cpp │ ├── CMakeLists.txt │ ├── runner.exe.manifest │ ├── run_loop.h │ ├── main.cpp │ ├── flutter_window.h │ ├── flutter_window.cpp │ ├── run_loop.cpp │ ├── Runner.rc │ ├── win32_window.h │ └── win32_window.cpp ├── .gitignore ├── flutter │ ├── generated_plugin_registrant.h │ ├── generated_plugin_registrant.cc │ ├── generated_plugins.cmake │ └── CMakeLists.txt └── CMakeLists.txt ├── android ├── gradle.properties ├── .gitignore ├── 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 │ │ │ │ └── values-night │ │ │ │ │ └── styles.xml │ │ │ ├── kotlin │ │ │ │ └── com │ │ │ │ │ └── example │ │ │ │ │ └── food_delivery_app │ │ │ │ │ └── MainActivity.kt │ │ │ └── AndroidManifest.xml │ │ ├── debug │ │ │ └── AndroidManifest.xml │ │ └── profile │ │ │ └── AndroidManifest.xml │ └── build.gradle ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties ├── build.gradle └── settings.gradle ├── .metadata ├── .vscode └── launch.json ├── .gitignore ├── lib ├── models │ ├── category_model.dart │ ├── user_model.dart │ ├── request_model.dart │ └── food_model.dart ├── blocs │ ├── LoginPageBloc.dart │ ├── SearchPageBloc.dart │ ├── RegisterPageBloc.dart │ ├── CartPageBloc.dart │ ├── FoodDetailPageBloc.dart │ └── HomePageBloc.dart ├── utils │ └── universal_variables.dart ├── widgets │ ├── categorywidget.dart │ ├── cartitemswidget.dart │ ├── foodTitleWidget.dart │ └── orderwidget.dart ├── main.dart ├── resourese │ ├── databaseSQL.dart │ ├── auth_methods.dart │ └── firebase_helper.dart └── screens │ ├── MyOrderPage.dart │ ├── SearchPage.dart │ ├── loginpages │ ├── register.dart │ └── login.dart │ ├── CategoryListPage.dart │ ├── CartPage.dart │ └── FoodDetailPage.dart ├── test └── widget_test.dart ├── README.md ├── pubspec.yaml └── pubspec.lock /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudofyou9/food_delivery_app/HEAD/banner.png -------------------------------------------------------------------------------- /capture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudofyou9/food_delivery_app/HEAD/capture.jpg -------------------------------------------------------------------------------- /flutter_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudofyou9/food_delivery_app/HEAD/flutter_01.png -------------------------------------------------------------------------------- /flutter_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudofyou9/food_delivery_app/HEAD/flutter_02.png -------------------------------------------------------------------------------- /assets/logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudofyou9/food_delivery_app/HEAD/assets/logo.jpg -------------------------------------------------------------------------------- /web/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudofyou9/food_delivery_app/HEAD/web/favicon.png -------------------------------------------------------------------------------- /.github/FUNDING.yml: -------------------------------------------------------------------------------- 1 | # These are supported funding model platforms 2 | 3 | open_collective: food_delivery 4 | -------------------------------------------------------------------------------- /web/icons/Icon-192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudofyou9/food_delivery_app/HEAD/web/icons/Icon-192.png -------------------------------------------------------------------------------- /web/icons/Icon-512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudofyou9/food_delivery_app/HEAD/web/icons/Icon-512.png -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudofyou9/food_delivery_app/HEAD/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.enableR8=true 3 | android.useAndroidX=true 4 | android.enableJetifier=true 5 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" 2 | #include "Generated.xcconfig" 3 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudofyou9/food_delivery_app/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/proudofyou9/food_delivery_app/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/proudofyou9/food_delivery_app/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudofyou9/food_delivery_app/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/proudofyou9/food_delivery_app/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudofyou9/food_delivery_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudofyou9/food_delivery_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudofyou9/food_delivery_app/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudofyou9/food_delivery_app/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/proudofyou9/food_delivery_app/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/proudofyou9/food_delivery_app/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/proudofyou9/food_delivery_app/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/proudofyou9/food_delivery_app/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/proudofyou9/food_delivery_app/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/proudofyou9/food_delivery_app/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/proudofyou9/food_delivery_app/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/proudofyou9/food_delivery_app/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/proudofyou9/food_delivery_app/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/proudofyou9/food_delivery_app/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/proudofyou9/food_delivery_app/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/proudofyou9/food_delivery_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/proudofyou9/food_delivery_app/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/proudofyou9/food_delivery_app/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | // Creates a console for the process, and redirects stdout and stderr to 5 | // it for both the runner and the Flutter library. 6 | void CreateAndAttachConsole(); 7 | 8 | #endif // RUNNER_UTILS_H_ 9 | -------------------------------------------------------------------------------- /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-7.5-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 | -------------------------------------------------------------------------------- /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: d3ed9ec945f8869f0e136c357d0c2a6be2b60c98 8 | channel: beta 9 | 10 | project_type: app 11 | -------------------------------------------------------------------------------- /windows/.gitignore: -------------------------------------------------------------------------------- 1 | flutter/ephemeral/ 2 | 3 | # Visual Studio user-specific files. 4 | *.suo 5 | *.user 6 | *.userosscache 7 | *.sln.docstates 8 | 9 | # Visual Studio build-related files. 10 | x64/ 11 | x86/ 12 | 13 | # Visual Studio cache files 14 | # files ending in .cache can be ignored 15 | *.[Cc]ache 16 | # but keep track of directories ending in .cache 17 | !*.[Cc]ache/ 18 | -------------------------------------------------------------------------------- /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. -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.h: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #ifndef GENERATED_PLUGIN_REGISTRANT_ 8 | #define GENERATED_PLUGIN_REGISTRANT_ 9 | 10 | #include 11 | 12 | // Registers Flutter plugins. 13 | void RegisterPlugins(flutter::PluginRegistry* registry); 14 | 15 | #endif // GENERATED_PLUGIN_REGISTRANT_ 16 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/food_delivery_app/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.food_delivery_app 2 | 3 | import io.flutter.embedding.android.FlutterFragmentActivity 4 | import io.flutter.embedding.engine.FlutterEngine 5 | import io.flutter.plugins.GeneratedPluginRegistrant 6 | 7 | class MainActivity: FlutterFragmentActivity() { 8 | override fun configureFlutterEngine(flutterEngine: FlutterEngine) { 9 | GeneratedPluginRegistrant.registerWith(flutterEngine) 10 | } 11 | } -------------------------------------------------------------------------------- /windows/runner/resource.h: -------------------------------------------------------------------------------- 1 | //{{NO_DEPENDENCIES}} 2 | // Microsoft Visual C++ generated include file. 3 | // Used by Runner.rc 4 | // 5 | #define IDI_APP_ICON 101 6 | 7 | // Next default values for new objects 8 | // 9 | #ifdef APSTUDIO_INVOKED 10 | #ifndef APSTUDIO_READONLY_SYMBOLS 11 | #define _APS_NEXT_RESOURCE_VALUE 102 12 | #define _APS_NEXT_COMMAND_VALUE 40001 13 | #define _APS_NEXT_CONTROL_VALUE 1001 14 | #define _APS_NEXT_SYMED_VALUE 101 15 | #endif 16 | #endif 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 | -------------------------------------------------------------------------------- /.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 | "type": "pwa-chrome", 9 | "request": "launch", 10 | "name": "Launch Chrome against localhost", 11 | "url": "http://localhost:8080", 12 | "webRoot": "${workspaceFolder}" 13 | } 14 | ] 15 | } -------------------------------------------------------------------------------- /windows/runner/utils.cpp: -------------------------------------------------------------------------------- 1 | #include "utils.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | 10 | void CreateAndAttachConsole() { 11 | if (::AllocConsole()) { 12 | FILE *unused; 13 | if (freopen_s(&unused, "CONOUT$", "w", stdout)) { 14 | _dup2(_fileno(stdout), 1); 15 | } 16 | if (freopen_s(&unused, "CONOUT$", "w", stderr)) { 17 | _dup2(_fileno(stdout), 2); 18 | } 19 | std::ios::sync_with_stdio(); 20 | FlutterDesktopResyncOutputStreams(); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugin_registrant.cc: -------------------------------------------------------------------------------- 1 | // 2 | // Generated file. Do not edit. 3 | // 4 | 5 | // clang-format off 6 | 7 | #include "generated_plugin_registrant.h" 8 | 9 | #include 10 | #include 11 | 12 | void RegisterPlugins(flutter::PluginRegistry* registry) { 13 | FirebaseAuthPluginCApiRegisterWithRegistrar( 14 | registry->GetRegistrarForPlugin("FirebaseAuthPluginCApi")); 15 | FirebaseCorePluginCApiRegisterWithRegistrar( 16 | registry->GetRegistrarForPlugin("FirebaseCorePluginCApi")); 17 | } 18 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | project(runner LANGUAGES CXX) 3 | 4 | add_executable(${BINARY_NAME} WIN32 5 | "flutter_window.cpp" 6 | "main.cpp" 7 | "run_loop.cpp" 8 | "utils.cpp" 9 | "win32_window.cpp" 10 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 11 | "Runner.rc" 12 | "runner.exe.manifest" 13 | ) 14 | apply_standard_settings(${BINARY_NAME}) 15 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 16 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 17 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 18 | add_dependencies(${BINARY_NAME} flutter_assemble) 19 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /web/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "food_delivery_app", 3 | "short_name": "food_delivery_app", 4 | "start_url": ".", 5 | "display": "standalone", 6 | "background_color": "#0175C2", 7 | "theme_color": "#0175C2", 8 | "description": "A new Flutter project.", 9 | "orientation": "portrait-primary", 10 | "prefer_related_applications": false, 11 | "icons": [ 12 | { 13 | "src": "icons/Icon-192.png", 14 | "sizes": "192x192", 15 | "type": "image/png" 16 | }, 17 | { 18 | "src": "icons/Icon-512.png", 19 | "sizes": "512x512", 20 | "type": "image/png" 21 | } 22 | ] 23 | } 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Feature request 3 | about: Suggest an idea for this project 4 | title: '' 5 | labels: '' 6 | assignees: '' 7 | 8 | --- 9 | 10 | **Is your feature request related to a problem? Please describe.** 11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.8.0' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | maven { 7 | url 'https://maven.fabric.io/public' 8 | } 9 | } 10 | 11 | dependencies { 12 | classpath 'com.android.tools.build:gradle:7.2.0' 13 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 14 | classpath 'com.google.gms:google-services:4.3.15' 15 | } 16 | } 17 | 18 | allprojects { 19 | repositories { 20 | google() 21 | jcenter() 22 | } 23 | } 24 | 25 | rootProject.buildDir = '../build' 26 | subprojects { 27 | project.buildDir = "${rootProject.buildDir}/${project.name}" 28 | } 29 | subprojects { 30 | project.evaluationDependsOn(':app') 31 | } 32 | 33 | tasks.register("clean", Delete) { 34 | delete rootProject.buildDir 35 | } 36 | -------------------------------------------------------------------------------- /.github/github-actions-demo.yml: -------------------------------------------------------------------------------- 1 | name: GitHub Actions Demo 2 | on: [push] 3 | jobs: 4 | Explore-GitHub-Actions: 5 | runs-on: ubuntu-latest 6 | steps: 7 | - run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." 8 | - run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" 9 | - run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}." 10 | - name: Check out repository code 11 | uses: actions/checkout@v2 12 | - run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." 13 | - run: echo "🖥️ The workflow is now ready to test your code on the runner." 14 | - name: List files in the repository 15 | run: | 16 | ls ${{ github.workspace }} 17 | - run: echo "🍏 This job's status is ${{ job.status }}." 18 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | firebase_auth 7 | firebase_core 8 | ) 9 | 10 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 11 | ) 12 | 13 | set(PLUGIN_BUNDLED_LIBRARIES) 14 | 15 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 16 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 17 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 18 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 19 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 20 | endforeach(plugin) 21 | 22 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 23 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 24 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 25 | endforeach(ffi_plugin) 26 | -------------------------------------------------------------------------------- /.github/dependabot.yml: -------------------------------------------------------------------------------- 1 | version: 2 2 | updates: 3 | - package-ecosystem: "github-actions" 4 | directory: "/" 5 | schedule: 6 | interval: "daily" 7 | - package-ecosystem: gradle 8 | directory: "/" 9 | schedule: 10 | interval: daily 11 | time: "10:00" 12 | open-pull-requests-limit: 10 13 | target-branch: dependency-updates 14 | labels: 15 | - "dependencies" 16 | ignore: 17 | # We cannot update this one until API26. Ignore range should slide with known versions so we stay informed. 18 | - dependency-name: org.apache.commons:commons-compress 19 | versions: 20 | - ">= 1.12, < 1.22" 21 | # We cannot use current versions of material-dialogs with Java. It went Kotlin-only. 22 | - dependency-name: com.afollestad.material-dialogs:core 23 | versions: 24 | - ">= 2.a, < 3" 25 | - dependency-name: com.afollestad.material-dialogs:core 26 | versions: 27 | - ">= 3.a, < 4" 28 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/runner/runner.exe.manifest: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PerMonitorV2 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /.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 | android/app/google-services.json 46 | *.cc 47 | reference.md 48 | -------------------------------------------------------------------------------- /lib/models/category_model.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | class CategoryModel { 18 | final String image; 19 | final String name; 20 | final String keys; 21 | 22 | CategoryModel({required this.image, required this.name, required this.keys}); 23 | } 24 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/issue_template.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Bug report 4 | title: "[Bug]" 5 | labels: bug 6 | assignees: '' 7 | 8 | --- 9 | 10 | ###### Reproduction Steps 11 | 12 | 1. 13 | 2. 14 | 3. 15 | 16 | 17 | ###### Expected Result 18 | 19 | 20 | 21 | ###### Actual Result 22 | 23 | 24 | 25 | ###### Debug info 26 | Refer to the [support page](https://github.com/Akshay0701/food_delivery_app) if you are unsure where to get the "debug info". 27 | 28 | ###### Research 29 | *Enter an [x] character to confirm the points below:* 30 | 31 | - [ ] I am reporting a bug or enhancement request specific to food_delivery_app 32 | - [ ] I have checked the https://github.com/Akshay0701/food_delivery_app and could not find a solution to my issue 33 | - [ ] I have searched for similar existing issues here and on the user forum 34 | - [ ] (Optional) I have confirmed the issue is not resolved in the latest alpha release ([instructions](https://github.com/Akshay0701/food_delivery_app)) 35 | 36 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml.txt: -------------------------------------------------------------------------------- 1 | name: Mark stale issues and pull requests 2 | 3 | on: 4 | schedule: 5 | - cron: "35 * * * *" 6 | 7 | jobs: 8 | stale: 9 | 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/stale@v4 14 | with: 15 | repo-token: ${{ secrets.GITHUB_TOKEN }} 16 | stale-issue-message: 'Hello 👋, this issue has been opened for more than 2 months with no activity on it. If the issue is still here, please keep in mind that we need community support and help to fix it! Just comment something like _still searching for solutions_ and if you found one, please open a pull request! You have 7 days until this gets closed automatically' 17 | stale-pr-message: 'Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically' 18 | exempt-issue-labels: 'Keep Open' 19 | exempt-pr-labels: 'Keep Open' 20 | 21 | -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/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:food_delivery_app/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 | -------------------------------------------------------------------------------- /windows/runner/run_loop.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_RUN_LOOP_H_ 2 | #define RUNNER_RUN_LOOP_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | 9 | // A runloop that will service events for Flutter instances as well 10 | // as native messages. 11 | class RunLoop { 12 | public: 13 | RunLoop(); 14 | ~RunLoop(); 15 | 16 | // Prevent copying 17 | RunLoop(RunLoop const&) = delete; 18 | RunLoop& operator=(RunLoop const&) = delete; 19 | 20 | // Runs the run loop until the application quits. 21 | void Run(); 22 | 23 | // Registers the given Flutter instance for event servicing. 24 | void RegisterFlutterInstance( 25 | flutter::FlutterEngine* flutter_instance); 26 | 27 | // Unregisters the given Flutter instance from event servicing. 28 | void UnregisterFlutterInstance( 29 | flutter::FlutterEngine* flutter_instance); 30 | 31 | private: 32 | using TimePoint = std::chrono::steady_clock::time_point; 33 | 34 | // Processes all currently pending messages for registered Flutter instances. 35 | TimePoint ProcessFlutterMessages(); 36 | 37 | std::set flutter_instances_; 38 | }; 39 | 40 | #endif // RUNNER_RUN_LOOP_H_ 41 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "run_loop.h" 7 | #include "utils.h" 8 | 9 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 10 | _In_ wchar_t *command_line, _In_ int show_command) { 11 | // Attach to console when present (e.g., 'flutter run') or create a 12 | // new console when running with a debugger. 13 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 14 | CreateAndAttachConsole(); 15 | } 16 | 17 | // Initialize COM, so that it is available for use in the library and/or 18 | // plugins. 19 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 20 | 21 | RunLoop run_loop; 22 | 23 | flutter::DartProject project(L"data"); 24 | FlutterWindow window(&run_loop, project); 25 | Win32Window::Point origin(10, 10); 26 | Win32Window::Size size(1280, 720); 27 | if (!window.CreateAndShow(L"food_delivery_app", origin, size)) { 28 | return EXIT_FAILURE; 29 | } 30 | window.SetQuitOnClose(true); 31 | 32 | run_loop.Run(); 33 | 34 | ::CoUninitialize(); 35 | return EXIT_SUCCESS; 36 | } 37 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Flutter Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style license that can be 3 | // found in the LICENSE file. 4 | 5 | include ':app' 6 | 7 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 8 | def properties = new Properties() 9 | 10 | assert localPropertiesFile.exists() 11 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 12 | 13 | def flutterSdkPath = properties.getProperty("flutter.sdk") 14 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 15 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 16 | 17 | 18 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath() 19 | 20 | def plugins = new Properties() 21 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins') 22 | if (pluginsFile.exists()) { 23 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) } 24 | } 25 | 26 | plugins.each { name, path -> 27 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile() 28 | include ":$name" 29 | project(":$name").projectDir = pluginDirectory 30 | } 31 | -------------------------------------------------------------------------------- /web/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | food_delivery_app 18 | 19 | 20 | 21 | 24 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_FLUTTER_WINDOW_H_ 2 | #define RUNNER_FLUTTER_WINDOW_H_ 3 | 4 | #include 5 | #include 6 | 7 | #include 8 | 9 | #include "run_loop.h" 10 | #include "win32_window.h" 11 | 12 | // A window that does nothing but host a Flutter view. 13 | class FlutterWindow : public Win32Window { 14 | public: 15 | // Creates a new FlutterWindow driven by the |run_loop|, hosting a 16 | // Flutter view running |project|. 17 | explicit FlutterWindow(RunLoop* run_loop, 18 | const flutter::DartProject& project); 19 | virtual ~FlutterWindow(); 20 | 21 | protected: 22 | // Win32Window: 23 | bool OnCreate() override; 24 | void OnDestroy() override; 25 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 26 | LPARAM const lparam) noexcept override; 27 | 28 | private: 29 | // The run loop driving events for this window. 30 | RunLoop* run_loop_; 31 | 32 | // The project to run. 33 | flutter::DartProject project_; 34 | 35 | // The Flutter instance hosted by this window. 36 | std::unique_ptr flutter_controller_; 37 | }; 38 | 39 | #endif // RUNNER_FLUTTER_WINDOW_H_ 40 | -------------------------------------------------------------------------------- /.github/config.yml: -------------------------------------------------------------------------------- 1 | # Configuration for welcome - https://github.com/behaviorbot/welcome 2 | 3 | # Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome 4 | 5 | # Comment to be posted to on first time issues 6 | newIssueWelcomeComment: > 7 | ![](https://media4.giphy.com/media/3o6fJ1BM7R2EBRDnxK/giphy.gif) Hello! 👋 Thanks for logging this issue. Please remember we are all volunteers here, so some patience may be required before we can get to the issue. Also remember that the fastest way to get resolution on an issue is to propose a change directly, https://github.com/Akshay0701/food_delivery_app 8 | 9 | # Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome 10 | 11 | # Comment to be posted to on PRs from first time contributors in your repository 12 | newPRWelcomeComment: > 13 | First PR! 🚀 We sincerely appreciate that you have taken the time to propose a change to food_delivery_app Please have patience with us as we are all volunteers - we will get to this as soon as possible. 14 | 15 | # Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge 16 | 17 | # Comment to be posted to on pull requests merged by a first time user 18 | firstPRMergeComment: > 19 | 20 | # It is recommended to include as many gifs and emojis as possible! 21 | -------------------------------------------------------------------------------- /.github/pull_request_template.md: -------------------------------------------------------------------------------- 1 | ## Pull Request template 2 | 3 | ## Purpose / Description 4 | _Describe the problem or feature and motivation_ 5 | 6 | ## Fixes 7 | Fixes _Link to the issues._ 8 | 9 | ## Approach 10 | _How does this change address the problem?_ 11 | 12 | ## How Has This Been Tested? 13 | 14 | Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration (SDK version(s), emulator or physical, etc) 15 | 16 | ## Learning (optional, can help others) 17 | _Describe the research stage_ 18 | 19 | _Links to blog posts, patterns, libraries or addons used to solve this problem_ 20 | 21 | ## Checklist 22 | _Please, go through these checks before submitting the PR._ 23 | 24 | - [ ] You have not changed whitespace unnecessarily (it makes diffs hard to read) 25 | - [ ] You have a descriptive commit message with a short title (first line, max 50 chars). 26 | - [ ] Your code follows the style of the project (e.g. never omit braces in `if` statements) 27 | - [ ] You have commented your code, particularly in hard-to-understand areas 28 | - [ ] You have performed a self-review of your own code 29 | - [ ] UI changes: include screenshots of all affected screens (in particular showing any new or changed strings) 30 | - [ ] UI Changes: You have tested your change using the [Google Accessibility Scanner](https://play.google.com/store/apps/details?id=com.google.android.apps.accessibility.auditor) 31 | -------------------------------------------------------------------------------- /ios/Podfile: -------------------------------------------------------------------------------- 1 | # Uncomment this line to define a global platform for your project 2 | # platform :ios, '11.0' 3 | 4 | # CocoaPods analytics sends network stats synchronously affecting flutter build latency. 5 | ENV['COCOAPODS_DISABLE_STATS'] = 'true' 6 | 7 | project 'Runner', { 8 | 'Debug' => :debug, 9 | 'Profile' => :release, 10 | 'Release' => :release, 11 | } 12 | 13 | def flutter_root 14 | generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) 15 | unless File.exist?(generated_xcode_build_settings_path) 16 | raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" 17 | end 18 | 19 | File.foreach(generated_xcode_build_settings_path) do |line| 20 | matches = line.match(/FLUTTER_ROOT\=(.*)/) 21 | return matches[1].strip if matches 22 | end 23 | raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" 24 | end 25 | 26 | require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) 27 | 28 | flutter_ios_podfile_setup 29 | 30 | target 'Runner' do 31 | use_frameworks! 32 | use_modular_headers! 33 | 34 | flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) 35 | target 'RunnerTests' do 36 | inherit! :search_paths 37 | end 38 | end 39 | 40 | post_install do |installer| 41 | installer.pods_project.targets.each do |target| 42 | flutter_additional_ios_build_settings(target) 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /lib/models/user_model.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | class UserModel { 18 | final String uid; 19 | final String phone; 20 | final String? email; 21 | final String password; 22 | 23 | UserModel( 24 | {required this.uid, 25 | required this.email, 26 | required this.password, 27 | required this.phone}); 28 | 29 | Map toMap(UserModel user) { 30 | var data = Map(); 31 | data['uid'] = user.uid; 32 | data['email'] = user.email; 33 | data['phone'] = user.phone; 34 | data['password'] = user.password; 35 | return data; 36 | } 37 | 38 | factory UserModel.fromMap(Map mapData) { 39 | return UserModel( 40 | uid: mapData['uid'], 41 | email: mapData['email'], 42 | phone: mapData['phone'], 43 | password: mapData['password'], 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /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 | food_delivery_app 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/models/request_model.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | class RequestModel { 18 | final String address; 19 | final Map foodList; 20 | final String name; 21 | final String uid; 22 | final String status; 23 | final String total; 24 | 25 | RequestModel({ 26 | required this.address, 27 | required this.foodList, 28 | required this.name, 29 | required this.uid, 30 | required this.status, 31 | required this.total, 32 | }); 33 | 34 | Map toMap(RequestModel request) { 35 | var data = Map(); 36 | data['address'] = request.address; 37 | data['foodList'] = request.foodList; 38 | data['name'] = request.name; 39 | data['uid'] = request.uid; 40 | data['status'] = request.status; 41 | data['total'] = request.total; 42 | return data; 43 | } 44 | 45 | factory RequestModel.fromMap(Map mapData) { 46 | return RequestModel( 47 | address: mapData['address'], 48 | foodList: mapData['foodList'], 49 | name: mapData['name'], 50 | uid: mapData['uid'], 51 | status: mapData['status'], 52 | total: mapData['total'], 53 | ); 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /lib/blocs/LoginPageBloc.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:email_validator/email_validator.dart'; 18 | import 'package:flutter/material.dart'; 19 | import 'package:food_delivery_app/resourese/auth_methods.dart'; 20 | 21 | class LoginPageBloc with ChangeNotifier { 22 | AuthMethods mAuthMethods = AuthMethods(); 23 | 24 | bool isLoginPressed = false; 25 | 26 | String? validateEmail(String email) { 27 | if (email.isEmpty && EmailValidator.validate(email)) { 28 | return 'Please enter valid email'; 29 | } 30 | return null; 31 | } 32 | 33 | String? validatePassword(String password) { 34 | if (password.isEmpty && password.length < 6) { 35 | return 'Password should atleast contain 6 character'; 36 | } 37 | return null; 38 | } 39 | 40 | Future validateFormAndLogin( 41 | GlobalKey formKey, String userName, String password) async { 42 | isLoginPressed = true; 43 | notifyListeners(); 44 | if (formKey.currentState?.validate() == true) { 45 | await mAuthMethods.handleSignInEmail(userName, password); 46 | isLoginPressed = false; 47 | notifyListeners(); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /lib/utils/universal_variables.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:flutter/material.dart'; 18 | 19 | class UniversalVariables { 20 | static final Color orangeColor = Colors.orange; 21 | static final Color orangeAccentColor = Colors.orangeAccent; 22 | static final Color blackColor = Color(0xff19191b); 23 | static final Color whiteColor = Colors.white; 24 | static final Color whiteLightColor = Colors.white10; 25 | static final Color amberColor =Colors.amber; 26 | 27 | 28 | static final Color greyColor = Color(0xff8f8f8f); 29 | static final Color userCircleBackground = Color(0xff2b2b33); 30 | static final Color onlineDotColor = Color(0xff46dc64); 31 | static final Color lightBlueColor = Color(0xff0077d7); 32 | static final Color separatorColor = Color(0xff272c35); 33 | 34 | static final Color gradientColorStart = Color(0xff00b6f3); 35 | static final Color gradientColorEnd = Color(0xff0184dc); 36 | 37 | static final Color senderColor = Color(0xff2b343b); 38 | static final Color receiverColor = Color(0xff1e2225); 39 | 40 | static final Gradient fabGradient = LinearGradient( 41 | colors: [gradientColorStart, gradientColorEnd], 42 | begin: Alignment.topLeft, 43 | end: Alignment.bottomRight); 44 | } -------------------------------------------------------------------------------- /lib/blocs/SearchPageBloc.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:flutter/foundation.dart'; 18 | import 'package:flutter/material.dart'; 19 | import 'package:food_delivery_app/models/food_model.dart'; 20 | import 'package:food_delivery_app/resourese/firebase_helper.dart'; 21 | 22 | class SearchPageBloc with ChangeNotifier { 23 | FirebaseHelper mFirebaseHelper = FirebaseHelper(); 24 | 25 | List searchedFoodList = []; 26 | 27 | // searched text by user 28 | String query = ""; 29 | 30 | List searchFoodsFromList(String query) { 31 | final List suggestionList = query.isEmpty 32 | ? searchedFoodList // show all foods 33 | : searchedFoodList.where((FoodModel food) { 34 | String _foodName = food.name.toLowerCase(); 35 | String _query = query.toLowerCase(); 36 | 37 | bool isMatch = _foodName.contains(_query); 38 | return (isMatch); 39 | }).toList(); 40 | return suggestionList; 41 | } 42 | 43 | void loadFoodList() { 44 | mFirebaseHelper.fetchAllFood().then((List foods) { 45 | searchedFoodList = foods; 46 | notifyListeners(); 47 | }); 48 | } 49 | 50 | setQuery(String q) { 51 | query = q; 52 | notifyListeners(); 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /lib/models/food_model.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | class FoodModel { 18 | final String description; 19 | final String discount; 20 | final String image; 21 | final String menuId; 22 | final String name; 23 | final String price; 24 | final String keys; 25 | 26 | FoodModel( 27 | {required this.description, 28 | required this.discount, 29 | required this.image, 30 | required this.menuId, 31 | required this.name, 32 | required this.price, 33 | required this.keys}); 34 | 35 | Map toMap(FoodModel food) { 36 | var data = Map(); 37 | data['description'] = food.description; 38 | data['discount'] = food.discount; 39 | data['image'] = food.image; 40 | data['menuId'] = food.menuId; 41 | data['name'] = food.name; 42 | data['price'] = food.price; 43 | data['keys'] = food.keys; 44 | return data; 45 | } 46 | 47 | factory FoodModel.fromMap( 48 | Map mapData, 49 | ) { 50 | return FoodModel( 51 | description: mapData['description'], 52 | discount: mapData['discount'], 53 | image: mapData['image'], 54 | menuId: mapData['menuId'], 55 | name: mapData['name'], 56 | price: mapData['price'], 57 | keys: mapData['keys'], 58 | ); 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /lib/blocs/RegisterPageBloc.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:email_validator/email_validator.dart'; 18 | import 'package:flutter/material.dart'; 19 | import 'package:food_delivery_app/resourese/auth_methods.dart'; 20 | 21 | class RegisterPageBloc with ChangeNotifier { 22 | AuthMethods mAuthMethods = AuthMethods(); 23 | 24 | bool isRegisterPressed = false; 25 | 26 | String? validateEmail(String email) { 27 | if (email.isEmpty && EmailValidator.validate(email)) { 28 | return 'Please enter valid email'; 29 | } 30 | return null; 31 | } 32 | 33 | String? validatePassword(String password) { 34 | if (password.isEmpty && password.length < 6) { 35 | return 'Password should atleast contain 6 character'; 36 | } 37 | return null; 38 | } 39 | 40 | String? validatePhone(String phone) { 41 | if (phone.isEmpty && phone.length < 6) { 42 | return 'Invalid PhoneNo'; 43 | } 44 | return null; 45 | } 46 | 47 | Future validateFormAndRegister(GlobalKey formKey, 48 | String userName, String password, String phone) async { 49 | isRegisterPressed = true; 50 | notifyListeners(); 51 | if (formKey.currentState?.validate() == true) { 52 | await mAuthMethods.handleSignUp(phone, userName, password); 53 | isRegisterPressed = false; 54 | notifyListeners(); 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /lib/blocs/CartPageBloc.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:flutter/foundation.dart'; 18 | import 'package:flutter/material.dart'; 19 | import 'package:food_delivery_app/models/food_model.dart'; 20 | import 'package:food_delivery_app/resourese/databaseSQL.dart'; 21 | import 'package:food_delivery_app/resourese/firebase_helper.dart'; 22 | import 'package:food_delivery_app/screens/homepage.dart'; 23 | 24 | class CartPageBloc with ChangeNotifier { 25 | List foodList = []; 26 | int totalPrice = 0; 27 | 28 | FirebaseHelper mFirebaseHelper = FirebaseHelper(); 29 | late DatabaseSql databaseSql; 30 | 31 | BuildContext? context; 32 | 33 | getDatabaseValue() async { 34 | databaseSql = DatabaseSql(); 35 | await databaseSql.openDatabaseSql(); 36 | foodList = await databaseSql.getData(); 37 | //calculating total price 38 | foodList.forEach((food) { 39 | int foodItemPrice = int.parse(food.price); 40 | totalPrice += foodItemPrice; 41 | }); 42 | notifyListeners(); 43 | } 44 | 45 | // ignore: non_constant_identifier_names 46 | orderPlaceToFirebase(String name, String address) async { 47 | mFirebaseHelper 48 | .addOrder(totalPrice.toString(), foodList, name, address) 49 | .then((isAdded) { 50 | notifyListeners(); 51 | if (context != null) { 52 | Navigator.pushReplacement(context!, 53 | MaterialPageRoute(builder: (BuildContext context) => HomePage())); 54 | } 55 | }); 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /windows/runner/flutter_window.cpp: -------------------------------------------------------------------------------- 1 | #include "flutter_window.h" 2 | 3 | #include 4 | 5 | #include "flutter/generated_plugin_registrant.h" 6 | 7 | FlutterWindow::FlutterWindow(RunLoop* run_loop, 8 | const flutter::DartProject& project) 9 | : run_loop_(run_loop), project_(project) {} 10 | 11 | FlutterWindow::~FlutterWindow() {} 12 | 13 | bool FlutterWindow::OnCreate() { 14 | if (!Win32Window::OnCreate()) { 15 | return false; 16 | } 17 | 18 | RECT frame = GetClientArea(); 19 | 20 | // The size here must match the window dimensions to avoid unnecessary surface 21 | // creation / destruction in the startup path. 22 | flutter_controller_ = std::make_unique( 23 | frame.right - frame.left, frame.bottom - frame.top, project_); 24 | // Ensure that basic setup of the controller was successful. 25 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 26 | return false; 27 | } 28 | RegisterPlugins(flutter_controller_->engine()); 29 | run_loop_->RegisterFlutterInstance(flutter_controller_->engine()); 30 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 31 | return true; 32 | } 33 | 34 | void FlutterWindow::OnDestroy() { 35 | if (flutter_controller_) { 36 | run_loop_->UnregisterFlutterInstance(flutter_controller_->engine()); 37 | flutter_controller_ = nullptr; 38 | } 39 | 40 | Win32Window::OnDestroy(); 41 | } 42 | 43 | LRESULT 44 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 45 | WPARAM const wparam, 46 | LPARAM const lparam) noexcept { 47 | // Give Flutter, including plugins, an opporutunity to handle window messages. 48 | if (flutter_controller_) { 49 | std::optional result = 50 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 51 | lparam); 52 | if (result) { 53 | return *result; 54 | } 55 | } 56 | 57 | switch (message) { 58 | case WM_FONTCHANGE: 59 | flutter_controller_->engine()->ReloadSystemFonts(); 60 | break; 61 | } 62 | 63 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 64 | } 65 | -------------------------------------------------------------------------------- /lib/widgets/categorywidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:food_delivery_app/models/category_model.dart'; 3 | import 'package:food_delivery_app/screens/CategoryListPage.dart'; 4 | import 'package:food_delivery_app/utils/universal_variables.dart'; 5 | 6 | class CategoryWidget extends StatelessWidget { 7 | final CategoryModel category; 8 | CategoryWidget(this.category); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | gotoCategoryList() { 13 | Navigator.push(context, 14 | MaterialPageRoute(builder: (context) => CategoryListPage(category))); 15 | } 16 | 17 | return GestureDetector( 18 | onTap: () => gotoCategoryList(), 19 | child: Container( 20 | padding: EdgeInsets.fromLTRB(20.0, 0.0, 0.0, 0.0), 21 | child: Column( 22 | crossAxisAlignment: CrossAxisAlignment.start, 23 | children: [ 24 | Container( 25 | height: 200.0, 26 | child: ClipRRect( 27 | borderRadius: BorderRadius.circular(10.0), 28 | child: Image.network( 29 | category.image, 30 | fit: BoxFit.cover, 31 | ), 32 | ), 33 | ), 34 | Text( 35 | category.name, 36 | style: TextStyle( 37 | fontSize: 25.0, 38 | fontWeight: FontWeight.bold, 39 | color: Colors.black), 40 | ), 41 | Row( 42 | children: [ 43 | SizedBox( 44 | height: 10.0, 45 | ), 46 | Icon( 47 | Icons.star, 48 | color: UniversalVariables.orangeAccentColor, 49 | ), 50 | Text( 51 | "4.0", 52 | style: TextStyle( 53 | fontWeight: FontWeight.bold, 54 | color: UniversalVariables.orangeAccentColor), 55 | ), 56 | SizedBox( 57 | width: 5.0, 58 | ), 59 | Text( 60 | "Cafe Western Food", 61 | style: TextStyle(color: Colors.black45), 62 | ), 63 | ], 64 | ), 65 | ], 66 | ), 67 | ), 68 | ); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /windows/runner/run_loop.cpp: -------------------------------------------------------------------------------- 1 | #include "run_loop.h" 2 | 3 | #include 4 | 5 | #include 6 | 7 | RunLoop::RunLoop() {} 8 | 9 | RunLoop::~RunLoop() {} 10 | 11 | void RunLoop::Run() { 12 | bool keep_running = true; 13 | TimePoint next_flutter_event_time = TimePoint::clock::now(); 14 | while (keep_running) { 15 | std::chrono::nanoseconds wait_duration = 16 | std::max(std::chrono::nanoseconds(0), 17 | next_flutter_event_time - TimePoint::clock::now()); 18 | ::MsgWaitForMultipleObjects( 19 | 0, nullptr, FALSE, static_cast(wait_duration.count() / 1000), 20 | QS_ALLINPUT); 21 | bool processed_events = false; 22 | MSG message; 23 | // All pending Windows messages must be processed; MsgWaitForMultipleObjects 24 | // won't return again for items left in the queue after PeekMessage. 25 | while (::PeekMessage(&message, nullptr, 0, 0, PM_REMOVE)) { 26 | processed_events = true; 27 | if (message.message == WM_QUIT) { 28 | keep_running = false; 29 | break; 30 | } 31 | ::TranslateMessage(&message); 32 | ::DispatchMessage(&message); 33 | // Allow Flutter to process messages each time a Windows message is 34 | // processed, to prevent starvation. 35 | next_flutter_event_time = 36 | std::min(next_flutter_event_time, ProcessFlutterMessages()); 37 | } 38 | // If the PeekMessage loop didn't run, process Flutter messages. 39 | if (!processed_events) { 40 | next_flutter_event_time = 41 | std::min(next_flutter_event_time, ProcessFlutterMessages()); 42 | } 43 | } 44 | } 45 | 46 | void RunLoop::RegisterFlutterInstance( 47 | flutter::FlutterEngine* flutter_instance) { 48 | flutter_instances_.insert(flutter_instance); 49 | } 50 | 51 | void RunLoop::UnregisterFlutterInstance( 52 | flutter::FlutterEngine* flutter_instance) { 53 | flutter_instances_.erase(flutter_instance); 54 | } 55 | 56 | RunLoop::TimePoint RunLoop::ProcessFlutterMessages() { 57 | TimePoint next_event_time = TimePoint::max(); 58 | for (auto instance : flutter_instances_) { 59 | std::chrono::nanoseconds wait_duration = instance->ProcessMessages(); 60 | if (wait_duration != std::chrono::nanoseconds::max()) { 61 | next_event_time = 62 | std::min(next_event_time, TimePoint::clock::now() + wait_duration); 63 | } 64 | } 65 | return next_event_time; 66 | } 67 | -------------------------------------------------------------------------------- /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 = '12' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'com.google.gms.google-services' 26 | apply plugin: 'kotlin-android' 27 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 28 | 29 | android { 30 | compileSdkVersion 33 31 | 32 | compileOptions { 33 | sourceCompatibility JavaVersion.VERSION_1_8 34 | targetCompatibility JavaVersion.VERSION_1_8 35 | } 36 | sourceSets { 37 | main.java.srcDirs += 'src/main/kotlin' 38 | } 39 | 40 | lintOptions { 41 | disable 'InvalidPackage' 42 | } 43 | 44 | defaultConfig { 45 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 46 | applicationId "com.example.food_delivery_app" 47 | minSdkVersion 23 48 | targetSdkVersion 33 49 | versionCode flutterVersionCode.toInteger() 50 | versionName flutterVersionName 51 | multiDexEnabled true 52 | } 53 | 54 | buildTypes { 55 | release { 56 | // TODO: Add your own signing config for the release build. 57 | // Signing with the debug keys for now, so `flutter run --release` works. 58 | signingConfig signingConfigs.debug 59 | } 60 | } 61 | } 62 | 63 | flutter { 64 | source '../..' 65 | } 66 | 67 | dependencies { 68 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 69 | implementation 'com.android.support:multidex:1.0.3' 70 | implementation 'androidx.multidex:multidex:2.0.1' 71 | 72 | } 73 | apply plugin: 'com.google.gms.google-services' -------------------------------------------------------------------------------- /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 | 20 | 24 | 28 | 33 | 37 | 38 | 39 | 40 | 41 | 42 | 44 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:firebase_auth/firebase_auth.dart'; 18 | import 'package:firebase_core/firebase_core.dart'; 19 | import 'package:flutter/material.dart'; 20 | import 'package:food_delivery_app/resourese/auth_methods.dart'; 21 | import 'package:food_delivery_app/screens/homepage.dart'; 22 | import 'package:food_delivery_app/screens/loginpages/login.dart'; 23 | import 'package:food_delivery_app/utils/universal_variables.dart'; 24 | 25 | void main() async { 26 | WidgetsFlutterBinding.ensureInitialized(); 27 | await Firebase.initializeApp(); 28 | 29 | runApp(MyApp()); 30 | } 31 | 32 | class MyApp extends StatefulWidget { 33 | // This widget is the root of your application. 34 | @override 35 | _MyAppState createState() => _MyAppState(); 36 | } 37 | 38 | class _MyAppState extends State { 39 | final AuthMethods _authMethods = AuthMethods(); 40 | @override 41 | Widget build(BuildContext context) { 42 | return MaterialApp( 43 | title: 'Food App', 44 | debugShowCheckedModeBanner: false, 45 | theme: ThemeData( 46 | primarySwatch: MaterialColor( 47 | UniversalVariables.orangeColor.value, 48 | { 49 | 50: UniversalVariables.orangeColor, 50 | 100: UniversalVariables.orangeColor, 51 | 200: UniversalVariables.orangeColor, 52 | 300: UniversalVariables.orangeColor, 53 | 400: UniversalVariables.orangeColor, 54 | 500: UniversalVariables.orangeColor, 55 | 600: UniversalVariables.orangeColor, 56 | 700: UniversalVariables.orangeColor, 57 | 800: UniversalVariables.orangeColor, 58 | 900: UniversalVariables.orangeColor, 59 | }, 60 | ), 61 | visualDensity: VisualDensity.adaptivePlatformDensity, 62 | ), 63 | home: StreamBuilder( 64 | stream: _authMethods.onAuthStateChanged, 65 | builder: (context, AsyncSnapshot snapshot) { 66 | if (snapshot.hasData && snapshot.data != null) { 67 | return HomePage(); 68 | } else { 69 | return LoginPage(); 70 | } 71 | }, 72 | ), 73 | ); 74 | } 75 | } 76 | -------------------------------------------------------------------------------- /lib/resourese/databaseSQL.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'dart:async'; 18 | import 'package:food_delivery_app/models/food_model.dart'; 19 | import 'package:path/path.dart'; 20 | import 'package:sqflite/sqflite.dart'; 21 | 22 | class DatabaseSql { 23 | late Database database; 24 | int? count; 25 | 26 | Future openDatabaseSql() async { 27 | // Get a location using getDatabasesPath 28 | var databasesPath = await getDatabasesPath(); 29 | String path = join(databasesPath, 'cart.db'); 30 | 31 | // open the database 32 | database = await openDatabase( 33 | path, 34 | version: 1, 35 | onCreate: (Database db, int version) async { 36 | // When creating the db, create the table 37 | await db.execute( 38 | "CREATE TABLE cartTable(keys TEXT PRIMARY KEY, name TEXT, price TEXT,menuId TEXT,image TEXT,discount TEXT,description TEXT)", 39 | ); 40 | }, 41 | ); 42 | } 43 | 44 | Future insertData(FoodModel food) async { 45 | await database.transaction((txn) async { 46 | int id1 = await txn.rawInsert( 47 | 'INSERT INTO cartTable(keys, name, price,menuId,image,discount,description) VALUES("${food.keys}","${food.name}","${food.price}","${food.menuId}","${food.image}","${food.discount}","${food.description}")'); 48 | print('inserted1: $id1'); 49 | }); 50 | return true; 51 | } 52 | 53 | Future countData() async { 54 | count = Sqflite.firstIntValue( 55 | await database.rawQuery('SELECT COUNT(*) FROM cartTable')); 56 | assert(count == 2); 57 | return count; 58 | } 59 | 60 | Future deleteData(String id) async { 61 | count = 62 | await database.rawDelete('DELETE FROM cartTable WHERE keys = ?', [id]); 63 | print(id); 64 | return true; 65 | } 66 | 67 | Future deleteAllData() async { 68 | count = await database.rawDelete('DELETE FROM cartTable '); 69 | return true; 70 | } 71 | 72 | Future> getData() async { 73 | List foodList = []; 74 | List list = await database.rawQuery('SELECT * FROM cartTable'); 75 | // convert to list food 76 | list.forEach((map) { 77 | foodList.add(FoodModel.fromMap(map)); 78 | }); 79 | return foodList; 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /lib/blocs/FoodDetailPageBloc.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'dart:math'; 18 | 19 | import 'package:flutter/foundation.dart'; 20 | import 'package:flutter/material.dart'; 21 | import 'package:food_delivery_app/models/food_model.dart'; 22 | import 'package:food_delivery_app/resourese/auth_methods.dart'; 23 | import 'package:food_delivery_app/resourese/databaseSQL.dart'; 24 | import 'package:food_delivery_app/resourese/firebase_helper.dart'; 25 | 26 | class FoodDetailPageBloc with ChangeNotifier { 27 | AuthMethods mAuthMethods = AuthMethods(); 28 | FirebaseHelper mFirebaseHelper = FirebaseHelper(); 29 | 30 | List foodList = []; 31 | 32 | // I dont implemented rating system, 33 | // so just for good UI, i am showing random value of rates from 0.00 to 5.00, 34 | // I been lazy here XD. 35 | var random = new Random(); 36 | String rating = "1.00"; 37 | 38 | // no of items add to list 39 | int mItemCount = 1; 40 | 41 | BuildContext? context; 42 | 43 | addToCart(FoodModel food) async { 44 | DatabaseSql databaseSql = DatabaseSql(); 45 | await databaseSql.openDatabaseSql(); 46 | await databaseSql.insertData(food); 47 | await databaseSql.getData(); 48 | final snackBar = SnackBar( 49 | content: Text('Food Added To Cart'), 50 | action: SnackBarAction( 51 | label: 'Undo', 52 | onPressed: () { 53 | // Some code to undo the change. 54 | }, 55 | ), 56 | ); 57 | mItemCount = 1; 58 | if (context != null) { 59 | ScaffoldMessenger.of(context!).showSnackBar(snackBar); 60 | } 61 | notifyListeners(); 62 | } 63 | 64 | getPopularFoodList() { 65 | // setted 06 id category as popular. 66 | mFirebaseHelper.fetchSpecifiedFoods("06").then((List list) { 67 | foodList = list; 68 | notifyListeners(); 69 | }); 70 | } 71 | 72 | void increamentItems() { 73 | mItemCount++; 74 | notifyListeners(); 75 | } 76 | 77 | void decreamentItems() { 78 | mItemCount--; 79 | notifyListeners(); 80 | } 81 | 82 | void generateRandomRating() { 83 | rating = doubleInRange(random, 3.5, 5.0).toStringAsFixed(1); 84 | } 85 | 86 | double doubleInRange(Random source, num start, num end) => 87 | source.nextDouble() * (end - start) + start; 88 | } 89 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Food Delivery App 2 | ![](banner.png) 3 | 4 | 5 | This is a food ordering & delivery application built with a flutter framework and firebase real-time database. 6 | Anyone can use this code for their own purpose. If you are interested please make your contribution to the code. 7 | 8 | release 9 | commit-activity 10 | forks 11 | stars 12 | contributors 13 | build 14 | license 15 |

16 | 17 | ## Application features 18 | 19 | - Simple UI for food delivery app's 20 | 21 | - Use SQLite to store order data in a local database 22 | 23 | - Used firebase real-time database for syncing data to server-side 24 | 25 | - Can add one or more food in the cart section 26 | 27 | - Automatically total bill will generate. 28 | 29 | - Search different food/types 30 | 31 | - View previous ordered food's from your account 32 | 33 | - Google/mail auth login integrated 34 | 35 | ### Home Screen & Loading Screen 36 | ------ 37 | 38 | ### Profile Screen 39 | ------ 40 | 41 | # Firebase Database 42 | 43 | 44 | 45 | ## Built With 🎯 46 | **A lot of love and Flutter** 47 | 48 | ## Contributing 49 | 50 | Make Pull requests which improve the functionality of the application in any sorts. It should conform with the following conditions. 51 | * Clear , short , crisp description of the PR. 52 | * Should add on to the value of the application. 53 | 54 | 55 | ## Acknowledgments 💖 56 | 57 | * To my family👪 and friends 👫 who always kept me motivated. 58 | * To the community of computer science 💻. 59 | 60 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /lib/resourese/auth_methods.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:firebase_auth/firebase_auth.dart'; 18 | import 'package:firebase_database/firebase_database.dart'; 19 | import 'package:food_delivery_app/models/user_model.dart'; 20 | 21 | class AuthMethods { 22 | // Firebase auth, will use to get user info and registration and signing 23 | final FirebaseAuth _auth = FirebaseAuth.instance; 24 | 25 | // Firebase Database, will use to get reference. 26 | static final FirebaseDatabase _database = FirebaseDatabase.instance; 27 | static final DatabaseReference _userReference = 28 | _database.reference().child("Users"); 29 | 30 | // current user getter 31 | Future getCurrentUser() async { 32 | User? currentUser; 33 | currentUser = _auth.currentUser; 34 | return currentUser!; 35 | } 36 | 37 | // gets auth state of user through out the life cycle of the app 38 | Stream get onAuthStateChanged { 39 | return _auth.authStateChanges().map((user) => user); 40 | } 41 | 42 | //sign in current user with email and password 43 | Future handleSignInEmail( 44 | String email, String password) async { 45 | final UserCredential userCredential = await _auth 46 | .signInWithEmailAndPassword(email: email, password: password); 47 | 48 | assert(userCredential.user != null); 49 | final User? currentUser = _auth.currentUser; 50 | assert(userCredential.user?.uid == currentUser?.uid); 51 | 52 | print('signInEmail succeeded: $userCredential'); 53 | 54 | return userCredential; 55 | } 56 | 57 | // register new user with phone email password details 58 | Future handleSignUp(phone, email, password) async { 59 | final UserCredential userCredential = await _auth 60 | .createUserWithEmailAndPassword(email: email, password: password); 61 | if (userCredential.user != null) { 62 | await addDataToDb(userCredential.user!, email, phone, password); 63 | } 64 | return userCredential; 65 | } 66 | 67 | // after sign up, add user data to firebase realtime database 68 | Future addDataToDb( 69 | User currentUser, String username, String phone, String password) async { 70 | UserModel user = UserModel( 71 | uid: currentUser.uid, 72 | email: currentUser.email, 73 | phone: phone, 74 | password: password); 75 | 76 | _userReference.child(currentUser.uid).set(user.toMap(user)); 77 | } 78 | 79 | // Logs out current user from the application 80 | Future logout() async { 81 | await _auth.signOut(); 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /lib/widgets/cartitemswidget.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:flutter/material.dart'; 18 | import 'package:food_delivery_app/models/food_model.dart'; 19 | import 'package:food_delivery_app/resourese/databaseSQL.dart'; 20 | import 'package:food_delivery_app/screens/CartPage.dart'; 21 | import 'package:food_delivery_app/utils/universal_variables.dart'; 22 | 23 | class CartItems extends StatefulWidget { 24 | final FoodModel fooddata; 25 | CartItems(this.fooddata); 26 | 27 | @override 28 | _CartItemsState createState() => _CartItemsState(); 29 | } 30 | 31 | class _CartItemsState extends State { 32 | @override 33 | Widget build(BuildContext context) { 34 | return GestureDetector( 35 | child: Container( 36 | color: UniversalVariables.whiteLightColor, 37 | padding: EdgeInsets.symmetric(horizontal: 0.0, vertical: 10.0), 38 | child: ListTile( 39 | leading: Container( 40 | child: ClipRRect( 41 | borderRadius: BorderRadius.circular(5.0), 42 | child: Image.network( 43 | widget.fooddata.image, 44 | fit: BoxFit.cover, 45 | )), 46 | height: 80.0, 47 | width: 80.0, 48 | ), 49 | title: Text( 50 | widget.fooddata.name, 51 | style: TextStyle( 52 | fontSize: 17.0, 53 | fontWeight: FontWeight.bold, 54 | color: Colors.black), 55 | ), 56 | subtitle: Text( 57 | "${widget.fooddata.price}\$", 58 | style: 59 | TextStyle(fontWeight: FontWeight.bold, color: Colors.black54), 60 | ), 61 | trailing: IconButton( 62 | icon: Icon( 63 | Icons.delete, 64 | size: 20.0, 65 | ), 66 | onPressed: () => deleteFoodFromCart(widget.fooddata.keys), 67 | ), 68 | )), 69 | ); 70 | } 71 | 72 | deleteFoodFromCart(String keys) async { 73 | DatabaseSql databaseSql = DatabaseSql(); 74 | await databaseSql.openDatabaseSql(); 75 | bool isDeleted = await databaseSql.deleteData(keys); 76 | if (isDeleted) { 77 | final snackBar = SnackBar( 78 | content: Text('Removed Food Item'), 79 | action: SnackBarAction( 80 | label: 'Undo', 81 | onPressed: () { 82 | // todo code to undo the change. 83 | }, 84 | ), 85 | ); 86 | ScaffoldMessenger.of(context).showSnackBar(snackBar); 87 | Navigator.pushReplacement(context, 88 | MaterialPageRoute(builder: (BuildContext context) => CartPage())); 89 | } 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: food_delivery_app 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: 2.0.0+1 19 | 20 | environment: 21 | sdk: ">=2.12.0 <3.0.0" 22 | 23 | dependencies: 24 | flutter: 25 | sdk: flutter 26 | 27 | 28 | # The following adds the Cupertino Icons font to your application. 29 | # Use with the CupertinoIcons class for iOS style icons. 30 | cupertino_icons: ^1.0.6 31 | firebase_auth: 32 | google_sign_in: ^6.1.5 33 | email_validator: ^2.1.17 34 | #database 35 | firebase_database: 36 | #bloc pattern 37 | provider: ^6.0.5 38 | sqflite: 39 | path: 40 | #toast msg 41 | toast: ^0.3.0 42 | #for rating star 43 | flutter_rating_bar: ^4.0.1 44 | carousel_slider: ^4.2.1 45 | firebase_core: ^2.17.0 46 | 47 | dev_dependencies: 48 | flutter_test: 49 | sdk: flutter 50 | 51 | # For information on the generic Dart part of this file, see the 52 | # following page: https://dart.dev/tools/pub/pubspec 53 | 54 | # The following section is specific to Flutter. 55 | flutter: 56 | 57 | # The following line ensures that the Material Icons font is 58 | # included with your application, so that you can use the icons in 59 | # the material Icons class. 60 | uses-material-design: true 61 | 62 | # To add assets to your application, add an assets section, like this: 63 | assets: 64 | - assets/logo.jpg 65 | # - images/a_dot_ham.jpeg 66 | 67 | # An image asset can refer to one or more resolution-specific "variants", see 68 | # https://flutter.dev/assets-and-images/#resolution-aware. 69 | 70 | # For details regarding adding assets from package dependencies, see 71 | # https://flutter.dev/assets-and-images/#from-packages 72 | 73 | # To add custom fonts to your application, add a fonts section here, 74 | # in this "flutter" section. Each entry in this list should have a 75 | # "family" key with the font family name, and a "fonts" key with a 76 | # list giving the asset and other descriptors for the font. For 77 | # example: 78 | # fonts: 79 | # - family: Schyler 80 | # fonts: 81 | # - asset: fonts/Schyler-Regular.ttf 82 | # - asset: fonts/Schyler-Italic.ttf 83 | # style: italic 84 | # - family: Trajan Pro 85 | # fonts: 86 | # - asset: fonts/TrajanPro.ttf 87 | # - asset: fonts/TrajanPro_Bold.ttf 88 | # weight: 700 89 | # 90 | # For details regarding fonts from package dependencies, 91 | # see https://flutter.dev/custom-fonts/#from-packages 92 | -------------------------------------------------------------------------------- /windows/runner/Runner.rc: -------------------------------------------------------------------------------- 1 | // Microsoft Visual C++ generated resource script. 2 | // 3 | #pragma code_page(65001) 4 | #include "resource.h" 5 | 6 | #define APSTUDIO_READONLY_SYMBOLS 7 | ///////////////////////////////////////////////////////////////////////////// 8 | // 9 | // Generated from the TEXTINCLUDE 2 resource. 10 | // 11 | #include "winres.h" 12 | 13 | ///////////////////////////////////////////////////////////////////////////// 14 | #undef APSTUDIO_READONLY_SYMBOLS 15 | 16 | ///////////////////////////////////////////////////////////////////////////// 17 | // English (United States) resources 18 | 19 | #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) 20 | LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 21 | 22 | #ifdef APSTUDIO_INVOKED 23 | ///////////////////////////////////////////////////////////////////////////// 24 | // 25 | // TEXTINCLUDE 26 | // 27 | 28 | 1 TEXTINCLUDE 29 | BEGIN 30 | "resource.h\0" 31 | END 32 | 33 | 2 TEXTINCLUDE 34 | BEGIN 35 | "#include ""winres.h""\r\n" 36 | "\0" 37 | END 38 | 39 | 3 TEXTINCLUDE 40 | BEGIN 41 | "\r\n" 42 | "\0" 43 | END 44 | 45 | #endif // APSTUDIO_INVOKED 46 | 47 | 48 | ///////////////////////////////////////////////////////////////////////////// 49 | // 50 | // Icon 51 | // 52 | 53 | // Icon with lowest ID value placed first to ensure application icon 54 | // remains consistent on all systems. 55 | IDI_APP_ICON ICON "resources\\app_icon.ico" 56 | 57 | 58 | ///////////////////////////////////////////////////////////////////////////// 59 | // 60 | // Version 61 | // 62 | 63 | #ifdef FLUTTER_BUILD_NUMBER 64 | #define VERSION_AS_NUMBER FLUTTER_BUILD_NUMBER 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0 67 | #endif 68 | 69 | #ifdef FLUTTER_BUILD_NAME 70 | #define VERSION_AS_STRING #FLUTTER_BUILD_NAME 71 | #else 72 | #define VERSION_AS_STRING "1.0.0" 73 | #endif 74 | 75 | VS_VERSION_INFO VERSIONINFO 76 | FILEVERSION VERSION_AS_NUMBER 77 | PRODUCTVERSION VERSION_AS_NUMBER 78 | FILEFLAGSMASK VS_FFI_FILEFLAGSMASK 79 | #ifdef _DEBUG 80 | FILEFLAGS VS_FF_DEBUG 81 | #else 82 | FILEFLAGS 0x0L 83 | #endif 84 | FILEOS VOS__WINDOWS32 85 | FILETYPE VFT_APP 86 | FILESUBTYPE 0x0L 87 | BEGIN 88 | BLOCK "StringFileInfo" 89 | BEGIN 90 | BLOCK "040904e4" 91 | BEGIN 92 | VALUE "CompanyName", "com.example" "\0" 93 | VALUE "FileDescription", "A new Flutter project." "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "food_delivery_app" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2020 com.example. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "food_delivery_app.exe" "\0" 98 | VALUE "ProductName", "food_delivery_app" "\0" 99 | VALUE "ProductVersion", VERSION_AS_STRING "\0" 100 | END 101 | END 102 | BLOCK "VarFileInfo" 103 | BEGIN 104 | VALUE "Translation", 0x409, 1252 105 | END 106 | END 107 | 108 | #endif // English (United States) resources 109 | ///////////////////////////////////////////////////////////////////////////// 110 | 111 | 112 | 113 | #ifndef APSTUDIO_INVOKED 114 | ///////////////////////////////////////////////////////////////////////////// 115 | // 116 | // Generated from the TEXTINCLUDE 3 resource. 117 | // 118 | 119 | 120 | ///////////////////////////////////////////////////////////////////////////// 121 | #endif // not APSTUDIO_INVOKED 122 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/runner/win32_window.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_WIN32_WINDOW_H_ 2 | #define RUNNER_WIN32_WINDOW_H_ 3 | 4 | #include 5 | 6 | #include 7 | #include 8 | #include 9 | 10 | // A class abstraction for a high DPI-aware Win32 Window. Intended to be 11 | // inherited from by classes that wish to specialize with custom 12 | // rendering and input handling 13 | class Win32Window { 14 | public: 15 | struct Point { 16 | unsigned int x; 17 | unsigned int y; 18 | Point(unsigned int x, unsigned int y) : x(x), y(y) {} 19 | }; 20 | 21 | struct Size { 22 | unsigned int width; 23 | unsigned int height; 24 | Size(unsigned int width, unsigned int height) 25 | : width(width), height(height) {} 26 | }; 27 | 28 | Win32Window(); 29 | virtual ~Win32Window(); 30 | 31 | // Creates and shows a win32 window with |title| and position and size using 32 | // |origin| and |size|. New windows are created on the default monitor. Window 33 | // sizes are specified to the OS in physical pixels, hence to ensure a 34 | // consistent size to will treat the width height passed in to this function 35 | // as logical pixels and scale to appropriate for the default monitor. Returns 36 | // true if the window was created successfully. 37 | bool CreateAndShow(const std::wstring& title, 38 | const Point& origin, 39 | const Size& size); 40 | 41 | // Release OS resources associated with window. 42 | void Destroy(); 43 | 44 | // Inserts |content| into the window tree. 45 | void SetChildContent(HWND content); 46 | 47 | // Returns the backing Window handle to enable clients to set icon and other 48 | // window properties. Returns nullptr if the window has been destroyed. 49 | HWND GetHandle(); 50 | 51 | // If true, closing this window will quit the application. 52 | void SetQuitOnClose(bool quit_on_close); 53 | 54 | // Return a RECT representing the bounds of the current client area. 55 | RECT GetClientArea(); 56 | 57 | protected: 58 | // Processes and route salient window messages for mouse handling, 59 | // size change and DPI. Delegates handling of these to member overloads that 60 | // inheriting classes can handle. 61 | virtual LRESULT MessageHandler(HWND window, 62 | UINT const message, 63 | WPARAM const wparam, 64 | LPARAM const lparam) noexcept; 65 | 66 | // Called when CreateAndShow is called, allowing subclass window-related 67 | // setup. Subclasses should return false if setup fails. 68 | virtual bool OnCreate(); 69 | 70 | // Called when Destroy is called. 71 | virtual void OnDestroy(); 72 | 73 | private: 74 | friend class WindowClassRegistrar; 75 | 76 | // OS callback called by message pump. Handles the WM_NCCREATE message which 77 | // is passed when the non-client area is being created and enables automatic 78 | // non-client DPI scaling so that the non-client area automatically 79 | // responsponds to changes in DPI. All other messages are handled by 80 | // MessageHandler. 81 | static LRESULT CALLBACK WndProc(HWND const window, 82 | UINT const message, 83 | WPARAM const wparam, 84 | LPARAM const lparam) noexcept; 85 | 86 | // Retrieves a class instance pointer for |window| 87 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 88 | 89 | bool quit_on_close_ = false; 90 | 91 | // window handle for top level window. 92 | HWND window_handle_ = nullptr; 93 | 94 | // window handle for hosted content. 95 | HWND child_content_ = nullptr; 96 | }; 97 | 98 | #endif // RUNNER_WIN32_WINDOW_H_ 99 | -------------------------------------------------------------------------------- /windows/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | project(food_delivery_app LANGUAGES CXX) 3 | 4 | set(BINARY_NAME "food_delivery_app") 5 | 6 | cmake_policy(SET CMP0063 NEW) 7 | 8 | set(CMAKE_INSTALL_RPATH "$ORIGIN/lib") 9 | 10 | # Configure build options. 11 | get_property(IS_MULTICONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) 12 | if(IS_MULTICONFIG) 13 | set(CMAKE_CONFIGURATION_TYPES "Debug;Profile;Release" 14 | CACHE STRING "" FORCE) 15 | else() 16 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 17 | set(CMAKE_BUILD_TYPE "Debug" CACHE 18 | STRING "Flutter build mode" FORCE) 19 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS 20 | "Debug" "Profile" "Release") 21 | endif() 22 | endif() 23 | 24 | set(CMAKE_EXE_LINKER_FLAGS_PROFILE "${CMAKE_EXE_LINKER_FLAGS_RELEASE}") 25 | set(CMAKE_SHARED_LINKER_FLAGS_PROFILE "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}") 26 | set(CMAKE_C_FLAGS_PROFILE "${CMAKE_C_FLAGS_RELEASE}") 27 | set(CMAKE_CXX_FLAGS_PROFILE "${CMAKE_CXX_FLAGS_RELEASE}") 28 | 29 | # Use Unicode for all projects. 30 | add_definitions(-DUNICODE -D_UNICODE) 31 | 32 | # Compilation settings that should be applied to most targets. 33 | function(APPLY_STANDARD_SETTINGS TARGET) 34 | target_compile_features(${TARGET} PUBLIC cxx_std_17) 35 | target_compile_options(${TARGET} PRIVATE /W4 /WX /wd"4100") 36 | target_compile_options(${TARGET} PRIVATE /EHsc) 37 | target_compile_definitions(${TARGET} PRIVATE "_HAS_EXCEPTIONS=0") 38 | target_compile_definitions(${TARGET} PRIVATE "$<$:_DEBUG>") 39 | endfunction() 40 | 41 | set(FLUTTER_MANAGED_DIR "${CMAKE_CURRENT_SOURCE_DIR}/flutter") 42 | 43 | # Flutter library and tool build rules. 44 | add_subdirectory(${FLUTTER_MANAGED_DIR}) 45 | 46 | # Application build 47 | add_subdirectory("runner") 48 | 49 | # Generated plugin build rules, which manage building the plugins and adding 50 | # them to the application. 51 | include(flutter/generated_plugins.cmake) 52 | 53 | 54 | # === Installation === 55 | # Support files are copied into place next to the executable, so that it can 56 | # run in place. This is done instead of making a separate bundle (as on Linux) 57 | # so that building and running from within Visual Studio will work. 58 | set(BUILD_BUNDLE_DIR "$") 59 | # Make the "install" step default, as it's required to run. 60 | set(CMAKE_VS_INCLUDE_INSTALL_TO_DEFAULT_BUILD 1) 61 | if(CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) 62 | set(CMAKE_INSTALL_PREFIX "${BUILD_BUNDLE_DIR}" CACHE PATH "..." FORCE) 63 | endif() 64 | 65 | set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data") 66 | set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}") 67 | 68 | install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}" 69 | COMPONENT Runtime) 70 | 71 | install(FILES "${FLUTTER_ICU_DATA_FILE}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 72 | COMPONENT Runtime) 73 | 74 | install(FILES "${FLUTTER_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 75 | COMPONENT Runtime) 76 | 77 | if(PLUGIN_BUNDLED_LIBRARIES) 78 | install(FILES "${PLUGIN_BUNDLED_LIBRARIES}" 79 | DESTINATION "${INSTALL_BUNDLE_LIB_DIR}" 80 | COMPONENT Runtime) 81 | endif() 82 | 83 | # Fully re-copy the assets directory on each build to avoid having stale files 84 | # from a previous install. 85 | set(FLUTTER_ASSET_DIR_NAME "flutter_assets") 86 | install(CODE " 87 | file(REMOVE_RECURSE \"${INSTALL_BUNDLE_DATA_DIR}/${FLUTTER_ASSET_DIR_NAME}\") 88 | " COMPONENT Runtime) 89 | install(DIRECTORY "${PROJECT_BUILD_DIR}/${FLUTTER_ASSET_DIR_NAME}" 90 | DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" COMPONENT Runtime) 91 | 92 | # Install the AOT library on non-Debug builds only. 93 | install(FILES "${AOT_LIBRARY}" DESTINATION "${INSTALL_BUNDLE_DATA_DIR}" 94 | CONFIGURATIONS Profile;Release 95 | COMPONENT Runtime) 96 | -------------------------------------------------------------------------------- /lib/screens/MyOrderPage.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:firebase_auth/firebase_auth.dart'; 18 | import 'package:flutter/cupertino.dart'; 19 | import 'package:flutter/material.dart'; 20 | import 'package:flutter/scheduler.dart'; 21 | import 'package:food_delivery_app/models/request_model.dart'; 22 | import 'package:food_delivery_app/resourese/auth_methods.dart'; 23 | import 'package:food_delivery_app/resourese/firebase_helper.dart'; 24 | import 'package:food_delivery_app/utils/universal_variables.dart'; 25 | import 'package:food_delivery_app/widgets/orderwidget.dart'; 26 | 27 | class MyOrderPage extends StatefulWidget { 28 | @override 29 | _MyOrderPageState createState() => _MyOrderPageState(); 30 | } 31 | 32 | class _MyOrderPageState extends State { 33 | List requestList = []; 34 | AuthMethods authMethods = AuthMethods(); 35 | FirebaseHelper mFirebaseHelper = FirebaseHelper(); 36 | late User currentUser; 37 | 38 | @override 39 | void initState() { 40 | super.initState(); 41 | SchedulerBinding.instance.addPostFrameCallback((timeStamp) async { 42 | currentUser = await authMethods.getCurrentUser(); 43 | mFirebaseHelper.fetchOrders(currentUser).then((List list) { 44 | // there are not much sync operation in myorder page, i.e didn;t made any bloc file :) 45 | setState(() { 46 | requestList = list; 47 | }); 48 | }); 49 | }); 50 | } 51 | 52 | @override 53 | Widget build(BuildContext context) { 54 | return Scaffold( 55 | appBar: AppBar( 56 | backgroundColor: Colors.transparent, 57 | elevation: 0.0, 58 | ), 59 | body: SingleChildScrollView( 60 | child: Column( 61 | crossAxisAlignment: CrossAxisAlignment.start, 62 | children: [ 63 | Padding( 64 | padding: const EdgeInsets.only(bottom: 10.0, left: 18.0), 65 | child: Text( 66 | "My Orders", 67 | style: TextStyle( 68 | color: UniversalVariables.orangeAccentColor, 69 | fontSize: 40.0, 70 | fontWeight: FontWeight.bold, 71 | ), 72 | ), 73 | ), 74 | Padding( 75 | padding: EdgeInsets.only(top: 0.0, left: 20.0), 76 | child: createListOfOrder(), 77 | ), 78 | ], 79 | ), 80 | ), 81 | ); 82 | } 83 | 84 | createListOfOrder() { 85 | return requestList.length == -1 86 | ? Center(child: CircularProgressIndicator()) 87 | : ListView.builder( 88 | physics: NeverScrollableScrollPhysics(), 89 | shrinkWrap: true, 90 | scrollDirection: Axis.vertical, 91 | itemCount: requestList.length, 92 | itemBuilder: (_, index) { 93 | return OrderWidget( 94 | requestList[index], 95 | ); 96 | }, 97 | ); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.15) 2 | 3 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 4 | 5 | # Configuration provided via flutter tool. 6 | include(${EPHEMERAL_DIR}/generated_config.cmake) 7 | 8 | # TODO: Move the rest of this into files in ephemeral. See 9 | # https://github.com/flutter/flutter/issues/57146. 10 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 11 | 12 | # === Flutter Library === 13 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 14 | 15 | # Published to parent scope for install step. 16 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 17 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 18 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 19 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 20 | 21 | list(APPEND FLUTTER_LIBRARY_HEADERS 22 | "flutter_export.h" 23 | "flutter_windows.h" 24 | "flutter_messenger.h" 25 | "flutter_plugin_registrar.h" 26 | ) 27 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 28 | add_library(flutter INTERFACE) 29 | target_include_directories(flutter INTERFACE 30 | "${EPHEMERAL_DIR}" 31 | ) 32 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 33 | add_dependencies(flutter flutter_assemble) 34 | 35 | # === Wrapper === 36 | list(APPEND CPP_WRAPPER_SOURCES_CORE 37 | "core_implementations.cc" 38 | "standard_codec.cc" 39 | ) 40 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 41 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 42 | "plugin_registrar.cc" 43 | ) 44 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 45 | list(APPEND CPP_WRAPPER_SOURCES_APP 46 | "flutter_engine.cc" 47 | "flutter_view_controller.cc" 48 | ) 49 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 50 | 51 | # Wrapper sources needed for a plugin. 52 | add_library(flutter_wrapper_plugin STATIC 53 | ${CPP_WRAPPER_SOURCES_CORE} 54 | ${CPP_WRAPPER_SOURCES_PLUGIN} 55 | ) 56 | apply_standard_settings(flutter_wrapper_plugin) 57 | set_target_properties(flutter_wrapper_plugin PROPERTIES 58 | POSITION_INDEPENDENT_CODE ON) 59 | set_target_properties(flutter_wrapper_plugin PROPERTIES 60 | CXX_VISIBILITY_PRESET hidden) 61 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 62 | target_include_directories(flutter_wrapper_plugin PUBLIC 63 | "${WRAPPER_ROOT}/include" 64 | ) 65 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 66 | 67 | # Wrapper sources needed for the runner. 68 | add_library(flutter_wrapper_app STATIC 69 | ${CPP_WRAPPER_SOURCES_CORE} 70 | ${CPP_WRAPPER_SOURCES_APP} 71 | ) 72 | apply_standard_settings(flutter_wrapper_app) 73 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 74 | target_include_directories(flutter_wrapper_app PUBLIC 75 | "${WRAPPER_ROOT}/include" 76 | ) 77 | add_dependencies(flutter_wrapper_app flutter_assemble) 78 | 79 | # === Flutter tool backend === 80 | # _phony_ is a non-existent file to force this command to run every time, 81 | # since currently there's no way to get a full input/output list from the 82 | # flutter tool. 83 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 84 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 85 | add_custom_command( 86 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 87 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 88 | ${CPP_WRAPPER_SOURCES_APP} 89 | ${PHONY_OUTPUT} 90 | COMMAND ${CMAKE_COMMAND} -E env 91 | ${FLUTTER_TOOL_ENVIRONMENT} 92 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 93 | windows-x64 $ 94 | ) 95 | add_custom_target(flutter_assemble DEPENDS 96 | "${FLUTTER_LIBRARY}" 97 | ${FLUTTER_LIBRARY_HEADERS} 98 | ${CPP_WRAPPER_SOURCES_CORE} 99 | ${CPP_WRAPPER_SOURCES_PLUGIN} 100 | ${CPP_WRAPPER_SOURCES_APP} 101 | ) 102 | -------------------------------------------------------------------------------- /lib/widgets/foodTitleWidget.dart: -------------------------------------------------------------------------------- 1 | import 'dart:math'; 2 | 3 | import 'package:flutter/material.dart'; 4 | import 'package:food_delivery_app/models/food_model.dart'; 5 | import 'package:food_delivery_app/screens/FoodDetailPage.dart'; 6 | import 'package:food_delivery_app/utils/universal_variables.dart'; 7 | 8 | class FoodTitleWidget extends StatelessWidget { 9 | final FoodModel fooddata; 10 | FoodTitleWidget(this.fooddata); 11 | @override 12 | Widget build(BuildContext context) { 13 | var random = new Random(); 14 | gotoFoodDetails() { 15 | // Navigator.push(context, MaterialPageRoute(builder: (context)=>FoodDetailPage(fooddata))); 16 | Navigator.push( 17 | context, 18 | PageRouteBuilder( 19 | transitionDuration: Duration(milliseconds: 500), 20 | pageBuilder: (_, __, ___) => FoodDetailPage(food: fooddata))); 21 | } 22 | 23 | return GestureDetector( 24 | onTap: () => gotoFoodDetails(), 25 | child: Container( 26 | padding: EdgeInsets.symmetric(horizontal: 20.0, vertical: 10.0), 27 | child: Row( 28 | children: [ 29 | Container( 30 | height: 120.0, 31 | width: 120.0, 32 | child: ClipRRect( 33 | borderRadius: BorderRadius.circular(10.0), 34 | child: Hero( 35 | tag: "avatar_${fooddata.keys.toString()}", 36 | child: Image.network( 37 | fooddata.image, 38 | fit: BoxFit.cover, 39 | )), 40 | ), 41 | ), 42 | SizedBox( 43 | width: 10.0, 44 | ), 45 | Wrap( 46 | spacing: 20.0, // gap between adjacent chips 47 | runSpacing: 4.0, // gap between lines 48 | direction: Axis.vertical, 49 | children: [ 50 | Text( 51 | "${fooddata.name}\$", 52 | overflow: TextOverflow.ellipsis, 53 | style: TextStyle( 54 | fontSize: 20.0, 55 | fontWeight: FontWeight.bold, 56 | color: Colors.black54), 57 | ), 58 | Row( 59 | children: [ 60 | SizedBox( 61 | height: 10.0, 62 | ), 63 | Icon( 64 | Icons.star, 65 | color: UniversalVariables.orangeAccentColor, 66 | ), 67 | Text( 68 | doubleInRange(random, 3.5, 5.0).toStringAsFixed(1), 69 | style: TextStyle( 70 | fontWeight: FontWeight.bold, 71 | color: UniversalVariables.orangeAccentColor), 72 | ), 73 | SizedBox( 74 | width: 5.0, 75 | ), 76 | Text( 77 | "Cafe Western Food", 78 | overflow: TextOverflow.ellipsis, 79 | style: TextStyle(color: Colors.black45), 80 | ), 81 | ], 82 | ), 83 | Text( 84 | "${fooddata.price}\$", 85 | style: TextStyle( 86 | fontSize: 17.0, 87 | fontWeight: FontWeight.bold, 88 | color: Colors.black54), 89 | ), 90 | ], 91 | ) 92 | ], 93 | )), 94 | ); 95 | } 96 | 97 | //we are generating random rating for now 98 | double doubleInRange(Random source, num start, num end) => 99 | source.nextDouble() * (end - start) + start; 100 | } 101 | -------------------------------------------------------------------------------- /lib/widgets/orderwidget.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:food_delivery_app/models/food_model.dart'; 3 | import 'package:food_delivery_app/models/request_model.dart'; 4 | import 'package:food_delivery_app/utils/universal_variables.dart'; 5 | 6 | import 'foodTitleWidget.dart'; 7 | 8 | class OrderWidget extends StatefulWidget { 9 | final RequestModel request; 10 | OrderWidget(this.request); 11 | 12 | @override 13 | _OrderWidgetState createState() => _OrderWidgetState(); 14 | } 15 | 16 | class _OrderWidgetState extends State { 17 | List steps = [ 18 | Step( 19 | content: Text('asd'), 20 | title: Text('Placed'), 21 | isActive: true, 22 | ), 23 | Step( 24 | title: Text('On The Way'), 25 | content: Text('asd'), 26 | isActive: true, 27 | ), 28 | Step( 29 | content: Text('Completed'), 30 | title: Text('asd'), 31 | isActive: true, 32 | ), 33 | ]; 34 | 35 | @override 36 | Widget build(BuildContext context) { 37 | return Container( 38 | padding: EdgeInsets.all(5.0), 39 | child: Column( 40 | crossAxisAlignment: CrossAxisAlignment.start, 41 | children: [ 42 | ListTile( 43 | title: Text( 44 | widget.request.name, 45 | style: TextStyle( 46 | color: Colors.black45, 47 | fontWeight: FontWeight.bold, 48 | ), 49 | ), 50 | subtitle: Text( 51 | widget.request.address, 52 | style: TextStyle( 53 | color: Colors.black38, 54 | fontWeight: FontWeight.normal, 55 | ), 56 | ), 57 | leading: CircleAvatar( 58 | backgroundImage: NetworkImage( 59 | "https://www.pngitem.com/pimgs/m/252-2523515_delivery-clipart-delivery-order-frames-illustrations.png"), 60 | ), 61 | trailing: Text( 62 | widget.request.total + " Rs.", 63 | style: TextStyle( 64 | color: UniversalVariables.orangeColor, 65 | fontSize: 20.0, 66 | fontWeight: FontWeight.bold, 67 | ), 68 | ), 69 | ), 70 | createSatusBar(), 71 | Container( 72 | padding: EdgeInsets.only(left: 20.0, top: 0.0), 73 | child: Column( 74 | crossAxisAlignment: CrossAxisAlignment.start, 75 | children: [ 76 | Text( 77 | "Your Food", 78 | style: TextStyle( 79 | color: Colors.black45, 80 | fontSize: 16.0, 81 | fontWeight: FontWeight.bold, 82 | ), 83 | ), 84 | createListOfFood(), 85 | ], 86 | ), 87 | ) 88 | ], 89 | ), 90 | ); 91 | } 92 | 93 | createSatusBar() { 94 | return Container( 95 | height: 100.0, 96 | child: Stepper( 97 | currentStep: int.parse(widget.request.status), 98 | steps: steps, 99 | type: StepperType.horizontal, 100 | physics: NeverScrollableScrollPhysics(), 101 | controlsBuilder: 102 | (BuildContext context, ControlsDetails controlsDetails) => 103 | Container( 104 | height: 0.0, 105 | ), 106 | ), 107 | ); 108 | } 109 | 110 | createListOfFood() { 111 | List foodList = []; 112 | widget.request.foodList.forEach((key, value) { 113 | FoodModel food = FoodModel( 114 | name: value["name"], 115 | image: value["image"], 116 | keys: value["keys"], 117 | price: value["price"], 118 | description: value["description"], 119 | menuId: value["menuId"], 120 | discount: value["discount"], 121 | ); 122 | foodList.add(food); 123 | }); 124 | 125 | return Container( 126 | height: 200.0, 127 | child: foodList.length == -1 128 | ? Center(child: CircularProgressIndicator()) 129 | : ListView.builder( 130 | scrollDirection: Axis.horizontal, 131 | itemCount: foodList.length, 132 | itemBuilder: (_, index) { 133 | return FoodTitleWidget( 134 | foodList[index], 135 | ); 136 | }), 137 | ); 138 | } 139 | } 140 | -------------------------------------------------------------------------------- /lib/blocs/HomePageBloc.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:firebase_auth/firebase_auth.dart'; 18 | import 'package:flutter/material.dart'; 19 | import 'package:food_delivery_app/models/food_model.dart'; 20 | 21 | import 'package:food_delivery_app/models/category_model.dart'; 22 | import 'package:food_delivery_app/resourese/auth_methods.dart'; 23 | import 'package:food_delivery_app/resourese/firebase_helper.dart'; 24 | 25 | class HomePageBloc with ChangeNotifier { 26 | FirebaseHelper mFirebaseHelper = FirebaseHelper(); 27 | AuthMethods mAuthMethods = AuthMethods(); 28 | 29 | List categoryList = []; 30 | List foodList = []; 31 | List popularFoodList = []; 32 | List bannerFoodList = []; 33 | 34 | //for sliding view 35 | final List imgList = [ 36 | 'https://images.unsplash.com/photo-1520342868574-5fa3804e551c?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=6ff92caffcdd63681a35134a6770ed3b&auto=format&fit=crop&w=1951&q=80', 37 | 'https://images.unsplash.com/photo-1522205408450-add114ad53fe?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=368f45b0888aeb0b7b08e3a1084d3ede&auto=format&fit=crop&w=1950&q=80', 38 | 'https://images.unsplash.com/photo-1519125323398-675f0ddb6308?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=94a1e718d89ca60a6337a6008341ca50&auto=format&fit=crop&w=1950&q=80', 39 | 'https://images.unsplash.com/photo-1523205771623-e0faa4d2813d?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=89719a0d55dd05e2deae4120227e6efc&auto=format&fit=crop&w=1953&q=80', 40 | 'https://images.unsplash.com/photo-1508704019882-f9cf40e475b4?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=8c6e5e3aba713b17aa1fe71ab4f0ae5b&auto=format&fit=crop&w=1352&q=80', 41 | 'https://images.unsplash.com/photo-1519985176271-adb1088fa94c?ixlib=rb-0.3.5&ixid=eyJhcHBfaWQiOjEyMDd9&s=a0c8d632e977f94e5d312d9893258f59&auto=format&fit=crop&w=1355&q=80' 42 | ]; 43 | 44 | //for recently added food 45 | CategoryModel recentlyCategory = CategoryModel( 46 | image: 47 | "https://images.unsplash.com/photo-1571091718767-18b5b1457add?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&w=1000&q=80", 48 | name: "burger", 49 | keys: "08"); 50 | CategoryModel recentlyCategory2 = CategoryModel( 51 | image: 52 | "https://img.buzzfeed.com/thumbnailer-prod-us-east-1/video-api/assets/216054.jpg", 53 | name: "Pizza", 54 | keys: "04"); 55 | CategoryModel recentlyCategory3 = CategoryModel( 56 | image: 57 | "https://static.toiimg.com/thumb/54659021.cms?width=1200&height=1200", 58 | name: "french fries", 59 | keys: "07"); 60 | CategoryModel recentlyCategory4 = CategoryModel( 61 | image: 62 | "https://i.pinimg.com/originals/3b/b4/ea/3bb4ea708b73c60a11ccd4a7bdbb1524.jpg", 63 | name: "kfc chicken", 64 | keys: "09"); 65 | 66 | late User? mFirebaseUser; 67 | 68 | getCurrentUser() { 69 | mAuthMethods.getCurrentUser().then((User? currentUser) { 70 | mFirebaseUser = currentUser; 71 | notifyListeners(); 72 | }); 73 | } 74 | 75 | getCategoryFoodList() { 76 | categoryList.clear(); 77 | mFirebaseHelper.fetchCategory().then((List cList) { 78 | categoryList = cList; 79 | notifyListeners(); 80 | }); 81 | } 82 | 83 | getRecommendedFoodList() { 84 | mFirebaseHelper.fetchAllFood().then((List fList) { 85 | fList.forEach((FoodModel food) { 86 | // we are fetching 3 types of foods who's menu id is 05 03 and 07. 87 | if (food.menuId == "05") { 88 | popularFoodList.add(food); 89 | } else if (food.menuId == "03") { 90 | foodList.add(food); 91 | } else if (food.menuId == "07") { 92 | bannerFoodList.add(food); 93 | } 94 | notifyListeners(); 95 | }); 96 | }); 97 | } 98 | } 99 | -------------------------------------------------------------------------------- /lib/screens/SearchPage.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:flutter/material.dart'; 18 | import 'package:flutter/scheduler.dart'; 19 | import 'package:food_delivery_app/blocs/SearchPageBloc.dart'; 20 | import 'package:food_delivery_app/models/food_model.dart'; 21 | import 'package:food_delivery_app/utils/universal_variables.dart'; 22 | import 'package:food_delivery_app/widgets/foodTitleWidget.dart'; 23 | import 'package:provider/provider.dart'; 24 | 25 | class SearchPage extends StatelessWidget { 26 | @override 27 | Widget build(BuildContext context) { 28 | return ChangeNotifierProvider( 29 | create: (_) => SearchPageBloc(), child: SearchPageContent()); 30 | } 31 | } 32 | 33 | class SearchPageContent extends StatefulWidget { 34 | @override 35 | _SearchPageContentState createState() => _SearchPageContentState(); 36 | } 37 | 38 | class _SearchPageContentState extends State { 39 | final TextEditingController searchCtrl = TextEditingController(); 40 | late SearchPageBloc searchPageBloc; 41 | 42 | @override 43 | void initState() { 44 | super.initState(); 45 | } 46 | 47 | @override 48 | void didChangeDependencies() { 49 | super.didChangeDependencies(); 50 | SchedulerBinding.instance.addPostFrameCallback((timeStamp) async { 51 | searchPageBloc.loadFoodList(); 52 | }); 53 | } 54 | 55 | @override 56 | Widget build(BuildContext context) { 57 | searchPageBloc = Provider.of(context); 58 | return Scaffold( 59 | extendBodyBehindAppBar: true, 60 | appBar: AppBar( 61 | elevation: 0.0, 62 | backgroundColor: UniversalVariables.whiteLightColor, 63 | ), 64 | body: SafeArea( 65 | child: Container( 66 | child: Column( 67 | children: [ 68 | createSearchBar(), 69 | Expanded( 70 | child: Container( 71 | color: Colors.white10, 72 | child: buildSuggestions(searchPageBloc.query), 73 | ), 74 | ) 75 | ], 76 | ), 77 | ), 78 | ), 79 | ); 80 | } 81 | 82 | buildSuggestions(String query) { 83 | final List suggestionList = 84 | searchPageBloc.searchFoodsFromList(query); 85 | return Container( 86 | child: suggestionList.length == -1 87 | ? Center(child: Center(child: CircularProgressIndicator())) 88 | : ListView.builder( 89 | scrollDirection: Axis.vertical, 90 | itemCount: suggestionList.length, 91 | itemBuilder: (_, index) { 92 | return FoodTitleWidget( 93 | searchPageBloc.searchedFoodList[index], 94 | ); 95 | }), 96 | ); 97 | } 98 | 99 | createSearchBar() { 100 | return Container( 101 | margin: EdgeInsets.all(20.0), 102 | decoration: BoxDecoration( 103 | color: UniversalVariables.whiteColor, 104 | borderRadius: BorderRadius.all(Radius.circular(10.0))), 105 | child: Row( 106 | children: [ 107 | Expanded( 108 | child: TextField( 109 | onChanged: (search) { 110 | searchPageBloc.setQuery(search); 111 | }, 112 | controller: searchCtrl, 113 | cursorColor: Colors.black, 114 | keyboardType: TextInputType.text, 115 | textInputAction: TextInputAction.go, 116 | decoration: InputDecoration( 117 | border: InputBorder.none, 118 | contentPadding: EdgeInsets.symmetric(horizontal: 15), 119 | hintText: "Search..."), 120 | ), 121 | ), 122 | Padding( 123 | padding: const EdgeInsets.only(right: 8.0), 124 | child: IconButton( 125 | icon: Icon( 126 | Icons.search, 127 | color: UniversalVariables.orangeColor, 128 | ), 129 | onPressed: () => null), 130 | ), 131 | ], 132 | ), 133 | ); 134 | } 135 | } 136 | -------------------------------------------------------------------------------- /lib/screens/loginpages/register.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:flutter/material.dart'; 18 | import 'package:flutter/services.dart'; 19 | import 'package:food_delivery_app/blocs/RegisterPageBloc.dart'; 20 | import 'package:food_delivery_app/screens/homepage.dart'; 21 | import 'package:food_delivery_app/screens/loginpages/login.dart'; 22 | import 'package:food_delivery_app/utils/universal_variables.dart'; 23 | import 'package:provider/provider.dart'; 24 | 25 | class RegisterPage extends StatelessWidget { 26 | @override 27 | Widget build(BuildContext context) { 28 | return ChangeNotifierProvider( 29 | create: (_) => RegisterPageBloc(), child: RegisterPageContent()); 30 | } 31 | } 32 | 33 | class RegisterPageContent extends StatefulWidget { 34 | @override 35 | _RegisterPageContentState createState() => _RegisterPageContentState(); 36 | } 37 | 38 | class _RegisterPageContentState extends State { 39 | late RegisterPageBloc registerPageBloc; 40 | 41 | TextEditingController textNameController = TextEditingController(); 42 | TextEditingController textPasswordController = TextEditingController(); 43 | TextEditingController textPhoneController = TextEditingController(); 44 | 45 | final _formKey = GlobalKey(); 46 | 47 | @override 48 | Widget build(BuildContext context) { 49 | // TODO: // do we need to keep this here or in didChangeDependencies 50 | registerPageBloc = Provider.of(context); 51 | return Scaffold( 52 | body: Container( 53 | color: UniversalVariables.whiteColor, 54 | padding: EdgeInsets.only(top: 20.0, left: 20.0, right: 20.0), 55 | child: Form( 56 | key: _formKey, 57 | child: buildForm(), 58 | ), 59 | ), 60 | ); 61 | } 62 | 63 | buildForm() { 64 | return Column( 65 | children: [ 66 | SizedBox(height: 20.0), 67 | FlutterLogo( 68 | size: 200.0, 69 | ), 70 | SizedBox(height: 20.0), 71 | TextFormField( 72 | validator: (email) { 73 | return registerPageBloc.validateEmail(email ?? ''); 74 | }, 75 | controller: textNameController, 76 | decoration: InputDecoration(hintText: "Email"), 77 | ), 78 | TextFormField( 79 | maxLength: 10, 80 | inputFormatters: [ 81 | FilteringTextInputFormatter.digitsOnly, 82 | ], 83 | keyboardType: TextInputType.number, 84 | validator: (phone) { 85 | return registerPageBloc.validatePhone(phone ?? ''); 86 | }, 87 | controller: textPhoneController, 88 | decoration: InputDecoration(hintText: "PhoneNo"), 89 | ), 90 | TextFormField( 91 | validator: (password) { 92 | return registerPageBloc.validatePassword(password ?? ''); 93 | }, 94 | controller: textPasswordController, 95 | decoration: InputDecoration(hintText: "Password"), 96 | ), 97 | SizedBox(height: 20.0), 98 | TextButton( 99 | style: ButtonStyle( 100 | backgroundColor: 101 | MaterialStateProperty.all(UniversalVariables.orangeColor), 102 | shape: MaterialStateProperty.all( 103 | RoundedRectangleBorder( 104 | borderRadius: BorderRadius.circular(30.0), 105 | )), 106 | ), 107 | onPressed: () { 108 | registerPageBloc 109 | .validateFormAndRegister(_formKey, textNameController.text, 110 | textPasswordController.text, textPhoneController.text) 111 | .then((_) => gotoHomePage()); 112 | }, 113 | child: Text("Register", 114 | style: TextStyle( 115 | color: UniversalVariables.whiteColor, 116 | )), 117 | ), 118 | registerPageBloc.isRegisterPressed 119 | ? Center(child: CircularProgressIndicator()) 120 | : Container(), 121 | ], 122 | ); 123 | } 124 | 125 | gotoLoginPage() { 126 | Navigator.push( 127 | context, MaterialPageRoute(builder: (context) => LoginPage())); 128 | } 129 | 130 | gotoHomePage() { 131 | Navigator.push( 132 | context, MaterialPageRoute(builder: (context) => HomePage())); 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /lib/screens/loginpages/login.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:flutter/material.dart'; 18 | import 'package:food_delivery_app/blocs/LoginPageBloc.dart'; 19 | import 'package:food_delivery_app/screens/homepage.dart'; 20 | import 'package:food_delivery_app/screens/loginpages/register.dart'; 21 | import 'package:food_delivery_app/utils/universal_variables.dart'; 22 | import 'package:provider/provider.dart'; 23 | 24 | class LoginPage extends StatelessWidget { 25 | @override 26 | Widget build(BuildContext context) { 27 | return ChangeNotifierProvider( 28 | create: (_) => LoginPageBloc(), child: LoginPageContent()); 29 | } 30 | } 31 | 32 | class LoginPageContent extends StatefulWidget { 33 | @override 34 | _LoginPageContentState createState() => _LoginPageContentState(); 35 | } 36 | 37 | class _LoginPageContentState extends State { 38 | TextEditingController textNameController = TextEditingController(); 39 | TextEditingController textPasswordController = TextEditingController(); 40 | 41 | final _formKey = GlobalKey(); 42 | 43 | late LoginPageBloc loginPageBloc; 44 | 45 | @override 46 | Widget build(BuildContext context) { 47 | // TODO: // do we need to keep this here or in didChangeDependencies 48 | loginPageBloc = Provider.of(context); 49 | return Scaffold( 50 | body: Container( 51 | color: UniversalVariables.whiteColor, 52 | padding: EdgeInsets.only(top: 20.0, left: 20.0, right: 20.0), 53 | child: Form( 54 | key: _formKey, 55 | child: buildForm(), 56 | ), 57 | ), 58 | ); 59 | } 60 | 61 | buildForm() { 62 | return Column( 63 | children: [ 64 | SizedBox(height: 20.0), 65 | Hero( 66 | tag: 'hero', 67 | child: CircleAvatar( 68 | backgroundColor: Colors.transparent, 69 | radius: 100.0, 70 | child: Image.asset('assets/logo.jpg'), 71 | ), 72 | ), 73 | SizedBox(height: 20.0), 74 | TextFormField( 75 | validator: (email) { 76 | return loginPageBloc.validateEmail(email ?? ''); 77 | }, 78 | controller: textNameController, 79 | decoration: InputDecoration( 80 | hintText: 'Email', 81 | prefixIcon: Icon(Icons.email), 82 | contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), 83 | border: 84 | OutlineInputBorder(borderRadius: BorderRadius.circular(32.0)), 85 | ), 86 | ), 87 | SizedBox( 88 | height: 10, 89 | ), 90 | TextFormField( 91 | validator: (password) { 92 | return loginPageBloc.validateEmail(password ?? ''); 93 | }, 94 | controller: textPasswordController, 95 | decoration: InputDecoration( 96 | hintText: 'Password', 97 | prefixIcon: Icon(Icons.password_outlined), 98 | contentPadding: EdgeInsets.fromLTRB(20.0, 10.0, 20.0, 10.0), 99 | border: 100 | OutlineInputBorder(borderRadius: BorderRadius.circular(32.0)), 101 | ), 102 | ), 103 | SizedBox(height: 50.0), 104 | SizedBox( 105 | width: double.infinity, 106 | child: TextButton( 107 | style: ButtonStyle( 108 | backgroundColor: 109 | MaterialStateProperty.all(UniversalVariables.orangeColor), 110 | shape: MaterialStateProperty.all( 111 | RoundedRectangleBorder( 112 | borderRadius: BorderRadius.circular(30.0), 113 | )), 114 | ), 115 | onPressed: () => loginPageBloc 116 | .validateFormAndLogin(_formKey, textNameController.text, 117 | textPasswordController.text) 118 | .then((_) => gotoHomePage()), 119 | child: Text("Login", 120 | style: TextStyle( 121 | color: UniversalVariables.whiteColor, fontSize: 24)), 122 | ), 123 | ), 124 | loginPageBloc.isLoginPressed 125 | ? Center(child: CircularProgressIndicator()) 126 | : Container(), 127 | TextButton.icon( 128 | onPressed: () => gotoRegisterPage(), 129 | icon: Icon(Icons.person_add), 130 | label: Text("New User ? Click Here..", 131 | style: TextStyle( 132 | color: Colors.black45, fontWeight: FontWeight.bold)), 133 | ) 134 | ], 135 | ); 136 | } 137 | 138 | gotoHomePage() { 139 | Navigator.push( 140 | context, MaterialPageRoute(builder: (context) => HomePage())); 141 | } 142 | 143 | gotoRegisterPage() { 144 | Navigator.pushReplacement( 145 | context, MaterialPageRoute(builder: (context) => RegisterPage())); 146 | } 147 | } 148 | -------------------------------------------------------------------------------- /lib/resourese/firebase_helper.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:firebase_auth/firebase_auth.dart'; 18 | import 'package:firebase_database/firebase_database.dart'; 19 | import 'package:food_delivery_app/models/category_model.dart'; 20 | import 'package:food_delivery_app/models/food_model.dart'; 21 | import 'package:food_delivery_app/models/request_model.dart'; 22 | import 'package:food_delivery_app/resourese/auth_methods.dart'; 23 | import 'package:food_delivery_app/resourese/databaseSQL.dart'; 24 | 25 | class FirebaseHelper { 26 | // Firebase Database, will use to get reference. 27 | static final FirebaseDatabase _database = FirebaseDatabase.instance; 28 | 29 | static final DatabaseReference _ordersReference = 30 | _database.reference().child("Orders"); 31 | static final DatabaseReference _categoryReference = 32 | _database.reference().child("Category"); 33 | static final DatabaseReference _foodReference = 34 | _database.reference().child("Foods"); 35 | 36 | // fetch all foods list from food reference 37 | Future> fetchAllFood() async { 38 | List foodList = []; 39 | DatabaseReference foodReference = _database.ref().child("Foods"); 40 | DatabaseEvent event = await foodReference.once(); 41 | event.snapshot.children.forEach((DataSnapshot element) { 42 | if (element.value is Map) { 43 | FoodModel food = 44 | FoodModel.fromMap(element.value as Map); 45 | foodList.add(food); 46 | } 47 | }); 48 | return foodList; 49 | } 50 | 51 | // fetch food list with query string 52 | Future> fetchSpecifiedFoods(String queryStr) async { 53 | List foodList = []; 54 | 55 | DatabaseReference foodReference = _database.ref().child("Foods"); 56 | DatabaseEvent event = await foodReference.once(); 57 | event.snapshot.children.forEach((DataSnapshot element) { 58 | if (element.value is Map) { 59 | FoodModel food = 60 | FoodModel.fromMap(element.value as Map); 61 | if (food.menuId == queryStr) { 62 | foodList.add(food); 63 | } 64 | } 65 | }); 66 | return foodList; 67 | } 68 | 69 | Future placeOrder(RequestModel request) async { 70 | await _ordersReference 71 | .child(request.uid) 72 | .push() 73 | .set(request.toMap(request)); 74 | return true; 75 | } 76 | 77 | Future> fetchCategory() async { 78 | List categoryList = []; 79 | DatabaseEvent event = await _categoryReference.once(); 80 | event.snapshot.children.forEach((DataSnapshot element) { 81 | if (element.value is Map) { 82 | Map e = element.value as Map; 83 | // TODO: use keyname in lowercase 84 | CategoryModel category = 85 | CategoryModel(image: e['Image'], name: e['Name'], keys: e['keys']); 86 | categoryList.add(category); 87 | } 88 | }); 89 | 90 | return categoryList; 91 | } 92 | 93 | Future> fetchOrders(User currentUser) async { 94 | List requestList = []; 95 | DatabaseReference foodReference = _ordersReference.child(currentUser.uid); 96 | 97 | DatabaseEvent event = await foodReference.once(); 98 | event.snapshot.children.forEach((DataSnapshot element) { 99 | if (element.value is Map) { 100 | Map e = element.value as Map; 101 | // TODO: can use fromMap() method 102 | RequestModel request = RequestModel( 103 | address: e['address'], 104 | name: e['name'], 105 | uid: e['uid'], 106 | status: e['status'], 107 | total: e['total'], 108 | foodList: e['foodList']); 109 | requestList.add(request); 110 | } 111 | }); 112 | 113 | return requestList; 114 | } 115 | 116 | Future addOrder(String totalPrice, List orderedFoodList, 117 | String name, String address) async { 118 | // getter user details 119 | User? user = await AuthMethods().getCurrentUser(); 120 | if (user == null) { 121 | return; 122 | } 123 | String uidtxt = user.uid; 124 | String statustxt = "0"; 125 | String totaltxt = totalPrice.toString(); 126 | 127 | // creating model of list of ordered foods 128 | Map aux = new Map(); 129 | orderedFoodList.forEach((food) { 130 | aux[food.keys] = food.toMap(food); 131 | }); 132 | 133 | RequestModel request = new RequestModel( 134 | address: address, 135 | name: name, 136 | uid: uidtxt, 137 | status: statustxt, 138 | total: totaltxt, 139 | foodList: aux); 140 | 141 | // add order to database 142 | await _ordersReference 143 | .child(request.uid) 144 | .push() 145 | .set(request.toMap(request)) 146 | .then((value) async { 147 | // delete cart data 148 | DatabaseSql databaseSql = DatabaseSql(); 149 | await databaseSql.openDatabaseSql(); 150 | await databaseSql.deleteAllData(); 151 | }); 152 | } 153 | } 154 | -------------------------------------------------------------------------------- /lib/screens/CategoryListPage.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:flutter/material.dart'; 18 | import 'package:food_delivery_app/models/category_model.dart'; 19 | import 'package:food_delivery_app/models/food_model.dart'; 20 | import 'package:food_delivery_app/resourese/firebase_helper.dart'; 21 | import 'package:food_delivery_app/utils/universal_variables.dart'; 22 | import 'package:food_delivery_app/widgets/foodTitleWidget.dart'; 23 | 24 | class CategoryListPage extends StatefulWidget { 25 | final CategoryModel category; 26 | CategoryListPage(this.category); 27 | @override 28 | _CategoryListPageState createState() => _CategoryListPageState(); 29 | } 30 | 31 | class _CategoryListPageState extends State { 32 | FirebaseHelper mFirebaseHelper = FirebaseHelper(); 33 | 34 | @override 35 | Widget build(BuildContext context) { 36 | return Scaffold( 37 | extendBodyBehindAppBar: true, 38 | body: SingleChildScrollView( 39 | child: Column( 40 | children: [ 41 | Container( 42 | alignment: Alignment.bottomLeft, 43 | height: MediaQuery.of(context).size.height * 0.4, 44 | width: MediaQuery.of(context).size.width, 45 | decoration: BoxDecoration( 46 | borderRadius: BorderRadius.only( 47 | bottomLeft: Radius.circular(0.0), 48 | bottomRight: Radius.circular(80.0)), 49 | image: DecorationImage( 50 | image: NetworkImage(widget.category.image), 51 | fit: BoxFit.cover), 52 | ), 53 | child: Stack( 54 | children: [ 55 | Container( 56 | height: 60.0, 57 | decoration: BoxDecoration( 58 | borderRadius: BorderRadius.only( 59 | bottomLeft: Radius.circular(0.0), 60 | bottomRight: Radius.circular(80.0)), 61 | gradient: LinearGradient( 62 | colors: [Colors.black45, Colors.transparent], 63 | begin: Alignment.bottomCenter, 64 | end: Alignment.topCenter), 65 | ), 66 | ), 67 | Padding( 68 | padding: const EdgeInsets.all(8.0), 69 | child: Text( 70 | widget.category.name, 71 | style: TextStyle( 72 | fontSize: 35.0, 73 | fontWeight: FontWeight.bold, 74 | color: UniversalVariables.whiteColor), 75 | ), 76 | ), 77 | ], 78 | ), 79 | ), 80 | Container( 81 | padding: EdgeInsets.symmetric(horizontal: 10.0, vertical: 10.0), 82 | decoration: BoxDecoration( 83 | color: UniversalVariables.whiteColor, 84 | borderRadius: BorderRadius.only( 85 | topLeft: Radius.circular(20.0), 86 | topRight: Radius.circular(20.0)), 87 | ), 88 | child: Column( 89 | children: [ 90 | Row( 91 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 92 | children: [ 93 | Text( 94 | "12 restaurants", 95 | style: TextStyle(color: Colors.black45), 96 | ), 97 | IconButton( 98 | icon: Icon( 99 | Icons.menu, 100 | color: UniversalVariables.orangeColor, 101 | ), 102 | onPressed: () => null, 103 | ) 104 | ], 105 | ), 106 | createFoodList(), 107 | ], 108 | ), 109 | ) 110 | ], 111 | ), 112 | ), 113 | ); 114 | } 115 | 116 | createFoodList() { 117 | return Container( 118 | height: MediaQuery.of(context).size.height, 119 | child: StreamBuilder>( 120 | stream: mFirebaseHelper 121 | .fetchSpecifiedFoods(widget.category.keys) 122 | .asStream(), 123 | builder: (context, AsyncSnapshot> snapshot) { 124 | if (snapshot.hasData) { 125 | if (snapshot.data == null || snapshot.data!.length == 0) { 126 | return Center( 127 | child: Text("No Food Available"), 128 | ); 129 | } 130 | return ListView.builder( 131 | physics: NeverScrollableScrollPhysics(), 132 | scrollDirection: Axis.vertical, 133 | itemCount: snapshot.data!.length, 134 | itemBuilder: (_, index) { 135 | return FoodTitleWidget( 136 | snapshot.data![index], 137 | ); 138 | }); 139 | } 140 | return Center(child: CircularProgressIndicator()); 141 | }), 142 | ); 143 | } 144 | } 145 | -------------------------------------------------------------------------------- /windows/runner/win32_window.cpp: -------------------------------------------------------------------------------- 1 | #include "win32_window.h" 2 | 3 | #include 4 | 5 | #include "resource.h" 6 | 7 | namespace { 8 | 9 | constexpr const wchar_t kWindowClassName[] = L"FLUTTER_RUNNER_WIN32_WINDOW"; 10 | 11 | // The number of Win32Window objects that currently exist. 12 | static int g_active_window_count = 0; 13 | 14 | using EnableNonClientDpiScaling = BOOL __stdcall(HWND hwnd); 15 | 16 | // Scale helper to convert logical scaler values to physical using passed in 17 | // scale factor 18 | int Scale(int source, double scale_factor) { 19 | return static_cast(source * scale_factor); 20 | } 21 | 22 | // Dynamically loads the |EnableNonClientDpiScaling| from the User32 module. 23 | // This API is only needed for PerMonitor V1 awareness mode. 24 | void EnableFullDpiSupportIfAvailable(HWND hwnd) { 25 | HMODULE user32_module = LoadLibraryA("User32.dll"); 26 | if (!user32_module) { 27 | return; 28 | } 29 | auto enable_non_client_dpi_scaling = 30 | reinterpret_cast( 31 | GetProcAddress(user32_module, "EnableNonClientDpiScaling")); 32 | if (enable_non_client_dpi_scaling != nullptr) { 33 | enable_non_client_dpi_scaling(hwnd); 34 | FreeLibrary(user32_module); 35 | } 36 | } 37 | 38 | } // namespace 39 | 40 | // Manages the Win32Window's window class registration. 41 | class WindowClassRegistrar { 42 | public: 43 | ~WindowClassRegistrar() = default; 44 | 45 | // Returns the singleton registar instance. 46 | static WindowClassRegistrar* GetInstance() { 47 | if (!instance_) { 48 | instance_ = new WindowClassRegistrar(); 49 | } 50 | return instance_; 51 | } 52 | 53 | // Returns the name of the window class, registering the class if it hasn't 54 | // previously been registered. 55 | const wchar_t* GetWindowClass(); 56 | 57 | // Unregisters the window class. Should only be called if there are no 58 | // instances of the window. 59 | void UnregisterWindowClass(); 60 | 61 | private: 62 | WindowClassRegistrar() = default; 63 | 64 | static WindowClassRegistrar* instance_; 65 | 66 | bool class_registered_ = false; 67 | }; 68 | 69 | WindowClassRegistrar* WindowClassRegistrar::instance_ = nullptr; 70 | 71 | const wchar_t* WindowClassRegistrar::GetWindowClass() { 72 | if (!class_registered_) { 73 | WNDCLASS window_class{}; 74 | window_class.hCursor = LoadCursor(nullptr, IDC_ARROW); 75 | window_class.lpszClassName = kWindowClassName; 76 | window_class.style = CS_HREDRAW | CS_VREDRAW; 77 | window_class.cbClsExtra = 0; 78 | window_class.cbWndExtra = 0; 79 | window_class.hInstance = GetModuleHandle(nullptr); 80 | window_class.hIcon = 81 | LoadIcon(window_class.hInstance, MAKEINTRESOURCE(IDI_APP_ICON)); 82 | window_class.hbrBackground = 0; 83 | window_class.lpszMenuName = nullptr; 84 | window_class.lpfnWndProc = Win32Window::WndProc; 85 | RegisterClass(&window_class); 86 | class_registered_ = true; 87 | } 88 | return kWindowClassName; 89 | } 90 | 91 | void WindowClassRegistrar::UnregisterWindowClass() { 92 | UnregisterClass(kWindowClassName, nullptr); 93 | class_registered_ = false; 94 | } 95 | 96 | Win32Window::Win32Window() { 97 | ++g_active_window_count; 98 | } 99 | 100 | Win32Window::~Win32Window() { 101 | --g_active_window_count; 102 | Destroy(); 103 | } 104 | 105 | bool Win32Window::CreateAndShow(const std::wstring& title, 106 | const Point& origin, 107 | const Size& size) { 108 | Destroy(); 109 | 110 | const wchar_t* window_class = 111 | WindowClassRegistrar::GetInstance()->GetWindowClass(); 112 | 113 | const POINT target_point = {static_cast(origin.x), 114 | static_cast(origin.y)}; 115 | HMONITOR monitor = MonitorFromPoint(target_point, MONITOR_DEFAULTTONEAREST); 116 | UINT dpi = FlutterDesktopGetDpiForMonitor(monitor); 117 | double scale_factor = dpi / 96.0; 118 | 119 | HWND window = CreateWindow( 120 | window_class, title.c_str(), WS_OVERLAPPEDWINDOW | WS_VISIBLE, 121 | Scale(origin.x, scale_factor), Scale(origin.y, scale_factor), 122 | Scale(size.width, scale_factor), Scale(size.height, scale_factor), 123 | nullptr, nullptr, GetModuleHandle(nullptr), this); 124 | 125 | if (!window) { 126 | return false; 127 | } 128 | 129 | return OnCreate(); 130 | } 131 | 132 | // static 133 | LRESULT CALLBACK Win32Window::WndProc(HWND const window, 134 | UINT const message, 135 | WPARAM const wparam, 136 | LPARAM const lparam) noexcept { 137 | if (message == WM_NCCREATE) { 138 | auto window_struct = reinterpret_cast(lparam); 139 | SetWindowLongPtr(window, GWLP_USERDATA, 140 | reinterpret_cast(window_struct->lpCreateParams)); 141 | 142 | auto that = static_cast(window_struct->lpCreateParams); 143 | EnableFullDpiSupportIfAvailable(window); 144 | that->window_handle_ = window; 145 | } else if (Win32Window* that = GetThisFromHandle(window)) { 146 | return that->MessageHandler(window, message, wparam, lparam); 147 | } 148 | 149 | return DefWindowProc(window, message, wparam, lparam); 150 | } 151 | 152 | LRESULT 153 | Win32Window::MessageHandler(HWND hwnd, 154 | UINT const message, 155 | WPARAM const wparam, 156 | LPARAM const lparam) noexcept { 157 | switch (message) { 158 | case WM_DESTROY: 159 | window_handle_ = nullptr; 160 | Destroy(); 161 | if (quit_on_close_) { 162 | PostQuitMessage(0); 163 | } 164 | return 0; 165 | 166 | case WM_DPICHANGED: { 167 | auto newRectSize = reinterpret_cast(lparam); 168 | LONG newWidth = newRectSize->right - newRectSize->left; 169 | LONG newHeight = newRectSize->bottom - newRectSize->top; 170 | 171 | SetWindowPos(hwnd, nullptr, newRectSize->left, newRectSize->top, newWidth, 172 | newHeight, SWP_NOZORDER | SWP_NOACTIVATE); 173 | 174 | return 0; 175 | } 176 | case WM_SIZE: 177 | RECT rect = GetClientArea(); 178 | if (child_content_ != nullptr) { 179 | // Size and position the child window. 180 | MoveWindow(child_content_, rect.left, rect.top, rect.right - rect.left, 181 | rect.bottom - rect.top, TRUE); 182 | } 183 | return 0; 184 | 185 | case WM_ACTIVATE: 186 | if (child_content_ != nullptr) { 187 | SetFocus(child_content_); 188 | } 189 | return 0; 190 | } 191 | 192 | return DefWindowProc(window_handle_, message, wparam, lparam); 193 | } 194 | 195 | void Win32Window::Destroy() { 196 | OnDestroy(); 197 | 198 | if (window_handle_) { 199 | DestroyWindow(window_handle_); 200 | window_handle_ = nullptr; 201 | } 202 | if (g_active_window_count == 0) { 203 | WindowClassRegistrar::GetInstance()->UnregisterWindowClass(); 204 | } 205 | } 206 | 207 | Win32Window* Win32Window::GetThisFromHandle(HWND const window) noexcept { 208 | return reinterpret_cast( 209 | GetWindowLongPtr(window, GWLP_USERDATA)); 210 | } 211 | 212 | void Win32Window::SetChildContent(HWND content) { 213 | child_content_ = content; 214 | SetParent(content, window_handle_); 215 | RECT frame = GetClientArea(); 216 | 217 | MoveWindow(content, frame.left, frame.top, frame.right - frame.left, 218 | frame.bottom - frame.top, true); 219 | 220 | SetFocus(child_content_); 221 | } 222 | 223 | RECT Win32Window::GetClientArea() { 224 | RECT frame; 225 | GetClientRect(window_handle_, &frame); 226 | return frame; 227 | } 228 | 229 | HWND Win32Window::GetHandle() { 230 | return window_handle_; 231 | } 232 | 233 | void Win32Window::SetQuitOnClose(bool quit_on_close) { 234 | quit_on_close_ = quit_on_close; 235 | } 236 | 237 | bool Win32Window::OnCreate() { 238 | // No-op; provided for subclasses. 239 | return true; 240 | } 241 | 242 | void Win32Window::OnDestroy() { 243 | // No-op; provided for subclasses. 244 | } 245 | -------------------------------------------------------------------------------- /lib/screens/CartPage.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:flutter/material.dart'; 18 | import 'package:flutter/scheduler.dart'; 19 | import 'package:food_delivery_app/blocs/CartPageBloc.dart'; 20 | import 'package:food_delivery_app/utils/universal_variables.dart'; 21 | import 'package:food_delivery_app/widgets/cartitemswidget.dart'; 22 | import 'package:provider/provider.dart'; 23 | 24 | class CartPage extends StatelessWidget { 25 | @override 26 | Widget build(BuildContext context) { 27 | return ChangeNotifierProvider( 28 | create: (_) => CartPageBloc(), child: CartPageContent()); 29 | } 30 | } 31 | 32 | class CartPageContent extends StatefulWidget { 33 | const CartPageContent() : super(); 34 | 35 | @override 36 | _CartPageContentState createState() => _CartPageContentState(); 37 | } 38 | 39 | class _CartPageContentState extends State { 40 | late CartPageBloc cartPageBloc; 41 | TextEditingController nametextcontroller = TextEditingController(); 42 | TextEditingController addresstextcontroller = TextEditingController(); 43 | 44 | @override 45 | void initState() { 46 | super.initState(); 47 | SchedulerBinding.instance.addPostFrameCallback((timeStamp) async { 48 | await cartPageBloc.getDatabaseValue(); 49 | }); 50 | } 51 | 52 | @override 53 | Widget build(BuildContext context) { 54 | // TODO: Do We need to keep this here or in didChangeDependencies 55 | cartPageBloc = Provider.of(context); 56 | cartPageBloc.context = context; 57 | return Scaffold( 58 | appBar: AppBar( 59 | elevation: 0.0, 60 | backgroundColor: Colors.transparent, 61 | ), 62 | body: SingleChildScrollView( 63 | child: Container( 64 | height: MediaQuery.of(context).size.height, 65 | padding: EdgeInsets.only(left: 30.0, top: 30.0), 66 | child: Column( 67 | crossAxisAlignment: CrossAxisAlignment.start, 68 | children: [ 69 | Text( 70 | "My Order", 71 | style: TextStyle( 72 | fontWeight: FontWeight.bold, 73 | color: Colors.black, 74 | fontSize: 35.0), 75 | ), 76 | Padding( 77 | padding: const EdgeInsets.only(right: 25.0), 78 | child: Divider( 79 | thickness: 2.0, 80 | ), 81 | ), 82 | createListCart(), 83 | createTotalPriceWidget(), 84 | ], 85 | ), 86 | ), 87 | ), 88 | ); 89 | } 90 | 91 | createTotalPriceWidget() { 92 | return Container( 93 | color: Colors.white30, 94 | padding: EdgeInsets.only(right: 30.0), 95 | child: Column( 96 | crossAxisAlignment: CrossAxisAlignment.start, 97 | children: [ 98 | Row( 99 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 100 | children: [ 101 | Text( 102 | "Total :", 103 | style: TextStyle( 104 | fontWeight: FontWeight.normal, 105 | color: Colors.black, 106 | fontSize: 25.0), 107 | ), 108 | Text( 109 | "${cartPageBloc.totalPrice} Rs.", 110 | style: TextStyle( 111 | fontWeight: FontWeight.bold, 112 | color: Colors.black, 113 | fontSize: 30.0), 114 | ), 115 | ], 116 | ), 117 | Divider( 118 | thickness: 2.0, 119 | ), 120 | SizedBox( 121 | height: 20.0, 122 | ), 123 | Align( 124 | alignment: Alignment.bottomCenter, 125 | child: SizedBox( 126 | height: MediaQuery.of(context).size.width * 0.14, 127 | width: MediaQuery.of(context).size.width * 0.9, 128 | child: TextButton( 129 | style: ButtonStyle( 130 | backgroundColor: 131 | MaterialStateProperty.all(UniversalVariables.orangeColor), 132 | shape: MaterialStateProperty.all( 133 | RoundedRectangleBorder( 134 | borderRadius: BorderRadius.circular(10.0), 135 | )), 136 | ), 137 | onPressed: () => _showDialog(), 138 | child: Text( 139 | "Place Order", 140 | style: TextStyle( 141 | fontSize: 22.0, 142 | fontWeight: FontWeight.bold, 143 | color: UniversalVariables.whiteColor), 144 | ), 145 | ), 146 | ), 147 | ), 148 | ], 149 | ), 150 | ); 151 | } 152 | 153 | createListCart() { 154 | return Container( 155 | margin: EdgeInsets.symmetric(vertical: 10.0), 156 | height: 400, 157 | child: cartPageBloc.foodList.length == 0 158 | ? Center(child: CircularProgressIndicator()) 159 | : ListView.builder( 160 | scrollDirection: Axis.vertical, 161 | itemCount: cartPageBloc.foodList.length, 162 | itemBuilder: (_, index) { 163 | return CartItems( 164 | cartPageBloc.foodList[index], 165 | ); 166 | }), 167 | ); 168 | } 169 | 170 | _showDialog() async { 171 | await showDialog( 172 | context: context, 173 | builder: (BuildContext context) { 174 | return handleOrderPlacement(); 175 | }, 176 | ); 177 | } 178 | 179 | handleOrderPlacement() { 180 | //check if card is empty 181 | if (cartPageBloc.totalPrice == 0) { 182 | print("not order"); 183 | return AlertDialog( 184 | title: Text('Abe Kuch Add Toh Kar'), 185 | content: SingleChildScrollView( 186 | child: ListBody( 187 | children: [ 188 | Text('Card Is Empty !'), 189 | Text('Add Some Product on Card First'), 190 | ], 191 | ), 192 | ), 193 | actions: [ 194 | TextButton( 195 | child: Text('Cancel'), 196 | onPressed: () { 197 | Navigator.of(context).pop(); 198 | }, 199 | ), 200 | ], 201 | ); 202 | } else { 203 | return AlertDialog( 204 | title: Text('OO Bhai Bohot Paise Hai haa..'), 205 | content: SingleChildScrollView( 206 | child: ListBody( 207 | children: [ 208 | Text('Fill Details'), 209 | TextField( 210 | controller: nametextcontroller, 211 | autofocus: true, 212 | decoration: 213 | InputDecoration(labelText: 'Name', hintText: 'eg. Akshay'), 214 | ), 215 | TextField( 216 | controller: addresstextcontroller, 217 | autofocus: true, 218 | decoration: InputDecoration( 219 | labelText: 'Address', hintText: 'eg. st road west chembur'), 220 | ), 221 | ], 222 | ), 223 | ), 224 | actions: [ 225 | TextButton( 226 | child: Text('Cancel'), 227 | onPressed: () { 228 | Navigator.of(context).pop(); 229 | }, 230 | ), 231 | TextButton( 232 | child: Text('Order'), 233 | onPressed: () { 234 | cartPageBloc.orderPlaceToFirebase( 235 | nametextcontroller.text, addresstextcontroller.text); 236 | }, 237 | ), 238 | ], 239 | ); 240 | } 241 | } 242 | 243 | @override 244 | void dispose() { 245 | super.dispose(); 246 | nametextcontroller.dispose(); 247 | addresstextcontroller.dispose(); 248 | } 249 | } 250 | -------------------------------------------------------------------------------- /lib/screens/FoodDetailPage.dart: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2021 Akshay Jadhav 3 | * 4 | * This program is free software; you can redistribute it and/or modify it under 5 | * the terms of the GNU General Public License as published by the Free Software 6 | * Foundation; either version 3 of the License, or (at your option) any later 7 | * version. 8 | * 9 | * This program is distributed in the hope that it will be useful, but WITHOUT ANY 10 | * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A 11 | * PARTICULAR PURPOSE. See the GNU General Public License for more details. 12 | * 13 | * You should have received a copy of the GNU General Public License along with 14 | * this program. If not, see . 15 | */ 16 | 17 | import 'package:flutter/cupertino.dart'; 18 | import 'package:flutter/material.dart'; 19 | import 'package:flutter/scheduler.dart'; 20 | import 'package:flutter_rating_bar/flutter_rating_bar.dart'; 21 | import 'package:food_delivery_app/blocs/FoodDetailPageBloc.dart'; 22 | import 'package:food_delivery_app/models/food_model.dart'; 23 | import 'package:food_delivery_app/utils/universal_variables.dart'; 24 | import 'package:food_delivery_app/widgets/foodTitleWidget.dart'; 25 | import 'package:provider/provider.dart'; 26 | 27 | class FoodDetailPage extends StatelessWidget { 28 | final FoodModel food; 29 | FoodDetailPage({required this.food}); 30 | @override 31 | Widget build(BuildContext context) { 32 | return ChangeNotifierProvider( 33 | create: (_) => FoodDetailPageBloc(), 34 | child: FoodDetailPageContent( 35 | food, 36 | )); 37 | } 38 | } 39 | 40 | class FoodDetailPageContent extends StatefulWidget { 41 | final FoodModel fooddata; 42 | FoodDetailPageContent(this.fooddata); 43 | @override 44 | _FoodDetailPageContentState createState() => _FoodDetailPageContentState(); 45 | } 46 | 47 | class _FoodDetailPageContentState extends State { 48 | late FoodDetailPageBloc foodDetailPageBloc; 49 | final GlobalKey _scaffoldKey = new GlobalKey(); 50 | 51 | // sample discription for food details 52 | String sampleDescription = 53 | "The existence of the Positioned forces the Container to the left, instead of centering. Removing the Positioned, however, puts the Container in the middle-center"; 54 | 55 | @override 56 | void initState() { 57 | super.initState(); 58 | SchedulerBinding.instance.addPostFrameCallback((timeStamp) async { 59 | foodDetailPageBloc.getPopularFoodList(); 60 | foodDetailPageBloc.generateRandomRating(); 61 | }); 62 | } 63 | 64 | @override 65 | Widget build(BuildContext context) { 66 | // TODO: Do we need to keep this here or in didChangeDependencies 67 | foodDetailPageBloc = Provider.of(context); 68 | foodDetailPageBloc.context = context; 69 | return Scaffold( 70 | key: _scaffoldKey, 71 | extendBodyBehindAppBar: true, 72 | appBar: AppBar( 73 | elevation: 0.0, 74 | iconTheme: IconThemeData( 75 | color: UniversalVariables.whiteColor, 76 | ), 77 | backgroundColor: Colors.transparent, 78 | ), 79 | body: SingleChildScrollView( 80 | child: Container( 81 | child: Column( 82 | children: [ 83 | Hero( 84 | tag: "avatar_${widget.fooddata.keys.toString()}", 85 | child: Container( 86 | padding: EdgeInsets.all(0.0), 87 | child: Stack( 88 | children: [ 89 | Container( 90 | height: 60.0, 91 | decoration: BoxDecoration( 92 | borderRadius: BorderRadius.only( 93 | bottomLeft: Radius.circular(0.0), 94 | bottomRight: Radius.circular(80.0)), 95 | gradient: LinearGradient( 96 | colors: [Colors.black45, Colors.transparent], 97 | begin: Alignment.bottomCenter, 98 | end: Alignment.topCenter), 99 | ), 100 | ), 101 | Padding( 102 | padding: const EdgeInsets.all(8.0), 103 | child: Material( 104 | color: Colors.transparent, 105 | child: Text( 106 | foodDetailPageBloc.rating + " ★", 107 | style: TextStyle( 108 | fontSize: 30.0, 109 | fontWeight: FontWeight.bold, 110 | color: UniversalVariables.whiteColor), 111 | )), 112 | ), 113 | ], 114 | ), 115 | alignment: Alignment.bottomLeft, 116 | height: MediaQuery.of(context).size.height * 0.4, 117 | width: MediaQuery.of(context).size.width, 118 | decoration: BoxDecoration( 119 | borderRadius: BorderRadius.only( 120 | bottomLeft: Radius.circular(0.0), 121 | bottomRight: Radius.circular(80.0)), 122 | image: DecorationImage( 123 | image: NetworkImage(widget.fooddata.image), 124 | fit: BoxFit.cover), 125 | ), 126 | )), 127 | createdetails(), 128 | createPopularFoodList(), 129 | ], 130 | ), 131 | ), 132 | )); 133 | } 134 | 135 | createdetails() { 136 | return Container( 137 | padding: EdgeInsets.all(10.0), 138 | child: Column( 139 | mainAxisSize: MainAxisSize.max, 140 | mainAxisAlignment: MainAxisAlignment.end, 141 | children: [ 142 | SizedBox( 143 | height: 10.0, 144 | ), 145 | Text( 146 | widget.fooddata.name, 147 | style: TextStyle( 148 | fontSize: 27.0, 149 | fontWeight: FontWeight.bold, 150 | color: UniversalVariables.orangeColor), 151 | ), 152 | SizedBox( 153 | height: 20.0, 154 | ), 155 | Row( 156 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 157 | children: [ 158 | Padding( 159 | padding: 160 | const EdgeInsets.only(left: 18.0, top: 10.0, bottom: 10.0), 161 | child: Text( 162 | "₹" + widget.fooddata.price, 163 | style: TextStyle( 164 | fontSize: 25.0, 165 | fontWeight: FontWeight.bold, 166 | color: UniversalVariables.orangeColor), 167 | ), 168 | ), 169 | SizedBox( 170 | width: 10.0, 171 | ), 172 | // widget of counter 173 | Container( 174 | margin: EdgeInsets.only(right: 18.0), 175 | decoration: BoxDecoration( 176 | color: UniversalVariables.orangeColor, 177 | borderRadius: BorderRadius.all(Radius.circular(50.0))), 178 | child: Row( 179 | children: [ 180 | // check and show decreament button 181 | foodDetailPageBloc.mItemCount != 1 182 | ? new IconButton( 183 | icon: new Icon( 184 | Icons.remove, 185 | color: UniversalVariables.whiteColor, 186 | size: 30.0, 187 | ), 188 | onPressed: () => 189 | foodDetailPageBloc.decreamentItems(), 190 | ) 191 | : new IconButton( 192 | icon: new Icon( 193 | Icons.remove, 194 | color: Colors.white, 195 | size: 30.0, 196 | ), 197 | onPressed: () => null), 198 | new Text( 199 | foodDetailPageBloc.mItemCount.toString(), 200 | style: TextStyle( 201 | color: UniversalVariables.whiteColor, 202 | fontSize: 20.0, 203 | fontWeight: FontWeight.bold), 204 | ), 205 | new IconButton( 206 | icon: new Icon( 207 | Icons.add, 208 | color: UniversalVariables.whiteColor, 209 | size: 30.0, 210 | ), 211 | onPressed: () => foodDetailPageBloc.increamentItems()) 212 | ], 213 | ), 214 | ), 215 | ], 216 | ), 217 | SizedBox( 218 | height: 15.0, 219 | ), 220 | Container( 221 | padding: EdgeInsets.symmetric(horizontal: 20.0), 222 | child: Text( 223 | sampleDescription, 224 | style: TextStyle( 225 | fontSize: 15.0, 226 | fontWeight: FontWeight.bold, 227 | color: Colors.black38), 228 | )), 229 | SizedBox( 230 | height: 30.0, 231 | ), 232 | Padding( 233 | padding: const EdgeInsets.symmetric(horizontal: 8.0), 234 | child: RatingBar( 235 | initialRating: 3, 236 | minRating: 1, 237 | direction: Axis.horizontal, 238 | allowHalfRating: true, 239 | itemCount: 5, 240 | itemPadding: EdgeInsets.symmetric(horizontal: 4.0), 241 | onRatingUpdate: (rating) { 242 | // do nothing XD 243 | }, 244 | ratingWidget: RatingWidget( 245 | full: Icon(Icons.star, color: UniversalVariables.amberColor), 246 | half: 247 | Icon(Icons.star_half, color: UniversalVariables.amberColor), 248 | empty: Icon(Icons.star_border, 249 | color: UniversalVariables.amberColor), 250 | ), 251 | ), 252 | ), 253 | SizedBox( 254 | height: 30.0, 255 | ), 256 | SizedBox( 257 | width: MediaQuery.of(context).size.width * 0.9, 258 | child: TextButton( 259 | style: ButtonStyle( 260 | backgroundColor: 261 | MaterialStateProperty.all(UniversalVariables.orangeColor), 262 | shape: MaterialStateProperty.all( 263 | RoundedRectangleBorder( 264 | borderRadius: BorderRadius.circular(30.0), 265 | )), 266 | ), 267 | onPressed: () => foodDetailPageBloc.addToCart(widget.fooddata), 268 | child: Text( 269 | "Add To Cart", 270 | style: TextStyle( 271 | fontSize: 24.0, 272 | fontWeight: FontWeight.w500, 273 | color: UniversalVariables.whiteColor), 274 | ), 275 | ), 276 | ), 277 | SizedBox( 278 | height: 20.0, 279 | ), 280 | ], 281 | ), 282 | ); 283 | } 284 | 285 | createPopularFoodList() { 286 | return Container( 287 | padding: EdgeInsets.all(10.0), 288 | child: Column( 289 | crossAxisAlignment: CrossAxisAlignment.start, 290 | children: [ 291 | Padding( 292 | padding: const EdgeInsets.only(left: 8.0), 293 | child: Text( 294 | "Popular Food ", 295 | style: TextStyle( 296 | fontSize: 20.0, 297 | fontWeight: FontWeight.bold, 298 | color: Colors.black45), 299 | ), 300 | ), 301 | SizedBox( 302 | height: 10.0, 303 | ), 304 | Container( 305 | height: 200.0, 306 | child: foodDetailPageBloc.foodList.length == -1 307 | ? Center(child: Center(child: CircularProgressIndicator())) 308 | : ListView.builder( 309 | scrollDirection: Axis.horizontal, 310 | itemCount: foodDetailPageBloc.foodList.length, 311 | itemBuilder: (_, index) { 312 | return FoodTitleWidget( 313 | foodDetailPageBloc.foodList[index], 314 | ); 315 | }), 316 | ), 317 | ], 318 | ), 319 | ); 320 | } 321 | } 322 | -------------------------------------------------------------------------------- /pubspec.lock: -------------------------------------------------------------------------------- 1 | # Generated by pub 2 | # See https://dart.dev/tools/pub/glossary#lockfile 3 | packages: 4 | _fe_analyzer_shared: 5 | dependency: transitive 6 | description: 7 | name: _fe_analyzer_shared 8 | sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a 9 | url: "https://pub.dev" 10 | source: hosted 11 | version: "61.0.0" 12 | _flutterfire_internals: 13 | dependency: transitive 14 | description: 15 | name: _flutterfire_internals 16 | sha256: d84d98f1992976775f83083523a34c5d22fea191eec3abb2bd09537fb623c2e0 17 | url: "https://pub.dev" 18 | source: hosted 19 | version: "1.3.7" 20 | analyzer: 21 | dependency: transitive 22 | description: 23 | name: analyzer 24 | sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562 25 | url: "https://pub.dev" 26 | source: hosted 27 | version: "5.13.0" 28 | args: 29 | dependency: transitive 30 | description: 31 | name: args 32 | sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596 33 | url: "https://pub.dev" 34 | source: hosted 35 | version: "2.4.2" 36 | async: 37 | dependency: transitive 38 | description: 39 | name: async 40 | sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" 41 | url: "https://pub.dev" 42 | source: hosted 43 | version: "2.11.0" 44 | boolean_selector: 45 | dependency: transitive 46 | description: 47 | name: boolean_selector 48 | sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" 49 | url: "https://pub.dev" 50 | source: hosted 51 | version: "2.1.1" 52 | carousel_slider: 53 | dependency: "direct main" 54 | description: 55 | name: carousel_slider 56 | sha256: "9c695cc963bf1d04a47bd6021f68befce8970bcd61d24938e1fb0918cf5d9c42" 57 | url: "https://pub.dev" 58 | source: hosted 59 | version: "4.2.1" 60 | characters: 61 | dependency: transitive 62 | description: 63 | name: characters 64 | sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" 65 | url: "https://pub.dev" 66 | source: hosted 67 | version: "1.3.0" 68 | clock: 69 | dependency: transitive 70 | description: 71 | name: clock 72 | sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf 73 | url: "https://pub.dev" 74 | source: hosted 75 | version: "1.1.1" 76 | collection: 77 | dependency: transitive 78 | description: 79 | name: collection 80 | sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 81 | url: "https://pub.dev" 82 | source: hosted 83 | version: "1.17.2" 84 | convert: 85 | dependency: transitive 86 | description: 87 | name: convert 88 | sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592" 89 | url: "https://pub.dev" 90 | source: hosted 91 | version: "3.1.1" 92 | crypto: 93 | dependency: transitive 94 | description: 95 | name: crypto 96 | sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab 97 | url: "https://pub.dev" 98 | source: hosted 99 | version: "3.0.3" 100 | cupertino_icons: 101 | dependency: "direct main" 102 | description: 103 | name: cupertino_icons 104 | sha256: d57953e10f9f8327ce64a508a355f0b1ec902193f66288e8cb5070e7c47eeb2d 105 | url: "https://pub.dev" 106 | source: hosted 107 | version: "1.0.6" 108 | email_validator: 109 | dependency: "direct main" 110 | description: 111 | name: email_validator 112 | sha256: e9a90f27ab2b915a27d7f9c2a7ddda5dd752d6942616ee83529b686fc086221b 113 | url: "https://pub.dev" 114 | source: hosted 115 | version: "2.1.17" 116 | fake_async: 117 | dependency: transitive 118 | description: 119 | name: fake_async 120 | sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" 121 | url: "https://pub.dev" 122 | source: hosted 123 | version: "1.3.1" 124 | file: 125 | dependency: transitive 126 | description: 127 | name: file 128 | sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c" 129 | url: "https://pub.dev" 130 | source: hosted 131 | version: "7.0.0" 132 | firebase_auth: 133 | dependency: "direct main" 134 | description: 135 | name: firebase_auth 136 | sha256: "95c74884ff25eafcbbbcd5506b738e68ee98ff54d09522a6092a2fb95d02ee7a" 137 | url: "https://pub.dev" 138 | source: hosted 139 | version: "4.10.1" 140 | firebase_auth_platform_interface: 141 | dependency: transitive 142 | description: 143 | name: firebase_auth_platform_interface 144 | sha256: "05d2636673e145d2b5eccc452c009808af4c15e8b402f34bb8fec63f2c76e86b" 145 | url: "https://pub.dev" 146 | source: hosted 147 | version: "6.19.1" 148 | firebase_auth_web: 149 | dependency: transitive 150 | description: 151 | name: firebase_auth_web 152 | sha256: "4b8374da5d8969f99453ebd65074c1d379fe781bb3680fa7f65a4d3ac4ec87b3" 153 | url: "https://pub.dev" 154 | source: hosted 155 | version: "5.8.2" 156 | firebase_core: 157 | dependency: "direct main" 158 | description: 159 | name: firebase_core 160 | sha256: "95580fa07c8ca3072a2bb1fecd792616a33f8683477d25b7d29d3a6a399e6ece" 161 | url: "https://pub.dev" 162 | source: hosted 163 | version: "2.17.0" 164 | firebase_core_platform_interface: 165 | dependency: transitive 166 | description: 167 | name: firebase_core_platform_interface 168 | sha256: b63e3be6c96ef5c33bdec1aab23c91eb00696f6452f0519401d640938c94cba2 169 | url: "https://pub.dev" 170 | source: hosted 171 | version: "4.8.0" 172 | firebase_core_web: 173 | dependency: transitive 174 | description: 175 | name: firebase_core_web 176 | sha256: e8c408923cd3a25bd342c576a114f2126769cd1a57106a4edeaa67ea4a84e962 177 | url: "https://pub.dev" 178 | source: hosted 179 | version: "2.8.0" 180 | firebase_database: 181 | dependency: "direct main" 182 | description: 183 | name: firebase_database 184 | sha256: b3b63057fe46a25e055861d8e66ee1e7cf4227ae968f6a69f8bfd8542995e01b 185 | url: "https://pub.dev" 186 | source: hosted 187 | version: "10.2.7" 188 | firebase_database_platform_interface: 189 | dependency: transitive 190 | description: 191 | name: firebase_database_platform_interface 192 | sha256: da370480b52e38a83cd9cc3a4a75652e97432026d068291c6d24060ed4e72cd0 193 | url: "https://pub.dev" 194 | source: hosted 195 | version: "0.2.5+7" 196 | firebase_database_web: 197 | dependency: transitive 198 | description: 199 | name: firebase_database_web 200 | sha256: "9e14532089bc2ec0fb3d3f1365c49213e7b4c3367357b69ba7fbf05d51917479" 201 | url: "https://pub.dev" 202 | source: hosted 203 | version: "0.2.3+7" 204 | flutter: 205 | dependency: "direct main" 206 | description: flutter 207 | source: sdk 208 | version: "0.0.0" 209 | flutter_rating_bar: 210 | dependency: "direct main" 211 | description: 212 | name: flutter_rating_bar 213 | sha256: d2af03469eac832c591a1eba47c91ecc871fe5708e69967073c043b2d775ed93 214 | url: "https://pub.dev" 215 | source: hosted 216 | version: "4.0.1" 217 | flutter_test: 218 | dependency: "direct dev" 219 | description: flutter 220 | source: sdk 221 | version: "0.0.0" 222 | flutter_web_plugins: 223 | dependency: transitive 224 | description: flutter 225 | source: sdk 226 | version: "0.0.0" 227 | glob: 228 | dependency: transitive 229 | description: 230 | name: glob 231 | sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63" 232 | url: "https://pub.dev" 233 | source: hosted 234 | version: "2.1.2" 235 | google_identity_services_web: 236 | dependency: transitive 237 | description: 238 | name: google_identity_services_web 239 | sha256: "554748f2478619076128152c58905620d10f9c7fc270ff1d3a9675f9f53838ed" 240 | url: "https://pub.dev" 241 | source: hosted 242 | version: "0.2.1+1" 243 | google_sign_in: 244 | dependency: "direct main" 245 | description: 246 | name: google_sign_in 247 | sha256: f45038d27bcad37498f282295ae97eece23c9349fc16649154067b87b9f1fd03 248 | url: "https://pub.dev" 249 | source: hosted 250 | version: "6.1.5" 251 | google_sign_in_android: 252 | dependency: transitive 253 | description: 254 | name: google_sign_in_android 255 | sha256: "6031f59074a337fdd81be821aba84cee3a41338c6e958499a5cd34d3e1db80ef" 256 | url: "https://pub.dev" 257 | source: hosted 258 | version: "6.1.20" 259 | google_sign_in_ios: 260 | dependency: transitive 261 | description: 262 | name: google_sign_in_ios 263 | sha256: "974944859f9cd40eb8a15b3fe8efb2d47fb7e99438f763f61a1ccd28d74ff4ce" 264 | url: "https://pub.dev" 265 | source: hosted 266 | version: "5.6.4" 267 | google_sign_in_platform_interface: 268 | dependency: transitive 269 | description: 270 | name: google_sign_in_platform_interface 271 | sha256: "35ceee5f0eadc1c07b0b4af7553246e315c901facbb7d3dadf734ba2693ceec4" 272 | url: "https://pub.dev" 273 | source: hosted 274 | version: "2.4.2" 275 | google_sign_in_web: 276 | dependency: transitive 277 | description: 278 | name: google_sign_in_web 279 | sha256: "939e9172a378ec4eaeb7f71eeddac9b55ebd0e8546d336daec476a68e5279766" 280 | url: "https://pub.dev" 281 | source: hosted 282 | version: "0.12.0+5" 283 | http: 284 | dependency: transitive 285 | description: 286 | name: http 287 | sha256: "759d1a329847dd0f39226c688d3e06a6b8679668e350e2891a6474f8b4bb8525" 288 | url: "https://pub.dev" 289 | source: hosted 290 | version: "1.1.0" 291 | http_parser: 292 | dependency: transitive 293 | description: 294 | name: http_parser 295 | sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" 296 | url: "https://pub.dev" 297 | source: hosted 298 | version: "4.0.2" 299 | js: 300 | dependency: transitive 301 | description: 302 | name: js 303 | sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 304 | url: "https://pub.dev" 305 | source: hosted 306 | version: "0.6.7" 307 | matcher: 308 | dependency: transitive 309 | description: 310 | name: matcher 311 | sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" 312 | url: "https://pub.dev" 313 | source: hosted 314 | version: "0.12.16" 315 | material_color_utilities: 316 | dependency: transitive 317 | description: 318 | name: material_color_utilities 319 | sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" 320 | url: "https://pub.dev" 321 | source: hosted 322 | version: "0.5.0" 323 | meta: 324 | dependency: transitive 325 | description: 326 | name: meta 327 | sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" 328 | url: "https://pub.dev" 329 | source: hosted 330 | version: "1.9.1" 331 | nested: 332 | dependency: transitive 333 | description: 334 | name: nested 335 | sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" 336 | url: "https://pub.dev" 337 | source: hosted 338 | version: "1.0.0" 339 | package_config: 340 | dependency: transitive 341 | description: 342 | name: package_config 343 | sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd" 344 | url: "https://pub.dev" 345 | source: hosted 346 | version: "2.1.0" 347 | path: 348 | dependency: "direct main" 349 | description: 350 | name: path 351 | sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" 352 | url: "https://pub.dev" 353 | source: hosted 354 | version: "1.8.3" 355 | pigeon: 356 | dependency: transitive 357 | description: 358 | name: pigeon 359 | sha256: "5a79fd0b10423f6b5705525e32015597f861c31220b522a67d1e6b580da96719" 360 | url: "https://pub.dev" 361 | source: hosted 362 | version: "11.0.1" 363 | plugin_platform_interface: 364 | dependency: transitive 365 | description: 366 | name: plugin_platform_interface 367 | sha256: da3fdfeccc4d4ff2da8f8c556704c08f912542c5fb3cf2233ed75372384a034d 368 | url: "https://pub.dev" 369 | source: hosted 370 | version: "2.1.6" 371 | provider: 372 | dependency: "direct main" 373 | description: 374 | name: provider 375 | sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f 376 | url: "https://pub.dev" 377 | source: hosted 378 | version: "6.0.5" 379 | pub_semver: 380 | dependency: transitive 381 | description: 382 | name: pub_semver 383 | sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c" 384 | url: "https://pub.dev" 385 | source: hosted 386 | version: "2.1.4" 387 | quiver: 388 | dependency: transitive 389 | description: 390 | name: quiver 391 | sha256: b1c1ac5ce6688d77f65f3375a9abb9319b3cb32486bdc7a1e0fdf004d7ba4e47 392 | url: "https://pub.dev" 393 | source: hosted 394 | version: "3.2.1" 395 | sky_engine: 396 | dependency: transitive 397 | description: flutter 398 | source: sdk 399 | version: "0.0.99" 400 | source_span: 401 | dependency: transitive 402 | description: 403 | name: source_span 404 | sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" 405 | url: "https://pub.dev" 406 | source: hosted 407 | version: "1.10.0" 408 | sqflite: 409 | dependency: "direct main" 410 | description: 411 | name: sqflite 412 | sha256: "591f1602816e9c31377d5f008c2d9ef7b8aca8941c3f89cc5fd9d84da0c38a9a" 413 | url: "https://pub.dev" 414 | source: hosted 415 | version: "2.3.0" 416 | sqflite_common: 417 | dependency: transitive 418 | description: 419 | name: sqflite_common 420 | sha256: "1b92f368f44b0dee2425bb861cfa17b6f6cf3961f762ff6f941d20b33355660a" 421 | url: "https://pub.dev" 422 | source: hosted 423 | version: "2.5.0" 424 | stack_trace: 425 | dependency: transitive 426 | description: 427 | name: stack_trace 428 | sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 429 | url: "https://pub.dev" 430 | source: hosted 431 | version: "1.11.0" 432 | stream_channel: 433 | dependency: transitive 434 | description: 435 | name: stream_channel 436 | sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" 437 | url: "https://pub.dev" 438 | source: hosted 439 | version: "2.1.1" 440 | string_scanner: 441 | dependency: transitive 442 | description: 443 | name: string_scanner 444 | sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" 445 | url: "https://pub.dev" 446 | source: hosted 447 | version: "1.2.0" 448 | synchronized: 449 | dependency: transitive 450 | description: 451 | name: synchronized 452 | sha256: "5fcbd27688af6082f5abd611af56ee575342c30e87541d0245f7ff99faa02c60" 453 | url: "https://pub.dev" 454 | source: hosted 455 | version: "3.1.0" 456 | term_glyph: 457 | dependency: transitive 458 | description: 459 | name: term_glyph 460 | sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 461 | url: "https://pub.dev" 462 | source: hosted 463 | version: "1.2.1" 464 | test_api: 465 | dependency: transitive 466 | description: 467 | name: test_api 468 | sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" 469 | url: "https://pub.dev" 470 | source: hosted 471 | version: "0.6.0" 472 | toast: 473 | dependency: "direct main" 474 | description: 475 | name: toast 476 | sha256: "12433091e3e5a25b3a25f670126e42547c9ade135de30ad9ace45d1ddccd57c9" 477 | url: "https://pub.dev" 478 | source: hosted 479 | version: "0.3.0" 480 | typed_data: 481 | dependency: transitive 482 | description: 483 | name: typed_data 484 | sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c 485 | url: "https://pub.dev" 486 | source: hosted 487 | version: "1.3.2" 488 | vector_math: 489 | dependency: transitive 490 | description: 491 | name: vector_math 492 | sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" 493 | url: "https://pub.dev" 494 | source: hosted 495 | version: "2.1.4" 496 | watcher: 497 | dependency: transitive 498 | description: 499 | name: watcher 500 | sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8" 501 | url: "https://pub.dev" 502 | source: hosted 503 | version: "1.1.0" 504 | web: 505 | dependency: transitive 506 | description: 507 | name: web 508 | sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 509 | url: "https://pub.dev" 510 | source: hosted 511 | version: "0.1.4-beta" 512 | yaml: 513 | dependency: transitive 514 | description: 515 | name: yaml 516 | sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5" 517 | url: "https://pub.dev" 518 | source: hosted 519 | version: "3.1.2" 520 | sdks: 521 | dart: ">=3.1.0 <4.0.0" 522 | flutter: ">=3.13.0" 523 | --------------------------------------------------------------------------------