├── .gitignore ├── .metadata ├── .vscode └── launch.json ├── README.md ├── analysis_options.yaml ├── android ├── .gitignore ├── app │ ├── build.gradle │ └── src │ │ ├── debug │ │ └── AndroidManifest.xml │ │ ├── main │ │ ├── AndroidManifest.xml │ │ ├── kotlin │ │ │ └── com │ │ │ │ └── example │ │ │ │ └── foodly_ui │ │ │ │ └── MainActivity.kt │ │ └── res │ │ │ ├── drawable-v21 │ │ │ └── launch_background.xml │ │ │ ├── drawable │ │ │ └── launch_background.xml │ │ │ ├── mipmap-hdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-mdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── mipmap-xxxhdpi │ │ │ └── ic_launcher.png │ │ │ ├── values-night │ │ │ └── styles.xml │ │ │ └── values │ │ │ └── styles.xml │ │ └── profile │ │ └── AndroidManifest.xml ├── build.gradle ├── gradle.properties ├── gradle │ └── wrapper │ │ └── gradle-wrapper.properties └── settings.gradle ├── assets ├── Illustrations │ ├── Illustrations_1.svg │ ├── Illustrations_2.svg │ └── Illustrations_3.svg ├── font │ └── SF Pro Text │ │ ├── SFProText-Bold.ttf │ │ ├── SFProText-Medium.ttf │ │ ├── SFProText-Regular.ttf │ │ └── SFProText-Semibold.ttf ├── icons │ ├── back.svg │ ├── camera.svg │ ├── card.svg │ ├── cart.svg │ ├── clock.svg │ ├── close.svg │ ├── delivery.svg │ ├── document.svg │ ├── done.svg │ ├── facebook.svg │ ├── fast-delivery.svg │ ├── fb.svg │ ├── fire.svg │ ├── food.svg │ ├── forward.svg │ ├── google.svg │ ├── home.svg │ ├── invisible.svg │ ├── location.svg │ ├── lock.svg │ ├── logout.svg │ ├── marker.svg │ ├── minus.svg │ ├── notify.svg │ ├── order.svg │ ├── phone.svg │ ├── plus.svg │ ├── profile.svg │ ├── rating.svg │ ├── recomended.svg │ ├── search.svg │ ├── share.svg │ └── visible.svg └── images │ ├── Banner.png │ ├── Header-image.png │ ├── big_1.png │ ├── big_2.png │ ├── big_3.png │ ├── big_4.png │ ├── featured _items_1.png │ ├── featured _items_2.png │ ├── featured _items_3.png │ ├── medium_1.png │ ├── medium_2.png │ ├── medium_3.png │ └── medium_4.png ├── foodly_thun.png ├── ios ├── .gitignore ├── Flutter │ ├── AppFrameworkInfo.plist │ ├── Debug.xcconfig │ └── Release.xcconfig ├── Runner.xcodeproj │ ├── project.pbxproj │ ├── project.xcworkspace │ │ ├── contents.xcworkspacedata │ │ └── xcshareddata │ │ │ ├── IDEWorkspaceChecks.plist │ │ │ └── WorkspaceSettings.xcsettings │ └── xcshareddata │ │ └── xcschemes │ │ └── Runner.xcscheme ├── Runner.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ │ ├── IDEWorkspaceChecks.plist │ │ └── WorkspaceSettings.xcsettings ├── Runner │ ├── AppDelegate.swift │ ├── Assets.xcassets │ │ ├── AppIcon.appiconset │ │ │ ├── Contents.json │ │ │ ├── Icon-App-1024x1024@1x.png │ │ │ ├── Icon-App-20x20@1x.png │ │ │ ├── Icon-App-20x20@2x.png │ │ │ ├── Icon-App-20x20@3x.png │ │ │ ├── Icon-App-29x29@1x.png │ │ │ ├── Icon-App-29x29@2x.png │ │ │ ├── Icon-App-29x29@3x.png │ │ │ ├── Icon-App-40x40@1x.png │ │ │ ├── Icon-App-40x40@2x.png │ │ │ ├── Icon-App-40x40@3x.png │ │ │ ├── Icon-App-60x60@2x.png │ │ │ ├── Icon-App-60x60@3x.png │ │ │ ├── Icon-App-76x76@1x.png │ │ │ ├── Icon-App-76x76@2x.png │ │ │ └── Icon-App-83.5x83.5@2x.png │ │ └── LaunchImage.imageset │ │ │ ├── Contents.json │ │ │ ├── LaunchImage.png │ │ │ ├── LaunchImage@2x.png │ │ │ ├── LaunchImage@3x.png │ │ │ └── README.md │ ├── Base.lproj │ │ ├── LaunchScreen.storyboard │ │ └── Main.storyboard │ ├── Info.plist │ └── Runner-Bridging-Header.h └── RunnerTests │ └── RunnerTests.swift ├── lib ├── components │ ├── buttons │ │ ├── fitted_button.dart │ │ ├── primary_button.dart │ │ ├── secondery_button.dart │ │ └── socal_button.dart │ ├── cards │ │ ├── big │ │ │ ├── big_card_image.dart │ │ │ ├── big_card_image_slide.dart │ │ │ └── restaurant_info_big_card.dart │ │ ├── iteam_card.dart │ │ └── medium │ │ │ └── restaurant_info_medium_card.dart │ ├── dot_indicators.dart │ ├── price_range_and_food_type.dart │ ├── rating.dart │ ├── rating_with_counter.dart │ ├── scalton │ │ ├── big_card_image_slide_scalton.dart │ │ ├── big_card_scalton.dart │ │ ├── medium_card_scalton.dart │ │ ├── scalton_line.dart │ │ └── scalton_rounded_container.dart │ ├── section_title.dart │ ├── small_dot.dart │ └── welcome_text.dart ├── constants.dart ├── demo_data.dart ├── entry_point.dart ├── main.dart ├── screens │ ├── addToOrder │ │ ├── add_to_order_screen.dart │ │ └── components │ │ │ ├── info.dart │ │ │ ├── required_section_title.dart │ │ │ ├── rounded_button.dart │ │ │ └── rounded_checkedbox_list_tile.dart │ ├── auth │ │ ├── components │ │ │ └── sign_in_form.dart │ │ ├── forgot_password_screen.dart │ │ ├── reset_email_sent_screen.dart │ │ ├── sign_in_screen.dart │ │ └── sign_up_screen.dart │ ├── details │ │ ├── components │ │ │ ├── featured_item_card.dart │ │ │ ├── featured_items.dart │ │ │ ├── iteams.dart │ │ │ └── restaurrant_info.dart │ │ └── details_screen.dart │ ├── featured │ │ ├── components │ │ │ └── body.dart │ │ └── featurred_screen.dart │ ├── filter │ │ ├── components │ │ │ ├── categories.dart │ │ │ ├── dietaries.dart │ │ │ └── price_range.dart │ │ └── filter_screen.dart │ ├── findRestaurants │ │ └── find_restaurants_screen.dart │ ├── home │ │ ├── components │ │ │ ├── medium_card_list.dart │ │ │ └── promotion_banner.dart │ │ └── home_screen.dart │ ├── onboarding │ │ ├── components │ │ │ └── onboard_content.dart │ │ └── onboarding_scrreen.dart │ ├── orderDetails │ │ ├── components │ │ │ ├── order_item_card.dart │ │ │ ├── price_row.dart │ │ │ └── total_price.dart │ │ └── order_details_screen.dart │ ├── phoneLogin │ │ ├── components │ │ │ └── otp_form.dart │ │ ├── number_verify_screen.dart │ │ └── phone_login_screen.dart │ ├── profile │ │ ├── components │ │ │ └── body.dart │ │ └── profile_screen.dart │ ├── search │ │ ├── components │ │ │ └── body.dart │ │ └── search_screen.dart │ └── signUp │ │ └── components │ │ ├── body.dart │ │ └── sign_up_form.dart └── theme.dart ├── preview.png ├── pubspec.lock ├── pubspec.yaml ├── test └── widget_test.dart └── windows ├── .gitignore ├── CMakeLists.txt ├── flutter ├── CMakeLists.txt ├── generated_plugin_registrant.cc ├── generated_plugin_registrant.h └── generated_plugins.cmake └── runner ├── CMakeLists.txt ├── Runner.rc ├── flutter_window.cpp ├── flutter_window.h ├── main.cpp ├── resource.h ├── resources └── app_icon.ico ├── runner.exe.manifest ├── utils.cpp ├── utils.h ├── win32_window.cpp └── win32_window.h /.gitignore: -------------------------------------------------------------------------------- 1 | # Miscellaneous 2 | *.class 3 | *.log 4 | *.pyc 5 | *.swp 6 | .DS_Store 7 | .atom/ 8 | .buildlog/ 9 | .history 10 | .svn/ 11 | migrate_working_dir/ 12 | 13 | # IntelliJ related 14 | *.iml 15 | *.ipr 16 | *.iws 17 | .idea/ 18 | 19 | # The .vscode folder contains launch configuration and tasks you configure in 20 | # VS Code which you may wish to be included in version control, so this line 21 | # is commented out by default. 22 | #.vscode/ 23 | 24 | # Flutter/Dart/Pub related 25 | **/doc/api/ 26 | **/ios/Flutter/.last_build_id 27 | .dart_tool/ 28 | .flutter-plugins 29 | .flutter-plugins-dependencies 30 | .packages 31 | .pub-cache/ 32 | .pub/ 33 | /build/ 34 | 35 | # Symbolication related 36 | app.*.symbols 37 | 38 | # Obfuscation related 39 | app.*.map.json 40 | 41 | # Android Studio will place build artifacts here 42 | /android/app/debug 43 | /android/app/profile 44 | /android/app/release 45 | -------------------------------------------------------------------------------- /.metadata: -------------------------------------------------------------------------------- 1 | # This file tracks properties of this Flutter project. 2 | # Used by Flutter tool to assess capabilities and perform upgrades etc. 3 | # 4 | # This file should be version controlled. 5 | 6 | version: 7 | revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff 8 | channel: stable 9 | 10 | project_type: app 11 | 12 | # Tracks metadata for the flutter migrate command 13 | migration: 14 | platforms: 15 | - platform: root 16 | create_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff 17 | base_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff 18 | - platform: android 19 | create_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff 20 | base_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff 21 | - platform: ios 22 | create_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff 23 | base_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff 24 | - platform: linux 25 | create_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff 26 | base_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff 27 | - platform: macos 28 | create_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff 29 | base_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff 30 | - platform: web 31 | create_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff 32 | base_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff 33 | - platform: windows 34 | create_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff 35 | base_revision: 9cd3d0d9ff05768afa249e036acc66e8abe93bff 36 | 37 | # User provided section 38 | 39 | # List of Local paths (relative to this file) that should be 40 | # ignored by the migrate tool. 41 | # 42 | # Files that are not part of the templates will be ignored by default. 43 | unmanaged_files: 44 | - 'lib/main.dart' 45 | - 'ios/Runner.xcodeproj/project.pbxproj' 46 | -------------------------------------------------------------------------------- /.vscode/launch.json: -------------------------------------------------------------------------------- 1 | { 2 | // Use IntelliSense to learn about possible attributes. 3 | // Hover to view descriptions of existing attributes. 4 | // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 5 | "version": "0.2.0", 6 | "configurations": [ 7 | { 8 | "name": "foodly_ui", 9 | "request": "launch", 10 | "type": "dart" 11 | }, 12 | { 13 | "name": "foodly_ui (profile mode)", 14 | "request": "launch", 15 | "type": "dart", 16 | "flutterMode": "profile" 17 | }, 18 | { 19 | "name": "foodly_ui (release mode)", 20 | "request": "launch", 21 | "type": "dart", 22 | "flutterMode": "release" 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Restaurant/Food Delivery App UI kit in Flutter 2 | 3 | We build Flutter Restaurant/Food delivery app UI Kit to help you build a nice clean app for restaurent using flutter which runs both Android and iOS. This kit comes packed with 25 beautifully designed screens and a hearty portion of deliciously responsive components. Also, we have skeleton loading and have separate components for both Android and iOS so that you feel the native experience. 4 | 5 | ## Screenshots 6 | 7 | ![All pages](/preview.png) 8 | 9 | ![Preview](/foodly_thun.png) 10 | -------------------------------------------------------------------------------- /analysis_options.yaml: -------------------------------------------------------------------------------- 1 | # This file configures the analyzer, which statically analyzes Dart code to 2 | # check for errors, warnings, and lints. 3 | # 4 | # The issues identified by the analyzer are surfaced in the UI of Dart-enabled 5 | # IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be 6 | # invoked from the command line by running `flutter analyze`. 7 | 8 | # The following line activates a set of recommended lints for Flutter apps, 9 | # packages, and plugins designed to encourage good coding practices. 10 | include: package:flutter_lints/flutter.yaml 11 | 12 | linter: 13 | # The lint rules applied to this project can be customized in the 14 | # section below to disable rules from the `package:flutter_lints/flutter.yaml` 15 | # included above or to enable additional rules. A list of all available lints 16 | # and their documentation is published at 17 | # https://dart-lang.github.io/linter/lints/index.html. 18 | # 19 | # Instead of disabling a lint rule for the entire project in the 20 | # section below, it can also be suppressed for a single line of code 21 | # or a specific dart file by using the `// ignore: name_of_lint` and 22 | # `// ignore_for_file: name_of_lint` syntax on the line or in the file 23 | # producing the lint. 24 | rules: 25 | # avoid_print: false # Uncomment to disable the `avoid_print` rule 26 | # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule 27 | 28 | # Additional information about this file can be found at 29 | # https://dart.dev/guides/language/analysis-options 30 | -------------------------------------------------------------------------------- /android/.gitignore: -------------------------------------------------------------------------------- 1 | gradle-wrapper.jar 2 | /.gradle 3 | /captures/ 4 | /gradlew 5 | /gradlew.bat 6 | /local.properties 7 | GeneratedPluginRegistrant.java 8 | 9 | # Remember to never publicly share your keystore. 10 | # See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app 11 | key.properties 12 | **/*.keystore 13 | **/*.jks 14 | -------------------------------------------------------------------------------- /android/app/build.gradle: -------------------------------------------------------------------------------- 1 | def localProperties = new Properties() 2 | def localPropertiesFile = rootProject.file('local.properties') 3 | if (localPropertiesFile.exists()) { 4 | localPropertiesFile.withReader('UTF-8') { reader -> 5 | localProperties.load(reader) 6 | } 7 | } 8 | 9 | def flutterRoot = localProperties.getProperty('flutter.sdk') 10 | if (flutterRoot == null) { 11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") 12 | } 13 | 14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode') 15 | if (flutterVersionCode == null) { 16 | flutterVersionCode = '1' 17 | } 18 | 19 | def flutterVersionName = localProperties.getProperty('flutter.versionName') 20 | if (flutterVersionName == null) { 21 | flutterVersionName = '1.0' 22 | } 23 | 24 | apply plugin: 'com.android.application' 25 | apply plugin: 'kotlin-android' 26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" 27 | 28 | android { 29 | namespace "com.example.foodly_ui" 30 | compileSdkVersion flutter.compileSdkVersion 31 | ndkVersion flutter.ndkVersion 32 | 33 | compileOptions { 34 | sourceCompatibility JavaVersion.VERSION_1_8 35 | targetCompatibility JavaVersion.VERSION_1_8 36 | } 37 | 38 | kotlinOptions { 39 | jvmTarget = '1.8' 40 | } 41 | 42 | sourceSets { 43 | main.java.srcDirs += 'src/main/kotlin' 44 | } 45 | 46 | defaultConfig { 47 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). 48 | applicationId "com.example.foodly_ui" 49 | // You can update the following values to match your application needs. 50 | // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. 51 | minSdkVersion flutter.minSdkVersion 52 | targetSdkVersion flutter.targetSdkVersion 53 | versionCode flutterVersionCode.toInteger() 54 | versionName flutterVersionName 55 | } 56 | 57 | buildTypes { 58 | release { 59 | // TODO: Add your own signing config for the release build. 60 | // Signing with the debug keys for now, so `flutter run --release` works. 61 | signingConfig signingConfigs.debug 62 | } 63 | } 64 | } 65 | 66 | flutter { 67 | source '../..' 68 | } 69 | 70 | dependencies { 71 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" 72 | } 73 | -------------------------------------------------------------------------------- /android/app/src/debug/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 14 | 18 | 22 | 23 | 24 | 25 | 26 | 27 | 29 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /android/app/src/main/kotlin/com/example/foodly_ui/MainActivity.kt: -------------------------------------------------------------------------------- 1 | package com.example.foodly_ui 2 | 3 | import io.flutter.embedding.android.FlutterActivity 4 | 5 | class MainActivity: FlutterActivity() { 6 | } 7 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable-v21/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/drawable/launch_background.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 12 | 13 | -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/android/app/src/main/res/mipmap-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/android/app/src/main/res/mipmap-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /android/app/src/main/res/values-night/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 15 | 18 | 19 | -------------------------------------------------------------------------------- /android/app/src/profile/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /android/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | ext.kotlin_version = '1.7.10' 3 | repositories { 4 | google() 5 | mavenCentral() 6 | } 7 | 8 | dependencies { 9 | classpath 'com.android.tools.build:gradle:7.3.0' 10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" 11 | } 12 | } 13 | 14 | allprojects { 15 | repositories { 16 | google() 17 | mavenCentral() 18 | } 19 | } 20 | 21 | rootProject.buildDir = '../build' 22 | subprojects { 23 | project.buildDir = "${rootProject.buildDir}/${project.name}" 24 | } 25 | subprojects { 26 | project.evaluationDependsOn(':app') 27 | } 28 | 29 | tasks.register("clean", Delete) { 30 | delete rootProject.buildDir 31 | } 32 | -------------------------------------------------------------------------------- /android/gradle.properties: -------------------------------------------------------------------------------- 1 | org.gradle.jvmargs=-Xmx1536M 2 | android.useAndroidX=true 3 | android.enableJetifier=true 4 | -------------------------------------------------------------------------------- /android/gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | distributionBase=GRADLE_USER_HOME 2 | distributionPath=wrapper/dists 3 | zipStoreBase=GRADLE_USER_HOME 4 | zipStorePath=wrapper/dists 5 | distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip 6 | -------------------------------------------------------------------------------- /android/settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | 3 | def localPropertiesFile = new File(rootProject.projectDir, "local.properties") 4 | def properties = new Properties() 5 | 6 | assert localPropertiesFile.exists() 7 | localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } 8 | 9 | def flutterSdkPath = properties.getProperty("flutter.sdk") 10 | assert flutterSdkPath != null, "flutter.sdk not set in local.properties" 11 | apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" 12 | -------------------------------------------------------------------------------- /assets/font/SF Pro Text/SFProText-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/font/SF Pro Text/SFProText-Bold.ttf -------------------------------------------------------------------------------- /assets/font/SF Pro Text/SFProText-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/font/SF Pro Text/SFProText-Medium.ttf -------------------------------------------------------------------------------- /assets/font/SF Pro Text/SFProText-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/font/SF Pro Text/SFProText-Regular.ttf -------------------------------------------------------------------------------- /assets/font/SF Pro Text/SFProText-Semibold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/font/SF Pro Text/SFProText-Semibold.ttf -------------------------------------------------------------------------------- /assets/icons/back.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/camera.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/card.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/cart.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/clock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/close.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/delivery.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/document.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/done.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/facebook.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 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 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /assets/icons/fast-delivery.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/fb.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /assets/icons/fire.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/food.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/forward.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/google.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | 8 | 11 | 14 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /assets/icons/home.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/invisible.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/location.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/lock.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/logout.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/marker.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/minus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/notify.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/order.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/phone.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /assets/icons/plus.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/profile.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/rating.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/recomended.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/search.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/share.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/icons/visible.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /assets/images/Banner.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/images/Banner.png -------------------------------------------------------------------------------- /assets/images/Header-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/images/Header-image.png -------------------------------------------------------------------------------- /assets/images/big_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/images/big_1.png -------------------------------------------------------------------------------- /assets/images/big_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/images/big_2.png -------------------------------------------------------------------------------- /assets/images/big_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/images/big_3.png -------------------------------------------------------------------------------- /assets/images/big_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/images/big_4.png -------------------------------------------------------------------------------- /assets/images/featured _items_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/images/featured _items_1.png -------------------------------------------------------------------------------- /assets/images/featured _items_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/images/featured _items_2.png -------------------------------------------------------------------------------- /assets/images/featured _items_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/images/featured _items_3.png -------------------------------------------------------------------------------- /assets/images/medium_1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/images/medium_1.png -------------------------------------------------------------------------------- /assets/images/medium_2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/images/medium_2.png -------------------------------------------------------------------------------- /assets/images/medium_3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/images/medium_3.png -------------------------------------------------------------------------------- /assets/images/medium_4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/assets/images/medium_4.png -------------------------------------------------------------------------------- /foodly_thun.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/foodly_thun.png -------------------------------------------------------------------------------- /ios/.gitignore: -------------------------------------------------------------------------------- 1 | **/dgph 2 | *.mode1v3 3 | *.mode2v3 4 | *.moved-aside 5 | *.pbxuser 6 | *.perspectivev3 7 | **/*sync/ 8 | .sconsign.dblite 9 | .tags* 10 | **/.vagrant/ 11 | **/DerivedData/ 12 | Icon? 13 | **/Pods/ 14 | **/.symlinks/ 15 | profile 16 | xcuserdata 17 | **/.generated/ 18 | Flutter/App.framework 19 | Flutter/Flutter.framework 20 | Flutter/Flutter.podspec 21 | Flutter/Generated.xcconfig 22 | Flutter/ephemeral/ 23 | Flutter/app.flx 24 | Flutter/app.zip 25 | Flutter/flutter_assets/ 26 | Flutter/flutter_export_environment.sh 27 | ServiceDefinitions.json 28 | Runner/GeneratedPluginRegistrant.* 29 | 30 | # Exceptions to above rules. 31 | !default.mode1v3 32 | !default.mode2v3 33 | !default.pbxuser 34 | !default.perspectivev3 35 | -------------------------------------------------------------------------------- /ios/Flutter/AppFrameworkInfo.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | App 9 | CFBundleIdentifier 10 | io.flutter.flutter.app 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | App 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1.0 23 | MinimumOSVersion 24 | 12.0 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Flutter/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Flutter/Release.xcconfig: -------------------------------------------------------------------------------- 1 | #include "Generated.xcconfig" 2 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme: -------------------------------------------------------------------------------- 1 | 2 | 5 | 8 | 9 | 15 | 21 | 22 | 23 | 24 | 25 | 30 | 31 | 37 | 38 | 39 | 40 | 43 | 49 | 50 | 51 | 52 | 53 | 63 | 65 | 71 | 72 | 73 | 74 | 80 | 82 | 88 | 89 | 90 | 91 | 93 | 94 | 97 | 98 | 99 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | IDEDidComputeMac32BitWarning 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | PreviewsEnabled 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /ios/Runner/AppDelegate.swift: -------------------------------------------------------------------------------- 1 | import UIKit 2 | import Flutter 3 | 4 | @main 5 | @objc class AppDelegate: FlutterAppDelegate { 6 | override func application( 7 | _ application: UIApplication, 8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? 9 | ) -> Bool { 10 | GeneratedPluginRegistrant.register(with: self) 11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions) 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "size" : "20x20", 5 | "idiom" : "iphone", 6 | "filename" : "Icon-App-20x20@2x.png", 7 | "scale" : "2x" 8 | }, 9 | { 10 | "size" : "20x20", 11 | "idiom" : "iphone", 12 | "filename" : "Icon-App-20x20@3x.png", 13 | "scale" : "3x" 14 | }, 15 | { 16 | "size" : "29x29", 17 | "idiom" : "iphone", 18 | "filename" : "Icon-App-29x29@1x.png", 19 | "scale" : "1x" 20 | }, 21 | { 22 | "size" : "29x29", 23 | "idiom" : "iphone", 24 | "filename" : "Icon-App-29x29@2x.png", 25 | "scale" : "2x" 26 | }, 27 | { 28 | "size" : "29x29", 29 | "idiom" : "iphone", 30 | "filename" : "Icon-App-29x29@3x.png", 31 | "scale" : "3x" 32 | }, 33 | { 34 | "size" : "40x40", 35 | "idiom" : "iphone", 36 | "filename" : "Icon-App-40x40@2x.png", 37 | "scale" : "2x" 38 | }, 39 | { 40 | "size" : "40x40", 41 | "idiom" : "iphone", 42 | "filename" : "Icon-App-40x40@3x.png", 43 | "scale" : "3x" 44 | }, 45 | { 46 | "size" : "60x60", 47 | "idiom" : "iphone", 48 | "filename" : "Icon-App-60x60@2x.png", 49 | "scale" : "2x" 50 | }, 51 | { 52 | "size" : "60x60", 53 | "idiom" : "iphone", 54 | "filename" : "Icon-App-60x60@3x.png", 55 | "scale" : "3x" 56 | }, 57 | { 58 | "size" : "20x20", 59 | "idiom" : "ipad", 60 | "filename" : "Icon-App-20x20@1x.png", 61 | "scale" : "1x" 62 | }, 63 | { 64 | "size" : "20x20", 65 | "idiom" : "ipad", 66 | "filename" : "Icon-App-20x20@2x.png", 67 | "scale" : "2x" 68 | }, 69 | { 70 | "size" : "29x29", 71 | "idiom" : "ipad", 72 | "filename" : "Icon-App-29x29@1x.png", 73 | "scale" : "1x" 74 | }, 75 | { 76 | "size" : "29x29", 77 | "idiom" : "ipad", 78 | "filename" : "Icon-App-29x29@2x.png", 79 | "scale" : "2x" 80 | }, 81 | { 82 | "size" : "40x40", 83 | "idiom" : "ipad", 84 | "filename" : "Icon-App-40x40@1x.png", 85 | "scale" : "1x" 86 | }, 87 | { 88 | "size" : "40x40", 89 | "idiom" : "ipad", 90 | "filename" : "Icon-App-40x40@2x.png", 91 | "scale" : "2x" 92 | }, 93 | { 94 | "size" : "76x76", 95 | "idiom" : "ipad", 96 | "filename" : "Icon-App-76x76@1x.png", 97 | "scale" : "1x" 98 | }, 99 | { 100 | "size" : "76x76", 101 | "idiom" : "ipad", 102 | "filename" : "Icon-App-76x76@2x.png", 103 | "scale" : "2x" 104 | }, 105 | { 106 | "size" : "83.5x83.5", 107 | "idiom" : "ipad", 108 | "filename" : "Icon-App-83.5x83.5@2x.png", 109 | "scale" : "2x" 110 | }, 111 | { 112 | "size" : "1024x1024", 113 | "idiom" : "ios-marketing", 114 | "filename" : "Icon-App-1024x1024@1x.png", 115 | "scale" : "1x" 116 | } 117 | ], 118 | "info" : { 119 | "version" : 1, 120 | "author" : "xcode" 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/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/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/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/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/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/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/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/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/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/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/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/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/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/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/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/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/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/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/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/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/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/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/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/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "universal", 5 | "filename" : "LaunchImage.png", 6 | "scale" : "1x" 7 | }, 8 | { 9 | "idiom" : "universal", 10 | "filename" : "LaunchImage@2x.png", 11 | "scale" : "2x" 12 | }, 13 | { 14 | "idiom" : "universal", 15 | "filename" : "LaunchImage@3x.png", 16 | "scale" : "3x" 17 | } 18 | ], 19 | "info" : { 20 | "version" : 1, 21 | "author" : "xcode" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png -------------------------------------------------------------------------------- /ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md: -------------------------------------------------------------------------------- 1 | # Launch Screen Assets 2 | 3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory. 4 | 5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images. -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/LaunchScreen.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /ios/Runner/Base.lproj/Main.storyboard: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /ios/Runner/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | $(DEVELOPMENT_LANGUAGE) 7 | CFBundleDisplayName 8 | Foodly Ui 9 | CFBundleExecutable 10 | $(EXECUTABLE_NAME) 11 | CFBundleIdentifier 12 | $(PRODUCT_BUNDLE_IDENTIFIER) 13 | CFBundleInfoDictionaryVersion 14 | 6.0 15 | CFBundleName 16 | foodly_ui 17 | CFBundlePackageType 18 | APPL 19 | CFBundleShortVersionString 20 | $(FLUTTER_BUILD_NAME) 21 | CFBundleSignature 22 | ???? 23 | CFBundleVersion 24 | $(FLUTTER_BUILD_NUMBER) 25 | LSRequiresIPhoneOS 26 | 27 | UILaunchStoryboardName 28 | LaunchScreen 29 | UIMainStoryboardFile 30 | Main 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | UISupportedInterfaceOrientations~ipad 38 | 39 | UIInterfaceOrientationPortrait 40 | UIInterfaceOrientationPortraitUpsideDown 41 | UIInterfaceOrientationLandscapeLeft 42 | UIInterfaceOrientationLandscapeRight 43 | 44 | UIViewControllerBasedStatusBarAppearance 45 | 46 | CADisableMinimumFrameDurationOnPhone 47 | 48 | UIApplicationSupportsIndirectInputEvents 49 | 50 | 51 | 52 | -------------------------------------------------------------------------------- /ios/Runner/Runner-Bridging-Header.h: -------------------------------------------------------------------------------- 1 | #import "GeneratedPluginRegistrant.h" 2 | -------------------------------------------------------------------------------- /ios/RunnerTests/RunnerTests.swift: -------------------------------------------------------------------------------- 1 | import Flutter 2 | import UIKit 3 | import XCTest 4 | 5 | class RunnerTests: XCTestCase { 6 | 7 | func testExample() { 8 | // If you add code to the Runner application, consider adding tests here. 9 | // See https://developer.apple.com/documentation/xctest for more information about using XCTest. 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /lib/components/buttons/fitted_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../constants.dart'; 4 | 5 | class FittedButton extends StatelessWidget { 6 | const FittedButton({ 7 | super.key, 8 | this.isActive = false, 9 | required this.text, 10 | required this.press, 11 | }); 12 | 13 | final bool? isActive; 14 | final String? text; 15 | final VoidCallback press; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return ElevatedButton( 20 | style: TextButton.styleFrom( 21 | padding: const EdgeInsets.symmetric(horizontal: defaultPadding * 1.5), 22 | backgroundColor: isActive! ? primaryColor : const Color(0xFFF1F1F1), 23 | ), 24 | onPressed: press, 25 | child: Text( 26 | text!.toUpperCase(), 27 | style: TextStyle( 28 | fontSize: 12, 29 | color: isActive! ? Colors.white : titleColor.withOpacity(0.54), 30 | fontWeight: FontWeight.w500, 31 | ), 32 | ), 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/components/buttons/primary_button.dart: -------------------------------------------------------------------------------- 1 | import 'dart:io'; 2 | 3 | import 'package:flutter/cupertino.dart'; 4 | import 'package:flutter/material.dart'; 5 | 6 | import '../../constants.dart'; 7 | 8 | class PrimaryButton extends StatelessWidget { 9 | final String text; 10 | final GestureTapCallback press; 11 | 12 | const PrimaryButton({super.key, required this.text, required this.press}); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | EdgeInsets verticalPadding = 17 | const EdgeInsets.symmetric(vertical: defaultPadding); 18 | return SizedBox( 19 | width: double.infinity, 20 | child: Platform.isIOS 21 | ? CupertinoButton( 22 | padding: verticalPadding, 23 | color: primaryColor, 24 | onPressed: press, 25 | child: buildText(context), 26 | ) 27 | : ElevatedButton( 28 | style: TextButton.styleFrom( 29 | padding: verticalPadding, 30 | backgroundColor: primaryColor, 31 | ), 32 | onPressed: press, 33 | child: buildText(context), 34 | ), 35 | ); 36 | } 37 | 38 | Text buildText(BuildContext context) { 39 | return Text( 40 | text.toUpperCase(), 41 | style: kButtonTextStyle, 42 | ); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /lib/components/buttons/secondery_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../constants.dart'; 4 | 5 | class SeconderyButton extends StatelessWidget { 6 | const SeconderyButton({ 7 | super.key, 8 | required this.child, 9 | required this.press, 10 | }); 11 | 12 | final Widget child; 13 | final VoidCallback press; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return SizedBox( 18 | width: double.infinity, 19 | child: OutlinedButton( 20 | onPressed: press, 21 | style: OutlinedButton.styleFrom( 22 | padding: const EdgeInsets.symmetric( 23 | horizontal: defaultPadding, vertical: 12), 24 | shape: const RoundedRectangleBorder( 25 | borderRadius: BorderRadius.all(Radius.circular(8)), 26 | side: BorderSide(color: primaryColor, width: 0.8), 27 | ), 28 | ), 29 | child: child, 30 | ), 31 | ); 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /lib/components/buttons/socal_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SocalButton extends StatelessWidget { 4 | final Color color; 5 | final String text; 6 | final Widget icon; 7 | final GestureTapCallback press; 8 | 9 | const SocalButton({ 10 | super.key, 11 | required this.color, 12 | required this.icon, 13 | required this.press, 14 | required this.text, 15 | }); 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | const padding = EdgeInsets.symmetric(horizontal: 16, vertical: 8); 20 | return SizedBox( 21 | width: double.infinity, 22 | child: ElevatedButton( 23 | style: ElevatedButton.styleFrom( 24 | padding: padding, 25 | backgroundColor: color, 26 | shape: const RoundedRectangleBorder( 27 | borderRadius: BorderRadius.all(Radius.circular(8))), 28 | ), 29 | onPressed: press, 30 | child: Row( 31 | children: [ 32 | Container( 33 | padding: const EdgeInsets.all(8), 34 | height: 28, 35 | width: 28, 36 | decoration: const BoxDecoration( 37 | color: Colors.white, 38 | borderRadius: BorderRadius.all(Radius.circular(4)), 39 | ), 40 | child: icon, 41 | ), 42 | const Spacer(flex: 2), 43 | Text( 44 | text.toUpperCase(), 45 | style: Theme.of(context) 46 | .textTheme 47 | .bodySmall! 48 | .copyWith(color: Colors.white, fontWeight: FontWeight.w600), 49 | ), 50 | const Spacer(flex: 3), 51 | ], 52 | ), 53 | ), 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /lib/components/cards/big/big_card_image.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class BigCardImage extends StatelessWidget { 4 | const BigCardImage({ 5 | super.key, 6 | required this.image, 7 | }); 8 | 9 | final String image; 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Container( 14 | decoration: BoxDecoration( 15 | borderRadius: const BorderRadius.all(Radius.circular(12)), 16 | image: DecorationImage( 17 | // for newtowk image use NetworkImage() 18 | image: AssetImage(image), 19 | fit: BoxFit.cover, 20 | ), 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/components/cards/big/big_card_image_slide.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../../constants.dart'; 3 | 4 | import '../../dot_indicators.dart'; 5 | import 'big_card_image.dart'; 6 | 7 | class BigCardImageSlide extends StatefulWidget { 8 | const BigCardImageSlide({ 9 | super.key, 10 | required this.images, 11 | }); 12 | 13 | final List images; 14 | 15 | @override 16 | State createState() => _BigCardImageSlideState(); 17 | } 18 | 19 | class _BigCardImageSlideState extends State { 20 | int intialIndex = 0; 21 | 22 | @override 23 | Widget build(BuildContext context) { 24 | return AspectRatio( 25 | aspectRatio: 1.81, 26 | child: Stack( 27 | children: [ 28 | PageView.builder( 29 | onPageChanged: (value) { 30 | setState(() { 31 | intialIndex = value; 32 | }); 33 | }, 34 | itemCount: widget.images.length, 35 | itemBuilder: (context, index) => 36 | BigCardImage(image: widget.images[index]), 37 | ), 38 | Positioned( 39 | bottom: defaultPadding, 40 | right: defaultPadding, 41 | child: Row( 42 | children: List.generate( 43 | widget.images.length, 44 | (index) => DotIndicator( 45 | isActive: intialIndex == index, 46 | activeColor: Colors.white, 47 | inActiveColor: Colors.white, 48 | ), 49 | ), 50 | ), 51 | ) 52 | ], 53 | ), 54 | ); 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /lib/components/cards/big/restaurant_info_big_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/flutter_svg.dart'; 3 | 4 | import '../../../constants.dart'; 5 | import '../../price_range_and_food_type.dart'; 6 | import '../../rating_with_counter.dart'; 7 | import '../../small_dot.dart'; 8 | import 'big_card_image_slide.dart'; 9 | 10 | class RestaurantInfoBigCard extends StatelessWidget { 11 | final List images, foodType; 12 | final String name; 13 | final double rating; 14 | final int numOfRating, deliveryTime; 15 | final bool isFreeDelivery; 16 | final VoidCallback press; 17 | 18 | const RestaurantInfoBigCard({ 19 | super.key, 20 | required this.name, 21 | required this.rating, 22 | required this.numOfRating, 23 | required this.deliveryTime, 24 | this.isFreeDelivery = true, 25 | required this.images, 26 | required this.foodType, 27 | required this.press, 28 | }); 29 | @override 30 | Widget build(BuildContext context) { 31 | return InkWell( 32 | onTap: press, 33 | child: Column( 34 | crossAxisAlignment: CrossAxisAlignment.start, 35 | children: [ 36 | // pass list of images here 37 | BigCardImageSlide(images: images), 38 | const SizedBox(height: defaultPadding / 2), 39 | Text(name, style: Theme.of(context).textTheme.titleLarge), 40 | const SizedBox(height: defaultPadding / 4), 41 | PriceRangeAndFoodtype(foodType: foodType), 42 | const SizedBox(height: defaultPadding / 4), 43 | Row( 44 | children: [ 45 | RatingWithCounter(rating: rating, numOfRating: numOfRating), 46 | const SizedBox(width: defaultPadding / 2), 47 | SvgPicture.asset( 48 | "assets/icons/clock.svg", 49 | height: 20, 50 | width: 20, 51 | colorFilter: ColorFilter.mode( 52 | Theme.of(context) 53 | .textTheme 54 | .bodyLarge! 55 | .color! 56 | .withOpacity(0.5), 57 | BlendMode.srcIn, 58 | ), 59 | ), 60 | const SizedBox(width: 8), 61 | Text( 62 | "$deliveryTime Min", 63 | style: Theme.of(context).textTheme.labelSmall, 64 | ), 65 | const Padding( 66 | padding: EdgeInsets.symmetric(horizontal: defaultPadding / 2), 67 | child: SmallDot(), 68 | ), 69 | SvgPicture.asset( 70 | "assets/icons/delivery.svg", 71 | height: 20, 72 | width: 20, 73 | colorFilter: ColorFilter.mode( 74 | Theme.of(context) 75 | .textTheme 76 | .bodyLarge! 77 | .color! 78 | .withOpacity(0.5), 79 | BlendMode.srcIn, 80 | ), 81 | ), 82 | const SizedBox(width: 8), 83 | Text(isFreeDelivery ? "Free" : "Paid", 84 | style: Theme.of(context).textTheme.labelSmall), 85 | ], 86 | ), 87 | ], 88 | ), 89 | ); 90 | } 91 | } 92 | -------------------------------------------------------------------------------- /lib/components/cards/iteam_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../constants.dart'; 4 | 5 | import '../small_dot.dart'; 6 | 7 | class ItemCard extends StatelessWidget { 8 | const ItemCard({ 9 | super.key, 10 | required this.title, 11 | required this.description, 12 | required this.image, 13 | required this.foodType, 14 | required this.price, 15 | required this.priceRange, 16 | required this.press, 17 | }); 18 | 19 | final String? title, description, image, foodType, priceRange; 20 | final double? price; 21 | final VoidCallback press; 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | TextStyle textStyle = Theme.of(context).textTheme.labelLarge!.copyWith( 26 | color: titleColor.withOpacity(0.64), 27 | fontWeight: FontWeight.normal, 28 | ); 29 | return InkWell( 30 | borderRadius: const BorderRadius.all(Radius.circular(8)), 31 | onTap: press, 32 | child: Padding( 33 | padding: const EdgeInsets.all(5.0), 34 | child: SizedBox( 35 | height: 110, 36 | child: Row( 37 | children: [ 38 | AspectRatio( 39 | aspectRatio: 1, 40 | child: ClipRRect( 41 | borderRadius: const BorderRadius.all(Radius.circular(8)), 42 | child: Image.asset( 43 | image!, 44 | fit: BoxFit.cover, 45 | ), 46 | ), 47 | ), 48 | const SizedBox(width: defaultPadding), 49 | Expanded( 50 | child: Column( 51 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 52 | crossAxisAlignment: CrossAxisAlignment.start, 53 | children: [ 54 | Text( 55 | title!, 56 | maxLines: 1, 57 | style: Theme.of(context) 58 | .textTheme 59 | .titleLarge! 60 | .copyWith(fontSize: 18), 61 | ), 62 | Text( 63 | description!, 64 | style: Theme.of(context).textTheme.bodyMedium, 65 | maxLines: 2, 66 | overflow: TextOverflow.ellipsis, 67 | ), 68 | Row( 69 | children: [ 70 | Text( 71 | priceRange!, 72 | style: textStyle, 73 | ), 74 | const Padding( 75 | padding: EdgeInsets.symmetric( 76 | horizontal: defaultPadding / 2), 77 | child: SmallDot(), 78 | ), 79 | Text(foodType!, style: textStyle), 80 | const Spacer(), 81 | Text( 82 | "USD$price", 83 | style: Theme.of(context) 84 | .textTheme 85 | .labelLarge! 86 | .copyWith(color: primaryColor), 87 | ) 88 | ], 89 | ), 90 | ], 91 | ), 92 | ), 93 | ], 94 | ), 95 | ), 96 | ), 97 | ); 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /lib/components/cards/medium/restaurant_info_medium_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../constants.dart'; 4 | import '../../rating.dart'; 5 | import '../../small_dot.dart'; 6 | 7 | class RestaurantInfoMediumCard extends StatelessWidget { 8 | const RestaurantInfoMediumCard({ 9 | super.key, 10 | required this.image, 11 | required this.name, 12 | required this.location, 13 | required this.rating, 14 | required this.delivertTime, 15 | required this.press, 16 | }); 17 | 18 | final String image, name, location; 19 | final double rating; 20 | final int delivertTime; 21 | final VoidCallback press; 22 | 23 | @override 24 | Widget build(BuildContext context) { 25 | return InkWell( 26 | onTap: press, 27 | child: SizedBox( 28 | width: 200, 29 | child: Column( 30 | crossAxisAlignment: CrossAxisAlignment.start, 31 | children: [ 32 | AspectRatio( 33 | aspectRatio: 1.25, 34 | child: ClipRRect( 35 | borderRadius: const BorderRadius.all(Radius.circular(10)), 36 | child: Image.asset(image, fit: BoxFit.cover), 37 | ), 38 | ), 39 | const SizedBox(height: defaultPadding / 2), 40 | Text( 41 | name, 42 | maxLines: 1, 43 | overflow: TextOverflow.ellipsis, 44 | style: Theme.of(context).textTheme.titleMedium, 45 | ), 46 | const SizedBox(height: defaultPadding / 4), 47 | Text( 48 | location, 49 | maxLines: 1, 50 | style: Theme.of(context).textTheme.bodyMedium, 51 | ), 52 | const SizedBox(height: defaultPadding / 2), 53 | Row( 54 | crossAxisAlignment: CrossAxisAlignment.center, 55 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 56 | children: [ 57 | Rating(rating: rating), 58 | Text( 59 | "$delivertTime min", 60 | style: Theme.of(context) 61 | .textTheme 62 | .labelLarge! 63 | .copyWith(color: titleColor.withOpacity(0.74)), 64 | ), 65 | const SmallDot(), 66 | Text( 67 | "Free delivery", 68 | style: Theme.of(context) 69 | .textTheme 70 | .labelMedium! 71 | .copyWith(color: titleColor.withOpacity(0.74)), 72 | ) 73 | ], 74 | ) 75 | ], 76 | ), 77 | ), 78 | ); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /lib/components/dot_indicators.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../constants.dart'; 4 | 5 | class DotIndicator extends StatelessWidget { 6 | const DotIndicator({ 7 | super.key, 8 | this.isActive = false, 9 | this.activeColor = primaryColor, 10 | this.inActiveColor = const Color(0xFF868686), 11 | }); 12 | 13 | final bool isActive; 14 | final Color activeColor, inActiveColor; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return AnimatedContainer( 19 | duration: kDefaultDuration, 20 | margin: const EdgeInsets.symmetric(horizontal: defaultPadding / 2), 21 | height: 5, 22 | width: 8, 23 | decoration: BoxDecoration( 24 | color: isActive ? activeColor : inActiveColor.withOpacity(0.25), 25 | borderRadius: const BorderRadius.all(Radius.circular(20)), 26 | ), 27 | ); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /lib/components/price_range_and_food_type.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../components/small_dot.dart'; 3 | 4 | import '../constants.dart'; 5 | 6 | class PriceRangeAndFoodtype extends StatelessWidget { 7 | const PriceRangeAndFoodtype({ 8 | super.key, 9 | this.priceRange = "\$\$", 10 | required this.foodType, 11 | }); 12 | 13 | final String priceRange; 14 | final List foodType; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Row( 19 | children: [ 20 | Text(priceRange, style: Theme.of(context).textTheme.bodyMedium), 21 | ...List.generate( 22 | foodType.length, 23 | (index) => Row( 24 | children: [ 25 | buildSmallDot(), 26 | Text(foodType[index], 27 | style: Theme.of(context).textTheme.bodyMedium), 28 | ], 29 | ), 30 | ), 31 | ], 32 | ); 33 | } 34 | 35 | Padding buildSmallDot() { 36 | return const Padding( 37 | padding: EdgeInsets.symmetric(horizontal: defaultPadding / 2), 38 | child: SmallDot(), 39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/components/rating.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../constants.dart'; 4 | 5 | class Rating extends StatelessWidget { 6 | const Rating({ 7 | super.key, 8 | required this.rating, 9 | }); 10 | 11 | final double rating; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Container( 16 | padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 3), 17 | decoration: const BoxDecoration( 18 | color: primaryColor, 19 | borderRadius: BorderRadius.all(Radius.circular(6)), 20 | ), 21 | child: Text( 22 | rating.toString(), 23 | style: Theme.of(context) 24 | .textTheme 25 | .labelSmall! 26 | .copyWith(color: Colors.white), 27 | ), 28 | ); 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /lib/components/rating_with_counter.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/flutter_svg.dart'; 3 | 4 | import '../constants.dart'; 5 | 6 | class RatingWithCounter extends StatelessWidget { 7 | const RatingWithCounter({ 8 | super.key, 9 | required this.rating, 10 | required this.numOfRating, 11 | }); 12 | 13 | final double rating; 14 | final int numOfRating; 15 | 16 | @override 17 | Widget build(BuildContext context) { 18 | return Row( 19 | children: [ 20 | Text( 21 | rating.toString(), 22 | style: Theme.of(context) 23 | .textTheme 24 | .labelSmall! 25 | .copyWith(color: titleColor.withOpacity(0.74)), 26 | ), 27 | const SizedBox(width: 8), 28 | SvgPicture.asset( 29 | "assets/icons/rating.svg", 30 | height: 20, 31 | width: 20, 32 | colorFilter: const ColorFilter.mode( 33 | primaryColor, 34 | BlendMode.srcIn, 35 | ), 36 | ), 37 | const SizedBox(width: 8), 38 | Text("$numOfRating+ Ratings", 39 | style: Theme.of(context) 40 | .textTheme 41 | .labelSmall! 42 | .copyWith(color: titleColor.withOpacity(0.74))), 43 | ], 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/components/scalton/big_card_image_slide_scalton.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../constants.dart'; 3 | 4 | import '../dot_indicators.dart'; 5 | 6 | class BigCardImageSlideScalton extends StatelessWidget { 7 | const BigCardImageSlideScalton({ 8 | super.key, 9 | }); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Stack( 14 | children: [ 15 | Container( 16 | decoration: BoxDecoration( 17 | color: Colors.black.withOpacity(0.08), 18 | borderRadius: const BorderRadius.all(Radius.circular(12)), 19 | ), 20 | ), 21 | Positioned( 22 | bottom: defaultPadding, 23 | right: defaultPadding, 24 | child: Row( 25 | children: List.generate(4, (index) => const DotIndicator()), 26 | ), 27 | ), 28 | ], 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/components/scalton/big_card_scalton.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'big_card_image_slide_scalton.dart'; 4 | import 'scalton_line.dart'; 5 | 6 | class BigCardScalton extends StatelessWidget { 7 | const BigCardScalton({ 8 | super.key, 9 | }); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Column( 14 | crossAxisAlignment: CrossAxisAlignment.start, 15 | children: [ 16 | const AspectRatio( 17 | aspectRatio: 1.81, 18 | child: BigCardImageSlideScalton(), 19 | ), 20 | const SizedBox(height: 16), 21 | ScaltonLine( 22 | width: MediaQuery.of(context).size.width * 0.8, 23 | ), 24 | const SizedBox(height: 16), 25 | const ScaltonLine(), 26 | const SizedBox(height: 16), 27 | const ScaltonLine(), 28 | ], 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/components/scalton/medium_card_scalton.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../scalton/scalton_line.dart'; 4 | import '../scalton/scalton_rounded_container.dart'; 5 | 6 | class MediumCardScalton extends StatelessWidget { 7 | const MediumCardScalton({ 8 | super.key, 9 | }); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return const SizedBox( 14 | width: 200, 15 | child: Column( 16 | crossAxisAlignment: CrossAxisAlignment.start, 17 | children: [ 18 | AspectRatio( 19 | aspectRatio: 1.25, 20 | child: ScaltonRoundedContainer(), 21 | ), 22 | SizedBox(height: 16), 23 | ScaltonLine(width: 150), 24 | SizedBox(height: 16), 25 | ScaltonLine(), 26 | SizedBox(height: 16), 27 | ScaltonLine(), 28 | ], 29 | ), 30 | ); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /lib/components/scalton/scalton_line.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ScaltonLine extends StatelessWidget { 4 | const ScaltonLine({ 5 | super.key, 6 | this.height = 15, 7 | this.width = double.infinity, 8 | }); 9 | 10 | final double height, width; 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Container( 15 | height: height, 16 | width: width, 17 | color: Colors.black.withOpacity(0.08), 18 | ); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/components/scalton/scalton_rounded_container.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class ScaltonRoundedContainer extends StatelessWidget { 4 | const ScaltonRoundedContainer({ 5 | super.key, 6 | this.height = double.infinity, 7 | this.width = double.infinity, 8 | this.radious = 10, 9 | }); 10 | 11 | final double height, width, radious; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Container( 16 | height: height, 17 | width: width, 18 | decoration: BoxDecoration( 19 | color: Colors.black.withOpacity(0.08), 20 | borderRadius: BorderRadius.all(Radius.circular(radious)), 21 | ), 22 | ); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /lib/components/section_title.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../constants.dart'; 4 | 5 | class SectionTitle extends StatelessWidget { 6 | const SectionTitle({ 7 | super.key, 8 | this.isMainSection = true, 9 | required this.title, 10 | required this.press, 11 | }); 12 | 13 | // Main Section means on Home page section 14 | final bool isMainSection; 15 | final String title; 16 | final VoidCallback press; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return Padding( 21 | padding: const EdgeInsets.symmetric(horizontal: defaultPadding), 22 | child: Row( 23 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 24 | children: [ 25 | Text( 26 | isMainSection ? title : title.toUpperCase(), 27 | style: isMainSection 28 | ? Theme.of(context).textTheme.titleLarge 29 | : Theme.of(context).textTheme.titleMedium, 30 | ), 31 | GestureDetector( 32 | onTap: press, 33 | child: Text( 34 | isMainSection ? "See all" : "Clear all".toUpperCase(), 35 | style: isMainSection 36 | ? Theme.of(context) 37 | .textTheme 38 | .bodyMedium! 39 | .copyWith(color: primaryColor) 40 | : TextStyle( 41 | fontSize: 12, 42 | fontWeight: FontWeight.w500, 43 | color: titleColor.withOpacity(0.64), 44 | ), 45 | ), 46 | ), 47 | ], 48 | ), 49 | ); 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /lib/components/small_dot.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class SmallDot extends StatelessWidget { 4 | const SmallDot({ 5 | super.key, 6 | }); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Container( 11 | height: 4, 12 | width: 4, 13 | decoration: BoxDecoration( 14 | color: Theme.of(context).textTheme.bodyLarge!.color!.withOpacity(0.4), 15 | shape: BoxShape.circle, 16 | ), 17 | ); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/components/welcome_text.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../constants.dart'; 3 | 4 | class WelcomeText extends StatelessWidget { 5 | final String title, text; 6 | 7 | const WelcomeText({super.key, required this.title, required this.text}); 8 | @override 9 | Widget build(BuildContext context) { 10 | return Column( 11 | crossAxisAlignment: CrossAxisAlignment.start, 12 | children: [ 13 | const SizedBox(height: defaultPadding), 14 | Text( 15 | title, 16 | style: Theme.of(context) 17 | .textTheme 18 | .titleLarge! 19 | .copyWith(fontWeight: FontWeight.w600), 20 | ), 21 | const SizedBox(height: defaultPadding / 2), 22 | Text(text, style: Theme.of(context).textTheme.bodyMedium), 23 | const SizedBox(height: defaultPadding), 24 | ], 25 | ); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /lib/constants.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:form_field_validator/form_field_validator.dart'; 3 | 4 | // clolors that we use in our app 5 | const titleColor = Color(0xFF010F07); 6 | const primaryColor = Color(0xFF22A45D); 7 | const accentColor = Color(0xFFEF9920); 8 | const bodyTextColor = Color(0xFF868686); 9 | const inputColor = Color(0xFFFBFBFB); 10 | 11 | const double defaultPadding = 16; 12 | const Duration kDefaultDuration = Duration(milliseconds: 250); 13 | 14 | const TextStyle kButtonTextStyle = TextStyle( 15 | color: Colors.white, 16 | fontSize: 14, 17 | fontWeight: FontWeight.bold, 18 | ); 19 | 20 | const EdgeInsets kTextFieldPadding = EdgeInsets.symmetric( 21 | horizontal: defaultPadding, 22 | vertical: defaultPadding, 23 | ); 24 | 25 | // Text Field Decoration 26 | const OutlineInputBorder kDefaultOutlineInputBorder = OutlineInputBorder( 27 | borderRadius: BorderRadius.all(Radius.circular(6)), 28 | borderSide: BorderSide( 29 | color: Color(0xFFF3F2F2), 30 | ), 31 | ); 32 | 33 | const InputDecoration otpInputDecoration = InputDecoration( 34 | contentPadding: EdgeInsets.zero, 35 | counterText: "", 36 | errorStyle: TextStyle(height: 0), 37 | ); 38 | 39 | const kErrorBorderSide = BorderSide(color: Colors.red, width: 1); 40 | 41 | // Validator 42 | final passwordValidator = MultiValidator([ 43 | RequiredValidator(errorText: 'Password is required'), 44 | MinLengthValidator(8, errorText: 'Password must be at least 8 digits long'), 45 | PatternValidator(r'(?=.*?[#?!@$%^&*-/])', 46 | errorText: 'Passwords must have at least one special character') 47 | ]); 48 | 49 | final emailValidator = MultiValidator([ 50 | RequiredValidator(errorText: 'Email is required'), 51 | EmailValidator(errorText: 'Enter a valid email address') 52 | ]); 53 | 54 | final requiredValidator = 55 | RequiredValidator(errorText: 'This field is required'); 56 | final matchValidator = MatchValidator(errorText: 'passwords do not match'); 57 | 58 | final phoneNumberValidator = MinLengthValidator(10, 59 | errorText: 'Phone Number must be at least 10 digits long'); 60 | 61 | // Common Text 62 | final Center kOrText = Center( 63 | child: Text("Or", style: TextStyle(color: titleColor.withOpacity(0.7)))); 64 | -------------------------------------------------------------------------------- /lib/demo_data.dart: -------------------------------------------------------------------------------- 1 | 2 | 3 | List demoBigImages = [ 4 | "assets/images/big_1.png", 5 | "assets/images/big_2.png", 6 | "assets/images/big_3.png", 7 | "assets/images/big_4.png", 8 | ]; 9 | 10 | List> demoMediumCardData = [ 11 | { 12 | "name": "Daylight Coffee", 13 | "image": "assets/images/medium_1.png", 14 | "location": "Colarodo, San Francisco", 15 | "rating": 4.6, 16 | "delivertTime": 25, 17 | }, 18 | { 19 | "name": "Mario Italiano", 20 | "image": "assets/images/medium_2.png", 21 | "location": "Colarodo, San Francisco", 22 | "rating": 4.3, 23 | "delivertTime": 30, 24 | }, 25 | { 26 | "name": "McDonald’s", 27 | "image": "assets/images/medium_3.png", 28 | "location": "Colarodo, San Francisco", 29 | "rating": 4.8, 30 | "delivertTime": 25, 31 | }, 32 | { 33 | "name": "The Halal Guys", 34 | "image": "assets/images/medium_4.png", 35 | "location": "Colarodo, San Francisco", 36 | "rating": 4.6, 37 | "delivertTime": 25, 38 | }, 39 | ]; 40 | -------------------------------------------------------------------------------- /lib/entry_point.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/cupertino.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_svg/flutter_svg.dart'; 4 | 5 | import 'constants.dart'; 6 | import 'screens/home/home_screen.dart'; 7 | import 'screens/orderDetails/order_details_screen.dart'; 8 | import 'screens/profile/profile_screen.dart'; 9 | import 'screens/search/search_screen.dart'; 10 | 11 | class EntryPoint extends StatefulWidget { 12 | const EntryPoint({super.key}); 13 | 14 | @override 15 | State createState() => _EntryPointState(); 16 | } 17 | 18 | class _EntryPointState extends State { 19 | // Bydefault first one is selected 20 | int _selectedIndex = 0; 21 | 22 | // List of nav items 23 | final List> _navitems = [ 24 | {"icon": "assets/icons/home.svg", "title": "Home"}, 25 | {"icon": "assets/icons/search.svg", "title": "Search"}, 26 | {"icon": "assets/icons/order.svg", "title": "Orders"}, 27 | {"icon": "assets/icons/profile.svg", "title": "Profile"}, 28 | ]; 29 | 30 | // Screens 31 | final List _screens = [ 32 | const HomeScreen(), 33 | const SearchScreen(), 34 | const OrderDetailsScreen(), 35 | const ProfileScreen(), 36 | ]; 37 | 38 | @override 39 | Widget build(BuildContext context) { 40 | /// If you set your home screen as first screen make sure call [SizeConfig().init(context)] 41 | 42 | return Scaffold( 43 | body: _screens[_selectedIndex], 44 | bottomNavigationBar: CupertinoTabBar( 45 | onTap: (value) { 46 | setState(() { 47 | _selectedIndex = value; 48 | }); 49 | }, 50 | currentIndex: _selectedIndex, 51 | activeColor: primaryColor, 52 | inactiveColor: bodyTextColor, 53 | items: List.generate( 54 | _navitems.length, 55 | (index) => BottomNavigationBarItem( 56 | icon: SvgPicture.asset( 57 | _navitems[index]["icon"], 58 | height: 30, 59 | width: 30, 60 | colorFilter: ColorFilter.mode( 61 | index == _selectedIndex ? primaryColor : bodyTextColor, 62 | BlendMode.srcIn), 63 | ), 64 | label: _navitems[index]["title"], 65 | ), 66 | ), 67 | ), 68 | ); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /lib/main.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'constants.dart'; 3 | import 'screens/onboarding/onboarding_scrreen.dart'; 4 | 5 | void main() { 6 | runApp(const MyApp()); 7 | } 8 | 9 | class MyApp extends StatelessWidget { 10 | const MyApp({super.key}); 11 | 12 | // This widget is the root of your application. 13 | @override 14 | Widget build(BuildContext context) { 15 | return MaterialApp( 16 | title: 'The Flutter Way - Foodly UI Kit', 17 | theme: ThemeData( 18 | colorScheme: ColorScheme.fromSeed(seedColor: primaryColor), 19 | elevatedButtonTheme: ElevatedButtonThemeData( 20 | style: ElevatedButton.styleFrom( 21 | backgroundColor: primaryColor, 22 | foregroundColor: Colors.white, 23 | minimumSize: const Size(double.infinity, 40), 24 | shape: RoundedRectangleBorder( 25 | borderRadius: BorderRadius.circular(8), 26 | ), 27 | ), 28 | ), 29 | textTheme: const TextTheme( 30 | bodyMedium: TextStyle(color: bodyTextColor), 31 | bodySmall: TextStyle(color: bodyTextColor), 32 | ), 33 | inputDecorationTheme: const InputDecorationTheme( 34 | contentPadding: EdgeInsets.all(defaultPadding), 35 | hintStyle: TextStyle(color: bodyTextColor), 36 | ), 37 | ), 38 | home: const OnboardingScreen(), 39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/screens/addToOrder/components/info.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../components/price_range_and_food_type.dart'; 4 | import '../../../constants.dart'; 5 | 6 | class Info extends StatelessWidget { 7 | const Info({ 8 | super.key, 9 | }); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Column( 14 | crossAxisAlignment: CrossAxisAlignment.start, 15 | children: [ 16 | AspectRatio( 17 | aspectRatio: 1.33, 18 | child: Image.asset( 19 | "assets/images/Header-image.png", 20 | fit: BoxFit.cover, 21 | ), 22 | ), 23 | const SizedBox(height: defaultPadding), 24 | Padding( 25 | padding: const EdgeInsets.symmetric(horizontal: defaultPadding), 26 | child: Column( 27 | crossAxisAlignment: CrossAxisAlignment.start, 28 | children: [ 29 | Text("Cookie Sandwich", 30 | style: Theme.of(context).textTheme.titleLarge), 31 | const SizedBox(height: 8), 32 | Text( 33 | "Shortbread, chocolate turtle cookies, and red velvet. 8 ounces cream cheese, softened.", 34 | style: Theme.of(context).textTheme.bodyMedium, 35 | ), 36 | const SizedBox(height: 16), 37 | const PriceRangeAndFoodtype( 38 | foodType: ["Chinese", "American", "Deshi food"], 39 | ), 40 | ], 41 | ), 42 | ), 43 | ], 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/screens/addToOrder/components/required_section_title.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../constants.dart'; 4 | 5 | class RequiredSectionTitle extends StatelessWidget { 6 | const RequiredSectionTitle({ 7 | super.key, 8 | required this.title, 9 | }); 10 | 11 | final String title; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row( 16 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 17 | children: [ 18 | Text( 19 | title, 20 | maxLines: 1, 21 | style: Theme.of(context).textTheme.titleLarge, 22 | ), 23 | Container( 24 | padding: const EdgeInsets.symmetric( 25 | horizontal: defaultPadding / 2, 26 | vertical: defaultPadding / 4, 27 | ), 28 | decoration: BoxDecoration( 29 | color: accentColor.withOpacity(0.2), 30 | borderRadius: const BorderRadius.all(Radius.circular(4))), 31 | child: Text( 32 | "Required".toUpperCase(), 33 | style: Theme.of(context) 34 | .textTheme 35 | .labelSmall! 36 | .copyWith(color: accentColor), 37 | ), 38 | ) 39 | ], 40 | ); 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /lib/screens/addToOrder/components/rounded_button.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | class RoundedButton extends StatelessWidget { 4 | const RoundedButton({ 5 | super.key, 6 | required this.iconData, 7 | required this.press, 8 | }); 9 | 10 | final IconData iconData; 11 | final VoidCallback press; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return SizedBox( 16 | height: 56, 17 | width: 56, 18 | child: ElevatedButton( 19 | style: ElevatedButton.styleFrom( 20 | padding: EdgeInsets.zero, 21 | backgroundColor: const Color(0xFFF8F8F8), 22 | shape: RoundedRectangleBorder( 23 | borderRadius: const BorderRadius.all(Radius.circular(100)), 24 | side: BorderSide( 25 | color: const Color(0xFF979797).withOpacity(0.1), 26 | ), 27 | ), 28 | ), 29 | onPressed: press, 30 | child: Icon(iconData), 31 | ), 32 | ); 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /lib/screens/addToOrder/components/rounded_checkedbox_list_tile.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../constants.dart'; 4 | 5 | class RoundedCheckboxListTile extends StatelessWidget { 6 | const RoundedCheckboxListTile({ 7 | super.key, 8 | this.isActive = false, 9 | required this.press, 10 | required this.text, 11 | }); 12 | 13 | final bool isActive; 14 | final VoidCallback press; 15 | final String text; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Column( 20 | children: [ 21 | InkWell( 22 | borderRadius: const BorderRadius.all(Radius.circular(8)), 23 | onTap: press, 24 | child: Padding( 25 | padding: const EdgeInsets.symmetric(vertical: 5), 26 | child: Row( 27 | children: [ 28 | CircleCheckBox(isActive: isActive), 29 | const SizedBox(width: 8), 30 | Text( 31 | text, 32 | style: Theme.of(context).textTheme.bodyMedium?.copyWith( 33 | color: titleColor.withOpacity(0.84), height: 1), 34 | ) 35 | ], 36 | ), 37 | ), 38 | ), 39 | const Divider(), 40 | ], 41 | ); 42 | } 43 | } 44 | 45 | class CircleCheckBox extends StatelessWidget { 46 | const CircleCheckBox({ 47 | super.key, 48 | this.isActive = false, 49 | }); 50 | 51 | final bool isActive; 52 | 53 | @override 54 | Widget build(BuildContext context) { 55 | return AnimatedContainer( 56 | duration: kDefaultDuration, 57 | height: 24, 58 | width: 24, 59 | padding: EdgeInsets.all(isActive ? 3 : 12), 60 | decoration: BoxDecoration( 61 | shape: BoxShape.circle, 62 | border: Border.all( 63 | color: isActive 64 | ? primaryColor.withOpacity(0.54) 65 | : const Color(0xFF868686).withOpacity(0.54), 66 | width: 0.8, 67 | ), 68 | ), 69 | child: const DecoratedBox( 70 | decoration: BoxDecoration( 71 | color: primaryColor, 72 | shape: BoxShape.circle, 73 | ), 74 | ), 75 | ); 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /lib/screens/auth/components/sign_in_form.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../findRestaurants/find_restaurants_screen.dart'; 3 | 4 | import '../../../constants.dart'; 5 | import '../forgot_password_screen.dart'; 6 | 7 | class SignInForm extends StatefulWidget { 8 | const SignInForm({super.key}); 9 | 10 | @override 11 | State createState() => _SignInFormState(); 12 | } 13 | 14 | class _SignInFormState extends State { 15 | final _formKey = GlobalKey(); 16 | 17 | bool _obscureText = true; 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | return Form( 22 | key: _formKey, 23 | child: Column( 24 | children: [ 25 | TextFormField( 26 | validator: emailValidator.call, 27 | onSaved: (value) {}, 28 | textInputAction: TextInputAction.next, 29 | keyboardType: TextInputType.emailAddress, 30 | decoration: const InputDecoration(hintText: "Email Address"), 31 | ), 32 | const SizedBox(height: defaultPadding), 33 | 34 | // Password Field 35 | TextFormField( 36 | obscureText: _obscureText, 37 | validator: passwordValidator.call, 38 | onSaved: (value) {}, 39 | decoration: InputDecoration( 40 | hintText: "Password", 41 | suffixIcon: GestureDetector( 42 | onTap: () { 43 | setState(() { 44 | _obscureText = !_obscureText; 45 | }); 46 | }, 47 | child: _obscureText 48 | ? const Icon(Icons.visibility_off, color: bodyTextColor) 49 | : const Icon(Icons.visibility, color: bodyTextColor), 50 | ), 51 | ), 52 | ), 53 | const SizedBox(height: defaultPadding), 54 | 55 | // Forget Password 56 | GestureDetector( 57 | onTap: () => Navigator.push( 58 | context, 59 | MaterialPageRoute( 60 | builder: (context) => const ForgotPasswordScreen(), 61 | ), 62 | ), 63 | child: Text( 64 | "Forget Password?", 65 | style: Theme.of(context) 66 | .textTheme 67 | .bodySmall! 68 | .copyWith(fontWeight: FontWeight.w500), 69 | ), 70 | ), 71 | const SizedBox(height: defaultPadding), 72 | 73 | // Sign In Button 74 | ElevatedButton( 75 | onPressed: () { 76 | if (_formKey.currentState!.validate()) { 77 | _formKey.currentState!.save(); 78 | 79 | // just for demo 80 | Navigator.pushAndRemoveUntil( 81 | context, 82 | MaterialPageRoute( 83 | builder: (context) => const FindRestaurantsScreen(), 84 | ), 85 | (_) => true, 86 | ); 87 | } 88 | }, 89 | child: const Text("Sign in"), 90 | ), 91 | ], 92 | ), 93 | ); 94 | } 95 | } 96 | -------------------------------------------------------------------------------- /lib/screens/auth/forgot_password_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'reset_email_sent_screen.dart'; 3 | 4 | import '../../components/welcome_text.dart'; 5 | import '../../constants.dart'; 6 | 7 | class ForgotPasswordScreen extends StatelessWidget { 8 | const ForgotPasswordScreen({super.key}); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Scaffold( 13 | appBar: AppBar( 14 | title: const Text("Forgot Password"), 15 | ), 16 | body: const SingleChildScrollView( 17 | padding: EdgeInsets.symmetric(horizontal: defaultPadding), 18 | child: Column( 19 | crossAxisAlignment: CrossAxisAlignment.start, 20 | children: [ 21 | WelcomeText( 22 | title: "Forgot password", 23 | text: 24 | "Enter your email address and we will \nsend you a reset instructions."), 25 | SizedBox(height: defaultPadding), 26 | ForgotPassForm(), 27 | ], 28 | ), 29 | ), 30 | ); 31 | } 32 | } 33 | 34 | class ForgotPassForm extends StatefulWidget { 35 | const ForgotPassForm({super.key}); 36 | 37 | @override 38 | State createState() => _ForgotPassFormState(); 39 | } 40 | 41 | class _ForgotPassFormState extends State { 42 | final _formKey = GlobalKey(); 43 | 44 | @override 45 | Widget build(BuildContext context) { 46 | return Form( 47 | key: _formKey, 48 | child: Column( 49 | children: [ 50 | // Email Field 51 | TextFormField( 52 | validator: emailValidator.call, 53 | onSaved: (value) {}, 54 | keyboardType: TextInputType.emailAddress, 55 | decoration: const InputDecoration(hintText: "Email Address"), 56 | ), 57 | const SizedBox(height: defaultPadding), 58 | 59 | // Reset password Button 60 | ElevatedButton( 61 | onPressed: () { 62 | if (_formKey.currentState!.validate()) { 63 | // If all data are correct then save data to out variables 64 | _formKey.currentState!.save(); 65 | Navigator.push( 66 | context, 67 | MaterialPageRoute( 68 | builder: (context) => const ResetEmailSentScreen(), 69 | ), 70 | ); 71 | } 72 | }, 73 | child: const Text("Reset password"), 74 | ), 75 | ], 76 | ), 77 | ); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /lib/screens/auth/reset_email_sent_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../constants.dart'; 4 | 5 | import '../../components/welcome_text.dart'; 6 | 7 | class ResetEmailSentScreen extends StatelessWidget { 8 | const ResetEmailSentScreen({super.key}); 9 | 10 | @override 11 | Widget build(BuildContext context) { 12 | return Scaffold( 13 | appBar: AppBar( 14 | title: const Text("Forgot Password"), 15 | ), 16 | body: SingleChildScrollView( 17 | padding: const EdgeInsets.symmetric(horizontal: defaultPadding), 18 | child: Column( 19 | crossAxisAlignment: CrossAxisAlignment.start, 20 | children: [ 21 | const WelcomeText( 22 | title: "Reset email sent", 23 | text: 24 | "We have sent a instructions email to \ntheflutterway@email.com."), 25 | const SizedBox(height: defaultPadding), 26 | ElevatedButton( 27 | onPressed: () {}, 28 | child: const Text("Send again"), 29 | ), 30 | ], 31 | ), 32 | ), 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/screens/auth/sign_in_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/gestures.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_svg/flutter_svg.dart'; 4 | 5 | import '../../components/buttons/socal_button.dart'; 6 | import '../../components/welcome_text.dart'; 7 | import '../../constants.dart'; 8 | import 'sign_up_screen.dart'; 9 | import 'components/sign_in_form.dart'; 10 | 11 | class SignInScreen extends StatelessWidget { 12 | const SignInScreen({super.key}); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | appBar: AppBar( 18 | leading: const SizedBox(), 19 | title: const Text("Sign In"), 20 | ), 21 | body: SingleChildScrollView( 22 | child: Padding( 23 | padding: const EdgeInsets.symmetric(horizontal: defaultPadding), 24 | child: Column( 25 | crossAxisAlignment: CrossAxisAlignment.start, 26 | children: [ 27 | const WelcomeText( 28 | title: "Welcome to", 29 | text: 30 | "Enter your Phone number or Email \naddress for sign in. Enjoy your food :)", 31 | ), 32 | const SignInForm(), 33 | const SizedBox(height: defaultPadding), 34 | kOrText, 35 | const SizedBox(height: defaultPadding * 1.5), 36 | 37 | Center( 38 | child: Text.rich( 39 | TextSpan( 40 | style: Theme.of(context) 41 | .textTheme 42 | .bodySmall! 43 | .copyWith(fontWeight: FontWeight.w600), 44 | text: "Don’t have account? ", 45 | children: [ 46 | TextSpan( 47 | text: "Create new account.", 48 | style: const TextStyle(color: primaryColor), 49 | recognizer: TapGestureRecognizer() 50 | ..onTap = () => Navigator.push( 51 | context, 52 | MaterialPageRoute( 53 | builder: (context) => const SignUpScreen(), 54 | ), 55 | ), 56 | ) 57 | ], 58 | ), 59 | ), 60 | ), 61 | const SizedBox(height: defaultPadding), 62 | 63 | // Facebook 64 | SocalButton( 65 | press: () {}, 66 | text: "Connect with Facebook", 67 | color: const Color(0xFF395998), 68 | icon: SvgPicture.asset( 69 | 'assets/icons/facebook.svg', 70 | colorFilter: const ColorFilter.mode( 71 | Color(0xFF395998), 72 | BlendMode.srcIn, 73 | ), 74 | ), 75 | ), 76 | const SizedBox(height: defaultPadding), 77 | 78 | // Google 79 | SocalButton( 80 | press: () {}, 81 | text: "Connect with Google", 82 | color: const Color(0xFF4285F4), 83 | icon: SvgPicture.asset( 84 | 'assets/icons/google.svg', 85 | ), 86 | ), 87 | const SizedBox(height: defaultPadding), 88 | ], 89 | ), 90 | ), 91 | ), 92 | ); 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /lib/screens/auth/sign_up_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/gestures.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_svg/flutter_svg.dart'; 4 | import 'sign_in_screen.dart'; 5 | 6 | import '../../components/buttons/socal_button.dart'; 7 | import '../../components/welcome_text.dart'; 8 | import '../../constants.dart'; 9 | import '../signUp/components/sign_up_form.dart'; 10 | 11 | class SignUpScreen extends StatelessWidget { 12 | const SignUpScreen({super.key}); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Scaffold( 17 | appBar: AppBar( 18 | title: const Text("Sign Up"), 19 | ), 20 | body: SingleChildScrollView( 21 | child: Padding( 22 | padding: const EdgeInsets.symmetric(horizontal: defaultPadding), 23 | child: Column( 24 | crossAxisAlignment: CrossAxisAlignment.start, 25 | children: [ 26 | const WelcomeText( 27 | title: "Create Account", 28 | text: "Enter your Name, Email and Password \nfor sign up.", 29 | ), 30 | 31 | // Sign Up Form 32 | const SignUpForm(), 33 | const SizedBox(height: defaultPadding), 34 | 35 | // Already have account 36 | Center( 37 | child: Text.rich( 38 | TextSpan( 39 | style: Theme.of(context) 40 | .textTheme 41 | .bodySmall! 42 | .copyWith(fontWeight: FontWeight.w500), 43 | text: "Already have account? ", 44 | children: [ 45 | TextSpan( 46 | text: "Sign In", 47 | style: const TextStyle(color: primaryColor), 48 | recognizer: TapGestureRecognizer() 49 | ..onTap = () => Navigator.push( 50 | context, 51 | MaterialPageRoute( 52 | builder: (context) => const SignInScreen(), 53 | ), 54 | ), 55 | ), 56 | ], 57 | ), 58 | ), 59 | ), 60 | const SizedBox(height: defaultPadding), 61 | Center( 62 | child: Text( 63 | "By Signing up you agree to our Terms \nConditions & Privacy Policy.", 64 | textAlign: TextAlign.center, 65 | style: Theme.of(context).textTheme.bodyMedium, 66 | ), 67 | ), 68 | const SizedBox(height: defaultPadding), 69 | kOrText, 70 | const SizedBox(height: defaultPadding), 71 | 72 | // Facebook 73 | SocalButton( 74 | press: () {}, 75 | text: "Connect with Facebook", 76 | color: const Color(0xFF395998), 77 | icon: SvgPicture.asset( 78 | 'assets/icons/facebook.svg', 79 | colorFilter: const ColorFilter.mode( 80 | Color(0xFF395998), 81 | BlendMode.srcIn, 82 | ), 83 | ), 84 | ), 85 | const SizedBox(height: defaultPadding), 86 | 87 | // Google 88 | SocalButton( 89 | press: () {}, 90 | text: "Connect with Google", 91 | color: const Color(0xFF4285F4), 92 | icon: SvgPicture.asset( 93 | 'assets/icons/google.svg', 94 | ), 95 | ), 96 | const SizedBox(height: defaultPadding), 97 | ], 98 | ), 99 | ), 100 | ), 101 | ); 102 | } 103 | } 104 | -------------------------------------------------------------------------------- /lib/screens/details/components/featured_item_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../components/small_dot.dart'; 4 | import '../../../constants.dart'; 5 | 6 | class FeaturedItemCard extends StatelessWidget { 7 | const FeaturedItemCard({ 8 | super.key, 9 | required this.foodType, 10 | required this.image, 11 | required this.priceRange, 12 | required this.press, 13 | required this.title, 14 | }); 15 | 16 | final String foodType, image, priceRange, title; 17 | final VoidCallback press; 18 | 19 | @override 20 | Widget build(BuildContext context) { 21 | TextStyle textStyle = Theme.of(context).textTheme.labelLarge!.copyWith( 22 | color: titleColor.withOpacity(0.64), 23 | fontWeight: FontWeight.normal, 24 | ); 25 | return InkWell( 26 | borderRadius: const BorderRadius.all(Radius.circular(8)), 27 | onTap: press, 28 | child: Padding( 29 | padding: const EdgeInsets.all(5.0), 30 | child: SizedBox( 31 | width: 140, 32 | child: Column( 33 | crossAxisAlignment: CrossAxisAlignment.start, 34 | children: [ 35 | AspectRatio( 36 | aspectRatio: 1, 37 | child: ClipRRect( 38 | borderRadius: const BorderRadius.all(Radius.circular(8)), 39 | child: Image.asset( 40 | image, 41 | fit: BoxFit.cover, 42 | ), 43 | ), 44 | ), 45 | const SizedBox(height: 8), 46 | Text( 47 | title, 48 | style: Theme.of(context) 49 | .textTheme 50 | .bodyMedium 51 | ?.copyWith(color: titleColor, fontWeight: FontWeight.w500), 52 | ), 53 | const SizedBox(height: 8), 54 | Row( 55 | children: [ 56 | Text( 57 | priceRange, 58 | style: textStyle, 59 | ), 60 | const Padding( 61 | padding: 62 | EdgeInsets.symmetric(horizontal: defaultPadding / 2), 63 | child: SmallDot(), 64 | ), 65 | Text(foodType, style: textStyle) 66 | ], 67 | ), 68 | ], 69 | ), 70 | ), 71 | ), 72 | ); 73 | } 74 | } 75 | -------------------------------------------------------------------------------- /lib/screens/details/components/featured_items.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../constants.dart'; 4 | import 'featured_item_card.dart'; 5 | 6 | class FeaturedItems extends StatelessWidget { 7 | const FeaturedItems({ 8 | super.key, 9 | }); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Column( 14 | crossAxisAlignment: CrossAxisAlignment.start, 15 | children: [ 16 | Padding( 17 | padding: const EdgeInsets.symmetric(horizontal: defaultPadding), 18 | child: Text("Featured Items", 19 | style: Theme.of(context).textTheme.titleLarge), 20 | ), 21 | const SizedBox(height: defaultPadding / 2), 22 | SingleChildScrollView( 23 | scrollDirection: Axis.horizontal, 24 | child: Row( 25 | children: [ 26 | ...List.generate( 27 | 3, // for demo we use 3 28 | (index) => Padding( 29 | padding: const EdgeInsets.only(left: defaultPadding), 30 | child: FeaturedItemCard( 31 | title: "Cookie Sandwich", 32 | image: "assets/images/featured _items_${index + 1}.png", 33 | foodType: "Chines", 34 | priceRange: "\$" * 2, 35 | press: () {}, 36 | ), 37 | ), 38 | ), 39 | const SizedBox(width: defaultPadding), 40 | ], 41 | ), 42 | ), 43 | ], 44 | ); 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /lib/screens/details/components/iteams.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../../components/cards/iteam_card.dart'; 3 | import '../../../constants.dart'; 4 | import '../../addToOrder/add_to_order_screen.dart'; 5 | 6 | class Items extends StatefulWidget { 7 | const Items({super.key}); 8 | 9 | @override 10 | State createState() => _ItemsState(); 11 | } 12 | 13 | class _ItemsState extends State { 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Column( 18 | crossAxisAlignment: CrossAxisAlignment.start, 19 | children: [ 20 | DefaultTabController( 21 | length: demoTabs.length, 22 | child: TabBar( 23 | isScrollable: true, 24 | unselectedLabelColor: titleColor, 25 | labelStyle: Theme.of(context).textTheme.titleLarge, 26 | onTap: (value) { 27 | // you will get selected tab index 28 | }, 29 | tabs: demoTabs, 30 | ), 31 | ), 32 | // SizedBox(height: defaultPadding), 33 | ...List.generate( 34 | demoData.length, 35 | (index) => Padding( 36 | padding: const EdgeInsets.symmetric( 37 | horizontal: defaultPadding, vertical: defaultPadding / 2), 38 | child: ItemCard( 39 | title: demoData[index]["title"], 40 | description: demoData[index]["description"], 41 | image: demoData[index]["image"], 42 | foodType: demoData[index]['foodType'], 43 | price: demoData[index]["price"], 44 | priceRange: demoData[index]["priceRange"], 45 | press: () => Navigator.push( 46 | context, 47 | MaterialPageRoute( 48 | builder: (context) => const AddToOrderScrreen(), 49 | ), 50 | ), 51 | ), 52 | ), 53 | ), 54 | ], 55 | ); 56 | } 57 | } 58 | 59 | final List demoTabs = [ 60 | const Tab( 61 | child: Text('Most Populars'), 62 | ), 63 | const Tab( 64 | child: Text('Beef & Lamb'), 65 | ), 66 | const Tab( 67 | child: Text('Seafood'), 68 | ), 69 | const Tab( 70 | child: Text('Appetizers'), 71 | ), 72 | const Tab( 73 | child: Text('Dim Sum'), 74 | ), 75 | ]; 76 | 77 | final List> demoData = List.generate( 78 | 3, 79 | (index) => { 80 | "image": "assets/images/featured _items_${index + 1}.png", 81 | "title": "Cookie Sandwich", 82 | "description": "Shortbread, chocolate turtle cookies, and red velvet.", 83 | "price": 7.4, 84 | "foodType": "Chinese", 85 | "priceRange": "\$" * 2, 86 | }, 87 | ); 88 | -------------------------------------------------------------------------------- /lib/screens/details/components/restaurrant_info.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/flutter_svg.dart'; 3 | import '../../../components/price_range_and_food_type.dart'; 4 | import '../../../components/rating_with_counter.dart'; 5 | import '../../../constants.dart'; 6 | 7 | class RestaurantInfo extends StatelessWidget { 8 | const RestaurantInfo({ 9 | super.key, 10 | }); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Padding( 15 | padding: const EdgeInsets.symmetric(horizontal: defaultPadding), 16 | child: Column( 17 | crossAxisAlignment: CrossAxisAlignment.start, 18 | children: [ 19 | Text( 20 | "Mayfield Bakery & Cafe", 21 | style: Theme.of(context).textTheme.headlineMedium, 22 | maxLines: 1, 23 | ), 24 | const SizedBox(height: defaultPadding / 2), 25 | const PriceRangeAndFoodtype( 26 | foodType: ["Chinese", "American", "Deshi food"], 27 | ), 28 | const SizedBox(height: defaultPadding / 2), 29 | const RatingWithCounter(rating: 4.3, numOfRating: 200), 30 | const SizedBox(height: defaultPadding), 31 | Row( 32 | children: [ 33 | const DeliveryInfo( 34 | iconSrc: "assets/icons/delivery.svg", 35 | text: "Free", 36 | subText: "Delivery", 37 | ), 38 | const SizedBox(width: defaultPadding), 39 | const DeliveryInfo( 40 | iconSrc: "assets/icons/clock.svg", 41 | text: "25", 42 | subText: "Minutes", 43 | ), 44 | const Spacer(), 45 | OutlinedButton( 46 | onPressed: () {}, 47 | style: ElevatedButton.styleFrom( 48 | shape: RoundedRectangleBorder( 49 | borderRadius: BorderRadius.circular(10), 50 | ), 51 | ), 52 | child: const Text("Take away"), 53 | ), 54 | ], 55 | ), 56 | ], 57 | ), 58 | ); 59 | } 60 | } 61 | 62 | class DeliveryInfo extends StatelessWidget { 63 | const DeliveryInfo({ 64 | super.key, 65 | required this.iconSrc, 66 | required this.text, 67 | required this.subText, 68 | }); 69 | 70 | final String iconSrc, text, subText; 71 | 72 | @override 73 | Widget build(BuildContext context) { 74 | return Row( 75 | crossAxisAlignment: CrossAxisAlignment.start, 76 | children: [ 77 | SvgPicture.asset( 78 | iconSrc, 79 | height: 20, 80 | width: 20, 81 | colorFilter: const ColorFilter.mode( 82 | primaryColor, 83 | BlendMode.srcIn, 84 | ), 85 | ), 86 | const SizedBox(width: 8), 87 | Text.rich( 88 | TextSpan( 89 | text: "$text\n", 90 | style: Theme.of(context).textTheme.labelLarge, 91 | children: [ 92 | TextSpan( 93 | text: subText, 94 | style: Theme.of(context) 95 | .textTheme 96 | .labelSmall! 97 | .copyWith(fontWeight: FontWeight.normal), 98 | ) 99 | ], 100 | ), 101 | ), 102 | ], 103 | ); 104 | } 105 | } 106 | -------------------------------------------------------------------------------- /lib/screens/details/details_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/svg.dart'; 3 | 4 | import '../../constants.dart'; 5 | import '../search/search_screen.dart'; 6 | import 'components/featured_items.dart'; 7 | import 'components/iteams.dart'; 8 | import 'components/restaurrant_info.dart'; 9 | 10 | class DetailsScreen extends StatelessWidget { 11 | const DetailsScreen({super.key}); 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Scaffold( 16 | appBar: AppBar( 17 | actions: [ 18 | IconButton( 19 | icon: SvgPicture.asset("assets/icons/share.svg"), 20 | onPressed: () {}, 21 | ), 22 | IconButton( 23 | icon: SvgPicture.asset("assets/icons/search.svg"), 24 | onPressed: () => Navigator.push( 25 | context, 26 | MaterialPageRoute( 27 | builder: (context) => const SearchScreen(), 28 | ), 29 | ), 30 | ), 31 | ], 32 | ), 33 | body: const SafeArea( 34 | child: SingleChildScrollView( 35 | child: Column( 36 | crossAxisAlignment: CrossAxisAlignment.start, 37 | children: [ 38 | SizedBox(height: defaultPadding / 2), 39 | RestaurantInfo(), 40 | SizedBox(height: defaultPadding), 41 | FeaturedItems(), 42 | Items(), 43 | ], 44 | ), 45 | ), 46 | ), 47 | ); 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/screens/featured/components/body.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../../components/cards/big/restaurant_info_big_card.dart'; 3 | import '../../../components/scalton/big_card_scalton.dart'; 4 | import '../../../constants.dart'; 5 | 6 | import '../../../demo_data.dart'; 7 | 8 | /// Just for show the scalton we use [StatefulWidget] 9 | class Body extends StatefulWidget { 10 | const Body({super.key}); 11 | 12 | @override 13 | State createState() => _BodyState(); 14 | } 15 | 16 | class _BodyState extends State { 17 | 18 | bool isLoading = true; 19 | int demoDataLength = 4; 20 | 21 | @override 22 | void initState() { 23 | super.initState(); 24 | Future.delayed(const Duration(seconds: 1), () { 25 | setState(() { 26 | isLoading = false; 27 | }); 28 | }); 29 | } 30 | 31 | @override 32 | Widget build(BuildContext context) { 33 | return SafeArea( 34 | child: Padding( 35 | padding: const EdgeInsets.symmetric(horizontal: defaultPadding), 36 | child: ListView.builder( 37 | // while we dont have our data bydefault we show 3 scalton 38 | itemCount: isLoading ? 3 : demoDataLength, 39 | itemBuilder: (context, index) => Padding( 40 | padding: const EdgeInsets.only(bottom: defaultPadding), 41 | child: isLoading 42 | ? const BigCardScalton() 43 | : RestaurantInfoBigCard( 44 | // Images are List 45 | images: demoBigImages..shuffle(), 46 | name: "McDonald's", 47 | rating: 4.3, 48 | numOfRating: 200, 49 | deliveryTime: 25, 50 | foodType: const ["Chinese", "American", "Deshi food"], 51 | press: () {}, 52 | ), 53 | ), 54 | ), 55 | ), 56 | ); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /lib/screens/featured/featurred_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'components/body.dart'; 4 | 5 | class FeaturedScreen extends StatelessWidget { 6 | const FeaturedScreen({super.key}); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return Scaffold( 11 | appBar: AppBar( 12 | title: const Text("Featured Partners"), 13 | ), 14 | body: const Body(), 15 | ); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /lib/screens/filter/components/categories.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../components/section_title.dart'; 4 | import '../../../constants.dart'; 5 | 6 | class Categories extends StatefulWidget { 7 | const Categories({super.key}); 8 | 9 | @override 10 | State createState() => _CategoriesState(); 11 | } 12 | 13 | class _CategoriesState extends State { 14 | @override 15 | Widget build(BuildContext context) { 16 | return Column( 17 | crossAxisAlignment: CrossAxisAlignment.start, 18 | children: [ 19 | SectionTitle( 20 | title: "Categories", 21 | press: () {}, 22 | isMainSection: false, 23 | ), 24 | const SizedBox(height: defaultPadding), 25 | Padding( 26 | padding: const EdgeInsets.symmetric(horizontal: defaultPadding), 27 | child: Wrap( 28 | spacing: defaultPadding / 2, 29 | children: List.generate( 30 | demoCategories.length, 31 | (index) => ElevatedButton( 32 | onPressed: () {}, 33 | style: ElevatedButton.styleFrom( 34 | minimumSize: const Size(56, 40), 35 | backgroundColor: index == 2 ? primaryColor : bodyTextColor, 36 | ), 37 | child: Text(demoCategories[index]["title"]), 38 | ), 39 | ), 40 | ), 41 | ), 42 | ], 43 | ); 44 | } 45 | 46 | // Demo data categories 47 | List> demoCategories = [ 48 | {"title": "All", "isActive": false}, 49 | {"title": "Brunch", "isActive": false}, 50 | {"title": "Dinner", "isActive": false}, 51 | {"title": "Burgers", "isActive": true}, 52 | {"title": "Chinese", "isActive": false}, 53 | {"title": "Pizza", "isActive": false}, 54 | {"title": "Salads", "isActive": false}, 55 | {"title": "Soups", "isActive": false}, 56 | {"title": "Breakfast", "isActive": false}, 57 | ]; 58 | } 59 | -------------------------------------------------------------------------------- /lib/screens/filter/components/dietaries.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../components/section_title.dart'; 4 | import '../../../constants.dart'; 5 | 6 | class Dietaries extends StatefulWidget { 7 | const Dietaries({super.key}); 8 | 9 | @override 10 | State createState() => _DietariesState(); 11 | } 12 | 13 | class _DietariesState extends State { 14 | @override 15 | Widget build(BuildContext context) { 16 | return Column( 17 | crossAxisAlignment: CrossAxisAlignment.start, 18 | children: [ 19 | SectionTitle( 20 | title: "Dietary", 21 | // When press the clean all 22 | press: () {}, 23 | isMainSection: false, 24 | ), 25 | const SizedBox(height: defaultPadding), 26 | Padding( 27 | padding: const EdgeInsets.symmetric(horizontal: 20), 28 | child: Wrap( 29 | spacing: 10, 30 | children: List.generate( 31 | demoDietaries.length, 32 | (index) => ElevatedButton( 33 | onPressed: () {}, 34 | style: ElevatedButton.styleFrom( 35 | minimumSize: const Size(56, 40), 36 | backgroundColor: index == 1 ? primaryColor : bodyTextColor, 37 | ), 38 | child: Text(demoDietaries[index]["title"]), 39 | ), 40 | ), 41 | ), 42 | ) 43 | ], 44 | ); 45 | } 46 | 47 | List> demoDietaries = [ 48 | {"title": "Any", "isActive": false}, 49 | {"title": "Vegetarian", "isActive": false}, 50 | {"title": "Vegan", "isActive": false}, 51 | {"title": "Gluten-Free", "isActive": false}, 52 | ]; 53 | } 54 | -------------------------------------------------------------------------------- /lib/screens/filter/components/price_range.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../components/section_title.dart'; 4 | import '../../../constants.dart'; 5 | 6 | class PriceRange extends StatelessWidget { 7 | const PriceRange({super.key}); 8 | 9 | @override 10 | Widget build(BuildContext context) { 11 | return Column( 12 | crossAxisAlignment: CrossAxisAlignment.start, 13 | children: [ 14 | SectionTitle( 15 | title: "Price Range", 16 | press: () {}, 17 | isMainSection: false, 18 | ), 19 | const SizedBox(height: defaultPadding), 20 | SingleChildScrollView( 21 | scrollDirection: Axis.horizontal, 22 | child: Row( 23 | children: [ 24 | const SizedBox(width: defaultPadding), 25 | ...List.generate( 26 | // For demo i'm using length 5 27 | 5, // Price limit 28 | (index) => Padding( 29 | padding: const EdgeInsets.only(right: defaultPadding), 30 | child: RoundedButton( 31 | index: index, 32 | isActive: index == 2, // for demo just select 3rd item 33 | press: () {}, 34 | ), 35 | ), 36 | ), 37 | ], 38 | ), 39 | ) 40 | ], 41 | ); 42 | } 43 | } 44 | 45 | class RoundedButton extends StatelessWidget { 46 | const RoundedButton({ 47 | super.key, 48 | this.isActive = false, 49 | required this.index, 50 | required this.press, 51 | }); 52 | 53 | final bool isActive; 54 | final int index; 55 | final VoidCallback press; 56 | 57 | @override 58 | Widget build(BuildContext context) { 59 | return SizedBox( 60 | height: 56, 61 | width: 56, 62 | child: ElevatedButton( 63 | style: ElevatedButton.styleFrom( 64 | padding: EdgeInsets.zero, 65 | backgroundColor: isActive ? primaryColor : inputColor, 66 | shape: RoundedRectangleBorder( 67 | borderRadius: BorderRadius.circular(100), 68 | side: BorderSide( 69 | color: 70 | isActive ? primaryColor : bodyTextColor.withOpacity(0.1)), 71 | ), 72 | ), 73 | onPressed: press, 74 | child: Text( 75 | "\$" * (index + 1), 76 | style: TextStyle( 77 | fontWeight: FontWeight.normal, 78 | color: isActive ? Colors.white : titleColor, 79 | fontSize: 14, 80 | ), 81 | ), 82 | ), 83 | ); 84 | } 85 | } 86 | -------------------------------------------------------------------------------- /lib/screens/filter/filter_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../constants.dart'; 4 | import 'components/categories.dart'; 5 | import 'components/dietaries.dart'; 6 | import 'components/price_range.dart'; 7 | 8 | class FilterScreen extends StatelessWidget { 9 | const FilterScreen({super.key}); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar( 15 | title: const Text("Filters"), 16 | ), 17 | body: const SafeArea( 18 | child: SingleChildScrollView( 19 | child: Column( 20 | crossAxisAlignment: CrossAxisAlignment.start, 21 | children: [ 22 | SizedBox(height: defaultPadding), 23 | Categories(), 24 | SizedBox(height: defaultPadding), 25 | Dietaries(), 26 | SizedBox(height: defaultPadding), 27 | PriceRange(), 28 | SizedBox(height: defaultPadding), 29 | ], 30 | ), 31 | ), 32 | ), 33 | ); 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /lib/screens/home/components/medium_card_list.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../components/cards/medium/restaurant_info_medium_card.dart'; 4 | import '../../../components/scalton/medium_card_scalton.dart'; 5 | import '../../../constants.dart'; 6 | import '../../../demo_data.dart'; 7 | import '../../details/details_screen.dart'; 8 | 9 | class MediumCardList extends StatefulWidget { 10 | const MediumCardList({super.key}); 11 | 12 | @override 13 | State createState() => _MediumCardListState(); 14 | } 15 | 16 | class _MediumCardListState extends State { 17 | bool isLoading = true; 18 | @override 19 | void initState() { 20 | super.initState(); 21 | Future.delayed(const Duration(seconds: 1), () { 22 | setState(() { 23 | isLoading = false; 24 | }); 25 | }); 26 | } 27 | 28 | @override 29 | Widget build(BuildContext context) { 30 | // only for demo 31 | List data = demoMediumCardData..shuffle(); 32 | return Column( 33 | crossAxisAlignment: CrossAxisAlignment.start, 34 | children: [ 35 | SizedBox( 36 | width: double.infinity, 37 | height: 254, 38 | child: isLoading 39 | ? buildFeaturedPartnersLoadingIndicator() 40 | : ListView.builder( 41 | scrollDirection: Axis.horizontal, 42 | itemCount: data.length, 43 | itemBuilder: (context, index) => Padding( 44 | padding: EdgeInsets.only( 45 | left: defaultPadding, 46 | right: (data.length - 1) == index ? defaultPadding : 0, 47 | ), 48 | child: RestaurantInfoMediumCard( 49 | image: data[index]['image'], 50 | name: data[index]['name'], 51 | location: data[index]['location'], 52 | delivertTime: 25, 53 | rating: 4.6, 54 | press: () { 55 | Navigator.push( 56 | context, 57 | MaterialPageRoute( 58 | builder: (context) => const DetailsScreen(), 59 | ), 60 | ); 61 | }, 62 | ), 63 | ), 64 | ), 65 | ), 66 | ], 67 | ); 68 | } 69 | 70 | SingleChildScrollView buildFeaturedPartnersLoadingIndicator() { 71 | return SingleChildScrollView( 72 | scrollDirection: Axis.horizontal, 73 | child: Row( 74 | children: List.generate( 75 | 2, 76 | (index) => const Padding( 77 | padding: EdgeInsets.only(left: defaultPadding), 78 | child: MediumCardScalton(), 79 | ), 80 | ), 81 | ), 82 | ); 83 | } 84 | } 85 | -------------------------------------------------------------------------------- /lib/screens/home/components/promotion_banner.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../../components/scalton/scalton_rounded_container.dart'; 3 | 4 | import '../../../constants.dart'; 5 | 6 | class PromotionBanner extends StatefulWidget { 7 | const PromotionBanner({super.key}); 8 | 9 | @override 10 | State createState() => _PromotionBannerState(); 11 | } 12 | 13 | class _PromotionBannerState extends State { 14 | 15 | bool isLoading = true; 16 | @override 17 | void initState() { 18 | super.initState(); 19 | Future.delayed(const Duration(seconds: 1), () { 20 | setState(() { 21 | isLoading = false; 22 | }); 23 | }); 24 | } 25 | 26 | @override 27 | Widget build(BuildContext context) { 28 | return Padding( 29 | padding: const EdgeInsets.symmetric(horizontal: defaultPadding), 30 | child: isLoading 31 | ? const AspectRatio( 32 | aspectRatio: 1.97, 33 | child: ScaltonRoundedContainer(radious: 12), 34 | ) 35 | : ClipRRect( 36 | borderRadius: const BorderRadius.all(Radius.circular(12)), 37 | child: Image.asset("assets/images/Banner.png"), 38 | ), 39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/screens/onboarding/components/onboard_content.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import 'package:flutter_svg/flutter_svg.dart'; 3 | 4 | class OnboardContent extends StatelessWidget { 5 | const OnboardContent({ 6 | super.key, 7 | required this.illustration, 8 | required this.title, 9 | required this.text, 10 | }); 11 | 12 | final String? illustration, title, text; 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return Column( 17 | children: [ 18 | Expanded( 19 | child: AspectRatio( 20 | aspectRatio: 1, 21 | child: SvgPicture.asset(illustration!), 22 | ), 23 | ), 24 | const SizedBox(height: 16), 25 | Text( 26 | title!, 27 | style: Theme.of(context) 28 | .textTheme 29 | .titleLarge! 30 | .copyWith(fontWeight: FontWeight.bold), 31 | ), 32 | const SizedBox(height: 8), 33 | Text( 34 | text!, 35 | style: Theme.of(context).textTheme.bodyMedium, 36 | textAlign: TextAlign.center, 37 | ), 38 | ], 39 | ); 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/screens/onboarding/onboarding_scrreen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../constants.dart'; 3 | 4 | import '../../components/dot_indicators.dart'; 5 | import '../auth/sign_in_screen.dart'; 6 | import 'components/onboard_content.dart'; 7 | 8 | class OnboardingScreen extends StatefulWidget { 9 | const OnboardingScreen({super.key}); 10 | 11 | @override 12 | State createState() => _OnboardingScreenState(); 13 | } 14 | 15 | class _OnboardingScreenState extends State { 16 | int currentPage = 0; 17 | @override 18 | Widget build(BuildContext context) { 19 | return Scaffold( 20 | body: SafeArea( 21 | child: Column( 22 | children: [ 23 | const Spacer(flex: 2), 24 | Expanded( 25 | flex: 14, 26 | child: PageView.builder( 27 | itemCount: demoData.length, 28 | onPageChanged: (value) { 29 | setState(() { 30 | currentPage = value; 31 | }); 32 | }, 33 | itemBuilder: (context, index) => OnboardContent( 34 | illustration: demoData[index]["illustration"], 35 | title: demoData[index]["title"], 36 | text: demoData[index]["text"], 37 | ), 38 | ), 39 | ), 40 | const Spacer(), 41 | Row( 42 | mainAxisAlignment: MainAxisAlignment.center, 43 | children: List.generate( 44 | demoData.length, 45 | (index) => DotIndicator(isActive: index == currentPage), 46 | ), 47 | ), 48 | const Spacer(flex: 2), 49 | Padding( 50 | padding: const EdgeInsets.symmetric(horizontal: defaultPadding), 51 | child: ElevatedButton( 52 | onPressed: () { 53 | Navigator.push( 54 | context, 55 | MaterialPageRoute( 56 | builder: (context) => const SignInScreen(), 57 | ), 58 | ); 59 | }, 60 | child: Text("Get Started".toUpperCase()), 61 | ), 62 | ), 63 | const Spacer(), 64 | ], 65 | ), 66 | ), 67 | ); 68 | } 69 | } 70 | 71 | // Demo data for our Onboarding screen 72 | List> demoData = [ 73 | { 74 | "illustration": "assets/Illustrations/Illustrations_1.svg", 75 | "title": "All your favorites", 76 | "text": 77 | "Order from the best local restaurants \nwith easy, on-demand delivery.", 78 | }, 79 | { 80 | "illustration": "assets/Illustrations/Illustrations_2.svg", 81 | "title": "Free delivery offers", 82 | "text": 83 | "Free delivery for new customers via Apple Pay\nand others payment methods.", 84 | }, 85 | { 86 | "illustration": "assets/Illustrations/Illustrations_3.svg", 87 | "title": "Choose your food", 88 | "text": 89 | "Easily find your type of food craving and\nyou’ll get delivery in wide range.", 90 | }, 91 | ]; 92 | -------------------------------------------------------------------------------- /lib/screens/orderDetails/components/order_item_card.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../constants.dart'; 4 | 5 | class OrderedItemCard extends StatelessWidget { 6 | const OrderedItemCard({ 7 | super.key, 8 | required this.numOfItem, 9 | required this.title, 10 | required this.description, 11 | required this.price, 12 | }); 13 | final int numOfItem; 14 | final String? title, description; 15 | final double? price; 16 | 17 | @override 18 | Widget build(BuildContext context) { 19 | return Column( 20 | children: [ 21 | Row( 22 | crossAxisAlignment: CrossAxisAlignment.start, 23 | children: [ 24 | NumOfItems(numOfItem: numOfItem), 25 | const SizedBox(width: defaultPadding * 0.75), 26 | Expanded( 27 | child: Column( 28 | crossAxisAlignment: CrossAxisAlignment.start, 29 | children: [ 30 | Text( 31 | title!, 32 | style: Theme.of(context).textTheme.titleMedium, 33 | ), 34 | const SizedBox(height: defaultPadding / 4), 35 | Text( 36 | description!, 37 | style: Theme.of(context).textTheme.bodyMedium, 38 | maxLines: 2, 39 | overflow: TextOverflow.ellipsis, 40 | ) 41 | ], 42 | ), 43 | ), 44 | const SizedBox(width: defaultPadding / 2), 45 | Text( 46 | "USD$price", 47 | style: Theme.of(context) 48 | .textTheme 49 | .labelSmall! 50 | .copyWith(color: primaryColor), 51 | ) 52 | ], 53 | ), 54 | const SizedBox(height: defaultPadding / 2), 55 | const Divider(), 56 | ], 57 | ); 58 | } 59 | } 60 | 61 | class NumOfItems extends StatelessWidget { 62 | const NumOfItems({ 63 | super.key, 64 | required this.numOfItem, 65 | }); 66 | 67 | final int numOfItem; 68 | 69 | @override 70 | Widget build(BuildContext context) { 71 | return Container( 72 | height: 24, 73 | width: 24, 74 | alignment: Alignment.center, 75 | decoration: BoxDecoration( 76 | borderRadius: const BorderRadius.all(Radius.circular(4)), 77 | border: Border.all( 78 | width: 0.5, color: const Color(0xFF868686).withOpacity(0.3)), 79 | ), 80 | child: Text( 81 | numOfItem.toString(), 82 | style: Theme.of(context) 83 | .textTheme 84 | .labelLarge! 85 | .copyWith(color: primaryColor), 86 | ), 87 | ); 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /lib/screens/orderDetails/components/price_row.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../constants.dart'; 4 | 5 | class PriceRow extends StatelessWidget { 6 | const PriceRow({ 7 | super.key, 8 | required this.text, 9 | required this.price, 10 | }); 11 | 12 | final String text; 13 | final double price; 14 | 15 | @override 16 | Widget build(BuildContext context) { 17 | return Row( 18 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 19 | children: [ 20 | Text( 21 | text, 22 | style: const TextStyle(color: titleColor), 23 | ), 24 | Text( 25 | "\$$price", 26 | style: const TextStyle(color: titleColor), 27 | ) 28 | ], 29 | ); 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /lib/screens/orderDetails/components/total_price.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../../constants.dart'; 4 | 5 | class TotalPrice extends StatelessWidget { 6 | const TotalPrice({ 7 | super.key, 8 | required this.price, 9 | }); 10 | 11 | final double price; 12 | 13 | @override 14 | Widget build(BuildContext context) { 15 | return Row( 16 | mainAxisAlignment: MainAxisAlignment.spaceBetween, 17 | children: [ 18 | const Text.rich( 19 | TextSpan( 20 | text: "Total ", 21 | style: TextStyle(color: titleColor, fontWeight: FontWeight.w500), 22 | children: [ 23 | TextSpan( 24 | text: "(incl. VAT)", 25 | style: TextStyle(fontWeight: FontWeight.normal), 26 | ), 27 | ], 28 | ), 29 | ), 30 | Text( 31 | "\$$price", 32 | style: 33 | const TextStyle(color: titleColor, fontWeight: FontWeight.w500), 34 | ), 35 | ], 36 | ); 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /lib/screens/orderDetails/order_details_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../components/buttons/primary_button.dart'; 4 | import '../../constants.dart'; 5 | import 'components/order_item_card.dart'; 6 | import 'components/price_row.dart'; 7 | import 'components/total_price.dart'; 8 | 9 | class OrderDetailsScreen extends StatelessWidget { 10 | const OrderDetailsScreen({super.key}); 11 | 12 | @override 13 | Widget build(BuildContext context) { 14 | return Scaffold( 15 | appBar: AppBar( 16 | title: const Text("Your Orders"), 17 | ), 18 | body: SingleChildScrollView( 19 | child: Padding( 20 | padding: const EdgeInsets.symmetric(horizontal: defaultPadding), 21 | child: Column( 22 | children: [ 23 | const SizedBox(height: defaultPadding), 24 | // List of cart items 25 | ...List.generate( 26 | demoItems.length, 27 | (index) => Padding( 28 | padding: 29 | const EdgeInsets.symmetric(vertical: defaultPadding / 2), 30 | child: OrderedItemCard( 31 | title: demoItems[index]["title"], 32 | description: 33 | "Shortbread, chocolate turtle cookies, and red velvet.", 34 | numOfItem: demoItems[index]["numOfItem"], 35 | price: demoItems[index]["price"].toDouble(), 36 | ), 37 | ), 38 | ), 39 | const PriceRow(text: "Subtotal", price: 28.0), 40 | const SizedBox(height: defaultPadding / 2), 41 | const PriceRow(text: "Delivery", price: 0), 42 | const SizedBox(height: defaultPadding / 2), 43 | const TotalPrice(price: 20), 44 | const SizedBox(height: defaultPadding * 2), 45 | PrimaryButton( 46 | text: "Checkout (\$20.10)", 47 | press: () {}, 48 | ), 49 | ], 50 | ), 51 | ), 52 | ), 53 | ); 54 | } 55 | } 56 | 57 | const List demoItems = [ 58 | { 59 | "title": "Cookie Sandwich", 60 | "price": 7.4, 61 | "numOfItem": 1, 62 | }, 63 | { 64 | "title": "Combo Burger", 65 | "price": 12, 66 | "numOfItem": 1, 67 | }, 68 | { 69 | "title": "Oyster Dish", 70 | "price": 8.6, 71 | "numOfItem": 2, 72 | }, 73 | ]; 74 | -------------------------------------------------------------------------------- /lib/screens/phoneLogin/number_verify_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/gestures.dart'; 2 | import 'package:flutter/material.dart'; 3 | 4 | import '../../components/welcome_text.dart'; 5 | import '../../constants.dart'; 6 | import 'components/otp_form.dart'; 7 | 8 | class NumberVerifyScreen extends StatelessWidget { 9 | const NumberVerifyScreen({super.key}); 10 | 11 | @override 12 | Widget build(BuildContext context) { 13 | return Scaffold( 14 | appBar: AppBar( 15 | title: const Text("Login to Foodly"), 16 | ), 17 | body: SingleChildScrollView( 18 | child: Padding( 19 | padding: const EdgeInsets.symmetric(horizontal: defaultPadding), 20 | child: Column( 21 | crossAxisAlignment: CrossAxisAlignment.start, 22 | children: [ 23 | const WelcomeText( 24 | title: "Verify phone number", 25 | text: "Enter the 4-Digit code sent to you at \n+1501333982", 26 | ), 27 | 28 | // OTP form 29 | const OtpForm(), 30 | const SizedBox(height: defaultPadding), 31 | Center( 32 | child: Text.rich( 33 | TextSpan( 34 | text: "Didn’t receive code? ", 35 | style: Theme.of(context) 36 | .textTheme 37 | .bodySmall! 38 | .copyWith(fontWeight: FontWeight.w500), 39 | children: [ 40 | TextSpan( 41 | text: "Resend Again.", 42 | style: const TextStyle(color: primaryColor), 43 | recognizer: TapGestureRecognizer() 44 | ..onTap = () { 45 | // Your OTP PIN resend code 46 | }, 47 | ), 48 | ], 49 | ), 50 | ), 51 | ), 52 | const SizedBox(height: defaultPadding), 53 | const Center( 54 | child: Text( 55 | "By Signing up you agree to our Terms \nConditions & Privacy Policy.", 56 | textAlign: TextAlign.center, 57 | ), 58 | ), 59 | const SizedBox(height: defaultPadding), 60 | ], 61 | ), 62 | ), 63 | ), 64 | ); 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/screens/phoneLogin/phone_login_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import '../../components/buttons/primary_button.dart'; 4 | import '../../components/welcome_text.dart'; 5 | import '../../constants.dart'; 6 | import 'number_verify_screen.dart'; 7 | 8 | class PghoneLoginScreen extends StatefulWidget { 9 | const PghoneLoginScreen({super.key}); 10 | 11 | @override 12 | State createState() => _PghoneLoginScreenState(); 13 | } 14 | 15 | class _PghoneLoginScreenState extends State { 16 | final _formKey = GlobalKey(); 17 | 18 | String? phoneNumber; 19 | @override 20 | Widget build(BuildContext context) { 21 | return Scaffold( 22 | appBar: AppBar( 23 | title: const Text("Login to Foodly"), 24 | ), 25 | body: SafeArea( 26 | child: Padding( 27 | padding: const EdgeInsets.symmetric(horizontal: defaultPadding), 28 | child: Column( 29 | crossAxisAlignment: CrossAxisAlignment.start, 30 | children: [ 31 | const WelcomeText( 32 | title: "Get started with Foodly", 33 | text: 34 | "Enter your phone number to use foodly \nand enjoy your food :)", 35 | ), 36 | const SizedBox(height: defaultPadding), 37 | Form( 38 | key: _formKey, 39 | child: TextFormField( 40 | validator: phoneNumberValidator.call, 41 | autofocus: true, 42 | onSaved: (value) => phoneNumber = value, 43 | style: Theme.of(context) 44 | .textTheme 45 | .bodyMedium! 46 | .copyWith(color: titleColor), 47 | cursorColor: primaryColor, 48 | keyboardType: TextInputType.phone, 49 | decoration: const InputDecoration( 50 | hintText: "Phone Number", 51 | contentPadding: kTextFieldPadding, 52 | ), 53 | ), 54 | ), 55 | const Spacer(), 56 | // Sign Up Button 57 | PrimaryButton( 58 | text: "Sign Up", 59 | press: () { 60 | if (_formKey.currentState!.validate()) { 61 | // If all data are correct then save data to out variables 62 | _formKey.currentState!.save(); 63 | Navigator.push( 64 | context, 65 | MaterialPageRoute( 66 | builder: (context) => const NumberVerifyScreen(), 67 | ), 68 | ); 69 | } else {} 70 | }, 71 | ), 72 | const SizedBox(height: defaultPadding), 73 | ], 74 | ), 75 | ), 76 | ), 77 | ); 78 | } 79 | } 80 | -------------------------------------------------------------------------------- /lib/screens/profile/profile_screen.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'components/body.dart'; 4 | 5 | class ProfileScreen extends StatelessWidget { 6 | const ProfileScreen({super.key}); 7 | 8 | @override 9 | Widget build(BuildContext context) { 10 | return const Scaffold( 11 | body: Body(), 12 | ); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /lib/screens/signUp/components/body.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/gestures.dart'; 2 | import 'package:flutter/material.dart'; 3 | import 'package:flutter_svg/flutter_svg.dart'; 4 | 5 | import '../../../components/buttons/socal_button.dart'; 6 | import '../../../components/welcome_text.dart'; 7 | import '../../../constants.dart'; 8 | import '../../auth/sign_in_screen.dart'; 9 | import 'sign_up_form.dart'; 10 | 11 | class Body extends StatelessWidget { 12 | const Body({super.key}); 13 | 14 | @override 15 | Widget build(BuildContext context) { 16 | return SafeArea( 17 | child: SingleChildScrollView( 18 | child: Padding( 19 | padding: const EdgeInsets.symmetric(horizontal: defaultPadding), 20 | child: Column( 21 | crossAxisAlignment: CrossAxisAlignment.start, 22 | children: [ 23 | const WelcomeText( 24 | title: "Create Account", 25 | text: "Enter your Name, Email and Password \nfor sign up.", 26 | ), 27 | 28 | // Sign Up Form 29 | const SignUpForm(), 30 | const SizedBox(height: 16), 31 | 32 | // Already have account 33 | Center( 34 | child: Text.rich( 35 | TextSpan( 36 | style: Theme.of(context) 37 | .textTheme 38 | .bodySmall! 39 | .copyWith(fontWeight: FontWeight.w500), 40 | text: "Already have account? ", 41 | children: [ 42 | TextSpan( 43 | text: "Sign In", 44 | style: const TextStyle(color: primaryColor), 45 | recognizer: TapGestureRecognizer() 46 | ..onTap = () => Navigator.push( 47 | context, 48 | MaterialPageRoute( 49 | builder: (context) => const SignInScreen(), 50 | ), 51 | ), 52 | ), 53 | ], 54 | ), 55 | ), 56 | ), 57 | const SizedBox(height: 16), 58 | Center( 59 | child: Text( 60 | "By Signing up you agree to our Terms \nConditions & Privacy Policy.", 61 | textAlign: TextAlign.center, 62 | style: Theme.of(context).textTheme.bodyMedium, 63 | ), 64 | ), 65 | const SizedBox(height: 16), 66 | kOrText, 67 | const SizedBox(height: 16), 68 | 69 | // Facebook 70 | SocalButton( 71 | press: () {}, 72 | text: "Connect with Facebook", 73 | color: const Color(0xFF395998), 74 | icon: SvgPicture.asset( 75 | 'assets/icons/facebook.svg', 76 | colorFilter: const ColorFilter.mode( 77 | Color(0xFF395998), 78 | BlendMode.srcIn, 79 | ), 80 | ), 81 | ), 82 | const SizedBox(height: 16), 83 | 84 | // Google 85 | SocalButton( 86 | press: () {}, 87 | text: "Connect with Google", 88 | color: const Color(0xFF4285F4), 89 | icon: SvgPicture.asset( 90 | 'assets/icons/google.svg', 91 | ), 92 | ), 93 | const SizedBox(height: defaultPadding), 94 | ], 95 | ), 96 | ), 97 | ), 98 | ); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /lib/screens/signUp/components/sign_up_form.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | import '../../phoneLogin/phone_login_screen.dart'; 3 | 4 | import '../../../constants.dart'; 5 | 6 | class SignUpForm extends StatefulWidget { 7 | const SignUpForm({super.key}); 8 | 9 | @override 10 | State createState() => _SignUpFormState(); 11 | } 12 | 13 | class _SignUpFormState extends State { 14 | final _formKey = GlobalKey(); 15 | 16 | bool _obscureText = true; 17 | 18 | @override 19 | Widget build(BuildContext context) { 20 | return Form( 21 | key: _formKey, 22 | child: Column( 23 | children: [ 24 | // Full Name Field 25 | TextFormField( 26 | validator: requiredValidator.call, 27 | onSaved: (value) {}, 28 | textInputAction: TextInputAction.next, 29 | decoration: const InputDecoration(hintText: "Full Name"), 30 | ), 31 | const SizedBox(height: defaultPadding), 32 | 33 | // Email Field 34 | TextFormField( 35 | validator: emailValidator.call, 36 | onSaved: (value) {}, 37 | textInputAction: TextInputAction.next, 38 | keyboardType: TextInputType.emailAddress, 39 | decoration: const InputDecoration(hintText: "Email Address"), 40 | ), 41 | const SizedBox(height: defaultPadding), 42 | 43 | // Password Field 44 | TextFormField( 45 | obscureText: _obscureText, 46 | validator: passwordValidator.call, 47 | textInputAction: TextInputAction.next, 48 | onChanged: (value) {}, 49 | onSaved: (value) {}, 50 | decoration: InputDecoration( 51 | hintText: "Password", 52 | suffixIcon: GestureDetector( 53 | onTap: () { 54 | setState(() { 55 | _obscureText = !_obscureText; 56 | }); 57 | }, 58 | child: _obscureText 59 | ? const Icon(Icons.visibility_off, color: bodyTextColor) 60 | : const Icon(Icons.visibility, color: bodyTextColor), 61 | ), 62 | ), 63 | ), 64 | const SizedBox(height: defaultPadding), 65 | 66 | // Confirm Password Field 67 | TextFormField( 68 | obscureText: _obscureText, 69 | decoration: InputDecoration( 70 | hintText: "Confirm Password", 71 | suffixIcon: GestureDetector( 72 | onTap: () { 73 | setState(() { 74 | _obscureText = !_obscureText; 75 | }); 76 | }, 77 | child: _obscureText 78 | ? const Icon(Icons.visibility_off, color: bodyTextColor) 79 | : const Icon(Icons.visibility, color: bodyTextColor), 80 | ), 81 | ), 82 | ), 83 | const SizedBox(height: defaultPadding), 84 | // Sign Up Button 85 | ElevatedButton( 86 | onPressed: () { 87 | Navigator.pushReplacement( 88 | context, 89 | MaterialPageRoute( 90 | builder: (_) => const PghoneLoginScreen(), 91 | ), 92 | ); 93 | }, 94 | child: const Text("Sign Up"), 95 | ), 96 | ], 97 | ), 98 | ); 99 | } 100 | } 101 | -------------------------------------------------------------------------------- /lib/theme.dart: -------------------------------------------------------------------------------- 1 | import 'package:flutter/material.dart'; 2 | 3 | import 'constants.dart'; 4 | 5 | ThemeData buildThemeData() { 6 | return ThemeData( 7 | primaryColor: accentColor, 8 | 9 | scaffoldBackgroundColor: Colors.white, 10 | fontFamily: "SF Pro Text", 11 | // textTheme: textTheme().apply(displayColor: titleColor), 12 | appBarTheme: const AppBarTheme( 13 | color: Colors.white, 14 | elevation: 0, 15 | centerTitle: true, 16 | iconTheme: IconThemeData(color: Colors.black), 17 | ), 18 | inputDecorationTheme: inputDecorationTheme, 19 | buttonTheme: buttonThemeData, 20 | visualDensity: VisualDensity.adaptivePlatformDensity, 21 | ); 22 | } 23 | 24 | final InputDecorationTheme inputDecorationTheme = InputDecorationTheme( 25 | fillColor: inputColor, 26 | filled: true, 27 | // hintStyle: Theme.of(context).textTheme.bodyMedium, 28 | contentPadding: const EdgeInsets.all(defaultPadding), 29 | border: kDefaultOutlineInputBorder, 30 | enabledBorder: kDefaultOutlineInputBorder, 31 | focusedBorder: kDefaultOutlineInputBorder.copyWith( 32 | borderSide: BorderSide( 33 | color: primaryColor.withOpacity(0.5), 34 | )), 35 | errorBorder: kDefaultOutlineInputBorder.copyWith( 36 | borderSide: kErrorBorderSide, 37 | ), 38 | focusedErrorBorder: kDefaultOutlineInputBorder.copyWith( 39 | borderSide: kErrorBorderSide, 40 | ), 41 | ); 42 | 43 | const ButtonThemeData buttonThemeData = ButtonThemeData( 44 | shape: RoundedRectangleBorder( 45 | borderRadius: BorderRadius.all(Radius.circular(8))), 46 | ); 47 | -------------------------------------------------------------------------------- /preview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/preview.png -------------------------------------------------------------------------------- /pubspec.yaml: -------------------------------------------------------------------------------- 1 | name: foodly_ui 2 | description: A new Flutter project. 3 | # The following line prevents the package from being accidentally published to 4 | # pub.dev using `flutter pub publish`. This is preferred for private packages. 5 | publish_to: "none" # Remove this line if you wish to publish to pub.dev 6 | 7 | # The following defines the version and build number for your application. 8 | # A version number is three numbers separated by dots, like 1.2.43 9 | # followed by an optional build number separated by a +. 10 | # Both the version and the builder number may be overridden in flutter 11 | # build by specifying --build-name and --build-number, respectively. 12 | # In Android, build-name is used as versionName while build-number used as versionCode. 13 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning 14 | # In iOS, build-name is used as CFBundleShortVersionString while build-number is used as CFBundleVersion. 15 | # Read more about iOS versioning at 16 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html 17 | # In Windows, build-name is used as the major, minor, and patch parts 18 | # of the product and file versions while build-number is used as the build suffix. 19 | version: 1.0.0+1 20 | 21 | environment: 22 | sdk: ">=3.5.0 <4.0.0" 23 | 24 | # Dependencies specify other packages that your package needs in order to work. 25 | # To automatically upgrade your package dependencies to the latest versions 26 | # consider running `flutter pub upgrade --major-versions`. Alternatively, 27 | # dependencies can be manually updated by changing the version numbers below to 28 | # the latest version available on pub.dev. To see which dependencies have newer 29 | # versions available, run `flutter pub outdated`. 30 | dependencies: 31 | flutter: 32 | sdk: flutter 33 | 34 | # The following adds the Cupertino Icons font to your application. 35 | # Use with the CupertinoIcons class for iOS style icons. 36 | cupertino_icons: ^1.0.8 37 | flutter_svg: ^2.0.10 38 | form_field_validator: ^1.1.0 39 | 40 | dev_dependencies: 41 | flutter_test: 42 | sdk: flutter 43 | 44 | # The "flutter_lints" package below contains a set of recommended lints to 45 | # encourage good coding practices. The lint set provided by the package is 46 | # activated in the `analysis_options.yaml` file located at the root of your 47 | # package. See that file for information about deactivating specific lint 48 | # rules and activating additional ones. 49 | flutter_lints: ^4.0.0 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 packages. 55 | flutter: 56 | # The following line ensures that the Material Icons font is 57 | # included with your application, so that you can use the icons in 58 | # the material Icons class. 59 | uses-material-design: true 60 | 61 | # To add assets to your application, add an assets section, like this: 62 | assets: 63 | - assets/images/ 64 | - assets/Illustrations/ 65 | - assets/icons/ 66 | # - images/a_dot_ham.jpeg 67 | 68 | # An image asset can refer to one or more resolution-specific "variants", see 69 | # https://flutter.dev/assets-and-images/#resolution-aware 70 | 71 | # For details regarding adding assets from package dependencies, see 72 | # https://flutter.dev/assets-and-images/#from-packages 73 | 74 | # To add custom fonts to your application, add a fonts section here, 75 | # in this "flutter" section. Each entry in this list should have a 76 | # "family" key with the font family name, and a "fonts" key with a 77 | # list giving the asset and other descriptors for the font. For 78 | # example: 79 | # fonts: 80 | # - family: Schyler 81 | # fonts: 82 | # - asset: fonts/Schyler-Regular.ttf 83 | # - asset: fonts/Schyler-Italic.ttf 84 | # style: italic 85 | # - family: Trajan Pro 86 | # fonts: 87 | # - asset: fonts/TrajanPro.ttf 88 | # - asset: fonts/TrajanPro_Bold.ttf 89 | # weight: 700 90 | # 91 | # For details regarding fonts from package dependencies, 92 | # see https://flutter.dev/custom-fonts/#from-packages 93 | -------------------------------------------------------------------------------- /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 in the flutter_test package. 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:foodly_ui/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(const 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/.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 | -------------------------------------------------------------------------------- /windows/flutter/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # This file controls Flutter-level build steps. It should not be edited. 2 | cmake_minimum_required(VERSION 3.14) 3 | 4 | set(EPHEMERAL_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ephemeral") 5 | 6 | # Configuration provided via flutter tool. 7 | include(${EPHEMERAL_DIR}/generated_config.cmake) 8 | 9 | # TODO: Move the rest of this into files in ephemeral. See 10 | # https://github.com/flutter/flutter/issues/57146. 11 | set(WRAPPER_ROOT "${EPHEMERAL_DIR}/cpp_client_wrapper") 12 | 13 | # === Flutter Library === 14 | set(FLUTTER_LIBRARY "${EPHEMERAL_DIR}/flutter_windows.dll") 15 | 16 | # Published to parent scope for install step. 17 | set(FLUTTER_LIBRARY ${FLUTTER_LIBRARY} PARENT_SCOPE) 18 | set(FLUTTER_ICU_DATA_FILE "${EPHEMERAL_DIR}/icudtl.dat" PARENT_SCOPE) 19 | set(PROJECT_BUILD_DIR "${PROJECT_DIR}/build/" PARENT_SCOPE) 20 | set(AOT_LIBRARY "${PROJECT_DIR}/build/windows/app.so" PARENT_SCOPE) 21 | 22 | list(APPEND FLUTTER_LIBRARY_HEADERS 23 | "flutter_export.h" 24 | "flutter_windows.h" 25 | "flutter_messenger.h" 26 | "flutter_plugin_registrar.h" 27 | "flutter_texture_registrar.h" 28 | ) 29 | list(TRANSFORM FLUTTER_LIBRARY_HEADERS PREPEND "${EPHEMERAL_DIR}/") 30 | add_library(flutter INTERFACE) 31 | target_include_directories(flutter INTERFACE 32 | "${EPHEMERAL_DIR}" 33 | ) 34 | target_link_libraries(flutter INTERFACE "${FLUTTER_LIBRARY}.lib") 35 | add_dependencies(flutter flutter_assemble) 36 | 37 | # === Wrapper === 38 | list(APPEND CPP_WRAPPER_SOURCES_CORE 39 | "core_implementations.cc" 40 | "standard_codec.cc" 41 | ) 42 | list(TRANSFORM CPP_WRAPPER_SOURCES_CORE PREPEND "${WRAPPER_ROOT}/") 43 | list(APPEND CPP_WRAPPER_SOURCES_PLUGIN 44 | "plugin_registrar.cc" 45 | ) 46 | list(TRANSFORM CPP_WRAPPER_SOURCES_PLUGIN PREPEND "${WRAPPER_ROOT}/") 47 | list(APPEND CPP_WRAPPER_SOURCES_APP 48 | "flutter_engine.cc" 49 | "flutter_view_controller.cc" 50 | ) 51 | list(TRANSFORM CPP_WRAPPER_SOURCES_APP PREPEND "${WRAPPER_ROOT}/") 52 | 53 | # Wrapper sources needed for a plugin. 54 | add_library(flutter_wrapper_plugin STATIC 55 | ${CPP_WRAPPER_SOURCES_CORE} 56 | ${CPP_WRAPPER_SOURCES_PLUGIN} 57 | ) 58 | apply_standard_settings(flutter_wrapper_plugin) 59 | set_target_properties(flutter_wrapper_plugin PROPERTIES 60 | POSITION_INDEPENDENT_CODE ON) 61 | set_target_properties(flutter_wrapper_plugin PROPERTIES 62 | CXX_VISIBILITY_PRESET hidden) 63 | target_link_libraries(flutter_wrapper_plugin PUBLIC flutter) 64 | target_include_directories(flutter_wrapper_plugin PUBLIC 65 | "${WRAPPER_ROOT}/include" 66 | ) 67 | add_dependencies(flutter_wrapper_plugin flutter_assemble) 68 | 69 | # Wrapper sources needed for the runner. 70 | add_library(flutter_wrapper_app STATIC 71 | ${CPP_WRAPPER_SOURCES_CORE} 72 | ${CPP_WRAPPER_SOURCES_APP} 73 | ) 74 | apply_standard_settings(flutter_wrapper_app) 75 | target_link_libraries(flutter_wrapper_app PUBLIC flutter) 76 | target_include_directories(flutter_wrapper_app PUBLIC 77 | "${WRAPPER_ROOT}/include" 78 | ) 79 | add_dependencies(flutter_wrapper_app flutter_assemble) 80 | 81 | # === Flutter tool backend === 82 | # _phony_ is a non-existent file to force this command to run every time, 83 | # since currently there's no way to get a full input/output list from the 84 | # flutter tool. 85 | set(PHONY_OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/_phony_") 86 | set_source_files_properties("${PHONY_OUTPUT}" PROPERTIES SYMBOLIC TRUE) 87 | add_custom_command( 88 | OUTPUT ${FLUTTER_LIBRARY} ${FLUTTER_LIBRARY_HEADERS} 89 | ${CPP_WRAPPER_SOURCES_CORE} ${CPP_WRAPPER_SOURCES_PLUGIN} 90 | ${CPP_WRAPPER_SOURCES_APP} 91 | ${PHONY_OUTPUT} 92 | COMMAND ${CMAKE_COMMAND} -E env 93 | ${FLUTTER_TOOL_ENVIRONMENT} 94 | "${FLUTTER_ROOT}/packages/flutter_tools/bin/tool_backend.bat" 95 | windows-x64 $ 96 | VERBATIM 97 | ) 98 | add_custom_target(flutter_assemble DEPENDS 99 | "${FLUTTER_LIBRARY}" 100 | ${FLUTTER_LIBRARY_HEADERS} 101 | ${CPP_WRAPPER_SOURCES_CORE} 102 | ${CPP_WRAPPER_SOURCES_PLUGIN} 103 | ${CPP_WRAPPER_SOURCES_APP} 104 | ) 105 | -------------------------------------------------------------------------------- /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 | 10 | void RegisterPlugins(flutter::PluginRegistry* registry) { 11 | } 12 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/flutter/generated_plugins.cmake: -------------------------------------------------------------------------------- 1 | # 2 | # Generated file, do not edit. 3 | # 4 | 5 | list(APPEND FLUTTER_PLUGIN_LIST 6 | ) 7 | 8 | list(APPEND FLUTTER_FFI_PLUGIN_LIST 9 | ) 10 | 11 | set(PLUGIN_BUNDLED_LIBRARIES) 12 | 13 | foreach(plugin ${FLUTTER_PLUGIN_LIST}) 14 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${plugin}/windows plugins/${plugin}) 15 | target_link_libraries(${BINARY_NAME} PRIVATE ${plugin}_plugin) 16 | list(APPEND PLUGIN_BUNDLED_LIBRARIES $) 17 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${plugin}_bundled_libraries}) 18 | endforeach(plugin) 19 | 20 | foreach(ffi_plugin ${FLUTTER_FFI_PLUGIN_LIST}) 21 | add_subdirectory(flutter/ephemeral/.plugin_symlinks/${ffi_plugin}/windows plugins/${ffi_plugin}) 22 | list(APPEND PLUGIN_BUNDLED_LIBRARIES ${${ffi_plugin}_bundled_libraries}) 23 | endforeach(ffi_plugin) 24 | -------------------------------------------------------------------------------- /windows/runner/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.14) 2 | project(runner LANGUAGES CXX) 3 | 4 | # Define the application target. To change its name, change BINARY_NAME in the 5 | # top-level CMakeLists.txt, not the value here, or `flutter run` will no longer 6 | # work. 7 | # 8 | # Any new source files that you add to the application should be added here. 9 | add_executable(${BINARY_NAME} WIN32 10 | "flutter_window.cpp" 11 | "main.cpp" 12 | "utils.cpp" 13 | "win32_window.cpp" 14 | "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" 15 | "Runner.rc" 16 | "runner.exe.manifest" 17 | ) 18 | 19 | # Apply the standard set of build settings. This can be removed for applications 20 | # that need different build settings. 21 | apply_standard_settings(${BINARY_NAME}) 22 | 23 | # Add preprocessor definitions for the build version. 24 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION=\"${FLUTTER_VERSION}\"") 25 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MAJOR=${FLUTTER_VERSION_MAJOR}") 26 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_MINOR=${FLUTTER_VERSION_MINOR}") 27 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_PATCH=${FLUTTER_VERSION_PATCH}") 28 | target_compile_definitions(${BINARY_NAME} PRIVATE "FLUTTER_VERSION_BUILD=${FLUTTER_VERSION_BUILD}") 29 | 30 | # Disable Windows macros that collide with C++ standard library functions. 31 | target_compile_definitions(${BINARY_NAME} PRIVATE "NOMINMAX") 32 | 33 | # Add dependency libraries and include directories. Add any application-specific 34 | # dependencies here. 35 | target_link_libraries(${BINARY_NAME} PRIVATE flutter flutter_wrapper_app) 36 | target_link_libraries(${BINARY_NAME} PRIVATE "dwmapi.lib") 37 | target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") 38 | 39 | # Run the Flutter tool portions of the build. This must not be removed. 40 | add_dependencies(${BINARY_NAME} flutter_assemble) 41 | -------------------------------------------------------------------------------- /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 | #if defined(FLUTTER_VERSION_MAJOR) && defined(FLUTTER_VERSION_MINOR) && defined(FLUTTER_VERSION_PATCH) && defined(FLUTTER_VERSION_BUILD) 64 | #define VERSION_AS_NUMBER FLUTTER_VERSION_MAJOR,FLUTTER_VERSION_MINOR,FLUTTER_VERSION_PATCH,FLUTTER_VERSION_BUILD 65 | #else 66 | #define VERSION_AS_NUMBER 1,0,0,0 67 | #endif 68 | 69 | #if defined(FLUTTER_VERSION) 70 | #define VERSION_AS_STRING FLUTTER_VERSION 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", "foodly_ui" "\0" 94 | VALUE "FileVersion", VERSION_AS_STRING "\0" 95 | VALUE "InternalName", "foodly_ui" "\0" 96 | VALUE "LegalCopyright", "Copyright (C) 2023 com.example. All rights reserved." "\0" 97 | VALUE "OriginalFilename", "foodly_ui.exe" "\0" 98 | VALUE "ProductName", "foodly_ui" "\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 | -------------------------------------------------------------------------------- /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(const flutter::DartProject& project) 8 | : project_(project) {} 9 | 10 | FlutterWindow::~FlutterWindow() {} 11 | 12 | bool FlutterWindow::OnCreate() { 13 | if (!Win32Window::OnCreate()) { 14 | return false; 15 | } 16 | 17 | RECT frame = GetClientArea(); 18 | 19 | // The size here must match the window dimensions to avoid unnecessary surface 20 | // creation / destruction in the startup path. 21 | flutter_controller_ = std::make_unique( 22 | frame.right - frame.left, frame.bottom - frame.top, project_); 23 | // Ensure that basic setup of the controller was successful. 24 | if (!flutter_controller_->engine() || !flutter_controller_->view()) { 25 | return false; 26 | } 27 | RegisterPlugins(flutter_controller_->engine()); 28 | SetChildContent(flutter_controller_->view()->GetNativeWindow()); 29 | 30 | flutter_controller_->engine()->SetNextFrameCallback([&]() { 31 | this->Show(); 32 | }); 33 | 34 | return true; 35 | } 36 | 37 | void FlutterWindow::OnDestroy() { 38 | if (flutter_controller_) { 39 | flutter_controller_ = nullptr; 40 | } 41 | 42 | Win32Window::OnDestroy(); 43 | } 44 | 45 | LRESULT 46 | FlutterWindow::MessageHandler(HWND hwnd, UINT const message, 47 | WPARAM const wparam, 48 | LPARAM const lparam) noexcept { 49 | // Give Flutter, including plugins, an opportunity to handle window messages. 50 | if (flutter_controller_) { 51 | std::optional result = 52 | flutter_controller_->HandleTopLevelWindowProc(hwnd, message, wparam, 53 | lparam); 54 | if (result) { 55 | return *result; 56 | } 57 | } 58 | 59 | switch (message) { 60 | case WM_FONTCHANGE: 61 | flutter_controller_->engine()->ReloadSystemFonts(); 62 | break; 63 | } 64 | 65 | return Win32Window::MessageHandler(hwnd, message, wparam, lparam); 66 | } 67 | -------------------------------------------------------------------------------- /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 "win32_window.h" 10 | 11 | // A window that does nothing but host a Flutter view. 12 | class FlutterWindow : public Win32Window { 13 | public: 14 | // Creates a new FlutterWindow hosting a Flutter view running |project|. 15 | explicit FlutterWindow(const flutter::DartProject& project); 16 | virtual ~FlutterWindow(); 17 | 18 | protected: 19 | // Win32Window: 20 | bool OnCreate() override; 21 | void OnDestroy() override; 22 | LRESULT MessageHandler(HWND window, UINT const message, WPARAM const wparam, 23 | LPARAM const lparam) noexcept override; 24 | 25 | private: 26 | // The project to run. 27 | flutter::DartProject project_; 28 | 29 | // The Flutter instance hosted by this window. 30 | std::unique_ptr flutter_controller_; 31 | }; 32 | 33 | #endif // RUNNER_FLUTTER_WINDOW_H_ 34 | -------------------------------------------------------------------------------- /windows/runner/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "flutter_window.h" 6 | #include "utils.h" 7 | 8 | int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, 9 | _In_ wchar_t *command_line, _In_ int show_command) { 10 | // Attach to console when present (e.g., 'flutter run') or create a 11 | // new console when running with a debugger. 12 | if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) { 13 | CreateAndAttachConsole(); 14 | } 15 | 16 | // Initialize COM, so that it is available for use in the library and/or 17 | // plugins. 18 | ::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED); 19 | 20 | flutter::DartProject project(L"data"); 21 | 22 | std::vector command_line_arguments = 23 | GetCommandLineArguments(); 24 | 25 | project.set_dart_entrypoint_arguments(std::move(command_line_arguments)); 26 | 27 | FlutterWindow window(project); 28 | Win32Window::Point origin(10, 10); 29 | Win32Window::Size size(1280, 720); 30 | if (!window.Create(L"foodly_ui", origin, size)) { 31 | return EXIT_FAILURE; 32 | } 33 | window.SetQuitOnClose(true); 34 | 35 | ::MSG msg; 36 | while (::GetMessage(&msg, nullptr, 0, 0)) { 37 | ::TranslateMessage(&msg); 38 | ::DispatchMessage(&msg); 39 | } 40 | 41 | ::CoUninitialize(); 42 | return EXIT_SUCCESS; 43 | } 44 | -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /windows/runner/resources/app_icon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/abuanwar072/foodly_ui/54c3cb2a5b11ed157bb8eefa57f65fd1d8b44318/windows/runner/resources/app_icon.ico -------------------------------------------------------------------------------- /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 | -------------------------------------------------------------------------------- /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 | 24 | std::vector GetCommandLineArguments() { 25 | // Convert the UTF-16 command line arguments to UTF-8 for the Engine to use. 26 | int argc; 27 | wchar_t** argv = ::CommandLineToArgvW(::GetCommandLineW(), &argc); 28 | if (argv == nullptr) { 29 | return std::vector(); 30 | } 31 | 32 | std::vector command_line_arguments; 33 | 34 | // Skip the first argument as it's the binary name. 35 | for (int i = 1; i < argc; i++) { 36 | command_line_arguments.push_back(Utf8FromUtf16(argv[i])); 37 | } 38 | 39 | ::LocalFree(argv); 40 | 41 | return command_line_arguments; 42 | } 43 | 44 | std::string Utf8FromUtf16(const wchar_t* utf16_string) { 45 | if (utf16_string == nullptr) { 46 | return std::string(); 47 | } 48 | int target_length = ::WideCharToMultiByte( 49 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 50 | -1, nullptr, 0, nullptr, nullptr) 51 | -1; // remove the trailing null character 52 | int input_length = (int)wcslen(utf16_string); 53 | std::string utf8_string; 54 | if (target_length <= 0 || target_length > utf8_string.max_size()) { 55 | return utf8_string; 56 | } 57 | utf8_string.resize(target_length); 58 | int converted_length = ::WideCharToMultiByte( 59 | CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, 60 | input_length, utf8_string.data(), target_length, nullptr, nullptr); 61 | if (converted_length == 0) { 62 | return std::string(); 63 | } 64 | return utf8_string; 65 | } 66 | -------------------------------------------------------------------------------- /windows/runner/utils.h: -------------------------------------------------------------------------------- 1 | #ifndef RUNNER_UTILS_H_ 2 | #define RUNNER_UTILS_H_ 3 | 4 | #include 5 | #include 6 | 7 | // Creates a console for the process, and redirects stdout and stderr to 8 | // it for both the runner and the Flutter library. 9 | void CreateAndAttachConsole(); 10 | 11 | // Takes a null-terminated wchar_t* encoded in UTF-16 and returns a std::string 12 | // encoded in UTF-8. Returns an empty std::string on failure. 13 | std::string Utf8FromUtf16(const wchar_t* utf16_string); 14 | 15 | // Gets the command line arguments passed in as a std::vector, 16 | // encoded in UTF-8. Returns an empty std::vector on failure. 17 | std::vector GetCommandLineArguments(); 18 | 19 | #endif // RUNNER_UTILS_H_ 20 | -------------------------------------------------------------------------------- /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 a win32 window with |title| that is positioned and sized 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 this function will scale the inputted width and height as 35 | // as appropriate for the default monitor. The window is invisible until 36 | // |Show| is called. Returns true if the window was created successfully. 37 | bool Create(const std::wstring& title, const Point& origin, const Size& size); 38 | 39 | // Show the current window. Returns true if the window was successfully shown. 40 | bool Show(); 41 | 42 | // Release OS resources associated with window. 43 | void Destroy(); 44 | 45 | // Inserts |content| into the window tree. 46 | void SetChildContent(HWND content); 47 | 48 | // Returns the backing Window handle to enable clients to set icon and other 49 | // window properties. Returns nullptr if the window has been destroyed. 50 | HWND GetHandle(); 51 | 52 | // If true, closing this window will quit the application. 53 | void SetQuitOnClose(bool quit_on_close); 54 | 55 | // Return a RECT representing the bounds of the current client area. 56 | RECT GetClientArea(); 57 | 58 | protected: 59 | // Processes and route salient window messages for mouse handling, 60 | // size change and DPI. Delegates handling of these to member overloads that 61 | // inheriting classes can handle. 62 | virtual LRESULT MessageHandler(HWND window, 63 | UINT const message, 64 | WPARAM const wparam, 65 | LPARAM const lparam) noexcept; 66 | 67 | // Called when CreateAndShow is called, allowing subclass window-related 68 | // setup. Subclasses should return false if setup fails. 69 | virtual bool OnCreate(); 70 | 71 | // Called when Destroy is called. 72 | virtual void OnDestroy(); 73 | 74 | private: 75 | friend class WindowClassRegistrar; 76 | 77 | // OS callback called by message pump. Handles the WM_NCCREATE message which 78 | // is passed when the non-client area is being created and enables automatic 79 | // non-client DPI scaling so that the non-client area automatically 80 | // responds to changes in DPI. All other messages are handled by 81 | // MessageHandler. 82 | static LRESULT CALLBACK WndProc(HWND const window, 83 | UINT const message, 84 | WPARAM const wparam, 85 | LPARAM const lparam) noexcept; 86 | 87 | // Retrieves a class instance pointer for |window| 88 | static Win32Window* GetThisFromHandle(HWND const window) noexcept; 89 | 90 | // Update the window frame's theme to match the system theme. 91 | static void UpdateTheme(HWND const window); 92 | 93 | bool quit_on_close_ = false; 94 | 95 | // window handle for top level window. 96 | HWND window_handle_ = nullptr; 97 | 98 | // window handle for hosted content. 99 | HWND child_content_ = nullptr; 100 | }; 101 | 102 | #endif // RUNNER_WIN32_WINDOW_H_ 103 | --------------------------------------------------------------------------------