commit 41d8a384715749f9ce10e7b66280cdba7f31a9a9 Author: jahongireshonqulov Date: Thu Oct 23 19:34:54 2025 +0500 Initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..3820a95 --- /dev/null +++ b/.gitignore @@ -0,0 +1,45 @@ +# Miscellaneous +*.class +*.log +*.pyc +*.swp +.DS_Store +.atom/ +.build/ +.buildlog/ +.history +.svn/ +.swiftpm/ +migrate_working_dir/ + +# IntelliJ related +*.iml +*.ipr +*.iws +.idea/ + +# The .vscode folder contains launch configuration and tasks you configure in +# VS Code which you may wish to be included in version control, so this line +# is commented out by default. +#.vscode/ + +# Flutter/Dart/Pub related +**/doc/api/ +**/ios/Flutter/.last_build_id +.dart_tool/ +.flutter-plugins-dependencies +.pub-cache/ +.pub/ +/build/ +/coverage/ + +# Symbolication related +app.*.symbols + +# Obfuscation related +app.*.map.json + +# Android Studio will place build artifacts here +/android/app/debug +/android/app/profile +/android/app/release diff --git a/.metadata b/.metadata new file mode 100644 index 0000000..a574790 --- /dev/null +++ b/.metadata @@ -0,0 +1,33 @@ +# This file tracks properties of this Flutter project. +# Used by Flutter tool to assess capabilities and perform upgrades etc. +# +# This file should be version controlled and should not be manually edited. + +version: + revision: "05db9689081f091050f01aed79f04dce0c750154" + channel: "stable" + +project_type: app + +# Tracks metadata for the flutter migrate command +migration: + platforms: + - platform: root + create_revision: 05db9689081f091050f01aed79f04dce0c750154 + base_revision: 05db9689081f091050f01aed79f04dce0c750154 + - platform: android + create_revision: 05db9689081f091050f01aed79f04dce0c750154 + base_revision: 05db9689081f091050f01aed79f04dce0c750154 + - platform: ios + create_revision: 05db9689081f091050f01aed79f04dce0c750154 + base_revision: 05db9689081f091050f01aed79f04dce0c750154 + + # User provided section + + # List of Local paths (relative to this file) that should be + # ignored by the migrate tool. + # + # Files that are not part of the templates will be ignored by default. + unmanaged_files: + - 'lib/main.dart' + - 'ios/Runner.xcodeproj/project.pbxproj' diff --git a/README.md b/README.md new file mode 100644 index 0000000..9d48a7f --- /dev/null +++ b/README.md @@ -0,0 +1,19 @@ +# food_delivery_client + +A new Flutter project. + +## Getting Started + +This project is a starting point for a Flutter application. + +A few resources to get you started if this is your first Flutter project: + +- [Lab: Write your first Flutter app](https://docs.flutter.dev/get-started/codelab) +- [Cookbook: Useful Flutter samples](https://docs.flutter.dev/cookbook) + +For help getting started with Flutter development, view the +[online documentation](https://docs.flutter.dev/), which offers tutorials, +samples, guidance on mobile development, and a full API reference. + +flutter packages pub run build_runner watch + diff --git a/analysis_options.yaml b/analysis_options.yaml new file mode 100644 index 0000000..0d29021 --- /dev/null +++ b/analysis_options.yaml @@ -0,0 +1,28 @@ +# This file configures the analyzer, which statically analyzes Dart code to +# check for errors, warnings, and lints. +# +# The issues identified by the analyzer are surfaced in the UI of Dart-enabled +# IDEs (https://dart.dev/tools#ides-and-editors). The analyzer can also be +# invoked from the command line by running `flutter analyze`. + +# The following line activates a set of recommended lints for Flutter apps, +# packages, and plugins designed to encourage good coding practices. +include: package:flutter_lints/flutter.yaml + +linter: + # The lint rules applied to this project can be customized in the + # section below to disable rules from the `package:flutter_lints/flutter.yaml` + # included above or to enable additional rules. A list of all available lints + # and their documentation is published at https://dart.dev/lints. + # + # Instead of disabling a lint rule for the entire project in the + # section below, it can also be suppressed for a single line of code + # or a specific dart file by using the `// ignore: name_of_lint` and + # `// ignore_for_file: name_of_lint` syntax on the line or in the file + # producing the lint. + rules: + # avoid_print: false # Uncomment to disable the `avoid_print` rule + # prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule + +# Additional information about this file can be found at +# https://dart.dev/guides/language/analysis-options diff --git a/android/.gitignore b/android/.gitignore new file mode 100755 index 0000000..be3943c --- /dev/null +++ b/android/.gitignore @@ -0,0 +1,14 @@ +gradle-wrapper.jar +/.gradle +/captures/ +/gradlew +/gradlew.bat +/local.properties +GeneratedPluginRegistrant.java +.cxx/ + +# Remember to never publicly share your keystore. +# See https://flutter.dev/to/reference-keystore +key.properties +**/*.keystore +**/*.jks diff --git a/android/app/build.gradle.kts b/android/app/build.gradle.kts new file mode 100644 index 0000000..164e5f0 --- /dev/null +++ b/android/app/build.gradle.kts @@ -0,0 +1,44 @@ +plugins { + id("com.android.application") + id("kotlin-android") + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. + id("dev.flutter.flutter-gradle-plugin") +} + +android { + namespace = "com.example.food_delivery_client" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion + + compileOptions { + sourceCompatibility = JavaVersion.VERSION_11 + targetCompatibility = JavaVersion.VERSION_11 + } + + kotlinOptions { + jvmTarget = JavaVersion.VERSION_11.toString() + } + + defaultConfig { + // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). + applicationId = "com.example.food_delivery_client" + // You can update the following values to match your application needs. + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName + } + + buildTypes { + release { + // TODO: Add your own signing config for the release build. + // Signing with the debug keys for now, so `flutter run --release` works. + signingConfig = signingConfigs.getByName("debug") + } + } +} + +flutter { + source = "../.." +} diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/android/app/src/debug/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml new file mode 100644 index 0000000..c9fac6b --- /dev/null +++ b/android/app/src/main/AndroidManifest.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/android/app/src/main/kotlin/com/example/food_delivery_client/MainActivity.kt b/android/app/src/main/kotlin/com/example/food_delivery_client/MainActivity.kt new file mode 100644 index 0000000..ea18492 --- /dev/null +++ b/android/app/src/main/kotlin/com/example/food_delivery_client/MainActivity.kt @@ -0,0 +1,5 @@ +package com.example.food_delivery_client + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity : FlutterActivity() diff --git a/android/app/src/main/res/drawable-v21/launch_background.xml b/android/app/src/main/res/drawable-v21/launch_background.xml new file mode 100755 index 0000000..f74085f --- /dev/null +++ b/android/app/src/main/res/drawable-v21/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/drawable/launch_background.xml b/android/app/src/main/res/drawable/launch_background.xml new file mode 100755 index 0000000..304732f --- /dev/null +++ b/android/app/src/main/res/drawable/launch_background.xml @@ -0,0 +1,12 @@ + + + + + + + + diff --git a/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png new file mode 100755 index 0000000..db77bb4 Binary files /dev/null and b/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png new file mode 100755 index 0000000..17987b7 Binary files /dev/null and b/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png new file mode 100755 index 0000000..09d4391 Binary files /dev/null and b/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png new file mode 100755 index 0000000..d5f1c8d Binary files /dev/null and b/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png new file mode 100755 index 0000000..4d6372e Binary files /dev/null and b/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ diff --git a/android/app/src/main/res/values-night/styles.xml b/android/app/src/main/res/values-night/styles.xml new file mode 100755 index 0000000..06952be --- /dev/null +++ b/android/app/src/main/res/values-night/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/main/res/values/styles.xml b/android/app/src/main/res/values/styles.xml new file mode 100755 index 0000000..cb1ef88 --- /dev/null +++ b/android/app/src/main/res/values/styles.xml @@ -0,0 +1,18 @@ + + + + + + + diff --git a/android/app/src/profile/AndroidManifest.xml b/android/app/src/profile/AndroidManifest.xml new file mode 100644 index 0000000..399f698 --- /dev/null +++ b/android/app/src/profile/AndroidManifest.xml @@ -0,0 +1,7 @@ + + + + diff --git a/android/build.gradle.kts b/android/build.gradle.kts new file mode 100644 index 0000000..dbee657 --- /dev/null +++ b/android/build.gradle.kts @@ -0,0 +1,24 @@ +allprojects { + repositories { + google() + mavenCentral() + } +} + +val newBuildDir: Directory = + rootProject.layout.buildDirectory + .dir("../../build") + .get() +rootProject.layout.buildDirectory.value(newBuildDir) + +subprojects { + val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name) + project.layout.buildDirectory.value(newSubprojectBuildDir) +} +subprojects { + project.evaluationDependsOn(":app") +} + +tasks.register("clean") { + delete(rootProject.layout.buildDirectory) +} diff --git a/android/gradle.properties b/android/gradle.properties new file mode 100644 index 0000000..f018a61 --- /dev/null +++ b/android/gradle.properties @@ -0,0 +1,3 @@ +org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError +android.useAndroidX=true +android.enableJetifier=true diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..ac3b479 --- /dev/null +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,5 @@ +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip diff --git a/android/settings.gradle.kts b/android/settings.gradle.kts new file mode 100644 index 0000000..fb605bc --- /dev/null +++ b/android/settings.gradle.kts @@ -0,0 +1,26 @@ +pluginManagement { + val flutterSdkPath = + run { + val properties = java.util.Properties() + file("local.properties").inputStream().use { properties.load(it) } + val flutterSdkPath = properties.getProperty("flutter.sdk") + require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" } + flutterSdkPath + } + + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") + + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} + +plugins { + id("dev.flutter.flutter-plugin-loader") version "1.0.0" + id("com.android.application") version "8.9.1" apply false + id("org.jetbrains.kotlin.android") version "2.1.0" apply false +} + +include(":app") diff --git a/assets/fonts/UberMoveTextBold.otf b/assets/fonts/UberMoveTextBold.otf new file mode 100644 index 0000000..979fbc1 Binary files /dev/null and b/assets/fonts/UberMoveTextBold.otf differ diff --git a/assets/fonts/UberMoveTextLight.otf b/assets/fonts/UberMoveTextLight.otf new file mode 100644 index 0000000..75ca07e Binary files /dev/null and b/assets/fonts/UberMoveTextLight.otf differ diff --git a/assets/fonts/UberMoveTextMedium.otf b/assets/fonts/UberMoveTextMedium.otf new file mode 100644 index 0000000..43bbda8 Binary files /dev/null and b/assets/fonts/UberMoveTextMedium.otf differ diff --git a/assets/fonts/UberMoveTextRegular.otf b/assets/fonts/UberMoveTextRegular.otf new file mode 100644 index 0000000..834b0de Binary files /dev/null and b/assets/fonts/UberMoveTextRegular.otf differ diff --git a/assets/icons/ic_account.svg b/assets/icons/ic_account.svg new file mode 100644 index 0000000..b0d08f7 --- /dev/null +++ b/assets/icons/ic_account.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_account_active.svg b/assets/icons/ic_account_active.svg new file mode 100644 index 0000000..c71af2c --- /dev/null +++ b/assets/icons/ic_account_active.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_allergy_friendly.png b/assets/icons/ic_allergy_friendly.png new file mode 100644 index 0000000..589a281 Binary files /dev/null and b/assets/icons/ic_allergy_friendly.png differ diff --git a/assets/icons/ic_arrow_btm.svg b/assets/icons/ic_arrow_btm.svg new file mode 100644 index 0000000..80e56a9 --- /dev/null +++ b/assets/icons/ic_arrow_btm.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_back.svg b/assets/icons/ic_back.svg new file mode 100644 index 0000000..03ec0db --- /dev/null +++ b/assets/icons/ic_back.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_basket.svg b/assets/icons/ic_basket.svg new file mode 100644 index 0000000..ace7342 --- /dev/null +++ b/assets/icons/ic_basket.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_basket_active.svg b/assets/icons/ic_basket_active.svg new file mode 100644 index 0000000..0f9f559 --- /dev/null +++ b/assets/icons/ic_basket_active.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_best.png b/assets/icons/ic_best.png new file mode 100644 index 0000000..8bcea14 Binary files /dev/null and b/assets/icons/ic_best.png differ diff --git a/assets/icons/ic_browse.svg b/assets/icons/ic_browse.svg new file mode 100644 index 0000000..6206340 --- /dev/null +++ b/assets/icons/ic_browse.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/icons/ic_browse_active.svg b/assets/icons/ic_browse_active.svg new file mode 100644 index 0000000..4f9beea --- /dev/null +++ b/assets/icons/ic_browse_active.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/icons/ic_check.svg b/assets/icons/ic_check.svg new file mode 100644 index 0000000..82387ec --- /dev/null +++ b/assets/icons/ic_check.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_deals.svg b/assets/icons/ic_deals.svg new file mode 100644 index 0000000..a6210fb --- /dev/null +++ b/assets/icons/ic_deals.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_delivery_time.svg b/assets/icons/ic_delivery_time.svg new file mode 100644 index 0000000..fdc8a5b --- /dev/null +++ b/assets/icons/ic_delivery_time.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/assets/icons/ic_dislike.svg b/assets/icons/ic_dislike.svg new file mode 100644 index 0000000..9f571ac --- /dev/null +++ b/assets/icons/ic_dislike.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_eat.svg b/assets/icons/ic_eat.svg new file mode 100644 index 0000000..66c47ee --- /dev/null +++ b/assets/icons/ic_eat.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_edit.svg b/assets/icons/ic_edit.svg new file mode 100644 index 0000000..e4e6747 --- /dev/null +++ b/assets/icons/ic_edit.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_empty_basket.svg b/assets/icons/ic_empty_basket.svg new file mode 100644 index 0000000..4d06763 --- /dev/null +++ b/assets/icons/ic_empty_basket.svg @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/assets/icons/ic_eye.svg b/assets/icons/ic_eye.svg new file mode 100644 index 0000000..9c30879 --- /dev/null +++ b/assets/icons/ic_eye.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/icons/ic_filter.svg b/assets/icons/ic_filter.svg new file mode 100644 index 0000000..6562b91 --- /dev/null +++ b/assets/icons/ic_filter.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/icons/ic_gluten_free.png b/assets/icons/ic_gluten_free.png new file mode 100644 index 0000000..f355f5b Binary files /dev/null and b/assets/icons/ic_gluten_free.png differ diff --git a/assets/icons/ic_home.svg b/assets/icons/ic_home.svg new file mode 100644 index 0000000..25b184d --- /dev/null +++ b/assets/icons/ic_home.svg @@ -0,0 +1,5 @@ + + + diff --git a/assets/icons/ic_home_active.svg b/assets/icons/ic_home_active.svg new file mode 100644 index 0000000..c9fac1a --- /dev/null +++ b/assets/icons/ic_home_active.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_location.svg b/assets/icons/ic_location.svg new file mode 100644 index 0000000..364bb1a --- /dev/null +++ b/assets/icons/ic_location.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_next.svg b/assets/icons/ic_next.svg new file mode 100644 index 0000000..9323e92 --- /dev/null +++ b/assets/icons/ic_next.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_next_grey.svg b/assets/icons/ic_next_grey.svg new file mode 100644 index 0000000..8d523a4 --- /dev/null +++ b/assets/icons/ic_next_grey.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_orders.png b/assets/icons/ic_orders.png new file mode 100644 index 0000000..6878743 Binary files /dev/null and b/assets/icons/ic_orders.png differ diff --git a/assets/icons/ic_oval.svg b/assets/icons/ic_oval.svg new file mode 100644 index 0000000..1c71a06 --- /dev/null +++ b/assets/icons/ic_oval.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_picked.svg b/assets/icons/ic_picked.svg new file mode 100644 index 0000000..714d1a8 --- /dev/null +++ b/assets/icons/ic_picked.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/assets/icons/ic_popular.svg b/assets/icons/ic_popular.svg new file mode 100644 index 0000000..a11c4c7 --- /dev/null +++ b/assets/icons/ic_popular.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_rating.svg b/assets/icons/ic_rating.svg new file mode 100644 index 0000000..9eab005 --- /dev/null +++ b/assets/icons/ic_rating.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_uber.svg b/assets/icons/ic_uber.svg new file mode 100644 index 0000000..cf4720e --- /dev/null +++ b/assets/icons/ic_uber.svg @@ -0,0 +1,3 @@ + + + diff --git a/assets/icons/ic_vegen.png b/assets/icons/ic_vegen.png new file mode 100644 index 0000000..3098f77 Binary files /dev/null and b/assets/icons/ic_vegen.png differ diff --git a/assets/icons/ic_vegetarian.png b/assets/icons/ic_vegetarian.png new file mode 100644 index 0000000..a00aca3 Binary files /dev/null and b/assets/icons/ic_vegetarian.png differ diff --git a/assets/images/img_alcohol.png b/assets/images/img_alcohol.png new file mode 100644 index 0000000..daeb0cc Binary files /dev/null and b/assets/images/img_alcohol.png differ diff --git a/assets/images/img_american.png b/assets/images/img_american.png new file mode 100644 index 0000000..ccf5b81 Binary files /dev/null and b/assets/images/img_american.png differ diff --git a/assets/images/img_asian.png b/assets/images/img_asian.png new file mode 100644 index 0000000..f6d9157 Binary files /dev/null and b/assets/images/img_asian.png differ diff --git a/assets/images/img_burger.png b/assets/images/img_burger.png new file mode 100644 index 0000000..3123511 Binary files /dev/null and b/assets/images/img_burger.png differ diff --git a/assets/images/img_carribean.png b/assets/images/img_carribean.png new file mode 100644 index 0000000..6e9984c Binary files /dev/null and b/assets/images/img_carribean.png differ diff --git a/assets/images/img_chinese.png b/assets/images/img_chinese.png new file mode 100644 index 0000000..f85acf0 Binary files /dev/null and b/assets/images/img_chinese.png differ diff --git a/assets/images/img_convenience.png b/assets/images/img_convenience.png new file mode 100644 index 0000000..e3ef7ad Binary files /dev/null and b/assets/images/img_convenience.png differ diff --git a/assets/images/img_desert.png b/assets/images/img_desert.png new file mode 100644 index 0000000..900f7cc Binary files /dev/null and b/assets/images/img_desert.png differ diff --git a/assets/images/img_fast_food.png b/assets/images/img_fast_food.png new file mode 100644 index 0000000..abae988 Binary files /dev/null and b/assets/images/img_fast_food.png differ diff --git a/assets/images/img_flowers.png b/assets/images/img_flowers.png new file mode 100644 index 0000000..8ea8923 Binary files /dev/null and b/assets/images/img_flowers.png differ diff --git a/assets/images/img_french.png b/assets/images/img_french.png new file mode 100644 index 0000000..3d5d017 Binary files /dev/null and b/assets/images/img_french.png differ diff --git a/assets/images/img_grocery.png b/assets/images/img_grocery.png new file mode 100644 index 0000000..560aa8c Binary files /dev/null and b/assets/images/img_grocery.png differ diff --git a/assets/images/img_halal.png b/assets/images/img_halal.png new file mode 100644 index 0000000..f61bbad Binary files /dev/null and b/assets/images/img_halal.png differ diff --git a/assets/images/img_ice_cream.png b/assets/images/img_ice_cream.png new file mode 100644 index 0000000..5b5e1ea Binary files /dev/null and b/assets/images/img_ice_cream.png differ diff --git a/assets/images/img_indian.png b/assets/images/img_indian.png new file mode 100644 index 0000000..cda49b1 Binary files /dev/null and b/assets/images/img_indian.png differ diff --git a/assets/images/img_pet_supplies.png b/assets/images/img_pet_supplies.png new file mode 100644 index 0000000..4ccd4c8 Binary files /dev/null and b/assets/images/img_pet_supplies.png differ diff --git a/assets/images/img_pick_up.png b/assets/images/img_pick_up.png new file mode 100644 index 0000000..af00009 Binary files /dev/null and b/assets/images/img_pick_up.png differ diff --git a/assets/images/img_retails.png b/assets/images/img_retails.png new file mode 100644 index 0000000..0e92e77 Binary files /dev/null and b/assets/images/img_retails.png differ diff --git a/assets/images/img_ride.png b/assets/images/img_ride.png new file mode 100644 index 0000000..a0f9c38 Binary files /dev/null and b/assets/images/img_ride.png differ diff --git a/assets/images/img_speciality.jpg b/assets/images/img_speciality.jpg new file mode 100644 index 0000000..9c02832 Binary files /dev/null and b/assets/images/img_speciality.jpg differ diff --git a/assets/images/img_takeout.png b/assets/images/img_takeout.png new file mode 100644 index 0000000..0599c6c Binary files /dev/null and b/assets/images/img_takeout.png differ diff --git a/assets/translations/app_en.arb b/assets/translations/app_en.arb new file mode 100644 index 0000000..e8782f2 --- /dev/null +++ b/assets/translations/app_en.arb @@ -0,0 +1,56 @@ +{ + "useYourTAxiAccount":"Use your uber account to get started", + "enterYourMobileNumber":"Enter your mobile number", + "mobileNumber":"Mobile number", + "next":"Next", + "contestToGetCallAndSms":"By proceeding, you consent to get calls, Whatsapp or SMS messages, including by automated means, from uber and its affiliates to the number provided.", + "continueWithGoogle":"Continue with google", + "or":"or", + "welcomeBack":"Welcome back, John", + "pleaseEnterYourPassword":"Please enter your password", + "iHaveForgotPassword":"I've forgotten my password", + "iCantSignIn":"I cant sign in", + "enter4DigitCodeSentYou":"Enter the 4-digit code sent to you at {phone}", + "@enter4DigitCodeSentYou":{ + "placeholders":{ + "phone":{ + "type":"String" + } + } + }, + "iHavenRecievedCode":"I haven’t recieved a code (${time})", + "@iHavenRecievedCode":{ + "placeholders":{ + "time":{ + "type":"String" + } + } + }, + "delivery":"Delivery", + "pickUp":"Pickup", + "dineIn":"Dine-in", + "allCategories": "All categories", + "convenience": "Convenience", + "alcohol": "Alcohol", + "petSupplies": "Pet Supplies", + "flowers": "Flowers", + "grocery": "Grocery", + "american": "American", + "speciality": "Speciality", + "takeout": "Takeout", + "asian": "Asian", + "iceCream": "Ice Cream", + "halal": "Halal", + "retails": "Retails", + "caribbean": "Caribbean", + "indian": "Indian", + "french": "French", + "fastFoods": "Fast Foods", + "burger": "Burger", + "ride": "Ride", + "chinese": "Chinese", + "dessert": "Dessert", + "more":"More" + + +} \ No newline at end of file diff --git a/assets/translations/app_ru.arb b/assets/translations/app_ru.arb new file mode 100644 index 0000000..d358b51 --- /dev/null +++ b/assets/translations/app_ru.arb @@ -0,0 +1,62 @@ +{ + "useYourTAxiAccount": "Используйте свой аккаунт Uber, чтобы начать", + "enterYourMobileNumber": "Введите свой номер телефона", + "mobileNumber": "Номер телефона", + "next": "Далее", + "contestToGetCallAndSms": "Продолжая, вы соглашаетесь получать звонки, сообщения WhatsApp или SMS, включая автоматические, от Uber и его партнеров на указанный номер.", + "continueWithGoogle": "Продолжить через Google", + "or": "или", + "welcomeBack": "С возвращением, {name}", + "@welcomeBack": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "pleaseEnterYourPassword": "Пожалуйста, введите свой пароль", + "iHaveForgotPassword": "Я забыл пароль", + "iCantSignIn": "Не могу войти в систему", + "enter4DigitCodeSentYou": "Введите 4-значный код, отправленный на номер {phone}", + "@enter4DigitCodeSentYou": { + "placeholders": { + "phone": { + "type": "String" + } + } + }, + "iHavenRecievedCode": "Я не получил код (${time})", + "@iHavenRecievedCode": { + "placeholders": { + "time": { + "type": "String" + } + } + }, + "delivery": "Доставка", + "pickUp": "Самовывоз", + "dineIn": "На месте", + "allCategories": "Все категории", + "convenience": "Магазин", + "alcohol": "Алкоголь", + "petSupplies": "Для питомцев", + "flowers": "Цветы", + "grocery": "Продукты", + "american": "Американская", + "speciality": "Особенная", + "takeout": "На вынос", + "asian": "Азиатская", + "iceCream": "Мороженое", + "halal": "Халяль", + "retails": "Розница", + "caribbean": "Карибская", + "indian": "Индийская", + "french": "Французская", + "fastFoods": "Фастфуд", + "burger": "Бургер", + "ride": "Поездка", + "chinese": "Китайская", + "dessert": "Десерт", + "more":"Ещё" + +} diff --git a/assets/translations/app_uz.arb b/assets/translations/app_uz.arb new file mode 100644 index 0000000..027eab4 --- /dev/null +++ b/assets/translations/app_uz.arb @@ -0,0 +1,61 @@ +{ + "useYourTAxiAccount": "Boshlash uchun Uber hisobingizdan foydalaning", + "enterYourMobileNumber": "Telefon raqamingizni kiriting", + "mobileNumber": "Telefon raqami", + "next": "Keyingi", + "contestToGetCallAndSms": "Davom etish orqali siz Uber va uning hamkorlaridan avtomatlashtirilgan qo‘ng‘iroqlar, WhatsApp yoki SMS xabarlarini olishga rozilik bildirasiz.", + "continueWithGoogle": "Google orqali davom etish", + "or": "yoki", + "welcomeBack": "Xush kelibsiz, {name}", + "@welcomeBack": { + "placeholders": { + "name": { + "type": "String" + } + } + }, + "pleaseEnterYourPassword": "Iltimos, parolingizni kiriting", + "iHaveForgotPassword": "Parolimni unutdim", + "iCantSignIn": "Kirishda muammo bor", + "enter4DigitCodeSentYou": "Sizga {phone} raqamiga yuborilgan 4 xonali kodni kiriting", + "@enter4DigitCodeSentYou": { + "placeholders": { + "phone": { + "type": "String" + } + } + }, + "iHavenRecievedCode": "Men hali kodni olmabman (${time})", + "@iHavenRecievedCode": { + "placeholders": { + "time": { + "type": "String" + } + } + }, + "delivery": "Yetkazib berish", + "pickUp": "Olib ketish", + "dineIn": "Joyida", + "allCategories": "Barcha toifalar", + "convenience": "Do‘kon", + "alcohol": "Alkogol", + "petSupplies": "Uy hayvoni uchun", + "flowers": "Gullar", + "grocery": "Bozor", + "american": "Amerika", + "speciality": "Maxsus", + "takeout": "Olib ketish", + "asian": "Osiyo", + "iceCream": "Muzqaymoq", + "halal": "Halol", + "retails": "Do‘konlar", + "caribbean": "Karib", + "indian": "Hind", + "french": "Fransuz", + "fastFoods": "Fast-fud", + "burger": "Burger", + "ride": "Yo‘l", + "chinese": "Xitoy", + "dessert": "Desert", + "more":"Ko'proq" +} diff --git a/devtools_options.yaml b/devtools_options.yaml new file mode 100644 index 0000000..fa0b357 --- /dev/null +++ b/devtools_options.yaml @@ -0,0 +1,3 @@ +description: This file stores settings for Dart & Flutter DevTools. +documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states +extensions: diff --git a/ios/.gitignore b/ios/.gitignore new file mode 100755 index 0000000..7a7f987 --- /dev/null +++ b/ios/.gitignore @@ -0,0 +1,34 @@ +**/dgph +*.mode1v3 +*.mode2v3 +*.moved-aside +*.pbxuser +*.perspectivev3 +**/*sync/ +.sconsign.dblite +.tags* +**/.vagrant/ +**/DerivedData/ +Icon? +**/Pods/ +**/.symlinks/ +profile +xcuserdata +**/.generated/ +Flutter/App.framework +Flutter/Flutter.framework +Flutter/Flutter.podspec +Flutter/Generated.xcconfig +Flutter/ephemeral/ +Flutter/app.flx +Flutter/app.zip +Flutter/flutter_assets/ +Flutter/flutter_export_environment.sh +ServiceDefinitions.json +Runner/GeneratedPluginRegistrant.* + +# Exceptions to above rules. +!default.mode1v3 +!default.mode2v3 +!default.pbxuser +!default.perspectivev3 diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist new file mode 100755 index 0000000..1dc6cf7 --- /dev/null +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + App + CFBundleIdentifier + io.flutter.flutter.app + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + App + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + MinimumOSVersion + 13.0 + + diff --git a/ios/Flutter/Debug.xcconfig b/ios/Flutter/Debug.xcconfig new file mode 100755 index 0000000..ec97fc6 --- /dev/null +++ b/ios/Flutter/Debug.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig" +#include "Generated.xcconfig" diff --git a/ios/Flutter/Release.xcconfig b/ios/Flutter/Release.xcconfig new file mode 100755 index 0000000..c4855bf --- /dev/null +++ b/ios/Flutter/Release.xcconfig @@ -0,0 +1,2 @@ +#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig" +#include "Generated.xcconfig" diff --git a/ios/Podfile b/ios/Podfile new file mode 100755 index 0000000..620e46e --- /dev/null +++ b/ios/Podfile @@ -0,0 +1,43 @@ +# Uncomment this line to define a global platform for your project +# platform :ios, '13.0' + +# CocoaPods analytics sends network stats synchronously affecting flutter build latency. +ENV['COCOAPODS_DISABLE_STATS'] = 'true' + +project 'Runner', { + 'Debug' => :debug, + 'Profile' => :release, + 'Release' => :release, +} + +def flutter_root + generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__) + unless File.exist?(generated_xcode_build_settings_path) + raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first" + end + + File.foreach(generated_xcode_build_settings_path) do |line| + matches = line.match(/FLUTTER_ROOT\=(.*)/) + return matches[1].strip if matches + end + raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get" +end + +require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root) + +flutter_ios_podfile_setup + +target 'Runner' do + use_frameworks! + + flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__)) + target 'RunnerTests' do + inherit! :search_paths + end +end + +post_install do |installer| + installer.pods_project.targets.each do |target| + flutter_additional_ios_build_settings(target) + end +end diff --git a/ios/Podfile.lock b/ios/Podfile.lock new file mode 100644 index 0000000..837cf98 --- /dev/null +++ b/ios/Podfile.lock @@ -0,0 +1,37 @@ +PODS: + - Flutter (1.0.0) + - path_provider_foundation (0.0.1): + - Flutter + - FlutterMacOS + - shared_preferences_foundation (0.0.1): + - Flutter + - FlutterMacOS + - sqflite_darwin (0.0.4): + - Flutter + - FlutterMacOS + +DEPENDENCIES: + - Flutter (from `Flutter`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) + - shared_preferences_foundation (from `.symlinks/plugins/shared_preferences_foundation/darwin`) + - sqflite_darwin (from `.symlinks/plugins/sqflite_darwin/darwin`) + +EXTERNAL SOURCES: + Flutter: + :path: Flutter + path_provider_foundation: + :path: ".symlinks/plugins/path_provider_foundation/darwin" + shared_preferences_foundation: + :path: ".symlinks/plugins/shared_preferences_foundation/darwin" + sqflite_darwin: + :path: ".symlinks/plugins/sqflite_darwin/darwin" + +SPEC CHECKSUMS: + Flutter: cabc95a1d2626b1b06e7179b784ebcf0c0cde467 + path_provider_foundation: 0b743cbb62d8e47eab856f09262bb8c1ddcfe6ba + shared_preferences_foundation: 5086985c1d43c5ba4d5e69a4e8083a389e2909e6 + sqflite_darwin: 5a7236e3b501866c1c9befc6771dfd73ffb8702d + +PODFILE CHECKSUM: 3c63482e143d1b91d2d2560aee9fb04ecc74ac7e + +COCOAPODS: 1.16.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj new file mode 100644 index 0000000..971e1e1 --- /dev/null +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -0,0 +1,731 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 54; + objects = { + +/* Begin PBXBuildFile section */ + 0D549A3C2BF55E9816B11237 /* Pods_Runner.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 26825AE1ED5121A57276DA4B /* Pods_Runner.framework */; }; + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; + A3A749C6DA3FE581E4CDD427 /* Pods_RunnerTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B2120DD933BF0721A71966A /* Pods_RunnerTests.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 97C146E61CF9000F007C117D /* Project object */; + proxyType = 1; + remoteGlobalIDString = 97C146ED1CF9000F007C117D; + remoteInfo = Runner; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 9705A1C41CF9048500538489 /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 26825AE1ED5121A57276DA4B /* Pods_Runner.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_Runner.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 2E7E24E60AFADFCF9F06731F /* Pods-RunnerTests.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.profile.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.profile.xcconfig"; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B2120DD933BF0721A71966A /* Pods_RunnerTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_RunnerTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; + 6CE00853D794CDBF16C046E7 /* Pods-RunnerTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.debug.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.debug.xcconfig"; sourceTree = ""; }; + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; }; + 8075E7BCFC9D4EB04122EA5A /* Pods-RunnerTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RunnerTests.release.xcconfig"; path = "Target Support Files/Pods-RunnerTests/Pods-RunnerTests.release.xcconfig"; sourceTree = ""; }; + 84B6A68A500EE13805A746C6 /* Pods-Runner.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.debug.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"; sourceTree = ""; }; + 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; }; + 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; }; + 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; + 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + AC27D6C24982266F44D9A596 /* Pods-Runner.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.release.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"; sourceTree = ""; }; + CE72955320D724BB54D77A6F /* Pods-Runner.profile.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Runner.profile.xcconfig"; path = "Target Support Files/Pods-Runner/Pods-Runner.profile.xcconfig"; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 4926290A563EF1395C1C21A8 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + A3A749C6DA3FE581E4CDD427 /* Pods_RunnerTests.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EB1CF9000F007C117D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 0D549A3C2BF55E9816B11237 /* Pods_Runner.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 00550C93FB0A36AEBA86FFA1 /* Frameworks */ = { + isa = PBXGroup; + children = ( + 26825AE1ED5121A57276DA4B /* Pods_Runner.framework */, + 3B2120DD933BF0721A71966A /* Pods_RunnerTests.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; + 9740EEB11CF90186004384FC /* Flutter */ = { + isa = PBXGroup; + children = ( + 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */, + 9740EEB21CF90195004384FC /* Debug.xcconfig */, + 7AFA3C8E1D35360C0083082E /* Release.xcconfig */, + 9740EEB31CF90195004384FC /* Generated.xcconfig */, + ); + name = Flutter; + sourceTree = ""; + }; + 97C146E51CF9000F007C117D = { + isa = PBXGroup; + children = ( + 9740EEB11CF90186004384FC /* Flutter */, + 97C146F01CF9000F007C117D /* Runner */, + 97C146EF1CF9000F007C117D /* Products */, + 331C8082294A63A400263BE5 /* RunnerTests */, + F113EF56A93FF5FF56F6AE28 /* Pods */, + 00550C93FB0A36AEBA86FFA1 /* Frameworks */, + ); + sourceTree = ""; + }; + 97C146EF1CF9000F007C117D /* Products */ = { + isa = PBXGroup; + children = ( + 97C146EE1CF9000F007C117D /* Runner.app */, + 331C8081294A63A400263BE5 /* RunnerTests.xctest */, + ); + name = Products; + sourceTree = ""; + }; + 97C146F01CF9000F007C117D /* Runner */ = { + isa = PBXGroup; + children = ( + 97C146FA1CF9000F007C117D /* Main.storyboard */, + 97C146FD1CF9000F007C117D /* Assets.xcassets */, + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */, + 97C147021CF9000F007C117D /* Info.plist */, + 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */, + 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */, + 74858FAE1ED2DC5600515810 /* AppDelegate.swift */, + 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */, + ); + path = Runner; + sourceTree = ""; + }; + F113EF56A93FF5FF56F6AE28 /* Pods */ = { + isa = PBXGroup; + children = ( + 84B6A68A500EE13805A746C6 /* Pods-Runner.debug.xcconfig */, + AC27D6C24982266F44D9A596 /* Pods-Runner.release.xcconfig */, + CE72955320D724BB54D77A6F /* Pods-Runner.profile.xcconfig */, + 6CE00853D794CDBF16C046E7 /* Pods-RunnerTests.debug.xcconfig */, + 8075E7BCFC9D4EB04122EA5A /* Pods-RunnerTests.release.xcconfig */, + 2E7E24E60AFADFCF9F06731F /* Pods-RunnerTests.profile.xcconfig */, + ); + name = Pods; + path = Pods; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 331C8080294A63A400263BE5 /* RunnerTests */ = { + isa = PBXNativeTarget; + buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; + buildPhases = ( + 02ACBDC033ED08F989F9D3BE /* [CP] Check Pods Manifest.lock */, + 331C807D294A63A400263BE5 /* Sources */, + 331C807F294A63A400263BE5 /* Resources */, + 4926290A563EF1395C1C21A8 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 331C8086294A63A400263BE5 /* PBXTargetDependency */, + ); + name = RunnerTests; + productName = RunnerTests; + productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */; + productType = "com.apple.product-type.bundle.unit-test"; + }; + 97C146ED1CF9000F007C117D /* Runner */ = { + isa = PBXNativeTarget; + buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */; + buildPhases = ( + 82205AE9033C2CF8CE6E5365 /* [CP] Check Pods Manifest.lock */, + 9740EEB61CF901F6004384FC /* Run Script */, + 97C146EA1CF9000F007C117D /* Sources */, + 97C146EB1CF9000F007C117D /* Frameworks */, + 97C146EC1CF9000F007C117D /* Resources */, + 9705A1C41CF9048500538489 /* Embed Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, + 593245A504393588B07CA843 /* [CP] Embed Pods Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Runner; + productName = Runner; + productReference = 97C146EE1CF9000F007C117D /* Runner.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 97C146E61CF9000F007C117D /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = YES; + LastUpgradeCheck = 1510; + ORGANIZATIONNAME = ""; + TargetAttributes = { + 331C8080294A63A400263BE5 = { + CreatedOnToolsVersion = 14.0; + TestTargetID = 97C146ED1CF9000F007C117D; + }; + 97C146ED1CF9000F007C117D = { + CreatedOnToolsVersion = 7.3.1; + LastSwiftMigration = 1100; + }; + }; + }; + buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */; + compatibilityVersion = "Xcode 9.3"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 97C146E51CF9000F007C117D; + productRefGroup = 97C146EF1CF9000F007C117D /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 97C146ED1CF9000F007C117D /* Runner */, + 331C8080294A63A400263BE5 /* RunnerTests */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 331C807F294A63A400263BE5 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EC1CF9000F007C117D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */, + 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */, + 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */, + 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXShellScriptBuildPhase section */ + 02ACBDC033ED08F989F9D3BE /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-RunnerTests-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", + ); + name = "Thin Binary"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin"; + }; + 593245A504393588B07CA843 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-input-files.xcfilelist", + ); + name = "[CP] Embed Pods Frameworks"; + outputFileListPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks-${CONFIGURATION}-output-files.xcfilelist", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-Runner/Pods-Runner-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + 82205AE9033C2CF8CE6E5365 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputFileListPaths = ( + ); + inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", + ); + name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); + outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-Runner-checkManifestLockResult.txt", + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; + showEnvVarsInLog = 0; + }; + 9740EEB61CF901F6004384FC /* Run Script */ = { + isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "Run Script"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build"; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 331C807D294A63A400263BE5 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 97C146EA1CF9000F007C117D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */, + 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 331C8086294A63A400263BE5 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 97C146ED1CF9000F007C117D /* Runner */; + targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin PBXVariantGroup section */ + 97C146FA1CF9000F007C117D /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C146FB1CF9000F007C117D /* Base */, + ); + name = Main.storyboard; + sourceTree = ""; + }; + 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 97C147001CF9000F007C117D /* Base */, + ); + name = LaunchScreen.storyboard; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 249021D3217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Profile; + }; + 249021D4217E4FDB00AE95B9 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = KN284MBC8G; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.foodDeliveryClient; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Profile; + }; + 331C8088294A63A400263BE5 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6CE00853D794CDBF16C046E7 /* Pods-RunnerTests.debug.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.foodDeliveryClient.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Debug; + }; + 331C8089294A63A400263BE5 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 8075E7BCFC9D4EB04122EA5A /* Pods-RunnerTests.release.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.foodDeliveryClient.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Release; + }; + 331C808A294A63A400263BE5 /* Profile */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 2E7E24E60AFADFCF9F06731F /* Pods-RunnerTests.profile.xcconfig */; + buildSettings = { + BUNDLE_LOADER = "$(TEST_HOST)"; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + GENERATE_INFOPLIST_FILE = YES; + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.example.foodDeliveryClient.RunnerTests; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_VERSION = 5.0; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; + }; + name = Profile; + }; + 97C147031CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 97C147041CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + SUPPORTED_PLATFORMS = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 97C147061CF9000F007C117D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = KN284MBC8G; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.foodDeliveryClient; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Debug; + }; + 97C147071CF9000F007C117D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + CLANG_ENABLE_MODULES = YES; + CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)"; + DEVELOPMENT_TEAM = KN284MBC8G; + ENABLE_BITCODE = NO; + INFOPLIST_FILE = Runner/Info.plist; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + PRODUCT_BUNDLE_IDENTIFIER = com.example.foodDeliveryClient; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; + SWIFT_VERSION = 5.0; + VERSIONING_SYSTEM = "apple-generic"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 331C8088294A63A400263BE5 /* Debug */, + 331C8089294A63A400263BE5 /* Release */, + 331C808A294A63A400263BE5 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147031CF9000F007C117D /* Debug */, + 97C147041CF9000F007C117D /* Release */, + 249021D3217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 97C147061CF9000F007C117D /* Debug */, + 97C147071CF9000F007C117D /* Release */, + 249021D4217E4FDB00AE95B9 /* Profile */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 97C146E61CF9000F007C117D /* Project object */; +} diff --git a/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100755 index 0000000..919434a --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100755 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100755 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme new file mode 100644 index 0000000..e3773d4 --- /dev/null +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner.xcworkspace/contents.xcworkspacedata b/ios/Runner.xcworkspace/contents.xcworkspacedata new file mode 100755 index 0000000..21a3cc1 --- /dev/null +++ b/ios/Runner.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,10 @@ + + + + + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100755 index 0000000..18d9810 --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings new file mode 100755 index 0000000..f9b0d7c --- /dev/null +++ b/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings @@ -0,0 +1,8 @@ + + + + + PreviewsEnabled + + + diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift new file mode 100755 index 0000000..6266644 --- /dev/null +++ b/ios/Runner/AppDelegate.swift @@ -0,0 +1,13 @@ +import Flutter +import UIKit + +@main +@objc class AppDelegate: FlutterAppDelegate { + override func application( + _ application: UIApplication, + didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]? + ) -> Bool { + GeneratedPluginRegistrant.register(with: self) + return super.application(application, didFinishLaunchingWithOptions: launchOptions) + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100755 index 0000000..d36b1fa --- /dev/null +++ b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,122 @@ +{ + "images" : [ + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "20x20", + "idiom" : "iphone", + "filename" : "Icon-App-20x20@3x.png", + "scale" : "3x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "iphone", + "filename" : "Icon-App-29x29@3x.png", + "scale" : "3x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "iphone", + "filename" : "Icon-App-40x40@3x.png", + "scale" : "3x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@2x.png", + "scale" : "2x" + }, + { + "size" : "60x60", + "idiom" : "iphone", + "filename" : "Icon-App-60x60@3x.png", + "scale" : "3x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@1x.png", + "scale" : "1x" + }, + { + "size" : "20x20", + "idiom" : "ipad", + "filename" : "Icon-App-20x20@2x.png", + "scale" : "2x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@1x.png", + "scale" : "1x" + }, + { + "size" : "29x29", + "idiom" : "ipad", + "filename" : "Icon-App-29x29@2x.png", + "scale" : "2x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@1x.png", + "scale" : "1x" + }, + { + "size" : "40x40", + "idiom" : "ipad", + "filename" : "Icon-App-40x40@2x.png", + "scale" : "2x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@1x.png", + "scale" : "1x" + }, + { + "size" : "76x76", + "idiom" : "ipad", + "filename" : "Icon-App-76x76@2x.png", + "scale" : "2x" + }, + { + "size" : "83.5x83.5", + "idiom" : "ipad", + "filename" : "Icon-App-83.5x83.5@2x.png", + "scale" : "2x" + }, + { + "size" : "1024x1024", + "idiom" : "ios-marketing", + "filename" : "Icon-App-1024x1024@1x.png", + "scale" : "1x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png new file mode 100644 index 0000000..dc9ada4 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png new file mode 100644 index 0000000..7353c41 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png new file mode 100644 index 0000000..6ed2d93 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png new file mode 100644 index 0000000..4cd7b00 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png new file mode 100644 index 0000000..fe73094 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png new file mode 100644 index 0000000..321773c Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png new file mode 100644 index 0000000..797d452 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png new file mode 100644 index 0000000..502f463 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png new file mode 100644 index 0000000..0ec3034 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png new file mode 100644 index 0000000..e9f5fea Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png new file mode 100644 index 0000000..84ac32a Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png new file mode 100644 index 0000000..8953cba Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ diff --git a/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png new file mode 100644 index 0000000..0467bf1 Binary files /dev/null and b/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json new file mode 100755 index 0000000..0bedcf2 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "idiom" : "universal", + "filename" : "LaunchImage.png", + "scale" : "1x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@2x.png", + "scale" : "2x" + }, + { + "idiom" : "universal", + "filename" : "LaunchImage@3x.png", + "scale" : "3x" + } + ], + "info" : { + "version" : 1, + "author" : "xcode" + } +} diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png new file mode 100644 index 0000000..9da19ea Binary files /dev/null and b/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ diff --git a/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md new file mode 100755 index 0000000..89c2725 --- /dev/null +++ b/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md @@ -0,0 +1,5 @@ +# Launch Screen Assets + +You can customize the launch screen with your own desired assets by replacing the image files in this directory. + +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. \ No newline at end of file diff --git a/ios/Runner/Base.lproj/LaunchScreen.storyboard b/ios/Runner/Base.lproj/LaunchScreen.storyboard new file mode 100755 index 0000000..f2e259c --- /dev/null +++ b/ios/Runner/Base.lproj/LaunchScreen.storyboard @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Base.lproj/Main.storyboard b/ios/Runner/Base.lproj/Main.storyboard new file mode 100755 index 0000000..f3c2851 --- /dev/null +++ b/ios/Runner/Base.lproj/Main.storyboard @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/ios/Runner/Info.plist b/ios/Runner/Info.plist new file mode 100644 index 0000000..6c3051c --- /dev/null +++ b/ios/Runner/Info.plist @@ -0,0 +1,49 @@ + + + + + CFBundleDevelopmentRegion + $(DEVELOPMENT_LANGUAGE) + CFBundleDisplayName + Food Delivery Client + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + food_delivery_client + CFBundlePackageType + APPL + CFBundleShortVersionString + $(FLUTTER_BUILD_NAME) + CFBundleSignature + ???? + CFBundleVersion + $(FLUTTER_BUILD_NUMBER) + LSRequiresIPhoneOS + + UILaunchStoryboardName + LaunchScreen + UIMainStoryboardFile + Main + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + UISupportedInterfaceOrientations~ipad + + UIInterfaceOrientationPortrait + UIInterfaceOrientationPortraitUpsideDown + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + CADisableMinimumFrameDurationOnPhone + + UIApplicationSupportsIndirectInputEvents + + + diff --git a/ios/Runner/Runner-Bridging-Header.h b/ios/Runner/Runner-Bridging-Header.h new file mode 100755 index 0000000..308a2a5 --- /dev/null +++ b/ios/Runner/Runner-Bridging-Header.h @@ -0,0 +1 @@ +#import "GeneratedPluginRegistrant.h" diff --git a/ios/RunnerTests/RunnerTests.swift b/ios/RunnerTests/RunnerTests.swift new file mode 100644 index 0000000..86a7c3b --- /dev/null +++ b/ios/RunnerTests/RunnerTests.swift @@ -0,0 +1,12 @@ +import Flutter +import UIKit +import XCTest + +class RunnerTests: XCTestCase { + + func testExample() { + // If you add code to the Runner application, consider adding tests here. + // See https://developer.apple.com/documentation/xctest for more information about using XCTest. + } + +} diff --git a/l10n.yaml b/l10n.yaml new file mode 100644 index 0000000..2b9fac5 --- /dev/null +++ b/l10n.yaml @@ -0,0 +1,4 @@ +arb-dir: assets/translations +template-arb-file: app_en.arb +output-localization-file: app_localizations.dart +output-dir: lib/core/l10n \ No newline at end of file diff --git a/lib/core/constants/app_locale_keys.dart b/lib/core/constants/app_locale_keys.dart new file mode 100644 index 0000000..4e608a0 --- /dev/null +++ b/lib/core/constants/app_locale_keys.dart @@ -0,0 +1,12 @@ +abstract class AppLocaleKeys { + ///Storage keys + static const String language = 'language'; + + static const String fontBold = "fontBold"; + static const String fontMedium = "fontMedium"; + static const String fontRegular = "fontRegular"; + static const String fontLight = "fontLight"; + + static const String imageUrl = + "https://xsznseejebbai1lj.public.blob.vercel-storage.com/homepage/hero/hero-1.webp"; +} diff --git a/lib/core/constants/constants.dart b/lib/core/constants/constants.dart new file mode 100644 index 0000000..876da0a --- /dev/null +++ b/lib/core/constants/constants.dart @@ -0,0 +1,4 @@ +export 'app_locale_keys.dart'; +export 'sizes_consts.dart'; +export 'l10n.dart'; +export 'time_delay_cons.dart'; \ No newline at end of file diff --git a/lib/core/constants/l10n.dart b/lib/core/constants/l10n.dart new file mode 100644 index 0000000..2cccd32 --- /dev/null +++ b/lib/core/constants/l10n.dart @@ -0,0 +1,9 @@ +import 'dart:ui'; + +abstract class L10n { + static List locales = const [ + Locale('en'), + Locale('uz'), + Locale('ru'), + ]; +} diff --git a/lib/core/constants/sizes_consts.dart b/lib/core/constants/sizes_consts.dart new file mode 100644 index 0000000..196599a --- /dev/null +++ b/lib/core/constants/sizes_consts.dart @@ -0,0 +1,803 @@ +abstract class SizesCons { + + static const double size_0 = 0.0; + + static const double size_1 = 1.0; + + static const double size_2 = 2.0; + + static const double size_3 = 3.0; + + static const double size_4 = 4.0; + + static const double size_5 = 5.0; + + static const double size_6 = 6.0; + + static const double size_7 = 7.0; + + static const double size_8 = 8.0; + + static const double size_9 = 9.0; + + static const double size_10 = 10.0; + + static const double size_11 = 11.0; + + static const double size_12 = 12.0; + + static const double size_13 = 13.0; + + static const double size_14 = 14.0; + + static const double size_15 = 15.0; + + static const double size_16 = 16.0; + + static const double size_17 = 17.0; + + static const double size_18 = 18.0; + + static const double size_19 = 19.0; + + static const double size_20 = 20.0; + + static const double size_21 = 21.0; + + static const double size_22 = 22.0; + + static const double size_23 = 23.0; + + static const double size_24 = 24.0; + + static const double size_25 = 25.0; + + static const double size_26 = 26.0; + + static const double size_27 = 27.0; + + static const double size_28 = 28.0; + + static const double size_29 = 29.0; + + static const double size_30 = 30.0; + + static const double size_31 = 31.0; + + static const double size_32 = 32.0; + + static const double size_33 = 33.0; + + static const double size_34 = 34.0; + + static const double size_35 = 35.0; + + static const double size_36 = 36.0; + + static const double size_37 = 37.0; + + static const double size_38 = 38.0; + + static const double size_39 = 39.0; + + static const double size_40 = 40.0; + + static const double size_41 = 41.0; + + static const double size_42 = 42.0; + + static const double size_43 = 43.0; + + static const double size_44 = 44.0; + + static const double size_45 = 45.0; + + static const double size_46 = 46.0; + + static const double size_47 = 47.0; + + static const double size_48 = 48.0; + + static const double size_49 = 49.0; + + static const double size_50 = 50.0; + + static const double size_51 = 51.0; + + static const double size_52 = 52.0; + + static const double size_53 = 53.0; + + static const double size_54 = 54.0; + + static const double size_55 = 55.0; + + static const double size_56 = 56.0; + + static const double size_57 = 57.0; + + static const double size_58 = 58.0; + + static const double size_59 = 59.0; + + static const double size_60 = 60.0; + + static const double size_61 = 61.0; + + static const double size_62 = 62.0; + + static const double size_63 = 63.0; + + static const double size_64 = 64.0; + + static const double size_65 = 65.0; + + static const double size_66 = 66.0; + + static const double size_67 = 67.0; + + static const double size_68 = 68.0; + + static const double size_69 = 69.0; + + static const double size_70 = 70.0; + + static const double size_71 = 71.0; + + static const double size_72 = 72.0; + + static const double size_73 = 73.0; + + static const double size_74 = 74.0; + + static const double size_75 = 75.0; + + static const double size_76 = 76.0; + + static const double size_77 = 77.0; + + static const double size_78 = 78.0; + + static const double size_79 = 79.0; + + static const double size_80 = 80.0; + + static const double size_81 = 81.0; + + static const double size_82 = 82.0; + + static const double size_83 = 83.0; + + static const double size_84 = 84.0; + + static const double size_85 = 85.0; + + static const double size_86 = 86.0; + + static const double size_87 = 87.0; + + static const double size_88 = 88.0; + + static const double size_89 = 89.0; + + static const double size_90 = 90.0; + + static const double size_91 = 91.0; + + static const double size_92 = 92.0; + + static const double size_93 = 93.0; + + static const double size_94 = 94.0; + + static const double size_95 = 95.0; + + static const double size_96 = 96.0; + + static const double size_97 = 97.0; + + static const double size_98 = 98.0; + + static const double size_99 = 99.0; + + static const double size_100 = 100.0; + + static const double size_101 = 101.0; + + static const double size_102 = 102.0; + + static const double size_103 = 103.0; + + static const double size_104 = 104.0; + + static const double size_105 = 105.0; + + static const double size_106 = 106.0; + + static const double size_107 = 107.0; + + static const double size_108 = 108.0; + + static const double size_109 = 109.0; + + static const double size_110 = 110.0; + + static const double size_111 = 111.0; + + static const double size_112 = 112.0; + + static const double size_113 = 113.0; + + static const double size_114 = 114.0; + + static const double size_115 = 115.0; + + static const double size_116 = 116.0; + + static const double size_117 = 117.0; + + static const double size_118 = 118.0; + + static const double size_119 = 119.0; + + static const double size_120 = 120.0; + + static const double size_121 = 121.0; + + static const double size_122 = 122.0; + + static const double size_123 = 123.0; + + static const double size_124 = 124.0; + + static const double size_125 = 125.0; + + static const double size_126 = 126.0; + + static const double size_127 = 127.0; + + static const double size_128 = 128.0; + + static const double size_129 = 129.0; + + static const double size_130 = 130.0; + + static const double size_131 = 131.0; + + static const double size_132 = 132.0; + + static const double size_133 = 133.0; + + static const double size_134 = 134.0; + + static const double size_135 = 135.0; + + static const double size_136 = 136.0; + + static const double size_137 = 137.0; + + static const double size_138 = 138.0; + + static const double size_139 = 139.0; + + static const double size_140 = 140.0; + + static const double size_141 = 141.0; + + static const double size_142 = 142.0; + + static const double size_143 = 143.0; + + static const double size_144 = 144.0; + + static const double size_145 = 145.0; + + static const double size_146 = 146.0; + + static const double size_147 = 147.0; + + static const double size_148 = 148.0; + + static const double size_149 = 149.0; + + static const double size_150 = 150.0; + + static const double size_151 = 151.0; + + static const double size_152 = 152.0; + + static const double size_153 = 153.0; + + static const double size_154 = 154.0; + + static const double size_155 = 155.0; + + static const double size_156 = 156.0; + + static const double size_157 = 157.0; + + static const double size_158 = 158.0; + + static const double size_159 = 159.0; + + static const double size_160 = 160.0; + + static const double size_161 = 161.0; + + static const double size_162 = 162.0; + + static const double size_163 = 163.0; + + static const double size_164 = 164.0; + + static const double size_165 = 165.0; + + static const double size_166 = 166.0; + + static const double size_167 = 167.0; + + static const double size_168 = 168.0; + + static const double size_169 = 169.0; + + static const double size_170 = 170.0; + + static const double size_171 = 171.0; + + static const double size_172 = 172.0; + + static const double size_173 = 173.0; + + static const double size_174 = 174.0; + + static const double size_175 = 175.0; + + static const double size_176 = 176.0; + + static const double size_177 = 177.0; + + static const double size_178 = 178.0; + + static const double size_179 = 179.0; + + static const double size_180 = 180.0; + + static const double size_181 = 181.0; + + static const double size_182 = 182.0; + + static const double size_183 = 183.0; + + static const double size_184 = 184.0; + + static const double size_185 = 185.0; + + static const double size_186 = 186.0; + + static const double size_187 = 187.0; + + static const double size_188 = 188.0; + + static const double size_189 = 189.0; + + static const double size_190 = 190.0; + + static const double size_191 = 191.0; + + static const double size_192 = 192.0; + + static const double size_193 = 193.0; + + static const double size_194 = 194.0; + + static const double size_195 = 195.0; + + static const double size_196 = 196.0; + + static const double size_197 = 197.0; + + static const double size_198 = 198.0; + + static const double size_199 = 199.0; + + static const double size_200 = 200.0; + + static const double size_201 = 201.0; + + static const double size_202 = 202.0; + + static const double size_203 = 203.0; + + static const double size_204 = 204.0; + + static const double size_205 = 205.0; + + static const double size_206 = 206.0; + + static const double size_207 = 207.0; + + static const double size_208 = 208.0; + + static const double size_209 = 209.0; + + static const double size_210 = 210.0; + + static const double size_211 = 211.0; + + static const double size_212 = 212.0; + + static const double size_213 = 213.0; + + static const double size_214 = 214.0; + + static const double size_215 = 215.0; + + static const double size_216 = 216.0; + + static const double size_217 = 217.0; + + static const double size_218 = 218.0; + + static const double size_219 = 219.0; + + static const double size_220 = 220.0; + + static const double size_221 = 221.0; + + static const double size_222 = 222.0; + + static const double size_223 = 223.0; + + static const double size_224 = 224.0; + + static const double size_225 = 225.0; + + static const double size_226 = 226.0; + + static const double size_227 = 227.0; + + static const double size_228 = 228.0; + + static const double size_229 = 229.0; + + static const double size_230 = 230.0; + + static const double size_231 = 231.0; + + static const double size_232 = 232.0; + + static const double size_233 = 233.0; + + static const double size_234 = 234.0; + + static const double size_235 = 235.0; + + static const double size_236 = 236.0; + + static const double size_237 = 237.0; + + static const double size_238 = 238.0; + + static const double size_239 = 239.0; + + static const double size_240 = 240.0; + + static const double size_241 = 241.0; + + static const double size_242 = 242.0; + + static const double size_243 = 243.0; + + static const double size_244 = 244.0; + + static const double size_245 = 245.0; + + static const double size_246 = 246.0; + + static const double size_247 = 247.0; + + static const double size_248 = 248.0; + + static const double size_249 = 249.0; + + static const double size_250 = 250.0; + + static const double size_251 = 251.0; + + static const double size_252 = 252.0; + + static const double size_253 = 253.0; + + static const double size_254 = 254.0; + + static const double size_255 = 255.0; + + static const double size_256 = 256.0; + + static const double size_257 = 257.0; + + static const double size_258 = 258.0; + + static const double size_259 = 259.0; + + static const double size_260 = 260.0; + + static const double size_261 = 261.0; + + static const double size_262 = 262.0; + + static const double size_263 = 263.0; + + static const double size_264 = 264.0; + + static const double size_265 = 265.0; + + static const double size_266 = 266.0; + + static const double size_267 = 267.0; + + static const double size_268 = 268.0; + + static const double size_269 = 269.0; + + static const double size_270 = 270.0; + + static const double size_271 = 271.0; + + static const double size_272 = 272.0; + + static const double size_273 = 273.0; + + static const double size_274 = 274.0; + + static const double size_275 = 275.0; + + static const double size_276 = 276.0; + + static const double size_277 = 277.0; + + static const double size_278 = 278.0; + + static const double size_279 = 279.0; + + static const double size_280 = 280.0; + + static const double size_281 = 281.0; + + static const double size_282 = 282.0; + + static const double size_283 = 283.0; + + static const double size_284 = 284.0; + + static const double size_285 = 285.0; + + static const double size_286 = 286.0; + + static const double size_287 = 287.0; + + static const double size_288 = 288.0; + + static const double size_289 = 289.0; + + static const double size_290 = 290.0; + + static const double size_291 = 291.0; + + static const double size_292 = 292.0; + + static const double size_293 = 293.0; + + static const double size_294 = 294.0; + + static const double size_295 = 295.0; + + static const double size_296 = 296.0; + + static const double size_297 = 297.0; + + static const double size_298 = 298.0; + + static const double size_299 = 299.0; + + static const double size_300 = 300.0; + + static const double size_301 = 301.0; + + static const double size_302 = 302.0; + + static const double size_303 = 303.0; + + static const double size_304 = 304.0; + + static const double size_305 = 305.0; + + static const double size_306 = 306.0; + + static const double size_307 = 307.0; + + static const double size_308 = 308.0; + + static const double size_309 = 309.0; + + static const double size_310 = 310.0; + + static const double size_311 = 311.0; + + static const double size_312 = 312.0; + + static const double size_313 = 313.0; + + static const double size_314 = 314.0; + + static const double size_315 = 315.0; + + static const double size_316 = 316.0; + + static const double size_317 = 317.0; + + static const double size_318 = 318.0; + + static const double size_319 = 319.0; + + static const double size_320 = 320.0; + + static const double size_321 = 321.0; + + static const double size_322 = 322.0; + + static const double size_323 = 323.0; + + static const double size_324 = 324.0; + + static const double size_325 = 325.0; + + static const double size_326 = 326.0; + + static const double size_327 = 327.0; + + static const double size_328 = 328.0; + + static const double size_329 = 329.0; + + static const double size_330 = 330.0; + + static const double size_331 = 331.0; + + static const double size_332 = 332.0; + + static const double size_333 = 333.0; + + static const double size_334 = 334.0; + + static const double size_335 = 335.0; + + static const double size_336 = 336.0; + + static const double size_337 = 337.0; + + static const double size_338 = 338.0; + + static const double size_339 = 339.0; + + static const double size_340 = 340.0; + + static const double size_341 = 341.0; + + static const double size_342 = 342.0; + + static const double size_343 = 343.0; + + static const double size_344 = 344.0; + + static const double size_345 = 345.0; + + static const double size_346 = 346.0; + + static const double size_347 = 347.0; + + static const double size_348 = 348.0; + + static const double size_349 = 349.0; + + static const double size_350 = 350.0; + + static const double size_351 = 351.0; + + static const double size_352 = 352.0; + + static const double size_353 = 353.0; + + static const double size_354 = 354.0; + + static const double size_355 = 355.0; + + static const double size_356 = 356.0; + + static const double size_357 = 357.0; + + static const double size_358 = 358.0; + + static const double size_359 = 359.0; + + static const double size_360 = 360.0; + + static const double size_361 = 361.0; + + static const double size_362 = 362.0; + + static const double size_363 = 363.0; + + static const double size_364 = 364.0; + + static const double size_365 = 365.0; + + static const double size_366 = 366.0; + + static const double size_367 = 367.0; + + static const double size_368 = 368.0; + + static const double size_369 = 369.0; + + static const double size_370 = 370.0; + + static const double size_371 = 371.0; + + static const double size_372 = 372.0; + + static const double size_373 = 373.0; + + static const double size_374 = 374.0; + + static const double size_375 = 375.0; + + static const double size_376 = 376.0; + + static const double size_377 = 377.0; + + static const double size_378 = 378.0; + + static const double size_379 = 379.0; + + static const double size_380 = 380.0; + + static const double size_381 = 381.0; + + static const double size_382 = 382.0; + + static const double size_383 = 383.0; + + static const double size_384 = 384.0; + + static const double size_385 = 385.0; + + static const double size_386 = 386.0; + + static const double size_387 = 387.0; + + static const double size_388 = 388.0; + + static const double size_389 = 389.0; + + static const double size_390 = 390.0; + + static const double size_391 = 391.0; + + static const double size_392 = 392.0; + + static const double size_393 = 393.0; + + static const double size_394 = 394.0; + + static const double size_395 = 395.0; + + static const double size_396 = 396.0; + + static const double size_397 = 397.0; + + static const double size_398 = 398.0; + + static const double size_399 = 399.0; +/**/ +} \ No newline at end of file diff --git a/lib/core/constants/time_delay_cons.dart b/lib/core/constants/time_delay_cons.dart new file mode 100644 index 0000000..a81b840 --- /dev/null +++ b/lib/core/constants/time_delay_cons.dart @@ -0,0 +1,6 @@ +abstract class TimeDelayConst { + static const Duration durationMill300 = Duration(milliseconds: 300); + static const Duration durationMill800 = Duration(milliseconds: 800); + + static const Duration duration3 = Duration(seconds: 3); +} diff --git a/lib/core/core.dart b/lib/core/core.dart new file mode 100644 index 0000000..23b99b1 --- /dev/null +++ b/lib/core/core.dart @@ -0,0 +1,14 @@ +export 'router/routes_name.dart'; +export 'router/app_routes.dart'; +export 'di/injection_container.dart'; +export 'di/injection_container.config.dart'; +export 'constants/constants.dart'; +export 'theme/theme.dart'; +export 'helpers/helpers.dart'; +export 'extensions/extensions.dart'; +export 'l10n/app_localizations.dart'; +export 'l10n/app_localizations_en.dart'; +export 'l10n/app_localizations_ru.dart'; +export 'l10n/app_localizations_uz.dart'; +export 'services/services.dart'; +export 'utils/app_utils.dart'; \ No newline at end of file diff --git a/lib/core/di/injection_container.config.dart b/lib/core/di/injection_container.config.dart new file mode 100644 index 0000000..2dd17c2 --- /dev/null +++ b/lib/core/di/injection_container.config.dart @@ -0,0 +1,44 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// dart format width=80 + +// ************************************************************************** +// InjectableConfigGenerator +// ************************************************************************** + +// ignore_for_file: type=lint +// coverage:ignore-file + +// ignore_for_file: no_leading_underscores_for_library_prefixes +import 'package:get_it/get_it.dart' as _i174; +import 'package:injectable/injectable.dart' as _i526; + +import '../../feature/common/presentation/blocs/language_bloc/language_bloc.dart' + as _i942; +import '../../feature/home/presentation/blocs/home_bloc/home_bloc.dart' + as _i1007; +import '../../feature/main/presentation/blocs/main_bloc/main_bloc.dart' + as _i580; +import '../../feature/on_boarding/presentation/blocs/splash_bloc/splash_bloc.dart' + as _i311; +import '../../food_delivery_client.dart' as _i321; +import '../router/app_routes.dart' as _i152; +import '../services/storage_service.dart' as _i306; + +extension GetItInjectableX on _i174.GetIt { + // initializes the registration of main-scope dependencies inside of GetIt + _i174.GetIt init({ + String? environment, + _i526.EnvironmentFilter? environmentFilter, + }) { + final gh = _i526.GetItHelper(this, environment, environmentFilter); + gh.factory<_i580.MainBloc>(() => _i580.MainBloc()); + gh.factory<_i311.SplashBloc>(() => _i311.SplashBloc()); + gh.factory<_i1007.HomeBloc>(() => _i1007.HomeBloc()); + gh.singleton<_i306.StorageService>(() => _i306.StorageService()); + gh.singleton<_i152.AppRoutes>(() => _i152.AppRoutes()); + gh.factory<_i942.LanguageBloc>( + () => _i942.LanguageBloc(gh<_i321.StorageService>()), + ); + return this; + } +} diff --git a/lib/core/di/injection_container.dart b/lib/core/di/injection_container.dart new file mode 100644 index 0000000..24d8cef --- /dev/null +++ b/lib/core/di/injection_container.dart @@ -0,0 +1,13 @@ +import '../../food_delivery_client.dart'; + +final sl = GetIt.instance; + +@InjectableInit( + initializerName: 'init', // default + preferRelativeImports: true, // default + asExtension: true, // default +) +Future configureDependencies() async { + sl.init(); + await sl().initialize(); +} diff --git a/lib/core/extensions/build_context_extensions.dart b/lib/core/extensions/build_context_extensions.dart new file mode 100644 index 0000000..bd69877 --- /dev/null +++ b/lib/core/extensions/build_context_extensions.dart @@ -0,0 +1,12 @@ +import 'package:flutter/cupertino.dart'; +import 'package:food_delivery_client/core/l10n/app_localizations.dart'; + +extension BuildContextExtensions on BuildContext { + MediaQueryData get mq => MediaQuery.of(this); + + double get w => mq.size.width; + + double get h => mq.size.height; + + AppLocalizations get loc => AppLocalizations.of(this)!; +} diff --git a/lib/core/extensions/color_extensions.dart b/lib/core/extensions/color_extensions.dart new file mode 100644 index 0000000..0c7187d --- /dev/null +++ b/lib/core/extensions/color_extensions.dart @@ -0,0 +1,12 @@ +import '../../food_delivery_client.dart'; + +extension ColorOpacityExtension on Color { + Color newWithOpacity(double amount) { + assert( + amount >= 0.0 && amount <= 1.0, + "Opacity must be between 0.0 and 1.0", + ); + final int alpha = (amount * 255).round(); + return withAlpha(alpha); + } +} \ No newline at end of file diff --git a/lib/core/extensions/extensions.dart b/lib/core/extensions/extensions.dart new file mode 100644 index 0000000..7e7dfe0 --- /dev/null +++ b/lib/core/extensions/extensions.dart @@ -0,0 +1,4 @@ +export 'build_context_extensions.dart'; +export 'padding_extensions.dart'; +export 'color_extensions.dart'; +export 'size_extensions.dart'; \ No newline at end of file diff --git a/lib/core/extensions/padding_extensions.dart b/lib/core/extensions/padding_extensions.dart new file mode 100644 index 0000000..7dd50f3 --- /dev/null +++ b/lib/core/extensions/padding_extensions.dart @@ -0,0 +1,43 @@ + + +import '../../food_delivery_client.dart'; + +extension WidgetPaddingExtension on Widget { + Widget paddingAll(double padding) => Padding( + padding: EdgeInsets.all(padding), + child: this, + ); + + Widget paddingSymmetric({ + double horizontal = 0.0, + double vertical = 0.0, + }) => + Padding( + padding: EdgeInsets.symmetric( + horizontal: horizontal, + vertical: vertical, + ), + child: this, + ); + + Widget paddingOnly({ + double left = 0.0, + double top = 0.0, + double right = 0.0, + double bottom = 0.0, + }) => + Padding( + padding: EdgeInsets.only( + top: top, + left: left, + right: right, + bottom: bottom, + ), + child: this, + ); + + Widget get paddingZero => Padding( + padding: EdgeInsets.zero, + child: this, + ); +} \ No newline at end of file diff --git a/lib/core/extensions/size_extensions.dart b/lib/core/extensions/size_extensions.dart new file mode 100644 index 0000000..d4d5d72 --- /dev/null +++ b/lib/core/extensions/size_extensions.dart @@ -0,0 +1,7 @@ +import 'package:flutter/cupertino.dart'; + +extension SizedBoxExtensions on num { + SizedBox get verticalSpace => SizedBox(height: toDouble()); + + SizedBox get horizontalSpace => SizedBox(width: toDouble()); +} diff --git a/lib/core/helpers/bloc_observer.dart b/lib/core/helpers/bloc_observer.dart new file mode 100644 index 0000000..3d1b7a9 --- /dev/null +++ b/lib/core/helpers/bloc_observer.dart @@ -0,0 +1,28 @@ +import '../../food_delivery_client.dart'; + +class AppBlocObserver extends BlocObserver { + @override + void onEvent(Bloc bloc, Object? event) { + super.onEvent(bloc, event); + log('🟢 Event: ${bloc.runtimeType}, $event'); + } + + @override + void onChange(BlocBase bloc, Change change) { + super.onChange(bloc, change); + log('🟡 Change: ${bloc.runtimeType}, $change'); + } + + @override + void onError(BlocBase bloc, Object error, StackTrace stackTrace) { + log('🔴 Error in ${bloc.runtimeType}: $error'); + log(stackTrace.toString()); + super.onError(bloc, error, stackTrace); + } + + @override + void onTransition(Bloc bloc, Transition transition) { + super.onTransition(bloc, transition); + log('🔵 Transition: ${bloc.runtimeType}, $transition'); + } +} diff --git a/lib/core/helpers/enum_helpers.dart b/lib/core/helpers/enum_helpers.dart new file mode 100644 index 0000000..4c14691 --- /dev/null +++ b/lib/core/helpers/enum_helpers.dart @@ -0,0 +1,20 @@ +enum RequestStatus { + initial, + loading, + loaded, + error, + warning, + loadingMore; + + bool isInitial() => this == RequestStatus.initial; + + bool isLoading() => this == RequestStatus.loading; + + bool isLoaded() => this == RequestStatus.loaded; + + bool isError() => this == RequestStatus.error; + + bool isWarning() => this == RequestStatus.warning; + + bool isLoadingMore() => this == RequestStatus.loadingMore; +} \ No newline at end of file diff --git a/lib/core/helpers/helpers.dart b/lib/core/helpers/helpers.dart new file mode 100644 index 0000000..841453b --- /dev/null +++ b/lib/core/helpers/helpers.dart @@ -0,0 +1,2 @@ +export 'enum_helpers.dart'; +export 'bloc_observer.dart'; \ No newline at end of file diff --git a/lib/core/l10n/app_localizations.dart b/lib/core/l10n/app_localizations.dart new file mode 100644 index 0000000..4262cb9 --- /dev/null +++ b/lib/core/l10n/app_localizations.dart @@ -0,0 +1,366 @@ +import 'dart:async'; + +import 'package:flutter/foundation.dart'; +import 'package:flutter/widgets.dart'; +import 'package:flutter_localizations/flutter_localizations.dart'; +import 'package:intl/intl.dart' as intl; + +import 'app_localizations_en.dart'; +import 'app_localizations_ru.dart'; +import 'app_localizations_uz.dart'; + +// ignore_for_file: type=lint + +/// Callers can lookup localized strings with an instance of AppLocalizations +/// returned by `AppLocalizations.of(context)`. +/// +/// Applications need to include `AppLocalizations.delegate()` in their app's +/// `localizationDelegates` list, and the locales they support in the app's +/// `supportedLocales` list. For example: +/// +/// ```dart +/// import 'l10n/app_localizations.dart'; +/// +/// return MaterialApp( +/// localizationsDelegates: AppLocalizations.localizationsDelegates, +/// supportedLocales: AppLocalizations.supportedLocales, +/// home: MyApplicationHome(), +/// ); +/// ``` +/// +/// ## Update pubspec.yaml +/// +/// Please make sure to update your pubspec.yaml to include the following +/// packages: +/// +/// ```yaml +/// dependencies: +/// # Internationalization support. +/// flutter_localizations: +/// sdk: flutter +/// intl: any # Use the pinned version from flutter_localizations +/// +/// # Rest of dependencies +/// ``` +/// +/// ## iOS Applications +/// +/// iOS applications define key application metadata, including supported +/// locales, in an Info.plist file that is built into the application bundle. +/// To configure the locales supported by your app, you’ll need to edit this +/// file. +/// +/// First, open your project’s ios/Runner.xcworkspace Xcode workspace file. +/// Then, in the Project Navigator, open the Info.plist file under the Runner +/// project’s Runner folder. +/// +/// Next, select the Information Property List item, select Add Item from the +/// Editor menu, then select Localizations from the pop-up menu. +/// +/// Select and expand the newly-created Localizations item then, for each +/// locale your application supports, add a new item and select the locale +/// you wish to add from the pop-up menu in the Value field. This list should +/// be consistent with the languages listed in the AppLocalizations.supportedLocales +/// property. +abstract class AppLocalizations { + AppLocalizations(String locale) + : localeName = intl.Intl.canonicalizedLocale(locale.toString()); + + final String localeName; + + static AppLocalizations? of(BuildContext context) { + return Localizations.of(context, AppLocalizations); + } + + static const LocalizationsDelegate delegate = + _AppLocalizationsDelegate(); + + /// A list of this localizations delegate along with the default localizations + /// delegates. + /// + /// Returns a list of localizations delegates containing this delegate along with + /// GlobalMaterialLocalizations.delegate, GlobalCupertinoLocalizations.delegate, + /// and GlobalWidgetsLocalizations.delegate. + /// + /// Additional delegates can be added by appending to this list in + /// MaterialApp. This list does not have to be used at all if a custom list + /// of delegates is preferred or required. + static const List> localizationsDelegates = + >[ + delegate, + GlobalMaterialLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + ]; + + /// A list of this localizations delegate's supported locales. + static const List supportedLocales = [ + Locale('en'), + Locale('ru'), + Locale('uz'), + ]; + + /// No description provided for @useYourTAxiAccount. + /// + /// In en, this message translates to: + /// **'Use your uber account to get started'** + String get useYourTAxiAccount; + + /// No description provided for @enterYourMobileNumber. + /// + /// In en, this message translates to: + /// **'Enter your mobile number'** + String get enterYourMobileNumber; + + /// No description provided for @mobileNumber. + /// + /// In en, this message translates to: + /// **'Mobile number'** + String get mobileNumber; + + /// No description provided for @next. + /// + /// In en, this message translates to: + /// **'Next'** + String get next; + + /// No description provided for @contestToGetCallAndSms. + /// + /// In en, this message translates to: + /// **'By proceeding, you consent to get calls, Whatsapp or SMS messages, including by automated means, from uber and its affiliates to the number provided.'** + String get contestToGetCallAndSms; + + /// No description provided for @continueWithGoogle. + /// + /// In en, this message translates to: + /// **'Continue with google'** + String get continueWithGoogle; + + /// No description provided for @or. + /// + /// In en, this message translates to: + /// **'or'** + String get or; + + /// No description provided for @welcomeBack. + /// + /// In en, this message translates to: + /// **'Welcome back, John'** + String get welcomeBack; + + /// No description provided for @pleaseEnterYourPassword. + /// + /// In en, this message translates to: + /// **'Please enter your password'** + String get pleaseEnterYourPassword; + + /// No description provided for @iHaveForgotPassword. + /// + /// In en, this message translates to: + /// **'I\'ve forgotten my password'** + String get iHaveForgotPassword; + + /// No description provided for @iCantSignIn. + /// + /// In en, this message translates to: + /// **'I cant sign in'** + String get iCantSignIn; + + /// No description provided for @enter4DigitCodeSentYou. + /// + /// In en, this message translates to: + /// **'Enter the 4-digit code sent to you at {phone}'** + String enter4DigitCodeSentYou(String phone); + + /// No description provided for @iHavenRecievedCode. + /// + /// In en, this message translates to: + /// **'I haven’t recieved a code (\${time})'** + String iHavenRecievedCode(String time); + + /// No description provided for @delivery. + /// + /// In en, this message translates to: + /// **'Delivery'** + String get delivery; + + /// No description provided for @pickUp. + /// + /// In en, this message translates to: + /// **'Pickup'** + String get pickUp; + + /// No description provided for @dineIn. + /// + /// In en, this message translates to: + /// **'Dine-in'** + String get dineIn; + + /// No description provided for @allCategories. + /// + /// In en, this message translates to: + /// **'All categories'** + String get allCategories; + + /// No description provided for @convenience. + /// + /// In en, this message translates to: + /// **'Convenience'** + String get convenience; + + /// No description provided for @alcohol. + /// + /// In en, this message translates to: + /// **'Alcohol'** + String get alcohol; + + /// No description provided for @petSupplies. + /// + /// In en, this message translates to: + /// **'Pet Supplies'** + String get petSupplies; + + /// No description provided for @flowers. + /// + /// In en, this message translates to: + /// **'Flowers'** + String get flowers; + + /// No description provided for @grocery. + /// + /// In en, this message translates to: + /// **'Grocery'** + String get grocery; + + /// No description provided for @american. + /// + /// In en, this message translates to: + /// **'American'** + String get american; + + /// No description provided for @speciality. + /// + /// In en, this message translates to: + /// **'Speciality'** + String get speciality; + + /// No description provided for @takeout. + /// + /// In en, this message translates to: + /// **'Takeout'** + String get takeout; + + /// No description provided for @asian. + /// + /// In en, this message translates to: + /// **'Asian'** + String get asian; + + /// No description provided for @iceCream. + /// + /// In en, this message translates to: + /// **'Ice Cream'** + String get iceCream; + + /// No description provided for @halal. + /// + /// In en, this message translates to: + /// **'Halal'** + String get halal; + + /// No description provided for @retails. + /// + /// In en, this message translates to: + /// **'Retails'** + String get retails; + + /// No description provided for @caribbean. + /// + /// In en, this message translates to: + /// **'Caribbean'** + String get caribbean; + + /// No description provided for @indian. + /// + /// In en, this message translates to: + /// **'Indian'** + String get indian; + + /// No description provided for @french. + /// + /// In en, this message translates to: + /// **'French'** + String get french; + + /// No description provided for @fastFoods. + /// + /// In en, this message translates to: + /// **'Fast Foods'** + String get fastFoods; + + /// No description provided for @burger. + /// + /// In en, this message translates to: + /// **'Burger'** + String get burger; + + /// No description provided for @ride. + /// + /// In en, this message translates to: + /// **'Ride'** + String get ride; + + /// No description provided for @chinese. + /// + /// In en, this message translates to: + /// **'Chinese'** + String get chinese; + + /// No description provided for @dessert. + /// + /// In en, this message translates to: + /// **'Dessert'** + String get dessert; + + /// No description provided for @more. + /// + /// In en, this message translates to: + /// **'More'** + String get more; +} + +class _AppLocalizationsDelegate + extends LocalizationsDelegate { + const _AppLocalizationsDelegate(); + + @override + Future load(Locale locale) { + return SynchronousFuture(lookupAppLocalizations(locale)); + } + + @override + bool isSupported(Locale locale) => + ['en', 'ru', 'uz'].contains(locale.languageCode); + + @override + bool shouldReload(_AppLocalizationsDelegate old) => false; +} + +AppLocalizations lookupAppLocalizations(Locale locale) { + // Lookup logic when only language code is specified. + switch (locale.languageCode) { + case 'en': + return AppLocalizationsEn(); + case 'ru': + return AppLocalizationsRu(); + case 'uz': + return AppLocalizationsUz(); + } + + throw FlutterError( + 'AppLocalizations.delegate failed to load unsupported locale "$locale". This is likely ' + 'an issue with the localizations generation tool. Please file an issue ' + 'on GitHub with a reproducible sample app and the gen-l10n configuration ' + 'that was used.', + ); +} diff --git a/lib/core/l10n/app_localizations_en.dart b/lib/core/l10n/app_localizations_en.dart new file mode 100644 index 0000000..b931f9e --- /dev/null +++ b/lib/core/l10n/app_localizations_en.dart @@ -0,0 +1,129 @@ +// ignore: unused_import +import 'package:intl/intl.dart' as intl; +import 'app_localizations.dart'; + +// ignore_for_file: type=lint + +/// The translations for English (`en`). +class AppLocalizationsEn extends AppLocalizations { + AppLocalizationsEn([String locale = 'en']) : super(locale); + + @override + String get useYourTAxiAccount => 'Use your uber account to get started'; + + @override + String get enterYourMobileNumber => 'Enter your mobile number'; + + @override + String get mobileNumber => 'Mobile number'; + + @override + String get next => 'Next'; + + @override + String get contestToGetCallAndSms => + 'By proceeding, you consent to get calls, Whatsapp or SMS messages, including by automated means, from uber and its affiliates to the number provided.'; + + @override + String get continueWithGoogle => 'Continue with google'; + + @override + String get or => 'or'; + + @override + String get welcomeBack => 'Welcome back, John'; + + @override + String get pleaseEnterYourPassword => 'Please enter your password'; + + @override + String get iHaveForgotPassword => 'I\'ve forgotten my password'; + + @override + String get iCantSignIn => 'I cant sign in'; + + @override + String enter4DigitCodeSentYou(String phone) { + return 'Enter the 4-digit code sent to you at $phone'; + } + + @override + String iHavenRecievedCode(String time) { + return 'I haven’t recieved a code (\$$time)'; + } + + @override + String get delivery => 'Delivery'; + + @override + String get pickUp => 'Pickup'; + + @override + String get dineIn => 'Dine-in'; + + @override + String get allCategories => 'All categories'; + + @override + String get convenience => 'Convenience'; + + @override + String get alcohol => 'Alcohol'; + + @override + String get petSupplies => 'Pet Supplies'; + + @override + String get flowers => 'Flowers'; + + @override + String get grocery => 'Grocery'; + + @override + String get american => 'American'; + + @override + String get speciality => 'Speciality'; + + @override + String get takeout => 'Takeout'; + + @override + String get asian => 'Asian'; + + @override + String get iceCream => 'Ice Cream'; + + @override + String get halal => 'Halal'; + + @override + String get retails => 'Retails'; + + @override + String get caribbean => 'Caribbean'; + + @override + String get indian => 'Indian'; + + @override + String get french => 'French'; + + @override + String get fastFoods => 'Fast Foods'; + + @override + String get burger => 'Burger'; + + @override + String get ride => 'Ride'; + + @override + String get chinese => 'Chinese'; + + @override + String get dessert => 'Dessert'; + + @override + String get more => 'More'; +} diff --git a/lib/core/l10n/app_localizations_ru.dart b/lib/core/l10n/app_localizations_ru.dart new file mode 100644 index 0000000..3798ca9 --- /dev/null +++ b/lib/core/l10n/app_localizations_ru.dart @@ -0,0 +1,130 @@ +// ignore: unused_import +import 'package:intl/intl.dart' as intl; +import 'app_localizations.dart'; + +// ignore_for_file: type=lint + +/// The translations for Russian (`ru`). +class AppLocalizationsRu extends AppLocalizations { + AppLocalizationsRu([String locale = 'ru']) : super(locale); + + @override + String get useYourTAxiAccount => + 'Используйте свой аккаунт Uber, чтобы начать'; + + @override + String get enterYourMobileNumber => 'Введите свой номер телефона'; + + @override + String get mobileNumber => 'Номер телефона'; + + @override + String get next => 'Далее'; + + @override + String get contestToGetCallAndSms => + 'Продолжая, вы соглашаетесь получать звонки, сообщения WhatsApp или SMS, включая автоматические, от Uber и его партнеров на указанный номер.'; + + @override + String get continueWithGoogle => 'Продолжить через Google'; + + @override + String get or => 'или'; + + @override + String get welcomeBack => 'С возвращением, null'; + + @override + String get pleaseEnterYourPassword => 'Пожалуйста, введите свой пароль'; + + @override + String get iHaveForgotPassword => 'Я забыл пароль'; + + @override + String get iCantSignIn => 'Не могу войти в систему'; + + @override + String enter4DigitCodeSentYou(String phone) { + return 'Введите 4-значный код, отправленный на номер $phone'; + } + + @override + String iHavenRecievedCode(String time) { + return 'Я не получил код (\$$time)'; + } + + @override + String get delivery => 'Доставка'; + + @override + String get pickUp => 'Самовывоз'; + + @override + String get dineIn => 'На месте'; + + @override + String get allCategories => 'Все категории'; + + @override + String get convenience => 'Магазин'; + + @override + String get alcohol => 'Алкоголь'; + + @override + String get petSupplies => 'Для питомцев'; + + @override + String get flowers => 'Цветы'; + + @override + String get grocery => 'Продукты'; + + @override + String get american => 'Американская'; + + @override + String get speciality => 'Особенная'; + + @override + String get takeout => 'На вынос'; + + @override + String get asian => 'Азиатская'; + + @override + String get iceCream => 'Мороженое'; + + @override + String get halal => 'Халяль'; + + @override + String get retails => 'Розница'; + + @override + String get caribbean => 'Карибская'; + + @override + String get indian => 'Индийская'; + + @override + String get french => 'Французская'; + + @override + String get fastFoods => 'Фастфуд'; + + @override + String get burger => 'Бургер'; + + @override + String get ride => 'Поездка'; + + @override + String get chinese => 'Китайская'; + + @override + String get dessert => 'Десерт'; + + @override + String get more => 'Ещё'; +} diff --git a/lib/core/l10n/app_localizations_uz.dart b/lib/core/l10n/app_localizations_uz.dart new file mode 100644 index 0000000..4f53b63 --- /dev/null +++ b/lib/core/l10n/app_localizations_uz.dart @@ -0,0 +1,130 @@ +// ignore: unused_import +import 'package:intl/intl.dart' as intl; +import 'app_localizations.dart'; + +// ignore_for_file: type=lint + +/// The translations for Uzbek (`uz`). +class AppLocalizationsUz extends AppLocalizations { + AppLocalizationsUz([String locale = 'uz']) : super(locale); + + @override + String get useYourTAxiAccount => + 'Boshlash uchun Uber hisobingizdan foydalaning'; + + @override + String get enterYourMobileNumber => 'Telefon raqamingizni kiriting'; + + @override + String get mobileNumber => 'Telefon raqami'; + + @override + String get next => 'Keyingi'; + + @override + String get contestToGetCallAndSms => + 'Davom etish orqali siz Uber va uning hamkorlaridan avtomatlashtirilgan qo‘ng‘iroqlar, WhatsApp yoki SMS xabarlarini olishga rozilik bildirasiz.'; + + @override + String get continueWithGoogle => 'Google orqali davom etish'; + + @override + String get or => 'yoki'; + + @override + String get welcomeBack => 'Xush kelibsiz, null'; + + @override + String get pleaseEnterYourPassword => 'Iltimos, parolingizni kiriting'; + + @override + String get iHaveForgotPassword => 'Parolimni unutdim'; + + @override + String get iCantSignIn => 'Kirishda muammo bor'; + + @override + String enter4DigitCodeSentYou(String phone) { + return 'Sizga $phone raqamiga yuborilgan 4 xonali kodni kiriting'; + } + + @override + String iHavenRecievedCode(String time) { + return 'Men hali kodni olmabman (\$$time)'; + } + + @override + String get delivery => 'Yetkazib berish'; + + @override + String get pickUp => 'Olib ketish'; + + @override + String get dineIn => 'Joyida'; + + @override + String get allCategories => 'Barcha toifalar'; + + @override + String get convenience => 'Do‘kon'; + + @override + String get alcohol => 'Alkogol'; + + @override + String get petSupplies => 'Uy hayvoni uchun'; + + @override + String get flowers => 'Gullar'; + + @override + String get grocery => 'Bozor'; + + @override + String get american => 'Amerika'; + + @override + String get speciality => 'Maxsus'; + + @override + String get takeout => 'Olib ketish'; + + @override + String get asian => 'Osiyo'; + + @override + String get iceCream => 'Muzqaymoq'; + + @override + String get halal => 'Halol'; + + @override + String get retails => 'Do‘konlar'; + + @override + String get caribbean => 'Karib'; + + @override + String get indian => 'Hind'; + + @override + String get french => 'Fransuz'; + + @override + String get fastFoods => 'Fast-fud'; + + @override + String get burger => 'Burger'; + + @override + String get ride => 'Yo‘l'; + + @override + String get chinese => 'Xitoy'; + + @override + String get dessert => 'Desert'; + + @override + String get more => 'Ko\'proq'; +} diff --git a/lib/core/router/app_routes.dart b/lib/core/router/app_routes.dart new file mode 100644 index 0000000..27faa14 --- /dev/null +++ b/lib/core/router/app_routes.dart @@ -0,0 +1,27 @@ +import 'package:flutter/cupertino.dart'; +import 'package:food_delivery_client/feature/home/presentation/pages/categories_page/categories_page.dart'; +import 'package:food_delivery_client/feature/on_boarding/presentation/pages/splash_page/splash_page.dart'; + +import '../../food_delivery_client.dart'; + +final GlobalKey navigatorKey = GlobalKey(); + +@singleton +class AppRoutes { + final GoRouter router = GoRouter( + navigatorKey: navigatorKey, + initialLocation: Routes.splash, + + routes: [ + GoRoute(path: Routes.splash, builder: (context, state) => SplashPage()), + GoRoute( + path: Routes.main, + pageBuilder: (context, state) => CupertinoPage(child: MainPage()), + ), + GoRoute( + path: Routes.categories, + pageBuilder: (context, state) => CupertinoPage(child: CategoriesPage()), + ), + ], + ); +} diff --git a/lib/core/router/routes_name.dart b/lib/core/router/routes_name.dart new file mode 100644 index 0000000..46c0f2d --- /dev/null +++ b/lib/core/router/routes_name.dart @@ -0,0 +1,8 @@ +abstract class Routes { + static const String splash = '/splash'; + static const String login = '/login'; + static const String register = '/register'; + static const String main = '/main'; + static const String categories = '/categories'; + +} diff --git a/lib/core/services/services.dart b/lib/core/services/services.dart new file mode 100644 index 0000000..8650db9 --- /dev/null +++ b/lib/core/services/services.dart @@ -0,0 +1 @@ +export 'storage_service.dart'; \ No newline at end of file diff --git a/lib/core/services/storage_service.dart b/lib/core/services/storage_service.dart new file mode 100644 index 0000000..6df56ae --- /dev/null +++ b/lib/core/services/storage_service.dart @@ -0,0 +1,32 @@ +import 'package:food_delivery_client/food_delivery_client.dart'; + +@singleton +class StorageService { + static late SharedPreferences _sharedPreference; + + Future initialize() async { + _sharedPreference = await SharedPreferences.getInstance(); + } + + void setString({required String key, required String value}) { + _sharedPreference.setString(key, value); + } + + String? getString({required String key}) { + return _sharedPreference.getString(key); + } +} + +/* +static StorageService? _instance; + + const StorageService._(); + + static Future initialize() async { + if (_instance == null) { + _sharedPreference = await SharedPreferences.getInstance(); + _instance = StorageService._(); + } + return _instance!; + } + */ diff --git a/lib/core/theme/app_colors.dart b/lib/core/theme/app_colors.dart new file mode 100644 index 0000000..0774c90 --- /dev/null +++ b/lib/core/theme/app_colors.dart @@ -0,0 +1,23 @@ +import '../../food_delivery_client.dart'; + +abstract class AppColors { + static const Color cTransparent = Colors.transparent; + static const Color cRed = Colors.red; + + static const Color cFFFFFF = Color(0xFFFFFFFF); + static const Color c000000 = Color(0xFF000000); + static const Color cB5B5B5 = Color(0xFFB5B5B5); + static const Color c142328 = Color(0xFF142328); + static const Color cE6E6E6 = Color(0xFFE6E6E6); + static const Color cF6F6F6 = Color(0xFFF6F6F6); + static const Color cEEEEEE = Color(0xFFEEEEEE); + static const Color c6B6B6B = Color(0xFF6B6B6B); + static const Color c34A853 = Color(0xFF34A853); + static const Color cD2D7F0 = Color(0xFFD2D7F0); + static const Color c9EE2B8 = Color(0xFF9EE2B8); + static const Color cE2CC9E = Color(0xFFE2CC9E); + static const Color cC99EE2 = Color(0xFFC99EE2); + static const Color cE29EC7 = Color(0xFFE29EC7); + static const Color c545454 = Color(0xFF545454); + +} diff --git a/lib/core/theme/app_icons.dart b/lib/core/theme/app_icons.dart new file mode 100644 index 0000000..9b53a26 --- /dev/null +++ b/lib/core/theme/app_icons.dart @@ -0,0 +1,27 @@ +abstract class AppIcons { + //baseurl + static const String baseUrl = 'assets/icons'; + + //icons + static const String icHome = "$baseUrl/ic_home.svg"; + static const String icBrowse = "$baseUrl/ic_browse.svg"; + static const String icBasket = "$baseUrl/ic_basket.svg"; + static const String icAccount = "$baseUrl/ic_account.svg"; + static const String icHomeActive = "$baseUrl/ic_home_active.svg"; + static const String icBrowseActive = "$baseUrl/ic_browse_active.svg"; + static const String icBasketActive = "$baseUrl/ic_basket_active.svg"; + static const String icAccountActive = "$baseUrl/ic_account_active.svg"; + static const String icBack = "$baseUrl/ic_back.svg"; + static const String icDislike = "$baseUrl/ic_dislike.svg"; + static const String icEat = "$baseUrl/ic_eat.svg"; + static const String icEye = "$baseUrl/ic_eye.svg"; + static const String icFilter = "$baseUrl/ic_filter.svg"; + static const String icNext = "$baseUrl/ic_next.svg"; + static const String icNextGrey = "$baseUrl/ic_next_grey.svg"; + static const String icOval = "$baseUrl/ic_oval.svg"; + static const String icUber = "$baseUrl/ic_uber.svg"; + static const String icLocation = "$baseUrl/ic_location.svg"; + static const String icArrowBottom = "$baseUrl/ic_arrow_btm.svg"; + + ///.png icons +} diff --git a/lib/core/theme/app_images.dart b/lib/core/theme/app_images.dart new file mode 100644 index 0000000..4fe7cbd --- /dev/null +++ b/lib/core/theme/app_images.dart @@ -0,0 +1,27 @@ +abstract class AppImages { + static const String baseUrl = "assets/images"; + + static const String imgConvenience = "$baseUrl/img_convenience.png"; + static const String imgAlcohol = "$baseUrl/img_alcohol.png"; + static const String imgPetSupplies = "$baseUrl/img_pet_supplies.png"; + static const String imgFlowers = "$baseUrl/img_flowers.png"; + static const String imgGrocery = "$baseUrl/img_grocery.png"; + static const String imgAmerican = "$baseUrl/img_american.png"; + static const String imgSpeciality = "$baseUrl/img_speciality.jpg"; + static const String imgTakeout = "$baseUrl/img_takeout.png"; + static const String imgAsian = "$baseUrl/img_asian.png"; + static const String imgIceCream = "$baseUrl/img_ice_cream.png"; + static const String imgHalal= "$baseUrl/img_halal.png"; + static const String imgRetails= "$baseUrl/img_retails.png"; + static const String imgCarribean= "$baseUrl/img_carribean.png"; + static const String imgIndian= "$baseUrl/img_indian.png"; + static const String imgFrench = "$baseUrl/img_french.png"; + static const String imgFastFoods = "$baseUrl/img_fast_food.png"; + static const String imgBurger = "$baseUrl/img_burger.png"; + static const String imgRide = "$baseUrl/img_ride.png"; + static const String imgChinese= "$baseUrl/img_chinese.png"; + static const String imgDesert = "$baseUrl/img_desert.png"; + static const String imgPickUp= "$baseUrl/img_pick_up.png"; + + +} diff --git a/lib/core/theme/app_textstyles.dart b/lib/core/theme/app_textstyles.dart new file mode 100644 index 0000000..7eaa8a5 --- /dev/null +++ b/lib/core/theme/app_textstyles.dart @@ -0,0 +1,87 @@ +import '../../food_delivery_client.dart'; + +abstract class AppTextStyles { + static const Color _defaultColor = AppColors.c000000; + static const String _fontRegular = AppLocaleKeys.fontRegular; + static const String _fontMedium = AppLocaleKeys.fontMedium; + static const String _fontBold = AppLocaleKeys.fontBold; + static const String _fontLight = AppLocaleKeys.fontLight; + + static const TextStyle size10Regular = TextStyle( + color: _defaultColor, + fontSize: SizesCons.size_10, + fontFamily: _fontRegular, + fontWeight: FontWeight.w400, + ); + + static const TextStyle size12Regular = TextStyle( + color: _defaultColor, + fontSize: SizesCons.size_12, + fontFamily: _fontRegular, + fontWeight: FontWeight.w400, + ); + + static const TextStyle size14Regular = TextStyle( + color: _defaultColor, + fontSize: SizesCons.size_14, + fontFamily: _fontRegular, + fontWeight: FontWeight.w400, + ); + + static const TextStyle size20Regular = TextStyle( + color: _defaultColor, + fontSize: SizesCons.size_20, + fontFamily: _fontRegular, + fontWeight: FontWeight.w400, + ); + + static const TextStyle size14Medium = TextStyle( + color: _defaultColor, + fontSize: SizesCons.size_14, + fontFamily: _fontMedium, + fontWeight: FontWeight.w500, + ); + + static const TextStyle size15Medium = TextStyle( + color: _defaultColor, + fontSize: SizesCons.size_15, + fontFamily: _fontMedium, + fontWeight: FontWeight.w500, + ); + + static const TextStyle size16Medium = TextStyle( + color: _defaultColor, + fontSize: SizesCons.size_16, + fontFamily: _fontMedium, + fontWeight: FontWeight.w500, + ); + + static const TextStyle size18Medium = TextStyle( + color: _defaultColor, + fontSize: SizesCons.size_18, + fontFamily: _fontMedium, + fontWeight: FontWeight.w500, + ); + + static const TextStyle size17Bold = TextStyle( + color: _defaultColor, + fontSize: SizesCons.size_17, + fontFamily: _fontBold, + fontWeight: FontWeight.w700, + ); + + static const TextStyle size24Bold = TextStyle( + color: _defaultColor, + fontSize: SizesCons.size_24, + fontFamily: _fontBold, + fontWeight: FontWeight.w700, + ); +} + +/* +TextStyle( + color: _defaultColor, + fontSize: SizesCons.size_10, + fontFamily: _fontRegular, + ); + */ diff --git a/lib/core/theme/app_theme.dart b/lib/core/theme/app_theme.dart new file mode 100644 index 0000000..b51a9fa --- /dev/null +++ b/lib/core/theme/app_theme.dart @@ -0,0 +1,64 @@ +import '../../food_delivery_client.dart'; + +abstract class AppTheme { + static ThemeData get lightTheme => ThemeData.light().copyWith( + brightness: Brightness.light, + appBarTheme: AppBarTheme( + elevation: 0, + backgroundColor: AppColors.cFFFFFF, + foregroundColor: AppColors.cFFFFFF, + surfaceTintColor: AppColors.cTransparent, + ), + scaffoldBackgroundColor: AppColors.cFFFFFF, + bottomNavigationBarTheme: BottomNavigationBarThemeData( + elevation:0, + showSelectedLabels: true, + showUnselectedLabels: true, + backgroundColor: AppColors.cFFFFFF, + type: BottomNavigationBarType.fixed, + unselectedItemColor: AppColors.cB5B5B5, + selectedItemColor:AppColors.c000000, + selectedLabelStyle: AppTextStyles.size10Regular.copyWith( + color: Colors.red, + ), + unselectedLabelStyle: AppTextStyles.size10Regular.copyWith( + color: AppColors.c000000, + ), + // unselectedLabelStyle: AppTextStyles.size14Medium.copyWith( + // color: AppColors.c888888, + // fontFamily: "fontNorms", + // ), + ), + // inputDecorationTheme: InputDecorationTheme( + // filled: true, + // fillColor: AppColors.cMainBg, + // hintStyle: AppTextStyles.size15Medium.copyWith(color: AppColors.c888888), + // contentPadding: EdgeInsets.symmetric(horizontal: 16.w, vertical: 10.h), + // errorStyle: AppTextStyles.size12Medium.copyWith(color: AppColors.cRed), + // errorBorder: OutlineInputBorder( + // borderRadius: BorderRadius.circular(12.sp), + // borderSide: BorderSide(color: AppColors.cRed, width: 1.5.r), + // ), + // focusedBorder: OutlineInputBorder( + // borderRadius: BorderRadius.circular(12.sp), + // borderSide: BorderSide(color: AppColors.cFF9914, width: 1.5.r), + // ), + // enabledBorder: OutlineInputBorder( + // borderRadius: BorderRadius.circular(12.sp), + // borderSide: BorderSide(color: AppColors.cEDEDED, width: 1.5.r), + // ), + // focusedErrorBorder: OutlineInputBorder( + // borderRadius: BorderRadius.circular(12.sp), + // borderSide: BorderSide(color: AppColors.cRed, width: 1.5.r), + // ), + // disabledBorder: OutlineInputBorder( + // borderRadius: BorderRadius.circular(12.sp), + // borderSide: BorderSide(color: AppColors.cEDEDED, width: 1.5.r), + // ), + // border: OutlineInputBorder( + // borderRadius: BorderRadius.circular(12.sp), + // borderSide: BorderSide(color: AppColors.cEDEDED, width: 1.5.r), + // ), + // ), + ); +} diff --git a/lib/core/theme/theme.dart b/lib/core/theme/theme.dart new file mode 100644 index 0000000..bdffd6d --- /dev/null +++ b/lib/core/theme/theme.dart @@ -0,0 +1,5 @@ +export 'app_icons.dart'; +export 'app_images.dart'; +export 'app_textstyles.dart'; +export 'app_theme.dart'; +export 'app_colors.dart'; \ No newline at end of file diff --git a/lib/core/utils/app_utils.dart b/lib/core/utils/app_utils.dart new file mode 100644 index 0000000..773c076 --- /dev/null +++ b/lib/core/utils/app_utils.dart @@ -0,0 +1,90 @@ +import '../../food_delivery_client.dart'; + +abstract class AppUtils { + static const Radius kRadius = Radius.zero; + static const Radius kRadius8 = Radius.circular(8); + static const Radius kRadius12 = Radius.circular(12); + static const Radius kRadius14 = Radius.circular(14); + static const Radius kRadius15 = Radius.circular(15); + static const Radius kRadius16 = Radius.circular(16); + static const Radius kRadius20 = Radius.circular(20); + static const Radius kRadius22 = Radius.circular(22); + static const Radius kRadius24 = Radius.circular(24); + static const Radius kRadius25 = Radius.circular(25); + static const BorderRadius kBorderRadius = BorderRadius.zero; + static const BorderRadius kBorderRadius2 = BorderRadius.all( + Radius.circular(2), + ); + static const BorderRadius kBorderRadius4 = BorderRadius.all( + Radius.circular(4), + ); + static const BorderRadius kBorderRadius6 = BorderRadius.all( + Radius.circular(6), + ); + static const BorderRadius kBorderRadius8 = BorderRadius.all( + Radius.circular(8), + ); + static const BorderRadius kBorderRadius9 = BorderRadius.all( + Radius.circular(9), + ); + static const BorderRadius kBorderRadius10 = BorderRadius.all( + Radius.circular(10), + ); + static const BorderRadius kBorderRadius12 = BorderRadius.all( + Radius.circular(12), + ); + static const BorderRadius kBorderRadius14 = BorderRadius.all( + Radius.circular(14), + ); + static const BorderRadius kBorderRadius16 = BorderRadius.all( + Radius.circular(16), + ); + static const BorderRadius kBorderRadius18 = BorderRadius.all( + Radius.circular(18), + ); + static const BorderRadius kBorderRadius20 = BorderRadius.all( + Radius.circular(20), + ); + static const BorderRadius kBorderRadius22 = BorderRadius.all( + Radius.circular(22), + ); + static const BorderRadius kBorderRadius24 = BorderRadius.all( + Radius.circular(24), + ); + + static const BorderRadius kBorderRadius25 = BorderRadius.all( + Radius.circular(25), + ); + static const BorderRadius kBorderRadius26 = BorderRadius.all( + Radius.circular(26), + ); + static const BorderRadius kBorderRadius28 = BorderRadius.all( + Radius.circular(28), + ); + static const BorderRadius kBorderRadius30 = BorderRadius.all( + Radius.circular(30), + ); + static const BorderRadius kBorderRadius32 = BorderRadius.all( + Radius.circular(32), + ); + static const BorderRadius kBorderRadius34 = BorderRadius.all( + Radius.circular(34), + ); + static const BorderRadius kBorderRadius36 = BorderRadius.all( + Radius.circular(36), + ); + static const BorderRadius kBorderRadius38 = BorderRadius.all( + Radius.circular(38), + ); + static const BorderRadius kBorderRadius40 = BorderRadius.all( + Radius.circular(40), + ); + static const BorderRadius kBorderRadiusTop20Bottom20 = BorderRadius.only( + bottomRight: kRadius20, + topRight: kRadius20, + ); + static const BorderRadius kBorderRadiusTop15Bottom15 = BorderRadius.only( + bottomRight: kRadius15, + topRight: kRadius15, + ); +} diff --git a/lib/feature/account/account.dart b/lib/feature/account/account.dart new file mode 100644 index 0000000..704a6f0 --- /dev/null +++ b/lib/feature/account/account.dart @@ -0,0 +1 @@ +export 'presentation/pages/account_page/account_page.dart'; diff --git a/lib/feature/account/presentation/pages/account_page/account_page.dart b/lib/feature/account/presentation/pages/account_page/account_page.dart new file mode 100644 index 0000000..55f6449 --- /dev/null +++ b/lib/feature/account/presentation/pages/account_page/account_page.dart @@ -0,0 +1,42 @@ +import '../../../../../food_delivery_client.dart'; + +class AccountPage extends StatelessWidget { + const AccountPage({super.key}); + + @override + Widget build(BuildContext context) { + return BlocBuilder( + builder: (context, state) { + return WLayout( + child: Scaffold( + body: Center( + child: Column( + children: [ + Text(context.loc.iCantSignIn), + TextButton( + onPressed: () { + if (state.currentLocale == Locale("uz")) { + context.read().add( + LanguageEvent.changed(Locale('ru')), + ); + } else if (state.currentLocale == Locale("ru")) { + context.read().add( + LanguageEvent.changed(Locale('en')), + ); + } else { + context.read().add( + LanguageEvent.changed(Locale('uz')), + ); + } + }, + child: Text("changelang"), + ), + ], + ), + ), + ), + ); + }, + ); + } +} diff --git a/lib/feature/basket/basket.dart b/lib/feature/basket/basket.dart new file mode 100644 index 0000000..559d8b5 --- /dev/null +++ b/lib/feature/basket/basket.dart @@ -0,0 +1 @@ +export 'presentation/pages/basket_page/basket_page.dart'; \ No newline at end of file diff --git a/lib/feature/basket/presentation/pages/basket_page/basket_page.dart b/lib/feature/basket/presentation/pages/basket_page/basket_page.dart new file mode 100644 index 0000000..1cbaca7 --- /dev/null +++ b/lib/feature/basket/presentation/pages/basket_page/basket_page.dart @@ -0,0 +1,12 @@ +import '../../../../../food_delivery_client.dart'; + +class BasketPage extends StatelessWidget { + const BasketPage({super.key}); + + @override + Widget build(BuildContext context) { + return WLayout( + child: Scaffold(body: Center(child: Text(context.loc.useYourTAxiAccount))), + ); + } +} diff --git a/lib/feature/browse/browse.dart b/lib/feature/browse/browse.dart new file mode 100644 index 0000000..f4d8b77 --- /dev/null +++ b/lib/feature/browse/browse.dart @@ -0,0 +1 @@ +export 'presentation/pages/browse_page/browse_page.dart'; diff --git a/lib/feature/browse/presentation/pages/browse_page/browse_page.dart b/lib/feature/browse/presentation/pages/browse_page/browse_page.dart new file mode 100644 index 0000000..5ac8dcb --- /dev/null +++ b/lib/feature/browse/presentation/pages/browse_page/browse_page.dart @@ -0,0 +1,12 @@ +import '../../../../../food_delivery_client.dart'; + +class BrowsePage extends StatelessWidget { + const BrowsePage({super.key}); + + @override + Widget build(BuildContext context) { + return WLayout( + child: Scaffold(body: Center(child: Text(context.loc.mobileNumber))), + ); + } +} diff --git a/lib/feature/common/common.dart b/lib/feature/common/common.dart new file mode 100644 index 0000000..e024ca3 --- /dev/null +++ b/lib/feature/common/common.dart @@ -0,0 +1,2 @@ +export 'presentation/widgets/widgets.dart'; +export 'presentation/blocs/language_bloc/language_bloc.dart'; \ No newline at end of file diff --git a/lib/feature/common/presentation/blocs/language_bloc/language_bloc.dart b/lib/feature/common/presentation/blocs/language_bloc/language_bloc.dart new file mode 100644 index 0000000..aba65b2 --- /dev/null +++ b/lib/feature/common/presentation/blocs/language_bloc/language_bloc.dart @@ -0,0 +1,36 @@ + +import '../../../../../food_delivery_client.dart'; + +part 'language_event.dart'; + +part 'language_state.dart'; + +part 'language_bloc.freezed.dart'; +@injectable +class LanguageBloc extends Bloc { + final StorageService _storageService; + + LanguageBloc(this._storageService) : super(const LanguageState()) { + on<_Started>(_onStarted); + + on<_Changeded>(_onChanged); + } + + Future _onStarted(_Started event, Emitter emit) async { + final lang = _storageService.getString(key: AppLocaleKeys.language); + + if (lang != null) { + emit(state.copyWith(currentLocale: Locale(lang))); + } else { + emit(state.copyWith(currentLocale: Locale("en"))); + } + } + + Future _onChanged(_Changeded event, Emitter emit) async { + _storageService.setString( + key: AppLocaleKeys.language, + value: event.locale.languageCode, + ); + emit(state.copyWith(currentLocale: event.locale)); + } +} diff --git a/lib/feature/common/presentation/blocs/language_bloc/language_bloc.freezed.dart b/lib/feature/common/presentation/blocs/language_bloc/language_bloc.freezed.dart new file mode 100644 index 0000000..b4a8b4d --- /dev/null +++ b/lib/feature/common/presentation/blocs/language_bloc/language_bloc.freezed.dart @@ -0,0 +1,535 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'language_bloc.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; +/// @nodoc +mixin _$LanguageEvent { + + + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is LanguageEvent); +} + + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'LanguageEvent()'; +} + + +} + +/// @nodoc +class $LanguageEventCopyWith<$Res> { +$LanguageEventCopyWith(LanguageEvent _, $Res Function(LanguageEvent) __); +} + + +/// Adds pattern-matching-related methods to [LanguageEvent]. +extension LanguageEventPatterns on LanguageEvent { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( _Started value)? started,TResult Function( _Changeded value)? changed,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Started() when started != null: +return started(_that);case _Changeded() when changed != null: +return changed(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( _Started value) started,required TResult Function( _Changeded value) changed,}){ +final _that = this; +switch (_that) { +case _Started(): +return started(_that);case _Changeded(): +return changed(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( _Started value)? started,TResult? Function( _Changeded value)? changed,}){ +final _that = this; +switch (_that) { +case _Started() when started != null: +return started(_that);case _Changeded() when changed != null: +return changed(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function()? started,TResult Function( Locale locale)? changed,required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Started() when started != null: +return started();case _Changeded() when changed != null: +return changed(_that.locale);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function() started,required TResult Function( Locale locale) changed,}) {final _that = this; +switch (_that) { +case _Started(): +return started();case _Changeded(): +return changed(_that.locale);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function()? started,TResult? Function( Locale locale)? changed,}) {final _that = this; +switch (_that) { +case _Started() when started != null: +return started();case _Changeded() when changed != null: +return changed(_that.locale);case _: + return null; + +} +} + +} + +/// @nodoc + + +class _Started implements LanguageEvent { + const _Started(); + + + + + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Started); +} + + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'LanguageEvent.started()'; +} + + +} + + + + +/// @nodoc + + +class _Changeded implements LanguageEvent { + const _Changeded(this.locale); + + + final Locale locale; + +/// Create a copy of LanguageEvent +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$ChangededCopyWith<_Changeded> get copyWith => __$ChangededCopyWithImpl<_Changeded>(this, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Changeded&&(identical(other.locale, locale) || other.locale == locale)); +} + + +@override +int get hashCode => Object.hash(runtimeType,locale); + +@override +String toString() { + return 'LanguageEvent.changed(locale: $locale)'; +} + + +} + +/// @nodoc +abstract mixin class _$ChangededCopyWith<$Res> implements $LanguageEventCopyWith<$Res> { + factory _$ChangededCopyWith(_Changeded value, $Res Function(_Changeded) _then) = __$ChangededCopyWithImpl; +@useResult +$Res call({ + Locale locale +}); + + + + +} +/// @nodoc +class __$ChangededCopyWithImpl<$Res> + implements _$ChangededCopyWith<$Res> { + __$ChangededCopyWithImpl(this._self, this._then); + + final _Changeded _self; + final $Res Function(_Changeded) _then; + +/// Create a copy of LanguageEvent +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? locale = null,}) { + return _then(_Changeded( +null == locale ? _self.locale : locale // ignore: cast_nullable_to_non_nullable +as Locale, + )); +} + + +} + +/// @nodoc +mixin _$LanguageState { + + Locale get currentLocale; +/// Create a copy of LanguageState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$LanguageStateCopyWith get copyWith => _$LanguageStateCopyWithImpl(this as LanguageState, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is LanguageState&&(identical(other.currentLocale, currentLocale) || other.currentLocale == currentLocale)); +} + + +@override +int get hashCode => Object.hash(runtimeType,currentLocale); + +@override +String toString() { + return 'LanguageState(currentLocale: $currentLocale)'; +} + + +} + +/// @nodoc +abstract mixin class $LanguageStateCopyWith<$Res> { + factory $LanguageStateCopyWith(LanguageState value, $Res Function(LanguageState) _then) = _$LanguageStateCopyWithImpl; +@useResult +$Res call({ + Locale currentLocale +}); + + + + +} +/// @nodoc +class _$LanguageStateCopyWithImpl<$Res> + implements $LanguageStateCopyWith<$Res> { + _$LanguageStateCopyWithImpl(this._self, this._then); + + final LanguageState _self; + final $Res Function(LanguageState) _then; + +/// Create a copy of LanguageState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? currentLocale = null,}) { + return _then(_self.copyWith( +currentLocale: null == currentLocale ? _self.currentLocale : currentLocale // ignore: cast_nullable_to_non_nullable +as Locale, + )); +} + +} + + +/// Adds pattern-matching-related methods to [LanguageState]. +extension LanguageStatePatterns on LanguageState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _LanguageState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _LanguageState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _LanguageState value) $default,){ +final _that = this; +switch (_that) { +case _LanguageState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _LanguageState value)? $default,){ +final _that = this; +switch (_that) { +case _LanguageState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( Locale currentLocale)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _LanguageState() when $default != null: +return $default(_that.currentLocale);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( Locale currentLocale) $default,) {final _that = this; +switch (_that) { +case _LanguageState(): +return $default(_that.currentLocale);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( Locale currentLocale)? $default,) {final _that = this; +switch (_that) { +case _LanguageState() when $default != null: +return $default(_that.currentLocale);case _: + return null; + +} +} + +} + +/// @nodoc + + +class _LanguageState implements LanguageState { + const _LanguageState({this.currentLocale = const Locale('en')}); + + +@override@JsonKey() final Locale currentLocale; + +/// Create a copy of LanguageState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$LanguageStateCopyWith<_LanguageState> get copyWith => __$LanguageStateCopyWithImpl<_LanguageState>(this, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _LanguageState&&(identical(other.currentLocale, currentLocale) || other.currentLocale == currentLocale)); +} + + +@override +int get hashCode => Object.hash(runtimeType,currentLocale); + +@override +String toString() { + return 'LanguageState(currentLocale: $currentLocale)'; +} + + +} + +/// @nodoc +abstract mixin class _$LanguageStateCopyWith<$Res> implements $LanguageStateCopyWith<$Res> { + factory _$LanguageStateCopyWith(_LanguageState value, $Res Function(_LanguageState) _then) = __$LanguageStateCopyWithImpl; +@override @useResult +$Res call({ + Locale currentLocale +}); + + + + +} +/// @nodoc +class __$LanguageStateCopyWithImpl<$Res> + implements _$LanguageStateCopyWith<$Res> { + __$LanguageStateCopyWithImpl(this._self, this._then); + + final _LanguageState _self; + final $Res Function(_LanguageState) _then; + +/// Create a copy of LanguageState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? currentLocale = null,}) { + return _then(_LanguageState( +currentLocale: null == currentLocale ? _self.currentLocale : currentLocale // ignore: cast_nullable_to_non_nullable +as Locale, + )); +} + + +} + +// dart format on diff --git a/lib/feature/common/presentation/blocs/language_bloc/language_event.dart b/lib/feature/common/presentation/blocs/language_bloc/language_event.dart new file mode 100644 index 0000000..a41caed --- /dev/null +++ b/lib/feature/common/presentation/blocs/language_bloc/language_event.dart @@ -0,0 +1,8 @@ +part of 'language_bloc.dart'; + +@freezed +class LanguageEvent with _$LanguageEvent { + const factory LanguageEvent.started() = _Started; + + const factory LanguageEvent.changed(Locale locale) = _Changeded; +} diff --git a/lib/feature/common/presentation/blocs/language_bloc/language_state.dart b/lib/feature/common/presentation/blocs/language_bloc/language_state.dart new file mode 100644 index 0000000..7b3b329 --- /dev/null +++ b/lib/feature/common/presentation/blocs/language_bloc/language_state.dart @@ -0,0 +1,7 @@ +part of 'language_bloc.dart'; + +@freezed +abstract class LanguageState with _$LanguageState { + const factory LanguageState({@Default(Locale('en')) Locale currentLocale}) = + _LanguageState; +} diff --git a/lib/feature/common/presentation/widgets/w_divider.dart b/lib/feature/common/presentation/widgets/w_divider.dart new file mode 100644 index 0000000..5372571 --- /dev/null +++ b/lib/feature/common/presentation/widgets/w_divider.dart @@ -0,0 +1,25 @@ +import '../../../../food_delivery_client.dart'; + +class WDivider extends StatelessWidget { + const WDivider({ + super.key, + this.height = 10, + this.endIndent = 0, + this.indent = 0, + }); + + final double height; + final double endIndent; + final double indent; + + @override + Widget build(BuildContext context) { + return Divider( + color: AppColors.cF6F6F6, + height: height, + thickness: height, + endIndent: 0, + indent: 0, + ); + } +} diff --git a/lib/feature/common/presentation/widgets/w_food_item.dart b/lib/feature/common/presentation/widgets/w_food_item.dart new file mode 100644 index 0000000..5bd7472 --- /dev/null +++ b/lib/feature/common/presentation/widgets/w_food_item.dart @@ -0,0 +1,144 @@ +import 'dart:ui'; + +import 'package:flutter_bounceable/flutter_bounceable.dart'; +import 'package:flutter_svg/flutter_svg.dart'; + +import '../../../../food_delivery_client.dart'; + +class WFoodItem extends StatelessWidget { + const WFoodItem({ + super.key, + this.imageHeight, + this.textStyle1, + this.textStyle2, + this.enableTag = false, + }); + + final double? imageHeight; + final TextStyle? textStyle1; + final TextStyle? textStyle2; + final bool enableTag; + + @override + Widget build(BuildContext context) { + return Bounceable( + onTap: () {}, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + // CachedNetworkImage( + // imageUrl: AppLocaleKeys.imageUrl, + // width: 200, + // height: 155, + // fit: BoxFit.cover, + // placeholder: (context, url) => CircularProgressIndicator(), + // errorWidget: (context, url, error) => Icon(Icons.error), + // + // ), + SizedBox( + height: imageHeight ?? 155, + width: context.w, + child: Stack( + children: [ + Positioned.fill( + child: CachedNetworkImage( + imageUrl: AppLocaleKeys.imageUrl, + width: 200, + height: 155, + fit: BoxFit.cover, + placeholder: (context, url) => + Center(child: CircularProgressIndicator.adaptive()), + errorWidget: (context, url, error) => Icon(Icons.error), + ), + ), + Positioned( + top: 10, + right: 8, + left: 0, + child: Row( + children: [ + if (enableTag) + DecoratedBox( + decoration: BoxDecoration( + color: AppColors.c34A853, + borderRadius: AppUtils.kBorderRadiusTop20Bottom20, + ), + child: Text( + "5 orders until \$8 reward", + style: AppTextStyles.size14Medium.copyWith( + color: AppColors.cFFFFFF, + ), + ).paddingOnly(top: 2, bottom: 2, left: 20, right: 40), + ), + const Spacer(), + IconButton( + onPressed: () {}, + icon: SvgPicture.asset(AppIcons.icDislike), + ), + ], + ), + ), + ], + ), + ), + 8.verticalSpace, + Row( + children: [ + Expanded( + child: Text( + "Adenine Kitchen", + style: textStyle1 ?? AppTextStyles.size16Medium, + ), + ), + SizedBox( + height: 24, + width: 24, + child: DecoratedBox( + decoration: BoxDecoration( + color: AppColors.cEEEEEE, + borderRadius: AppUtils.kBorderRadius28, + ), + child: Center( + child: Text("4.4", style: AppTextStyles.size12Regular), + ), + ), + ), + ], + ), + // RichText( + // text: TextSpan( + // text: "\$0.29 Delivery Fee", + // children: [TextSpan(text: "10-25 min")], + // style: AppTextStyles.size14Regular.copyWith( + // color: AppColors.c6B6B6B, + // ), + // ), + // ), + Row( + children: [ + Text( + "\$0.29 Delivery Fee", + style: + textStyle2 ?? + AppTextStyles.size14Regular.copyWith( + color: AppColors.c6B6B6B, + ), + ), + 5.horizontalSpace, + Icon(Icons.circle, size: 5, color: AppColors.c6B6B6B), + 5.horizontalSpace, + Text( + "10-25 min", + style: + textStyle2 ?? + AppTextStyles.size14Regular.copyWith( + color: AppColors.c6B6B6B, + ), + ), + ], + ), + ], + ).paddingSymmetric(horizontal: 15), + ); + } +} diff --git a/lib/feature/common/presentation/widgets/w_layout.dart b/lib/feature/common/presentation/widgets/w_layout.dart new file mode 100644 index 0000000..ea1565b --- /dev/null +++ b/lib/feature/common/presentation/widgets/w_layout.dart @@ -0,0 +1,24 @@ +import '../../../../food_delivery_client.dart'; + +class WLayout extends StatelessWidget { + const WLayout({ + super.key, + this.bgColor = AppColors.cFFFFFF, + this.bottom = true, + this.top = true, + required this.child, + }); + + final Color bgColor; + final bool bottom; + final bool top; + final Widget child; + + @override + Widget build(BuildContext context) { + return Container( + color: bgColor, + child: SafeArea(top: top, bottom: bottom, child: child), + ); + } +} diff --git a/lib/feature/common/presentation/widgets/w_see_all_raw.dart b/lib/feature/common/presentation/widgets/w_see_all_raw.dart new file mode 100644 index 0000000..f261d65 --- /dev/null +++ b/lib/feature/common/presentation/widgets/w_see_all_raw.dart @@ -0,0 +1,21 @@ +import '../../../../food_delivery_client.dart'; + +class WSeeAllRaw extends StatelessWidget { + const WSeeAllRaw({super.key, required this.title, required this.onPressed}); + + final String title; + final VoidCallback onPressed; + + @override + Widget build(BuildContext context) { + return Row( + children: [ + Expanded(child: Text(title, style: AppTextStyles.size24Bold)), + TextButton( + onPressed: onPressed, + child: Text("see all", style: AppTextStyles.size16Medium), + ), + ], + ).paddingOnly(left: 15, right: 8); + } +} diff --git a/lib/feature/common/presentation/widgets/w_stories_list_item.dart b/lib/feature/common/presentation/widgets/w_stories_list_item.dart new file mode 100644 index 0000000..5f37c23 --- /dev/null +++ b/lib/feature/common/presentation/widgets/w_stories_list_item.dart @@ -0,0 +1,33 @@ +import '../../../../food_delivery_client.dart'; + +class WStoriesListItem extends StatelessWidget { + const WStoriesListItem({super.key}); + + @override + Widget build(BuildContext context) { + return Stack( + children: [ + SizedBox( + height: 200, + width: 155, + child: ClipRRect( + borderRadius: AppUtils.kBorderRadius10, + child: CachedNetworkImage( + imageUrl: AppLocaleKeys.imageUrl, + fit: BoxFit.cover, + ), + ), + ), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + + + + ], + ) + + ], + ); + } +} diff --git a/lib/feature/common/presentation/widgets/widgets.dart b/lib/feature/common/presentation/widgets/widgets.dart new file mode 100644 index 0000000..8de4376 --- /dev/null +++ b/lib/feature/common/presentation/widgets/widgets.dart @@ -0,0 +1,5 @@ +export 'w_layout.dart'; +export 'w_food_item.dart'; +export 'w_divider.dart'; +export 'w_see_all_raw.dart'; +export 'w_stories_list_item.dart'; diff --git a/lib/feature/home/home.dart b/lib/feature/home/home.dart new file mode 100644 index 0000000..be74602 --- /dev/null +++ b/lib/feature/home/home.dart @@ -0,0 +1,11 @@ +export 'presentation/pages/home_page/home_page.dart'; +export 'presentation/blocs/home_bloc/home_bloc.dart'; +export 'presentation/pages/home_page/widgets/w_home_headers.dart'; +export 'presentation/widgets/w_category_item.dart'; +export "presentation/pages/home_page/widgets/w_categories_header_item.dart"; +export 'presentation/pages/home_page/widgets/w_delivery_header.dart'; +export 'presentation/pages/home_page/widgets/w_discount_part.dart'; +export 'presentation/pages/home_page/widgets/w_offers_carouseL_slider.dart'; +export 'presentation/pages/home_page/widgets/w_popular_near_you.dart'; +export 'presentation/pages/home_page/widgets/w_todays_offers.dart'; +export 'package:food_delivery_client/feature/home/presentation/pages/home_page/widgets/pick_it_for_free.dart'; diff --git a/lib/feature/home/presentation/blocs/home_bloc/home_bloc.dart b/lib/feature/home/presentation/blocs/home_bloc/home_bloc.dart new file mode 100644 index 0000000..1f98db5 --- /dev/null +++ b/lib/feature/home/presentation/blocs/home_bloc/home_bloc.dart @@ -0,0 +1,17 @@ +import 'package:food_delivery_client/food_delivery_client.dart'; + +part 'home_event.dart'; + +part 'home_state.dart'; + +part 'home_bloc.freezed.dart'; +@injectable +class HomeBloc extends Bloc { + HomeBloc() : super(const HomeState()) { + on<_Changed>(_onChanged); + } + + void _onChanged(_Changed event, Emitter emit) { + emit(state.copyWith(currentIndex: event.index)); + } +} diff --git a/lib/feature/home/presentation/blocs/home_bloc/home_bloc.freezed.dart b/lib/feature/home/presentation/blocs/home_bloc/home_bloc.freezed.dart new file mode 100644 index 0000000..3365c1f --- /dev/null +++ b/lib/feature/home/presentation/blocs/home_bloc/home_bloc.freezed.dart @@ -0,0 +1,535 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'home_bloc.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; +/// @nodoc +mixin _$HomeEvent { + + + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is HomeEvent); +} + + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'HomeEvent()'; +} + + +} + +/// @nodoc +class $HomeEventCopyWith<$Res> { +$HomeEventCopyWith(HomeEvent _, $Res Function(HomeEvent) __); +} + + +/// Adds pattern-matching-related methods to [HomeEvent]. +extension HomeEventPatterns on HomeEvent { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( _Started value)? started,TResult Function( _Changed value)? changed,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Started() when started != null: +return started(_that);case _Changed() when changed != null: +return changed(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( _Started value) started,required TResult Function( _Changed value) changed,}){ +final _that = this; +switch (_that) { +case _Started(): +return started(_that);case _Changed(): +return changed(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( _Started value)? started,TResult? Function( _Changed value)? changed,}){ +final _that = this; +switch (_that) { +case _Started() when started != null: +return started(_that);case _Changed() when changed != null: +return changed(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function()? started,TResult Function( int index)? changed,required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Started() when started != null: +return started();case _Changed() when changed != null: +return changed(_that.index);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function() started,required TResult Function( int index) changed,}) {final _that = this; +switch (_that) { +case _Started(): +return started();case _Changed(): +return changed(_that.index);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function()? started,TResult? Function( int index)? changed,}) {final _that = this; +switch (_that) { +case _Started() when started != null: +return started();case _Changed() when changed != null: +return changed(_that.index);case _: + return null; + +} +} + +} + +/// @nodoc + + +class _Started implements HomeEvent { + const _Started(); + + + + + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Started); +} + + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'HomeEvent.started()'; +} + + +} + + + + +/// @nodoc + + +class _Changed implements HomeEvent { + const _Changed(this.index); + + + final int index; + +/// Create a copy of HomeEvent +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$ChangedCopyWith<_Changed> get copyWith => __$ChangedCopyWithImpl<_Changed>(this, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Changed&&(identical(other.index, index) || other.index == index)); +} + + +@override +int get hashCode => Object.hash(runtimeType,index); + +@override +String toString() { + return 'HomeEvent.changed(index: $index)'; +} + + +} + +/// @nodoc +abstract mixin class _$ChangedCopyWith<$Res> implements $HomeEventCopyWith<$Res> { + factory _$ChangedCopyWith(_Changed value, $Res Function(_Changed) _then) = __$ChangedCopyWithImpl; +@useResult +$Res call({ + int index +}); + + + + +} +/// @nodoc +class __$ChangedCopyWithImpl<$Res> + implements _$ChangedCopyWith<$Res> { + __$ChangedCopyWithImpl(this._self, this._then); + + final _Changed _self; + final $Res Function(_Changed) _then; + +/// Create a copy of HomeEvent +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? index = null,}) { + return _then(_Changed( +null == index ? _self.index : index // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + +} + +/// @nodoc +mixin _$HomeState { + + int get currentIndex; +/// Create a copy of HomeState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$HomeStateCopyWith get copyWith => _$HomeStateCopyWithImpl(this as HomeState, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is HomeState&&(identical(other.currentIndex, currentIndex) || other.currentIndex == currentIndex)); +} + + +@override +int get hashCode => Object.hash(runtimeType,currentIndex); + +@override +String toString() { + return 'HomeState(currentIndex: $currentIndex)'; +} + + +} + +/// @nodoc +abstract mixin class $HomeStateCopyWith<$Res> { + factory $HomeStateCopyWith(HomeState value, $Res Function(HomeState) _then) = _$HomeStateCopyWithImpl; +@useResult +$Res call({ + int currentIndex +}); + + + + +} +/// @nodoc +class _$HomeStateCopyWithImpl<$Res> + implements $HomeStateCopyWith<$Res> { + _$HomeStateCopyWithImpl(this._self, this._then); + + final HomeState _self; + final $Res Function(HomeState) _then; + +/// Create a copy of HomeState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? currentIndex = null,}) { + return _then(_self.copyWith( +currentIndex: null == currentIndex ? _self.currentIndex : currentIndex // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +} + + +/// Adds pattern-matching-related methods to [HomeState]. +extension HomeStatePatterns on HomeState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _HomeState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _HomeState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _HomeState value) $default,){ +final _that = this; +switch (_that) { +case _HomeState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _HomeState value)? $default,){ +final _that = this; +switch (_that) { +case _HomeState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( int currentIndex)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _HomeState() when $default != null: +return $default(_that.currentIndex);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( int currentIndex) $default,) {final _that = this; +switch (_that) { +case _HomeState(): +return $default(_that.currentIndex);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( int currentIndex)? $default,) {final _that = this; +switch (_that) { +case _HomeState() when $default != null: +return $default(_that.currentIndex);case _: + return null; + +} +} + +} + +/// @nodoc + + +class _HomeState implements HomeState { + const _HomeState({this.currentIndex = 0}); + + +@override@JsonKey() final int currentIndex; + +/// Create a copy of HomeState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$HomeStateCopyWith<_HomeState> get copyWith => __$HomeStateCopyWithImpl<_HomeState>(this, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _HomeState&&(identical(other.currentIndex, currentIndex) || other.currentIndex == currentIndex)); +} + + +@override +int get hashCode => Object.hash(runtimeType,currentIndex); + +@override +String toString() { + return 'HomeState(currentIndex: $currentIndex)'; +} + + +} + +/// @nodoc +abstract mixin class _$HomeStateCopyWith<$Res> implements $HomeStateCopyWith<$Res> { + factory _$HomeStateCopyWith(_HomeState value, $Res Function(_HomeState) _then) = __$HomeStateCopyWithImpl; +@override @useResult +$Res call({ + int currentIndex +}); + + + + +} +/// @nodoc +class __$HomeStateCopyWithImpl<$Res> + implements _$HomeStateCopyWith<$Res> { + __$HomeStateCopyWithImpl(this._self, this._then); + + final _HomeState _self; + final $Res Function(_HomeState) _then; + +/// Create a copy of HomeState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? currentIndex = null,}) { + return _then(_HomeState( +currentIndex: null == currentIndex ? _self.currentIndex : currentIndex // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + +} + +// dart format on diff --git a/lib/feature/home/presentation/blocs/home_bloc/home_event.dart b/lib/feature/home/presentation/blocs/home_bloc/home_event.dart new file mode 100644 index 0000000..051abcd --- /dev/null +++ b/lib/feature/home/presentation/blocs/home_bloc/home_event.dart @@ -0,0 +1,8 @@ +part of 'home_bloc.dart'; + +@freezed +class HomeEvent with _$HomeEvent { + const factory HomeEvent.started() = _Started; + const factory HomeEvent.changed(int index) = _Changed; + +} diff --git a/lib/feature/home/presentation/blocs/home_bloc/home_state.dart b/lib/feature/home/presentation/blocs/home_bloc/home_state.dart new file mode 100644 index 0000000..2890caf --- /dev/null +++ b/lib/feature/home/presentation/blocs/home_bloc/home_state.dart @@ -0,0 +1,8 @@ +part of 'home_bloc.dart'; + +@freezed +abstract class HomeState with _$HomeState { + const factory HomeState({ + @Default(0) int currentIndex +}) = _HomeState; +} diff --git a/lib/feature/home/presentation/mixins/categories_mixin.dart b/lib/feature/home/presentation/mixins/categories_mixin.dart new file mode 100644 index 0000000..007aa8c --- /dev/null +++ b/lib/feature/home/presentation/mixins/categories_mixin.dart @@ -0,0 +1,26 @@ +import 'package:food_delivery_client/core/core.dart'; + +mixin CategoriesMixin { + List images = [ + AppImages.imgConvenience, + AppImages.imgAlcohol, + AppImages.imgPetSupplies, + AppImages.imgFlowers, + AppImages.imgGrocery, + AppImages.imgAmerican, + AppImages.imgSpeciality, + AppImages.imgTakeout, + AppImages.imgAsian, + AppImages.imgIceCream, + AppImages.imgHalal, + AppImages.imgRetails, + AppImages.imgCarribean, + AppImages.imgIndian, + AppImages.imgFrench, + AppImages.imgFastFoods, + AppImages.imgBurger, + AppImages.imgRide, + AppImages.imgChinese, + AppImages.imgDesert, + ]; +} diff --git a/lib/feature/home/presentation/mixins/home_page_mixins.dart b/lib/feature/home/presentation/mixins/home_page_mixins.dart new file mode 100644 index 0000000..fc4f9a5 --- /dev/null +++ b/lib/feature/home/presentation/mixins/home_page_mixins.dart @@ -0,0 +1,3 @@ +mixin HomePageMixins { + static const headers = []; +} diff --git a/lib/feature/home/presentation/pages/categories_page/categories_page.dart b/lib/feature/home/presentation/pages/categories_page/categories_page.dart new file mode 100644 index 0000000..c782c7a --- /dev/null +++ b/lib/feature/home/presentation/pages/categories_page/categories_page.dart @@ -0,0 +1,73 @@ +import 'package:food_delivery_client/feature/home/presentation/mixins/categories_mixin.dart'; + +import '../../../../../food_delivery_client.dart'; + +class CategoriesPage extends StatelessWidget with CategoriesMixin { + CategoriesPage({super.key}); + + show(BuildContext context) { + showModalBottomSheet( + context: context, + isScrollControlled: true, + + builder: (context) => Wrap(children: [this]), + ); + } + + @override + Widget build(BuildContext context) { + List _titles = [ + context.loc.convenience, + context.loc.alcohol, + context.loc.petSupplies, + context.loc.flowers, + context.loc.grocery, + context.loc.american, + context.loc.speciality, + context.loc.takeout, + context.loc.asian, + context.loc.iceCream, + context.loc.halal, + context.loc.retails, + context.loc.caribbean, + context.loc.indian, + context.loc.french, + context.loc.fastFoods, + context.loc.burger, + context.loc.ride, + context.loc.chinese, + context.loc.dessert, + ]; + return Material( + color: AppColors.cFFFFFF, + borderRadius: AppUtils.kBorderRadius20, + child: SafeArea( + child: Column( + children: [ + 24.verticalSpace, + Text(context.loc.allCategories, style: AppTextStyles.size20Regular), + 30.verticalSpace, + GridView.builder( + itemCount: images.length, + padding: EdgeInsets.zero, + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 4, + crossAxisSpacing: 5, + mainAxisSpacing: 10, + childAspectRatio: 78 / 100, + ), + itemBuilder: (context, index) => WCategoryItem( + onTap: () {}, + imgUrl: images[index], + text: _titles[index], + ), + ), + 40.verticalSpace, + ], + ).paddingSymmetric(horizontal: 15), + ), + ); + } +} diff --git a/lib/feature/home/presentation/pages/home_page/home_page.dart b/lib/feature/home/presentation/pages/home_page/home_page.dart new file mode 100644 index 0000000..de651c2 --- /dev/null +++ b/lib/feature/home/presentation/pages/home_page/home_page.dart @@ -0,0 +1,34 @@ +import '../../../../../food_delivery_client.dart'; + +class HomePage extends StatelessWidget { + const HomePage({super.key}); + + @override + Widget build(BuildContext context) { + return BlocProvider( + create: (context) => sl(), + child: BlocBuilder( + builder: (context, state) { + return WLayout( + child: Scaffold( + body: CustomScrollView( + slivers: [ + SliverToBoxAdapter(child: WHomeHeader()), + SliverToBoxAdapter(child: Column(children: [ + WDeliveryHeader(), + WDiscountPart(), + WOffersCarouselSlider(), + WDiscountPart(), + WPopularNearYou(), + WTodayOffers(), + WPickItUpForFree() + ])), + ], + ), + ), + ); + }, + ), + ); + } +} diff --git a/lib/feature/home/presentation/pages/home_page/widgets/pick_it_for_free.dart b/lib/feature/home/presentation/pages/home_page/widgets/pick_it_for_free.dart new file mode 100644 index 0000000..41d0649 --- /dev/null +++ b/lib/feature/home/presentation/pages/home_page/widgets/pick_it_for_free.dart @@ -0,0 +1,121 @@ +import '../../../../../../food_delivery_client.dart'; + +class WPickItUpForFree extends StatelessWidget { + const WPickItUpForFree({super.key}); + + @override + Widget build(BuildContext context) { + return Column( + mainAxisAlignment:MainAxisAlignment.start, + + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + 12.verticalSpace, + Column( + mainAxisAlignment:MainAxisAlignment.start, + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text('Pick it up for free', style: AppTextStyles.size24Bold), + Text( + "Skip the fees when you order pick-up", + style: AppTextStyles.size14Regular.copyWith( + color: AppColors.c545454, + ), + ), + 7.verticalSpace, + ], + ).paddingSymmetric(horizontal: 15), + Container( + height: 210, + width: context.w, + decoration: BoxDecoration( + image: DecorationImage( + image: AssetImage(AppImages.imgPickUp), + fit: BoxFit.cover, + ), + ), + child: Align( + alignment: AlignmentGeometry.topCenter, + child: CarouselSlider.builder( + options: CarouselOptions( + height: 100.0, + reverse: false, + viewportFraction: 0.9, + animateToClosest: true, + autoPlay: true, + autoPlayCurve: Curves.easeIn, + initialPage: 0, + padEnds: false, + enableInfiniteScroll: true, + scrollPhysics: const AlwaysScrollableScrollPhysics(), + scrollDirection: Axis.horizontal, + ), + itemCount: 5, + itemBuilder: (context, index, realIndex) { + return Builder( + builder: (BuildContext context) { + return PickItUpItem().paddingOnly(left: 15); + }, + ); + }, + ), + ), + ), + 10.verticalSpace, + WFoodItem(), + 40.verticalSpace + + + ], + ); + } +} + +class PickItUpItem extends StatelessWidget { + const PickItUpItem({super.key}); + + @override + Widget build(BuildContext context) { + return Material( + color: AppColors.cTransparent, + child: InkWell( + onTap: () {}, + child: Ink( + decoration: BoxDecoration( + color: AppColors.cFFFFFF, + boxShadow: [ + BoxShadow( + color: AppColors.c000000.newWithOpacity(.25), + offset: const Offset(0, 1), + blurRadius: 2, + ), + ], + ), + child: Row( + spacing: 6, + children: [ + Image.network( + AppLocaleKeys.imageUrl, + height: 88, + width: 96, + fit: BoxFit.cover, + ).paddingAll(4), + Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text("Island Takeway", style: AppTextStyles.size17Bold), + Text( + "10-20 min", + style: AppTextStyles.size14Medium.copyWith( + color: AppColors.c6B6B6B, + ), + ), + ], + ).paddingOnly(top: 4, bottom: 4, right: 40), + ], + ), + ), + ), + ); + } +} diff --git a/lib/feature/home/presentation/pages/home_page/widgets/w_categories_header_item.dart b/lib/feature/home/presentation/pages/home_page/widgets/w_categories_header_item.dart new file mode 100644 index 0000000..7a9467e --- /dev/null +++ b/lib/feature/home/presentation/pages/home_page/widgets/w_categories_header_item.dart @@ -0,0 +1,51 @@ +import 'package:flutter_bounceable/flutter_bounceable.dart'; + +import '../../../../../../food_delivery_client.dart'; + +class WCategoriesHeaderItem extends StatelessWidget { + const WCategoriesHeaderItem({ + super.key, + required this.text, + required this.imageUrl, + required this.onTap, + }); + + final String text; + final String imageUrl; + final VoidCallback onTap; + + @override + Widget build(BuildContext context) { + return Expanded( + child: InkWell( + onTap: onTap, + borderRadius: AppUtils.kBorderRadius10, + child: Ink( + height: 88, + decoration: BoxDecoration( + borderRadius: AppUtils.kBorderRadius10, + color: AppColors.cE6E6E6.newWithOpacity(.4), + ), + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Expanded( + flex: 2, + child: Align( + alignment: AlignmentGeometry.topRight, + child: Image.asset(imageUrl).paddingOnly(top: 5, right: 5), + ), + ), + Expanded( + child: Text( + text, + style: AppTextStyles.size18Medium, + ).paddingOnly(left: 12, bottom: 6), + ), + ], + ), + ), + ), + ); + } +} diff --git a/lib/feature/home/presentation/pages/home_page/widgets/w_delivery_header.dart b/lib/feature/home/presentation/pages/home_page/widgets/w_delivery_header.dart new file mode 100644 index 0000000..87839a6 --- /dev/null +++ b/lib/feature/home/presentation/pages/home_page/widgets/w_delivery_header.dart @@ -0,0 +1,72 @@ +import 'package:food_delivery_client/feature/home/presentation/pages/categories_page/categories_page.dart'; + +import '../../../../../../food_delivery_client.dart'; + +class WDeliveryHeader extends StatelessWidget { + const WDeliveryHeader({super.key}); + + @override + Widget build(BuildContext context) { + List _titles = [ + context.loc.convenience, + context.loc.alcohol, + context.loc.petSupplies, + context.loc.more, + ]; + return Column( + children: [ + 15.verticalSpace, + Row( + spacing: 12, + children: [ + WCategoriesHeaderItem( + onTap: () {}, + text: context.loc.american, + imageUrl: AppImages.imgAmerican, + ), + WCategoriesHeaderItem( + onTap: () {}, + text: context.loc.grocery, + imageUrl: AppImages.imgGrocery, + ), + ], + ), + 8.verticalSpace, + GridView.builder( + shrinkWrap: true, + itemCount: _titles.length, + padding: EdgeInsets.zero, + scrollDirection: Axis.vertical, + physics: const NeverScrollableScrollPhysics(), + keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag, + gridDelegate: SliverGridDelegateWithFixedCrossAxisCount( + crossAxisCount: 4, + crossAxisSpacing: 5, + mainAxisSpacing: 10, + childAspectRatio: 78 / 100, + ), + itemBuilder: (context, index) => WCategoryItem( + onTap: () { + if (index == 3) { + CategoriesPage().show(context); + } + }, + imgUrl: index != 3 ? _images[index] : null, + text: _titles[index], + child: index == 3 + ? SizedBox(height: 55, width: 55, child: Icon(Icons.more_horiz)) + : null, + ), + ), + 8.verticalSpace, + WDivider() + ], + ).paddingSymmetric(horizontal: 15); + } +} + +List _images = [ + AppImages.imgConvenience, + AppImages.imgAlcohol, + AppImages.imgPetSupplies, +]; diff --git a/lib/feature/home/presentation/pages/home_page/widgets/w_discount_part.dart b/lib/feature/home/presentation/pages/home_page/widgets/w_discount_part.dart new file mode 100644 index 0000000..b7fe859 --- /dev/null +++ b/lib/feature/home/presentation/pages/home_page/widgets/w_discount_part.dart @@ -0,0 +1,25 @@ +import '../../../../../../food_delivery_client.dart'; + +class WDiscountPart extends StatelessWidget { + const WDiscountPart({super.key}); + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + ListView.separated( + shrinkWrap: true, + padding: EdgeInsets.symmetric(vertical: 12), + scrollDirection: Axis.vertical, + keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag, + physics: const NeverScrollableScrollPhysics(), + itemBuilder: (context, index) => WFoodItem(enableTag: true), + separatorBuilder: (context, index) => 20.verticalSpace, + itemCount: 3, + ), + WDivider(), + ], + ); + } +} diff --git a/lib/feature/home/presentation/pages/home_page/widgets/w_home_headers.dart b/lib/feature/home/presentation/pages/home_page/widgets/w_home_headers.dart new file mode 100644 index 0000000..cede191 --- /dev/null +++ b/lib/feature/home/presentation/pages/home_page/widgets/w_home_headers.dart @@ -0,0 +1,54 @@ +import 'package:flutter_svg/flutter_svg.dart'; + +import '../../../../../../food_delivery_client.dart'; + +class WHomeHeader extends StatelessWidget { + const WHomeHeader({super.key}); + + @override + Widget build(BuildContext context) { + return BlocBuilder( + builder: (context, state) { + return DecoratedBox( + decoration: BoxDecoration(color: AppColors.cFFFFFF), + child: Column( + crossAxisAlignment: CrossAxisAlignment.center, + children: [ + 15.verticalSpace, + Stack( + alignment: AlignmentGeometry.center, + children: [ + TextButton( + onPressed: () {}, + child: Row( + mainAxisAlignment: MainAxisAlignment.center, + mainAxisSize: MainAxisSize.min, + children: [ + SvgPicture.asset(AppIcons.icLocation, height: 20), + 8.horizontalSpace, + Text("London Hall", style: AppTextStyles.size18Medium), + 5.horizontalSpace, + SvgPicture.asset(AppIcons.icArrowBottom), + ], + ), + ), + Align( + alignment: AlignmentGeometry.topRight, + child: IconButton( + onPressed: () {}, + icon: SvgPicture.asset( + AppIcons.icFilter, + height: 36, + width: 36, + ), + ), + ), + ], + ), + ], + ).paddingSymmetric(horizontal: 15), + ); + }, + ); + } +} diff --git a/lib/feature/home/presentation/pages/home_page/widgets/w_offers_carouseL_slider.dart b/lib/feature/home/presentation/pages/home_page/widgets/w_offers_carouseL_slider.dart new file mode 100644 index 0000000..675bffb --- /dev/null +++ b/lib/feature/home/presentation/pages/home_page/widgets/w_offers_carouseL_slider.dart @@ -0,0 +1,103 @@ +import '../../../../../../food_delivery_client.dart'; + +class WOffersCarouselSlider extends StatelessWidget { + WOffersCarouselSlider({super.key}); + + List _colors = [ + AppColors.cD2D7F0, + AppColors.c9EE2B8, + AppColors.cE2CC9E, + AppColors.cC99EE2, + AppColors.cE29EC7, + ]; + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + 16.verticalSpace, + CarouselSlider.builder( + options: CarouselOptions( + height: 170.0, + reverse: false, + viewportFraction: 0.9, + animateToClosest: true, + autoPlay: true, + autoPlayCurve: Curves.easeIn, + initialPage: 0, + padEnds: false, + enableInfiniteScroll: true, + scrollPhysics: const AlwaysScrollableScrollPhysics(), + scrollDirection: Axis.horizontal, + ), + itemBuilder: (context, index, realIndex) => Builder( + builder: (BuildContext context) { + return Container( + width: MediaQuery.of(context).size.width, + margin: EdgeInsets.only(left: 15), + decoration: BoxDecoration( + color: _colors[index], + borderRadius: AppUtils.kBorderRadius16, + ), + child: Row( + children: [ + Expanded( + flex: 3, + child: Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + Text( + "Order from these restaurants and save", + style: AppTextStyles.size17Bold, + ), + const Spacer(), + Material( + color: AppColors.cTransparent, + child: InkWell( + onTap: () {}, + borderRadius: AppUtils.kBorderRadius30, + child: Ink( + decoration: BoxDecoration( + color: AppColors.cFFFFFF, + borderRadius: AppUtils.kBorderRadius30, + ), + child: Row( + mainAxisSize: MainAxisSize.min, + mainAxisAlignment: MainAxisAlignment.start, + children: [Text('Browse offer')], + ).paddingSymmetric(horizontal: 8, vertical: 4), + ), + ), + ), + ], + ).paddingSymmetric(horizontal: 15, vertical: 15), + ), + Expanded( + flex: 2, + child: Column( + children: [ + ClipRRect( + borderRadius: AppUtils.kBorderRadiusTop15Bottom15, + child: Image.network( + AppLocaleKeys.imageUrl, + height: 170, + fit: BoxFit.cover, + ), + ), + ], + ), + ), + ], + ), + ); + }, + ), + itemCount: _colors.length, + ), + 8.verticalSpace, + WDivider(), + ], + ); + } +} diff --git a/lib/feature/home/presentation/pages/home_page/widgets/w_popular_near_you.dart b/lib/feature/home/presentation/pages/home_page/widgets/w_popular_near_you.dart new file mode 100644 index 0000000..1c0cfd7 --- /dev/null +++ b/lib/feature/home/presentation/pages/home_page/widgets/w_popular_near_you.dart @@ -0,0 +1,58 @@ +import '../../../../../../food_delivery_client.dart'; + +class WPopularNearYou extends StatelessWidget { + const WPopularNearYou({super.key}); + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + 10.verticalSpace, + WSeeAllRaw(title: "Popular near you", onPressed: () {}), + 10.verticalSpace, + CarouselSlider.builder( + options: CarouselOptions( + height: 180.0, + reverse: false, + viewportFraction: 0.9, + animateToClosest: true, + autoPlay: true, + autoPlayCurve: Curves.easeIn, + initialPage: 0, + padEnds: false, + enableInfiniteScroll: true, + scrollPhysics: const AlwaysScrollableScrollPhysics(), + scrollDirection: Axis.horizontal, + ), + itemCount: 5, + itemBuilder: (context, index, realIndex) { + return Builder( + builder: (BuildContext context) { + return WFoodItem( + imageHeight: 130, + textStyle1: AppTextStyles.size14Medium, + textStyle2: AppTextStyles.size12Regular, + ); + }, + ); + }, + ), + 13.verticalSpace, + WDivider(), + 10.verticalSpace, + ListView.separated( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag, + scrollDirection: Axis.vertical, + itemBuilder: (context, index) => WFoodItem(), + separatorBuilder: (context, index) => 25.verticalSpace, + itemCount: 5, + ), + 25.verticalSpace, + WDivider(), + ], + ); + } +} diff --git a/lib/feature/home/presentation/pages/home_page/widgets/w_quick_eats.dart b/lib/feature/home/presentation/pages/home_page/widgets/w_quick_eats.dart new file mode 100644 index 0000000..e69de29 diff --git a/lib/feature/home/presentation/pages/home_page/widgets/w_todays_offers.dart b/lib/feature/home/presentation/pages/home_page/widgets/w_todays_offers.dart new file mode 100644 index 0000000..29167d3 --- /dev/null +++ b/lib/feature/home/presentation/pages/home_page/widgets/w_todays_offers.dart @@ -0,0 +1,66 @@ +import '../../../../../../food_delivery_client.dart'; + +class WTodayOffers extends StatelessWidget { + const WTodayOffers({super.key}); + + @override + Widget build(BuildContext context) { + return Column( + crossAxisAlignment: CrossAxisAlignment.start, + children: [ + 12.verticalSpace, + WSeeAllRaw( + title: "Today's offers", + onPressed: () {}, + ), + 10.verticalSpace, + CarouselSlider.builder( + options: CarouselOptions( + height: 180.0, + reverse: false, + viewportFraction: 0.9, + animateToClosest: true, + autoPlay: true, + autoPlayCurve: Curves.easeIn, + initialPage: 0, + padEnds: false, + enableInfiniteScroll: true, + scrollPhysics: const AlwaysScrollableScrollPhysics(), + scrollDirection: Axis.horizontal, + ), + itemCount: 5, + itemBuilder: (context, index, realIndex) { + return Builder( + builder: (BuildContext context) { + return WFoodItem( + imageHeight: 130, + enableTag: true, + textStyle1: AppTextStyles.size14Medium, + textStyle2: AppTextStyles.size12Regular, + ); + }, + ); + }, + ), + 10.verticalSpace, + WDivider(), + 10.verticalSpace, + ListView.separated( + shrinkWrap: true, + physics: const NeverScrollableScrollPhysics(), + keyboardDismissBehavior: ScrollViewKeyboardDismissBehavior.onDrag, + scrollDirection: Axis.vertical, + itemBuilder: (context, index) => WFoodItem(), + separatorBuilder: (context, index) => 25.verticalSpace, + itemCount: 3, + ), + 25.verticalSpace, + WDivider() + + + + + ], + ); + } +} diff --git a/lib/feature/home/presentation/widgets/w_category_item.dart b/lib/feature/home/presentation/widgets/w_category_item.dart new file mode 100644 index 0000000..e6eab35 --- /dev/null +++ b/lib/feature/home/presentation/widgets/w_category_item.dart @@ -0,0 +1,47 @@ +import '../../../../food_delivery_client.dart'; + +class WCategoryItem extends StatelessWidget { + const WCategoryItem({ + super.key, + required this.onTap, + this.text, + this.imgUrl, + this.child, + }); + + final VoidCallback onTap; + final String? text; + final String? imgUrl; + final Widget? child; + + @override + Widget build(BuildContext context) { + return Column( + children: [ + InkWell( + onTap: onTap, + borderRadius: AppUtils.kBorderRadius10, + child: Ink( + decoration: BoxDecoration( + borderRadius: AppUtils.kBorderRadius10, + color: AppColors.cE6E6E6.newWithOpacity(.4), + ), + child: SizedBox( + height: 55, + width: 55, + child: child ?? Image.asset(imgUrl!, fit: BoxFit.cover), + ).paddingSymmetric(vertical: 8, horizontal: 12), + ), + ), + 3.verticalSpace, + if (text != null) + Text( + text!, + maxLines: 2, + style: AppTextStyles.size14Medium, + textAlign: TextAlign.center, + ), + ], + ); + } +} diff --git a/lib/feature/main/main.dart b/lib/feature/main/main.dart new file mode 100644 index 0000000..adbfac6 --- /dev/null +++ b/lib/feature/main/main.dart @@ -0,0 +1,3 @@ +export 'package:food_delivery_client/feature/main/presentation/pages/main_page/main_page.dart'; +export 'presentation/mixins/main_page_mixin.dart'; +export 'package:food_delivery_client/feature/main/presentation/blocs/main_bloc/main_bloc.dart'; diff --git a/lib/feature/main/presentation/blocs/main_bloc/main_bloc.dart b/lib/feature/main/presentation/blocs/main_bloc/main_bloc.dart new file mode 100644 index 0000000..54007fc --- /dev/null +++ b/lib/feature/main/presentation/blocs/main_bloc/main_bloc.dart @@ -0,0 +1,18 @@ +import 'package:bloc/bloc.dart'; +import 'package:food_delivery_client/food_delivery_client.dart'; +import 'package:freezed_annotation/freezed_annotation.dart'; + +part 'main_event.dart'; + +part 'main_state.dart'; + +part 'main_bloc.freezed.dart'; + +@injectable +class MainBloc extends Bloc { + MainBloc() : super(const MainState()) { + on<_Loaded>((event, emit) { + emit(state.copyWith(currentIndex: event.index)); + }); + } +} diff --git a/lib/feature/main/presentation/blocs/main_bloc/main_bloc.freezed.dart b/lib/feature/main/presentation/blocs/main_bloc/main_bloc.freezed.dart new file mode 100644 index 0000000..0e85b8a --- /dev/null +++ b/lib/feature/main/presentation/blocs/main_bloc/main_bloc.freezed.dart @@ -0,0 +1,538 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'main_bloc.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; +/// @nodoc +mixin _$MainEvent { + + + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MainEvent); +} + + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'MainEvent()'; +} + + +} + +/// @nodoc +class $MainEventCopyWith<$Res> { +$MainEventCopyWith(MainEvent _, $Res Function(MainEvent) __); +} + + +/// Adds pattern-matching-related methods to [MainEvent]. +extension MainEventPatterns on MainEvent { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( _Started value)? started,TResult Function( _Loaded value)? loaded,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Started() when started != null: +return started(_that);case _Loaded() when loaded != null: +return loaded(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( _Started value) started,required TResult Function( _Loaded value) loaded,}){ +final _that = this; +switch (_that) { +case _Started(): +return started(_that);case _Loaded(): +return loaded(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( _Started value)? started,TResult? Function( _Loaded value)? loaded,}){ +final _that = this; +switch (_that) { +case _Started() when started != null: +return started(_that);case _Loaded() when loaded != null: +return loaded(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function()? started,TResult Function( int index)? loaded,required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Started() when started != null: +return started();case _Loaded() when loaded != null: +return loaded(_that.index);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function() started,required TResult Function( int index) loaded,}) {final _that = this; +switch (_that) { +case _Started(): +return started();case _Loaded(): +return loaded(_that.index);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function()? started,TResult? Function( int index)? loaded,}) {final _that = this; +switch (_that) { +case _Started() when started != null: +return started();case _Loaded() when loaded != null: +return loaded(_that.index);case _: + return null; + +} +} + +} + +/// @nodoc + + +class _Started implements MainEvent { + const _Started(); + + + + + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Started); +} + + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'MainEvent.started()'; +} + + +} + + + + +/// @nodoc + + +class _Loaded implements MainEvent { + const _Loaded(this.index); + + + final int index; + +/// Create a copy of MainEvent +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$LoadedCopyWith<_Loaded> get copyWith => __$LoadedCopyWithImpl<_Loaded>(this, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Loaded&&(identical(other.index, index) || other.index == index)); +} + + +@override +int get hashCode => Object.hash(runtimeType,index); + +@override +String toString() { + return 'MainEvent.loaded(index: $index)'; +} + + +} + +/// @nodoc +abstract mixin class _$LoadedCopyWith<$Res> implements $MainEventCopyWith<$Res> { + factory _$LoadedCopyWith(_Loaded value, $Res Function(_Loaded) _then) = __$LoadedCopyWithImpl; +@useResult +$Res call({ + int index +}); + + + + +} +/// @nodoc +class __$LoadedCopyWithImpl<$Res> + implements _$LoadedCopyWith<$Res> { + __$LoadedCopyWithImpl(this._self, this._then); + + final _Loaded _self; + final $Res Function(_Loaded) _then; + +/// Create a copy of MainEvent +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') $Res call({Object? index = null,}) { + return _then(_Loaded( +null == index ? _self.index : index // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + +} + +/// @nodoc +mixin _$MainState { + + RequestStatus get status; int get currentIndex; +/// Create a copy of MainState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$MainStateCopyWith get copyWith => _$MainStateCopyWithImpl(this as MainState, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is MainState&&(identical(other.status, status) || other.status == status)&&(identical(other.currentIndex, currentIndex) || other.currentIndex == currentIndex)); +} + + +@override +int get hashCode => Object.hash(runtimeType,status,currentIndex); + +@override +String toString() { + return 'MainState(status: $status, currentIndex: $currentIndex)'; +} + + +} + +/// @nodoc +abstract mixin class $MainStateCopyWith<$Res> { + factory $MainStateCopyWith(MainState value, $Res Function(MainState) _then) = _$MainStateCopyWithImpl; +@useResult +$Res call({ + RequestStatus status, int currentIndex +}); + + + + +} +/// @nodoc +class _$MainStateCopyWithImpl<$Res> + implements $MainStateCopyWith<$Res> { + _$MainStateCopyWithImpl(this._self, this._then); + + final MainState _self; + final $Res Function(MainState) _then; + +/// Create a copy of MainState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? status = null,Object? currentIndex = null,}) { + return _then(_self.copyWith( +status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable +as RequestStatus,currentIndex: null == currentIndex ? _self.currentIndex : currentIndex // ignore: cast_nullable_to_non_nullable +as int, + )); +} + +} + + +/// Adds pattern-matching-related methods to [MainState]. +extension MainStatePatterns on MainState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _MainState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _MainState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _MainState value) $default,){ +final _that = this; +switch (_that) { +case _MainState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _MainState value)? $default,){ +final _that = this; +switch (_that) { +case _MainState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( RequestStatus status, int currentIndex)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _MainState() when $default != null: +return $default(_that.status,_that.currentIndex);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( RequestStatus status, int currentIndex) $default,) {final _that = this; +switch (_that) { +case _MainState(): +return $default(_that.status,_that.currentIndex);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( RequestStatus status, int currentIndex)? $default,) {final _that = this; +switch (_that) { +case _MainState() when $default != null: +return $default(_that.status,_that.currentIndex);case _: + return null; + +} +} + +} + +/// @nodoc + + +class _MainState implements MainState { + const _MainState({this.status = RequestStatus.initial, this.currentIndex = 0}); + + +@override@JsonKey() final RequestStatus status; +@override@JsonKey() final int currentIndex; + +/// Create a copy of MainState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$MainStateCopyWith<_MainState> get copyWith => __$MainStateCopyWithImpl<_MainState>(this, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _MainState&&(identical(other.status, status) || other.status == status)&&(identical(other.currentIndex, currentIndex) || other.currentIndex == currentIndex)); +} + + +@override +int get hashCode => Object.hash(runtimeType,status,currentIndex); + +@override +String toString() { + return 'MainState(status: $status, currentIndex: $currentIndex)'; +} + + +} + +/// @nodoc +abstract mixin class _$MainStateCopyWith<$Res> implements $MainStateCopyWith<$Res> { + factory _$MainStateCopyWith(_MainState value, $Res Function(_MainState) _then) = __$MainStateCopyWithImpl; +@override @useResult +$Res call({ + RequestStatus status, int currentIndex +}); + + + + +} +/// @nodoc +class __$MainStateCopyWithImpl<$Res> + implements _$MainStateCopyWith<$Res> { + __$MainStateCopyWithImpl(this._self, this._then); + + final _MainState _self; + final $Res Function(_MainState) _then; + +/// Create a copy of MainState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? status = null,Object? currentIndex = null,}) { + return _then(_MainState( +status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable +as RequestStatus,currentIndex: null == currentIndex ? _self.currentIndex : currentIndex // ignore: cast_nullable_to_non_nullable +as int, + )); +} + + +} + +// dart format on diff --git a/lib/feature/main/presentation/blocs/main_bloc/main_event.dart b/lib/feature/main/presentation/blocs/main_bloc/main_event.dart new file mode 100644 index 0000000..5a39d27 --- /dev/null +++ b/lib/feature/main/presentation/blocs/main_bloc/main_event.dart @@ -0,0 +1,8 @@ +part of 'main_bloc.dart'; + +@freezed +class MainEvent with _$MainEvent { + const factory MainEvent.started() = _Started; + const factory MainEvent.loaded(int index) = _Loaded; + +} diff --git a/lib/feature/main/presentation/blocs/main_bloc/main_state.dart b/lib/feature/main/presentation/blocs/main_bloc/main_state.dart new file mode 100644 index 0000000..2535c73 --- /dev/null +++ b/lib/feature/main/presentation/blocs/main_bloc/main_state.dart @@ -0,0 +1,10 @@ +part of 'main_bloc.dart'; + +@freezed +abstract class MainState with _$MainState { + const factory MainState({ + @Default(RequestStatus.initial) RequestStatus status, + @Default(0) int currentIndex, + + }) = _MainState; +} diff --git a/lib/feature/main/presentation/mixins/main_page_mixin.dart b/lib/feature/main/presentation/mixins/main_page_mixin.dart new file mode 100644 index 0000000..21dbbfb --- /dev/null +++ b/lib/feature/main/presentation/mixins/main_page_mixin.dart @@ -0,0 +1,28 @@ +import 'package:flutter_svg/flutter_svg.dart'; + +import '../../../../food_delivery_client.dart'; + +mixin MainPageMixin { + final List pages = [ + HomePage(), + BrowsePage(), + BasketPage(), + AccountPage(), + ]; + + final List defaultIcons = [ + SvgPicture.asset(AppIcons.icHome), + SvgPicture.asset(AppIcons.icBrowse), + SvgPicture.asset(AppIcons.icBasket), + SvgPicture.asset(AppIcons.icAccount), + ]; + + final List activeIcons = [ + SvgPicture.asset(AppIcons.icHomeActive), + SvgPicture.asset(AppIcons.icBrowseActive), + SvgPicture.asset(AppIcons.icBasketActive), + SvgPicture.asset(AppIcons.icAccountActive), + ]; + + final List labels = ["Home", "Browse", "Baskets", 'Account']; +} diff --git a/lib/feature/main/presentation/pages/main_page/main_page.dart b/lib/feature/main/presentation/pages/main_page/main_page.dart new file mode 100644 index 0000000..ff2ab0d --- /dev/null +++ b/lib/feature/main/presentation/pages/main_page/main_page.dart @@ -0,0 +1,40 @@ +import '../../../../../food_delivery_client.dart'; + +class MainPage extends StatelessWidget with MainPageMixin { + MainPage({super.key}); + + @override + Widget build(BuildContext context) { + return BlocProvider( + create: (context) => sl(), + child: BlocBuilder( + builder: (context, state) { + return Scaffold( + body: IndexedStack( + index: state.currentIndex, + sizing: StackFit.expand, + alignment: AlignmentGeometry.center, + children: pages, + ), + bottomNavigationBar: BottomNavigationBar( + onTap: (value) { + context.read().add(MainEvent.loaded(value)); + }, + currentIndex: state.currentIndex, + items: List.generate( + defaultIcons.length, + (index) => BottomNavigationBarItem( + icon: defaultIcons[index].paddingOnly(bottom: 4.85), + activeIcon: activeIcons[index].paddingOnly(bottom: 4.85), + label: labels[index], + tooltip: labels[index], + backgroundColor: AppColors.cFFFFFF, + ), + ), + ), + ); + }, + ), + ); + } +} diff --git a/lib/feature/on_boarding/on_boarding.dart b/lib/feature/on_boarding/on_boarding.dart new file mode 100644 index 0000000..e69de29 diff --git a/lib/feature/on_boarding/presentation/blocs/splash_bloc/splash_bloc.dart b/lib/feature/on_boarding/presentation/blocs/splash_bloc/splash_bloc.dart new file mode 100644 index 0000000..c6a5fad --- /dev/null +++ b/lib/feature/on_boarding/presentation/blocs/splash_bloc/splash_bloc.dart @@ -0,0 +1,19 @@ +import 'package:food_delivery_client/food_delivery_client.dart'; + +part 'splash_event.dart'; + +part 'splash_state.dart'; + +part 'splash_bloc.freezed.dart'; + +@injectable +class SplashBloc extends Bloc { + SplashBloc() : super(const SplashState()) { + on<_Started>(_onStarted); + } + + Future _onStarted(_Started event, Emitter emit) async { + await Future.delayed(TimeDelayConst.duration3); + emit(state.copyWith(status: RequestStatus.loaded)); + } +} diff --git a/lib/feature/on_boarding/presentation/blocs/splash_bloc/splash_bloc.freezed.dart b/lib/feature/on_boarding/presentation/blocs/splash_bloc/splash_bloc.freezed.dart new file mode 100644 index 0000000..2b3f223 --- /dev/null +++ b/lib/feature/on_boarding/presentation/blocs/splash_bloc/splash_bloc.freezed.dart @@ -0,0 +1,463 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND +// coverage:ignore-file +// ignore_for_file: type=lint +// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark + +part of 'splash_bloc.dart'; + +// ************************************************************************** +// FreezedGenerator +// ************************************************************************** + +// dart format off +T _$identity(T value) => value; +/// @nodoc +mixin _$SplashEvent { + + + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is SplashEvent); +} + + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'SplashEvent()'; +} + + +} + +/// @nodoc +class $SplashEventCopyWith<$Res> { +$SplashEventCopyWith(SplashEvent _, $Res Function(SplashEvent) __); +} + + +/// Adds pattern-matching-related methods to [SplashEvent]. +extension SplashEventPatterns on SplashEvent { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap({TResult Function( _Started value)? started,required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _Started() when started != null: +return started(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map({required TResult Function( _Started value) started,}){ +final _that = this; +switch (_that) { +case _Started(): +return started(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull({TResult? Function( _Started value)? started,}){ +final _that = this; +switch (_that) { +case _Started() when started != null: +return started(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen({TResult Function()? started,required TResult orElse(),}) {final _that = this; +switch (_that) { +case _Started() when started != null: +return started();case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when({required TResult Function() started,}) {final _that = this; +switch (_that) { +case _Started(): +return started();case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull({TResult? Function()? started,}) {final _that = this; +switch (_that) { +case _Started() when started != null: +return started();case _: + return null; + +} +} + +} + +/// @nodoc + + +class _Started implements SplashEvent { + const _Started(); + + + + + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _Started); +} + + +@override +int get hashCode => runtimeType.hashCode; + +@override +String toString() { + return 'SplashEvent.started()'; +} + + +} + + + + +/// @nodoc +mixin _$SplashState { + + RequestStatus get status; +/// Create a copy of SplashState +/// with the given fields replaced by the non-null parameter values. +@JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +$SplashStateCopyWith get copyWith => _$SplashStateCopyWithImpl(this as SplashState, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is SplashState&&(identical(other.status, status) || other.status == status)); +} + + +@override +int get hashCode => Object.hash(runtimeType,status); + +@override +String toString() { + return 'SplashState(status: $status)'; +} + + +} + +/// @nodoc +abstract mixin class $SplashStateCopyWith<$Res> { + factory $SplashStateCopyWith(SplashState value, $Res Function(SplashState) _then) = _$SplashStateCopyWithImpl; +@useResult +$Res call({ + RequestStatus status +}); + + + + +} +/// @nodoc +class _$SplashStateCopyWithImpl<$Res> + implements $SplashStateCopyWith<$Res> { + _$SplashStateCopyWithImpl(this._self, this._then); + + final SplashState _self; + final $Res Function(SplashState) _then; + +/// Create a copy of SplashState +/// with the given fields replaced by the non-null parameter values. +@pragma('vm:prefer-inline') @override $Res call({Object? status = null,}) { + return _then(_self.copyWith( +status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable +as RequestStatus, + )); +} + +} + + +/// Adds pattern-matching-related methods to [SplashState]. +extension SplashStatePatterns on SplashState { +/// A variant of `map` that fallback to returning `orElse`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeMap(TResult Function( _SplashState value)? $default,{required TResult orElse(),}){ +final _that = this; +switch (_that) { +case _SplashState() when $default != null: +return $default(_that);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// Callbacks receives the raw object, upcasted. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case final Subclass2 value: +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult map(TResult Function( _SplashState value) $default,){ +final _that = this; +switch (_that) { +case _SplashState(): +return $default(_that);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `map` that fallback to returning `null`. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case final Subclass value: +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? mapOrNull(TResult? Function( _SplashState value)? $default,){ +final _that = this; +switch (_that) { +case _SplashState() when $default != null: +return $default(_that);case _: + return null; + +} +} +/// A variant of `when` that fallback to an `orElse` callback. +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return orElse(); +/// } +/// ``` + +@optionalTypeArgs TResult maybeWhen(TResult Function( RequestStatus status)? $default,{required TResult orElse(),}) {final _that = this; +switch (_that) { +case _SplashState() when $default != null: +return $default(_that.status);case _: + return orElse(); + +} +} +/// A `switch`-like method, using callbacks. +/// +/// As opposed to `map`, this offers destructuring. +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case Subclass2(:final field2): +/// return ...; +/// } +/// ``` + +@optionalTypeArgs TResult when(TResult Function( RequestStatus status) $default,) {final _that = this; +switch (_that) { +case _SplashState(): +return $default(_that.status);case _: + throw StateError('Unexpected subclass'); + +} +} +/// A variant of `when` that fallback to returning `null` +/// +/// It is equivalent to doing: +/// ```dart +/// switch (sealedClass) { +/// case Subclass(:final field): +/// return ...; +/// case _: +/// return null; +/// } +/// ``` + +@optionalTypeArgs TResult? whenOrNull(TResult? Function( RequestStatus status)? $default,) {final _that = this; +switch (_that) { +case _SplashState() when $default != null: +return $default(_that.status);case _: + return null; + +} +} + +} + +/// @nodoc + + +class _SplashState implements SplashState { + const _SplashState({this.status = RequestStatus.initial}); + + +@override@JsonKey() final RequestStatus status; + +/// Create a copy of SplashState +/// with the given fields replaced by the non-null parameter values. +@override @JsonKey(includeFromJson: false, includeToJson: false) +@pragma('vm:prefer-inline') +_$SplashStateCopyWith<_SplashState> get copyWith => __$SplashStateCopyWithImpl<_SplashState>(this, _$identity); + + + +@override +bool operator ==(Object other) { + return identical(this, other) || (other.runtimeType == runtimeType&&other is _SplashState&&(identical(other.status, status) || other.status == status)); +} + + +@override +int get hashCode => Object.hash(runtimeType,status); + +@override +String toString() { + return 'SplashState(status: $status)'; +} + + +} + +/// @nodoc +abstract mixin class _$SplashStateCopyWith<$Res> implements $SplashStateCopyWith<$Res> { + factory _$SplashStateCopyWith(_SplashState value, $Res Function(_SplashState) _then) = __$SplashStateCopyWithImpl; +@override @useResult +$Res call({ + RequestStatus status +}); + + + + +} +/// @nodoc +class __$SplashStateCopyWithImpl<$Res> + implements _$SplashStateCopyWith<$Res> { + __$SplashStateCopyWithImpl(this._self, this._then); + + final _SplashState _self; + final $Res Function(_SplashState) _then; + +/// Create a copy of SplashState +/// with the given fields replaced by the non-null parameter values. +@override @pragma('vm:prefer-inline') $Res call({Object? status = null,}) { + return _then(_SplashState( +status: null == status ? _self.status : status // ignore: cast_nullable_to_non_nullable +as RequestStatus, + )); +} + + +} + +// dart format on diff --git a/lib/feature/on_boarding/presentation/blocs/splash_bloc/splash_event.dart b/lib/feature/on_boarding/presentation/blocs/splash_bloc/splash_event.dart new file mode 100644 index 0000000..b2fcaf7 --- /dev/null +++ b/lib/feature/on_boarding/presentation/blocs/splash_bloc/splash_event.dart @@ -0,0 +1,6 @@ +part of 'splash_bloc.dart'; + +@freezed +class SplashEvent with _$SplashEvent { + const factory SplashEvent.started() = _Started; +} diff --git a/lib/feature/on_boarding/presentation/blocs/splash_bloc/splash_state.dart b/lib/feature/on_boarding/presentation/blocs/splash_bloc/splash_state.dart new file mode 100644 index 0000000..926f529 --- /dev/null +++ b/lib/feature/on_boarding/presentation/blocs/splash_bloc/splash_state.dart @@ -0,0 +1,8 @@ +part of 'splash_bloc.dart'; + +@freezed +abstract class SplashState with _$SplashState { + const factory SplashState({ + @Default(RequestStatus.initial) RequestStatus status, + }) = _SplashState; +} diff --git a/lib/feature/on_boarding/presentation/pages/splash_page/splash_page.dart b/lib/feature/on_boarding/presentation/pages/splash_page/splash_page.dart new file mode 100644 index 0000000..567c2fd --- /dev/null +++ b/lib/feature/on_boarding/presentation/pages/splash_page/splash_page.dart @@ -0,0 +1,37 @@ +import 'package:flutter_svg/flutter_svg.dart'; +import 'package:food_delivery_client/feature/on_boarding/presentation/blocs/splash_bloc/splash_bloc.dart'; + +import '../../../../../food_delivery_client.dart'; + +class SplashPage extends StatelessWidget { + const SplashPage({super.key}); + + @override + Widget build(BuildContext context) { + return BlocProvider( + create: (context) => sl()..add(SplashEvent.started()), + child: BlocListener( + listener: (context, state) { + if (state.status.isLoaded()) { + context.go(Routes.main); + } + }, + child: Scaffold( + backgroundColor: AppColors.c142328, + body: Align( + alignment: AlignmentGeometry.center, + child: Column( + mainAxisSize: MainAxisSize.max, + crossAxisAlignment: CrossAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.center, + children: [ + SvgPicture.asset(AppIcons.icUber), + SvgPicture.asset(AppIcons.icEat), + ], + ), + ), + ), + ), + ); + } +} diff --git a/lib/food_delivery_client.dart b/lib/food_delivery_client.dart new file mode 100644 index 0000000..4605f52 --- /dev/null +++ b/lib/food_delivery_client.dart @@ -0,0 +1,21 @@ +export 'feature/main/main.dart'; +export 'package:flutter/material.dart'; +export 'package:get_it/get_it.dart'; +export 'package:injectable/injectable.dart'; +export 'package:food_delivery_client/core/router/routes_name.dart'; +export 'package:go_router/go_router.dart'; +export 'core/core.dart'; +export 'feature/common/common.dart'; +export 'feature/home/home.dart'; +export 'feature/browse/browse.dart'; +export 'feature/basket/basket.dart'; +export 'feature/account/account.dart'; +export 'package:flutter_bloc/flutter_bloc.dart'; +export 'package:flutter_localizations/flutter_localizations.dart'; +export 'package:flutter/services.dart'; +export 'dart:async'; +export 'dart:developer' show log; +export 'package:freezed_annotation/freezed_annotation.dart'; +export 'package:shared_preferences/shared_preferences.dart'; +export 'package:cached_network_image/cached_network_image.dart'; +export 'package:carousel_slider/carousel_slider.dart'; diff --git a/lib/main.dart b/lib/main.dart new file mode 100644 index 0000000..020c6bf --- /dev/null +++ b/lib/main.dart @@ -0,0 +1,75 @@ +import 'package:food_delivery_client/feature/common/presentation/blocs/language_bloc/language_bloc.dart'; + +import 'food_delivery_client.dart'; + +void main() { + runZonedGuarded( + () async{ + WidgetsFlutterBinding.ensureInitialized(); + FlutterError.onError = (details) { + FlutterError.presentError(details); + log("Flutter.onError $details"); + }; + Bloc.observer = AppBlocObserver(); + await configureDependencies(); + runApp( + BlocProvider(create: (context) => sl(), child: MyApp()), + ); + }, + (error, stack) { + log("RunZoneGuard Error $error"); + }, + ); +} + +class MyApp extends StatefulWidget { + const MyApp({super.key}); + + @override + State createState() => _MyAppState(); +} + +class _MyAppState extends State { + @override + void initState() { + SystemChrome.setPreferredOrientations([ + DeviceOrientation.portraitUp, + DeviceOrientation.portraitDown, + ]); + super.initState(); + } + + @override + Widget build(BuildContext context) { + return BlocBuilder( + bloc: context.read()..add(LanguageEvent.started()), + builder: (context, state) { + return MaterialApp.router( + title: "Uber Eats", + debugShowCheckedModeBanner: false, + theme: AppTheme.lightTheme, + routerConfig: sl().router, + locale: state.currentLocale, + supportedLocales: L10n.locales, + localizationsDelegates: [ + AppLocalizations.delegate, + GlobalMaterialLocalizations.delegate, + GlobalWidgetsLocalizations.delegate, + GlobalCupertinoLocalizations.delegate, + ], + builder: (context, child) => GestureDetector( + onTap: () { + FocusManager.instance.primaryFocus?.unfocus(); + }, + child: MediaQuery( + data: MediaQuery.of( + context, + ).copyWith(textScaler: const TextScaler.linear(1)), + child: child!, + ), + ), + ); + }, + ); + } +} diff --git a/pubspec.lock b/pubspec.lock new file mode 100644 index 0000000..51e70cc --- /dev/null +++ b/pubspec.lock @@ -0,0 +1,967 @@ +# Generated by pub +# See https://dart.dev/tools/pub/glossary#lockfile +packages: + _fe_analyzer_shared: + dependency: transitive + description: + name: _fe_analyzer_shared + sha256: c209688d9f5a5f26b2fb47a188131a6fb9e876ae9e47af3737c0b4f58a93470d + url: "https://pub.dev" + source: hosted + version: "91.0.0" + analyzer: + dependency: transitive + description: + name: analyzer + sha256: a40a0cee526a7e1f387c6847bd8a5ccbf510a75952ef8a28338e989558072cb0 + url: "https://pub.dev" + source: hosted + version: "8.4.0" + args: + dependency: transitive + description: + name: args + sha256: d0481093c50b1da8910eb0bb301626d4d8eb7284aa739614d2b394ee09e3ea04 + url: "https://pub.dev" + source: hosted + version: "2.7.0" + async: + dependency: transitive + description: + name: async + sha256: "758e6d74e971c3e5aceb4110bfd6698efc7f501675bcfe0c775459a8140750eb" + url: "https://pub.dev" + source: hosted + version: "2.13.0" + bloc: + dependency: "direct main" + description: + name: bloc + sha256: a2cebb899f91d36eeeaa55c7b20b5915db5a9df1b8fd4a3c9c825e22e474537d + url: "https://pub.dev" + source: hosted + version: "9.1.0" + boolean_selector: + dependency: transitive + description: + name: boolean_selector + sha256: "8aab1771e1243a5063b8b0ff68042d67334e3feab9e95b9490f9a6ebf73b42ea" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + build: + dependency: transitive + description: + name: build + sha256: dfb67ccc9a78c642193e0c2d94cb9e48c2c818b3178a86097d644acdcde6a8d9 + url: "https://pub.dev" + source: hosted + version: "4.0.2" + build_config: + dependency: transitive + description: + name: build_config + sha256: "4f64382b97504dc2fcdf487d5aae33418e08b4703fc21249e4db6d804a4d0187" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + build_daemon: + dependency: transitive + description: + name: build_daemon + sha256: "409002f1adeea601018715d613115cfaf0e31f512cb80ae4534c79867ae2363d" + url: "https://pub.dev" + source: hosted + version: "4.1.0" + build_runner: + dependency: "direct dev" + description: + name: build_runner + sha256: "8cd45bdd6217138f4cfbaf6286c93f270ae4b3e2e281e69c904bd00cdf8aa626" + url: "https://pub.dev" + source: hosted + version: "2.10.0" + built_collection: + dependency: transitive + description: + name: built_collection + sha256: "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100" + url: "https://pub.dev" + source: hosted + version: "5.1.1" + built_value: + dependency: transitive + description: + name: built_value + sha256: a30f0a0e38671e89a492c44d005b5545b830a961575bbd8336d42869ff71066d + url: "https://pub.dev" + source: hosted + version: "8.12.0" + cached_network_image: + dependency: "direct main" + description: + name: cached_network_image + sha256: "7c1183e361e5c8b0a0f21a28401eecdbde252441106a9816400dd4c2b2424916" + url: "https://pub.dev" + source: hosted + version: "3.4.1" + cached_network_image_platform_interface: + dependency: transitive + description: + name: cached_network_image_platform_interface + sha256: "35814b016e37fbdc91f7ae18c8caf49ba5c88501813f73ce8a07027a395e2829" + url: "https://pub.dev" + source: hosted + version: "4.1.1" + cached_network_image_web: + dependency: transitive + description: + name: cached_network_image_web + sha256: "980842f4e8e2535b8dbd3d5ca0b1f0ba66bf61d14cc3a17a9b4788a3685ba062" + url: "https://pub.dev" + source: hosted + version: "1.3.1" + carousel_slider: + dependency: "direct main" + description: + name: carousel_slider + sha256: bcc61735345c9ab5cb81073896579e735f81e35fd588907a393143ea986be8ff + url: "https://pub.dev" + source: hosted + version: "5.1.1" + characters: + dependency: transitive + description: + name: characters + sha256: f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + checked_yaml: + dependency: transitive + description: + name: checked_yaml + sha256: "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f" + url: "https://pub.dev" + source: hosted + version: "2.0.4" + clock: + dependency: transitive + description: + name: clock + sha256: fddb70d9b5277016c77a80201021d40a2247104d9f4aa7bab7157b7e3f05b84b + url: "https://pub.dev" + source: hosted + version: "1.1.2" + code_builder: + dependency: transitive + description: + name: code_builder + sha256: "11654819532ba94c34de52ff5feb52bd81cba1de00ef2ed622fd50295f9d4243" + url: "https://pub.dev" + source: hosted + version: "4.11.0" + collection: + dependency: transitive + description: + name: collection + sha256: "2f5709ae4d3d59dd8f7cd309b4e023046b57d8a6c82130785d2b0e5868084e76" + url: "https://pub.dev" + source: hosted + version: "1.19.1" + convert: + dependency: transitive + description: + name: convert + sha256: b30acd5944035672bc15c6b7a8b47d773e41e2f17de064350988c5d02adb1c68 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + crypto: + dependency: transitive + description: + name: crypto + sha256: "1e445881f28f22d6140f181e07737b22f1e099a5e1ff94b0af2f9e4a463f4855" + url: "https://pub.dev" + source: hosted + version: "3.0.6" + cupertino_icons: + dependency: "direct main" + description: + name: cupertino_icons + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 + url: "https://pub.dev" + source: hosted + version: "1.0.8" + dart_style: + dependency: transitive + description: + name: dart_style + sha256: c87dfe3d56f183ffe9106a18aebc6db431fc7c98c31a54b952a77f3d54a85697 + url: "https://pub.dev" + source: hosted + version: "3.1.2" + dio: + dependency: "direct main" + description: + name: dio + sha256: d90ee57923d1828ac14e492ca49440f65477f4bb1263575900be731a3dac66a9 + url: "https://pub.dev" + source: hosted + version: "5.9.0" + dio_web_adapter: + dependency: transitive + description: + name: dio_web_adapter + sha256: "7586e476d70caecaf1686d21eee7247ea43ef5c345eab9e0cc3583ff13378d78" + url: "https://pub.dev" + source: hosted + version: "2.1.1" + fake_async: + dependency: transitive + description: + name: fake_async + sha256: "5368f224a74523e8d2e7399ea1638b37aecfca824a3cc4dfdf77bf1fa905ac44" + url: "https://pub.dev" + source: hosted + version: "1.3.3" + ffi: + dependency: transitive + description: + name: ffi + sha256: "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + file: + dependency: transitive + description: + name: file + sha256: a3b4f84adafef897088c160faf7dfffb7696046cb13ae90b508c2cbc95d3b8d4 + url: "https://pub.dev" + source: hosted + version: "7.0.1" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: b6dc7065e46c974bc7c5f143080a6764ec7a4be6da1285ececdc37be96de53be + url: "https://pub.dev" + source: hosted + version: "1.1.1" + flutter: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_bloc: + dependency: "direct main" + description: + name: flutter_bloc + sha256: cf51747952201a455a1c840f8171d273be009b932c75093020f9af64f2123e38 + url: "https://pub.dev" + source: hosted + version: "9.1.1" + flutter_bounceable: + dependency: "direct main" + description: + name: flutter_bounceable + sha256: "2e46ad87e5870188a459d1e88f5acbf7bf0217651a6655f9ff079bc0c5976010" + url: "https://pub.dev" + source: hosted + version: "1.2.0" + flutter_cache_manager: + dependency: transitive + description: + name: flutter_cache_manager + sha256: "400b6592f16a4409a7f2bb929a9a7e38c72cceb8ffb99ee57bbf2cb2cecf8386" + url: "https://pub.dev" + source: hosted + version: "3.4.1" + flutter_lints: + dependency: "direct dev" + description: + name: flutter_lints + sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1" + url: "https://pub.dev" + source: hosted + version: "5.0.0" + flutter_localizations: + dependency: "direct main" + description: flutter + source: sdk + version: "0.0.0" + flutter_svg: + dependency: "direct main" + description: + name: flutter_svg + sha256: b9c2ad5872518a27507ab432d1fb97e8813b05f0fc693f9d40fad06d073e0678 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + flutter_test: + dependency: "direct dev" + description: flutter + source: sdk + version: "0.0.0" + flutter_web_plugins: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + freezed: + dependency: "direct main" + description: + name: freezed + sha256: "13065f10e135263a4f5a4391b79a8efc5fb8106f8dd555a9e49b750b45393d77" + url: "https://pub.dev" + source: hosted + version: "3.2.3" + freezed_annotation: + dependency: "direct main" + description: + name: freezed_annotation + sha256: "7294967ff0a6d98638e7acb774aac3af2550777accd8149c90af5b014e6d44d8" + url: "https://pub.dev" + source: hosted + version: "3.1.0" + get_it: + dependency: "direct main" + description: + name: get_it + sha256: a4292e7cf67193f8e7c1258203104eb2a51ec8b3a04baa14695f4064c144297b + url: "https://pub.dev" + source: hosted + version: "8.2.0" + glob: + dependency: transitive + description: + name: glob + sha256: c3f1ee72c96f8f78935e18aa8cecced9ab132419e8625dc187e1c2408efc20de + url: "https://pub.dev" + source: hosted + version: "2.1.3" + go_router: + dependency: "direct main" + description: + name: go_router + sha256: e1d7ffb0db475e6e845eb58b44768f50b830e23960e3df6908924acd8f7f70ea + url: "https://pub.dev" + source: hosted + version: "16.2.5" + graphs: + dependency: transitive + description: + name: graphs + sha256: "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0" + url: "https://pub.dev" + source: hosted + version: "2.3.2" + http: + dependency: transitive + description: + name: http + sha256: bb2ce4590bc2667c96f318d68cac1b5a7987ec819351d32b1c987239a815e007 + url: "https://pub.dev" + source: hosted + version: "1.5.0" + http_multi_server: + dependency: transitive + description: + name: http_multi_server + sha256: aa6199f908078bb1c5efb8d8638d4ae191aac11b311132c3ef48ce352fb52ef8 + url: "https://pub.dev" + source: hosted + version: "3.2.2" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "178d74305e7866013777bab2c3d8726205dc5a4dd935297175b19a23a2e66571" + url: "https://pub.dev" + source: hosted + version: "4.1.2" + injectable: + dependency: "direct main" + description: + name: injectable + sha256: f71ef28f5ed30603ab9be004425fd5cd4a473806f5de269d35deb33b61917534 + url: "https://pub.dev" + source: hosted + version: "2.5.2" + injectable_generator: + dependency: "direct main" + description: + name: injectable_generator + sha256: beac1179932b589ae1bc530c7f7dc4dedec4674d84aa452efa24f30b34495e00 + url: "https://pub.dev" + source: hosted + version: "2.9.0" + intl: + dependency: "direct main" + description: + name: intl + sha256: "3df61194eb431efc39c4ceba583b95633a403f46c9fd341e550ce0bfa50e9aa5" + url: "https://pub.dev" + source: hosted + version: "0.20.2" + io: + dependency: transitive + description: + name: io + sha256: dfd5a80599cf0165756e3181807ed3e77daf6dd4137caaad72d0b7931597650b + url: "https://pub.dev" + source: hosted + version: "1.0.5" + json_annotation: + dependency: transitive + description: + name: json_annotation + sha256: "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1" + url: "https://pub.dev" + source: hosted + version: "4.9.0" + leak_tracker: + dependency: transitive + description: + name: leak_tracker + sha256: "33e2e26bdd85a0112ec15400c8cbffea70d0f9c3407491f672a2fad47915e2de" + url: "https://pub.dev" + source: hosted + version: "11.0.2" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: "1dbc140bb5a23c75ea9c4811222756104fbcd1a27173f0c34ca01e16bea473c1" + url: "https://pub.dev" + source: hosted + version: "3.0.10" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: "8d5a2d49f4a66b49744b23b018848400d23e54caf9463f4eb20df3eb8acb2eb1" + url: "https://pub.dev" + source: hosted + version: "3.0.2" + lints: + dependency: transitive + description: + name: lints + sha256: c35bb79562d980e9a453fc715854e1ed39e24e7d0297a880ef54e17f9874a9d7 + url: "https://pub.dev" + source: hosted + version: "5.1.1" + logging: + dependency: transitive + description: + name: logging + sha256: c8245ada5f1717ed44271ed1c26b8ce85ca3228fd2ffdb75468ab01979309d61 + url: "https://pub.dev" + source: hosted + version: "1.3.0" + matcher: + dependency: transitive + description: + name: matcher + sha256: dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2 + url: "https://pub.dev" + source: hosted + version: "0.12.17" + material_color_utilities: + dependency: transitive + description: + name: material_color_utilities + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec + url: "https://pub.dev" + source: hosted + version: "0.11.1" + meta: + dependency: transitive + description: + name: meta + sha256: e3641ec5d63ebf0d9b41bd43201a66e3fc79a65db5f61fc181f04cd27aab950c + url: "https://pub.dev" + source: hosted + version: "1.16.0" + mime: + dependency: transitive + description: + name: mime + sha256: "41a20518f0cb1256669420fdba0cd90d21561e560ac240f26ef8322e45bb7ed6" + url: "https://pub.dev" + source: hosted + version: "2.0.0" + nested: + dependency: transitive + description: + name: nested + sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20" + url: "https://pub.dev" + source: hosted + version: "1.0.0" + octo_image: + dependency: transitive + description: + name: octo_image + sha256: "34faa6639a78c7e3cbe79be6f9f96535867e879748ade7d17c9b1ae7536293bd" + url: "https://pub.dev" + source: hosted + version: "2.1.0" + package_config: + dependency: transitive + description: + name: package_config + sha256: f096c55ebb7deb7e384101542bfba8c52696c1b56fca2eb62827989ef2353bbc + url: "https://pub.dev" + source: hosted + version: "2.2.0" + path: + dependency: transitive + description: + name: path + sha256: "75cca69d1490965be98c73ceaea117e8a04dd21217b37b292c9ddbec0d955bc5" + url: "https://pub.dev" + source: hosted + version: "1.9.1" + path_parsing: + dependency: transitive + description: + name: path_parsing + sha256: "883402936929eac138ee0a45da5b0f2c80f89913e6dc3bf77eb65b84b409c6ca" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + path_provider: + dependency: transitive + description: + name: path_provider + sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" + url: "https://pub.dev" + source: hosted + version: "2.1.5" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + sha256: e122c5ea805bb6773bb12ce667611265980940145be920cd09a4b0ec0285cb16 + url: "https://pub.dev" + source: hosted + version: "2.2.20" + path_provider_foundation: + dependency: transitive + description: + name: path_provider_foundation + sha256: efaec349ddfc181528345c56f8eda9d6cccd71c177511b132c6a0ddaefaa2738 + url: "https://pub.dev" + source: hosted + version: "2.4.3" + path_provider_linux: + dependency: transitive + description: + name: path_provider_linux + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 + url: "https://pub.dev" + source: hosted + version: "2.2.1" + path_provider_platform_interface: + dependency: transitive + description: + name: path_provider_platform_interface + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" + url: "https://pub.dev" + source: hosted + version: "2.1.2" + path_provider_windows: + dependency: transitive + description: + name: path_provider_windows + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 + url: "https://pub.dev" + source: hosted + version: "2.3.0" + petitparser: + dependency: transitive + description: + name: petitparser + sha256: "1a97266a94f7350d30ae522c0af07890c70b8e62c71e8e3920d1db4d23c057d1" + url: "https://pub.dev" + source: hosted + version: "7.0.1" + platform: + dependency: transitive + description: + name: platform + sha256: "5d6b1b0036a5f331ebc77c850ebc8506cbc1e9416c27e59b439f917a902a4984" + url: "https://pub.dev" + source: hosted + version: "3.1.6" + plugin_platform_interface: + dependency: transitive + description: + name: plugin_platform_interface + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" + url: "https://pub.dev" + source: hosted + version: "2.1.8" + pool: + dependency: transitive + description: + name: pool + sha256: "978783255c543aa3586a1b3c21f6e9d720eb315376a915872c61ef8b5c20177d" + url: "https://pub.dev" + source: hosted + version: "1.5.2" + provider: + dependency: transitive + description: + name: provider + sha256: "4e82183fa20e5ca25703ead7e05de9e4cceed1fbd1eadc1ac3cb6f565a09f272" + url: "https://pub.dev" + source: hosted + version: "6.1.5+1" + pub_semver: + dependency: transitive + description: + name: pub_semver + sha256: "5bfcf68ca79ef689f8990d1160781b4bad40a3bd5e5218ad4076ddb7f4081585" + url: "https://pub.dev" + source: hosted + version: "2.2.0" + pubspec_parse: + dependency: transitive + description: + name: pubspec_parse + sha256: "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082" + url: "https://pub.dev" + source: hosted + version: "1.5.0" + recase: + dependency: transitive + description: + name: recase + sha256: e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213 + url: "https://pub.dev" + source: hosted + version: "4.1.0" + rxdart: + dependency: transitive + description: + name: rxdart + sha256: "5c3004a4a8dbb94bd4bf5412a4def4acdaa12e12f269737a5751369e12d1a962" + url: "https://pub.dev" + source: hosted + version: "0.28.0" + shared_preferences: + dependency: "direct main" + description: + name: shared_preferences + sha256: "6e8bf70b7fef813df4e9a36f658ac46d107db4b4cfe1048b477d4e453a8159f5" + url: "https://pub.dev" + source: hosted + version: "2.5.3" + shared_preferences_android: + dependency: transitive + description: + name: shared_preferences_android + sha256: "34266009473bf71d748912da4bf62d439185226c03e01e2d9687bc65bbfcb713" + url: "https://pub.dev" + source: hosted + version: "2.4.15" + shared_preferences_foundation: + dependency: transitive + description: + name: shared_preferences_foundation + sha256: "1c33a907142607c40a7542768ec9badfd16293bac51da3a4482623d15845f88b" + url: "https://pub.dev" + source: hosted + version: "2.5.5" + shared_preferences_linux: + dependency: transitive + description: + name: shared_preferences_linux + sha256: "580abfd40f415611503cae30adf626e6656dfb2f0cee8f465ece7b6defb40f2f" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shared_preferences_platform_interface: + dependency: transitive + description: + name: shared_preferences_platform_interface + sha256: "57cbf196c486bc2cf1f02b85784932c6094376284b3ad5779d1b1c6c6a816b80" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shared_preferences_web: + dependency: transitive + description: + name: shared_preferences_web + sha256: c49bd060261c9a3f0ff445892695d6212ff603ef3115edbb448509d407600019 + url: "https://pub.dev" + source: hosted + version: "2.4.3" + shared_preferences_windows: + dependency: transitive + description: + name: shared_preferences_windows + sha256: "94ef0f72b2d71bc3e700e025db3710911bd51a71cefb65cc609dd0d9a982e3c1" + url: "https://pub.dev" + source: hosted + version: "2.4.1" + shelf: + dependency: transitive + description: + name: shelf + sha256: e7dd780a7ffb623c57850b33f43309312fc863fb6aa3d276a754bb299839ef12 + url: "https://pub.dev" + source: hosted + version: "1.4.2" + shelf_web_socket: + dependency: transitive + description: + name: shelf_web_socket + sha256: "3632775c8e90d6c9712f883e633716432a27758216dfb61bd86a8321c0580925" + url: "https://pub.dev" + source: hosted + version: "3.0.0" + sky_engine: + dependency: transitive + description: flutter + source: sdk + version: "0.0.0" + source_gen: + dependency: transitive + description: + name: source_gen + sha256: "9098ab86015c4f1d8af6486b547b11100e73b193e1899015033cb3e14ad20243" + url: "https://pub.dev" + source: hosted + version: "4.0.2" + source_span: + dependency: transitive + description: + name: source_span + sha256: "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c" + url: "https://pub.dev" + source: hosted + version: "1.10.1" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" + sqflite: + dependency: transitive + description: + name: sqflite + sha256: e2297b1da52f127bc7a3da11439985d9b536f75070f3325e62ada69a5c585d03 + url: "https://pub.dev" + source: hosted + version: "2.4.2" + sqflite_android: + dependency: transitive + description: + name: sqflite_android + sha256: ecd684501ebc2ae9a83536e8b15731642b9570dc8623e0073d227d0ee2bfea88 + url: "https://pub.dev" + source: hosted + version: "2.4.2+2" + sqflite_common: + dependency: transitive + description: + name: sqflite_common + sha256: "6ef422a4525ecc601db6c0a2233ff448c731307906e92cabc9ba292afaae16a6" + url: "https://pub.dev" + source: hosted + version: "2.5.6" + sqflite_darwin: + dependency: transitive + description: + name: sqflite_darwin + sha256: "279832e5cde3fe99e8571879498c9211f3ca6391b0d818df4e17d9fff5c6ccb3" + url: "https://pub.dev" + source: hosted + version: "2.4.2" + sqflite_platform_interface: + dependency: transitive + description: + name: sqflite_platform_interface + sha256: "8dd4515c7bdcae0a785b0062859336de775e8c65db81ae33dd5445f35be61920" + url: "https://pub.dev" + source: hosted + version: "2.4.0" + stack_trace: + dependency: transitive + description: + name: stack_trace + sha256: "8b27215b45d22309b5cddda1aa2b19bdfec9df0e765f2de506401c071d38d1b1" + url: "https://pub.dev" + source: hosted + version: "1.12.1" + stream_channel: + dependency: transitive + description: + name: stream_channel + sha256: "969e04c80b8bcdf826f8f16579c7b14d780458bd97f56d107d3950fdbeef059d" + url: "https://pub.dev" + source: hosted + version: "2.1.4" + stream_transform: + dependency: transitive + description: + name: stream_transform + sha256: ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871 + url: "https://pub.dev" + source: hosted + version: "2.1.1" + string_scanner: + dependency: transitive + description: + name: string_scanner + sha256: "921cd31725b72fe181906c6a94d987c78e3b98c2e205b397ea399d4054872b43" + url: "https://pub.dev" + source: hosted + version: "1.4.1" + synchronized: + dependency: transitive + description: + name: synchronized + sha256: c254ade258ec8282947a0acbbc90b9575b4f19673533ee46f2f6e9b3aeefd7c0 + url: "https://pub.dev" + source: hosted + version: "3.4.0" + term_glyph: + dependency: transitive + description: + name: term_glyph + sha256: "7f554798625ea768a7518313e58f83891c7f5024f88e46e7182a4558850a4b8e" + url: "https://pub.dev" + source: hosted + version: "1.2.2" + test_api: + dependency: transitive + description: + name: test_api + sha256: "522f00f556e73044315fa4585ec3270f1808a4b186c936e612cab0b565ff1e00" + url: "https://pub.dev" + source: hosted + version: "0.7.6" + typed_data: + dependency: transitive + description: + name: typed_data + sha256: f9049c039ebfeb4cf7a7104a675823cd72dba8297f264b6637062516699fa006 + url: "https://pub.dev" + source: hosted + version: "1.4.0" + uuid: + dependency: transitive + description: + name: uuid + sha256: a5be9ef6618a7ac1e964353ef476418026db906c4facdedaa299b7a2e71690ff + url: "https://pub.dev" + source: hosted + version: "4.5.1" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: a4f059dc26fc8295b5921376600a194c4ec7d55e72f2fe4c7d2831e103d461e6 + url: "https://pub.dev" + source: hosted + version: "1.1.19" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: "99fd9fbd34d9f9a32efd7b6a6aae14125d8237b10403b422a6a6dfeac2806146" + url: "https://pub.dev" + source: hosted + version: "1.1.13" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: d354a7ec6931e6047785f4db12a1f61ec3d43b207fc0790f863818543f8ff0dc + url: "https://pub.dev" + source: hosted + version: "1.1.19" + vector_math: + dependency: transitive + description: + name: vector_math + sha256: d530bd74fea330e6e364cda7a85019c434070188383e1cd8d9777ee586914c5b + url: "https://pub.dev" + source: hosted + version: "2.2.0" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: "45caa6c5917fa127b5dbcfbd1fa60b14e583afdc08bfc96dda38886ca252eb60" + url: "https://pub.dev" + source: hosted + version: "15.0.2" + watcher: + dependency: transitive + description: + name: watcher + sha256: "592ab6e2892f67760543fb712ff0177f4ec76c031f02f5b4ff8d3fc5eb9fb61a" + url: "https://pub.dev" + source: hosted + version: "1.1.4" + web: + dependency: transitive + description: + name: web + sha256: "868d88a33d8a87b18ffc05f9f030ba328ffefba92d6c127917a2ba740f9cfe4a" + url: "https://pub.dev" + source: hosted + version: "1.1.1" + web_socket: + dependency: transitive + description: + name: web_socket + sha256: "34d64019aa8e36bf9842ac014bb5d2f5586ca73df5e4d9bf5c936975cae6982c" + url: "https://pub.dev" + source: hosted + version: "1.0.1" + web_socket_channel: + dependency: transitive + description: + name: web_socket_channel + sha256: d645757fb0f4773d602444000a8131ff5d48c9e47adfe9772652dd1a4f2d45c8 + url: "https://pub.dev" + source: hosted + version: "3.0.3" + xdg_directories: + dependency: transitive + description: + name: xdg_directories + sha256: "7a3f37b05d989967cdddcbb571f1ea834867ae2faa29725fd085180e0883aa15" + url: "https://pub.dev" + source: hosted + version: "1.1.0" + xml: + dependency: transitive + description: + name: xml + sha256: "971043b3a0d3da28727e40ed3e0b5d18b742fa5a68665cca88e74b7876d5e025" + url: "https://pub.dev" + source: hosted + version: "6.6.1" + yaml: + dependency: transitive + description: + name: yaml + sha256: b9da305ac7c39faa3f030eccd175340f968459dae4af175130b3fc47e40d76ce + url: "https://pub.dev" + source: hosted + version: "3.1.3" +sdks: + dart: ">=3.9.0 <4.0.0" + flutter: ">=3.35.0" diff --git a/pubspec.yaml b/pubspec.yaml new file mode 100644 index 0000000..393175c --- /dev/null +++ b/pubspec.yaml @@ -0,0 +1,80 @@ +name: food_delivery_client +description: "A new Flutter project" +version: 1.0.0+1 + +environment: + sdk: ^3.9.0 + +dependencies: + flutter: + sdk: flutter + flutter_localizations: + sdk: flutter + + cupertino_icons: ^1.0.8 + #navigation + go_router: ^16.2.5 + + #helpers + intl: ^0.20.2 + flutter_bounceable: ^1.2.0 + cached_network_image: ^3.4.1 + carousel_slider: ^5.1.1 + + #DI + get_it: ^8.2.0 + injectable: ^2.5.2 + injectable_generator: ^2.9.0 + + #network + dio: ^5.9.0 + + #to use svgs + flutter_svg: ^2.2.1 + + #storage + shared_preferences: ^2.5.3 + + + #state_manegement + bloc: ^9.1.0 + flutter_bloc: ^9.1.1 + freezed: ^3.2.3 + freezed_annotation: ^3.1.0 + + +dev_dependencies: + flutter_test: + sdk: flutter + flutter_lints: ^5.0.0 + build_runner: ^2.10.0 + + +flutter: + generate: true + uses-material-design: true + + + assets: + - assets/images/ + - assets/icons/ + - assets/fonts/ + - assets/translations/ + + fonts: + - family: fontBold + fonts: + - asset: assets/fonts/UberMoveTextBold.otf + weight: 700 + - family: fontMedium + fonts: + - asset: assets/fonts/UberMoveTextMedium.otf + weight: 500 + - family: fontRegular + fonts: + - asset: assets/fonts/UberMoveTextRegular.otf + weight: 400 + - family: fontLight + fonts: + - asset: assets/fonts/UberMoveTextLight.otf + weight: 300 diff --git a/test/widget_test.dart b/test/widget_test.dart new file mode 100644 index 0000000..5640e60 --- /dev/null +++ b/test/widget_test.dart @@ -0,0 +1,30 @@ +// This is a basic Flutter widget test. +// +// To perform an interaction with a widget in your test, use the WidgetTester +// utility in the flutter_test package. For example, you can send tap and scroll +// gestures. You can also use WidgetTester to find child widgets in the widget +// tree, read text, and verify that the values of widget properties are correct. + +import 'package:flutter/material.dart'; +import 'package:flutter_test/flutter_test.dart'; + +import 'package:food_delivery_client/main.dart'; + +void main() { + testWidgets('Counter increments smoke test', (WidgetTester tester) async { + // Build our app and trigger a frame. + await tester.pumpWidget(const MyApp()); + + // Verify that our counter starts at 0. + expect(find.text('0'), findsOneWidget); + expect(find.text('1'), findsNothing); + + // Tap the '+' icon and trigger a frame. + await tester.tap(find.byIcon(Icons.add)); + await tester.pump(); + + // Verify that our counter has incremented. + expect(find.text('0'), findsNothing); + expect(find.text('1'), findsOneWidget); + }); +}