diff --git a/android/app/build.gradle b/android/app/build.gradle
index f251401..6a78e7c 100644
--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -48,7 +48,7 @@ android {
applicationId "com.example.food_delivery"
// You can update the following values to match your application needs.
// For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration.
- minSdkVersion flutter.minSdkVersion
+ minSdkVersion 19
targetSdkVersion flutter.targetSdkVersion
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
diff --git a/android/app/google-services.json b/android/app/google-services.json
new file mode 100644
index 0000000..a6a98e1
--- /dev/null
+++ b/android/app/google-services.json
@@ -0,0 +1,39 @@
+{
+ "project_info": {
+ "project_number": "386113379551",
+ "project_id": "food-delivery-5ccf6",
+ "storage_bucket": "food-delivery-5ccf6.appspot.com"
+ },
+ "client": [
+ {
+ "client_info": {
+ "mobilesdk_app_id": "1:386113379551:android:5de50f5cca859d8b2f5d6a",
+ "android_client_info": {
+ "package_name": "com.example.food_delivery"
+ }
+ },
+ "oauth_client": [
+ {
+ "client_id": "386113379551-mf393pb7ulp3kobavfb920jb19sqqqo9.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ],
+ "api_key": [
+ {
+ "current_key": "AIzaSyB4dx-pxLS8uYja7UG-GfBAVAUgq9rdBY8"
+ }
+ ],
+ "services": {
+ "appinvite_service": {
+ "other_platform_oauth_client": [
+ {
+ "client_id": "386113379551-mf393pb7ulp3kobavfb920jb19sqqqo9.apps.googleusercontent.com",
+ "client_type": 3
+ }
+ ]
+ }
+ }
+ }
+ ],
+ "configuration_version": "1"
+}
\ No newline at end of file
diff --git a/android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java b/android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java
new file mode 100644
index 0000000..752fc18
--- /dev/null
+++ b/android/app/src/main/java/io/flutter/app/FlutterMultiDexApplication.java
@@ -0,0 +1,25 @@
+// Generated file.
+//
+// If you wish to remove Flutter's multidex support, delete this entire file.
+//
+// Modifications to this file should be done in a copy under a different name
+// as this file may be regenerated.
+
+package io.flutter.app;
+
+import android.app.Application;
+import android.content.Context;
+import androidx.annotation.CallSuper;
+import androidx.multidex.MultiDex;
+
+/**
+ * Extension of {@link android.app.Application}, adding multidex support.
+ */
+public class FlutterMultiDexApplication extends Application {
+ @Override
+ @CallSuper
+ protected void attachBaseContext(Context base) {
+ super.attachBaseContext(base);
+ MultiDex.install(this);
+ }
+}
diff --git a/assets/fonts/Merriweather-Black.ttf b/assets/fonts/Merriweather-Black.ttf
new file mode 100644
index 0000000..50c3b33
Binary files /dev/null and b/assets/fonts/Merriweather-Black.ttf differ
diff --git a/assets/fonts/Merriweather-BlackItalic.ttf b/assets/fonts/Merriweather-BlackItalic.ttf
new file mode 100644
index 0000000..4879aba
Binary files /dev/null and b/assets/fonts/Merriweather-BlackItalic.ttf differ
diff --git a/assets/fonts/Merriweather-Bold.ttf b/assets/fonts/Merriweather-Bold.ttf
new file mode 100644
index 0000000..3e10e02
Binary files /dev/null and b/assets/fonts/Merriweather-Bold.ttf differ
diff --git a/assets/fonts/Merriweather-BoldItalic.ttf b/assets/fonts/Merriweather-BoldItalic.ttf
new file mode 100644
index 0000000..5b9d0ec
Binary files /dev/null and b/assets/fonts/Merriweather-BoldItalic.ttf differ
diff --git a/assets/fonts/Merriweather-Italic.ttf b/assets/fonts/Merriweather-Italic.ttf
new file mode 100644
index 0000000..8e9d03d
Binary files /dev/null and b/assets/fonts/Merriweather-Italic.ttf differ
diff --git a/assets/fonts/Merriweather-Light.ttf b/assets/fonts/Merriweather-Light.ttf
new file mode 100644
index 0000000..034ef03
Binary files /dev/null and b/assets/fonts/Merriweather-Light.ttf differ
diff --git a/assets/fonts/Merriweather-LightItalic.ttf b/assets/fonts/Merriweather-LightItalic.ttf
new file mode 100644
index 0000000..4d19550
Binary files /dev/null and b/assets/fonts/Merriweather-LightItalic.ttf differ
diff --git a/assets/fonts/Merriweather-Regular.ttf b/assets/fonts/Merriweather-Regular.ttf
new file mode 100644
index 0000000..3fecc77
Binary files /dev/null and b/assets/fonts/Merriweather-Regular.ttf differ
diff --git a/assets/image/nothing_founded_icon.svg b/assets/image/nothing_founded_icon.svg
new file mode 100644
index 0000000..186eab2
--- /dev/null
+++ b/assets/image/nothing_founded_icon.svg
@@ -0,0 +1,24 @@
+
+
+
\ No newline at end of file
diff --git a/core/analysis_options.yaml b/core/analysis_options.yaml
new file mode 100644
index 0000000..a5744c1
--- /dev/null
+++ b/core/analysis_options.yaml
@@ -0,0 +1,4 @@
+include: package:flutter_lints/flutter.yaml
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/core/lib/config/di/app_di.dart b/core/lib/config/di/app_di.dart
new file mode 100644
index 0000000..9236a69
--- /dev/null
+++ b/core/lib/config/di/app_di.dart
@@ -0,0 +1,17 @@
+import 'package:cloud_firestore/cloud_firestore.dart';
+import 'package:navigation/navigation.dart';
+
+import 'data_di.dart';
+
+final AppDI appDI = AppDI();
+
+class AppDI {
+ void initDependencies() async {
+ DataDI().initDependencies();
+
+ final FirebaseFirestore fireStore = FirebaseFirestore.instance;
+ instance.registerLazySingleton(() => fireStore);
+
+ setupNavigationDependencies();
+ }
+}
diff --git a/core/lib/config/di/data_di.dart b/core/lib/config/di/data_di.dart
new file mode 100644
index 0000000..0fcd4f5
--- /dev/null
+++ b/core/lib/config/di/data_di.dart
@@ -0,0 +1,56 @@
+import 'package:cloud_firestore/cloud_firestore.dart';
+import 'package:data/providers/menu_provider.dart';
+import 'package:data/repositories/menu_repository_impl/menu_repository_impl.dart';
+import 'package:domain/repositories/menu_repository.dart';
+import 'package:domain/usecases/fetch_menu_items_usecase.dart';
+import 'package:firebase_core/firebase_core.dart';
+import 'package:get_it/get_it.dart';
+
+import 'firebase_options.dart';
+
+final DataDI dataDI = DataDI();
+final GetIt instance = GetIt.instance;
+
+class DataDI {
+ Future initDependencies() async {
+ _initFirebaseOptions();
+ _initFirebase();
+ _initDataProvider();
+ _initMenuItems();
+ }
+
+ void _initFirebaseOptions() {
+ instance.registerLazySingleton(
+ () => DefaultFirebaseOptions.currentPlatform,
+ );
+ }
+
+ void _initFirebase() async {
+ await Firebase.initializeApp(
+ name: "food delivery",
+ options: instance(),
+ );
+ }
+
+ void _initDataProvider() {
+ instance.registerLazySingleton(
+ () => MenuDataProvider(
+ FirebaseFirestore.instance,
+ ),
+ );
+ }
+
+ void _initMenuItems() {
+ instance.registerLazySingleton(
+ () => MenuRepositoryImpl(
+ menuDataProvider: instance.get(),
+ ),
+ );
+
+ instance.registerLazySingleton(
+ () => FetchMenuItemsUseCase(
+ menuRepository: instance.get(),
+ ),
+ );
+ }
+}
diff --git a/core/lib/config/di/firebase_options.dart b/core/lib/config/di/firebase_options.dart
new file mode 100644
index 0000000..a8fb199
--- /dev/null
+++ b/core/lib/config/di/firebase_options.dart
@@ -0,0 +1,75 @@
+// File generated by FlutterFire CLI.
+// ignore_for_file: lines_longer_than_80_chars, avoid_classes_with_only_static_members
+import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
+import 'package:flutter/foundation.dart'
+ show defaultTargetPlatform, kIsWeb, TargetPlatform;
+
+/// Default [FirebaseOptions] for use with your Firebase apps.
+///
+/// Example:
+/// ```dart
+/// import 'firebase_options.dart';
+/// // ...
+/// await Firebase.initializeApp(
+/// options: DefaultFirebaseOptions.currentPlatform,
+/// );
+/// ```
+class DefaultFirebaseOptions {
+ static FirebaseOptions get currentPlatform {
+ if (kIsWeb) {
+ return web;
+ }
+ switch (defaultTargetPlatform) {
+ case TargetPlatform.android:
+ return android;
+ case TargetPlatform.iOS:
+ return ios;
+ case TargetPlatform.macOS:
+ throw UnsupportedError(
+ 'DefaultFirebaseOptions have not been configured for macos - '
+ 'you can reconfigure this by running the FlutterFire CLI again.',
+ );
+ case TargetPlatform.windows:
+ throw UnsupportedError(
+ 'DefaultFirebaseOptions have not been configured for windows - '
+ 'you can reconfigure this by running the FlutterFire CLI again.',
+ );
+ case TargetPlatform.linux:
+ throw UnsupportedError(
+ 'DefaultFirebaseOptions have not been configured for linux - '
+ 'you can reconfigure this by running the FlutterFire CLI again.',
+ );
+ default:
+ throw UnsupportedError(
+ 'DefaultFirebaseOptions are not supported for this platform.',
+ );
+ }
+ }
+
+ static const FirebaseOptions web = FirebaseOptions(
+ apiKey: 'AIzaSyDC8Gnj6LAoYqNlgFfUe9Cs-jFgwja0rAY',
+ appId: '1:386113379551:web:6bd17e1c219f76252f5d6a',
+ messagingSenderId: '386113379551',
+ projectId: 'food-delivery-5ccf6',
+ authDomain: 'food-delivery-5ccf6.firebaseapp.com',
+ storageBucket: 'food-delivery-5ccf6.appspot.com',
+ );
+
+ static const FirebaseOptions android = FirebaseOptions(
+ apiKey: 'AIzaSyB4dx-pxLS8uYja7UG-GfBAVAUgq9rdBY8',
+ appId: '1:386113379551:android:5de50f5cca859d8b2f5d6a',
+ messagingSenderId: '386113379551',
+ projectId: 'food-delivery-5ccf6',
+ storageBucket: 'food-delivery-5ccf6.appspot.com',
+ );
+
+ static const FirebaseOptions ios = FirebaseOptions(
+ apiKey: 'AIzaSyBY0Lh5bRGs4vOulq6T5SQ4F1BoirDSexI',
+ appId: '1:386113379551:ios:878c5cd3e8bc58482f5d6a',
+ messagingSenderId: '386113379551',
+ projectId: 'food-delivery-5ccf6',
+ storageBucket: 'food-delivery-5ccf6.appspot.com',
+ iosClientId: '386113379551-1ipl3s6v4u7o92mandq2nteojh2nl8q5.apps.googleusercontent.com',
+ iosBundleId: 'com.example.foodDelivery',
+ );
+}
diff --git a/core/lib/core.dart b/core/lib/core.dart
new file mode 100644
index 0000000..e3327b6
--- /dev/null
+++ b/core/lib/core.dart
@@ -0,0 +1,6 @@
+library core;
+
+export 'package:flutter_bloc/flutter_bloc.dart';
+export 'package:cloud_firestore/cloud_firestore.dart';
+export 'config/di/app_di.dart';
+export 'config/di/data_di.dart';
diff --git a/core/pubspec.lock b/core/pubspec.lock
new file mode 100644
index 0000000..c50cce7
--- /dev/null
+++ b/core/pubspec.lock
@@ -0,0 +1,466 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+ _flutterfire_internals:
+ dependency: transitive
+ description:
+ name: _flutterfire_internals
+ sha256: a742f71d7f3484253a623b30e19256aa4668ecbb3de6ad1beb0bcf8d4777ecd8
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.3"
+ args:
+ dependency: transitive
+ description:
+ name: args
+ sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.2"
+ async:
+ dependency: transitive
+ description:
+ name: async
+ sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.11.0"
+ auto_route:
+ dependency: transitive
+ description:
+ name: auto_route
+ sha256: "12047baeca0e01df93165ef33275b32119d72699ab9a49dc64c20e78f586f96d"
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.0.4"
+ bloc:
+ dependency: transitive
+ description:
+ name: bloc
+ sha256: "3820f15f502372d979121de1f6b97bfcf1630ebff8fe1d52fb2b0bfa49be5b49"
+ url: "https://pub.dev"
+ source: hosted
+ version: "8.1.2"
+ boolean_selector:
+ dependency: transitive
+ description:
+ name: boolean_selector
+ sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
+ characters:
+ dependency: transitive
+ description:
+ name: characters
+ sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.0"
+ clock:
+ dependency: transitive
+ description:
+ name: clock
+ sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.1"
+ cloud_firestore:
+ dependency: "direct main"
+ description:
+ name: cloud_firestore
+ sha256: "5bbc1f5bffa79af54ca035b92b57f81c6fb35ee5471ead67e29c8e12de8432f8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.8.2"
+ cloud_firestore_platform_interface:
+ dependency: transitive
+ description:
+ name: cloud_firestore_platform_interface
+ sha256: "8e0aafeb727087f84710275d59a101b2acf2290ffbb3b111aab70423f8350d5d"
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.15.2"
+ cloud_firestore_web:
+ dependency: transitive
+ description:
+ name: cloud_firestore_web
+ sha256: bbf0ebb9d1e9251caa00e8727389313c64cb4240c1c31f895971c52d0c782316
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.6.2"
+ collection:
+ dependency: transitive
+ description:
+ name: collection
+ sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.17.1"
+ core_ui:
+ dependency: transitive
+ description:
+ path: "../core_ui"
+ relative: true
+ source: path
+ version: "0.0.1"
+ data:
+ dependency: "direct main"
+ description:
+ path: "../data"
+ relative: true
+ source: path
+ version: "0.0.1"
+ dio:
+ dependency: transitive
+ description:
+ name: dio
+ sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.0.6"
+ domain:
+ dependency: "direct main"
+ description:
+ path: "../domain"
+ relative: true
+ source: path
+ version: "0.0.1"
+ fake_async:
+ dependency: transitive
+ description:
+ name: fake_async
+ sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.1"
+ firebase_core:
+ dependency: "direct main"
+ description:
+ name: firebase_core
+ sha256: a4a99204da264a0aa9d54a332ea0315ce7b0768075139c77abefe98093dd98be
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.14.0"
+ firebase_core_platform_interface:
+ dependency: transitive
+ description:
+ name: firebase_core_platform_interface
+ sha256: b63e3be6c96ef5c33bdec1aab23c91eb00696f6452f0519401d640938c94cba2
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.8.0"
+ firebase_core_web:
+ dependency: transitive
+ description:
+ name: firebase_core_web
+ sha256: "0fd5c4b228de29b55fac38aed0d9e42514b3d3bd47675de52bf7f8fccaf922fa"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.6.0"
+ flutter:
+ dependency: "direct main"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ flutter_bloc:
+ dependency: "direct main"
+ description:
+ name: flutter_bloc
+ sha256: e74efb89ee6945bcbce74a5b3a5a3376b088e5f21f55c263fc38cbdc6237faae
+ url: "https://pub.dev"
+ source: hosted
+ version: "8.1.3"
+ flutter_lints:
+ dependency: "direct dev"
+ description:
+ name: flutter_lints
+ sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.2"
+ flutter_spinkit:
+ dependency: transitive
+ description:
+ name: flutter_spinkit
+ sha256: b39c753e909d4796906c5696a14daf33639a76e017136c8d82bf3e620ce5bb8e
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.2.0"
+ flutter_svg:
+ dependency: transitive
+ description:
+ name: flutter_svg
+ sha256: "8c5d68a82add3ca76d792f058b186a0599414f279f00ece4830b9b231b570338"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.7"
+ 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_annotation:
+ dependency: transitive
+ description:
+ name: freezed_annotation
+ sha256: aeac15850ef1b38ee368d4c53ba9a847e900bb2c53a4db3f6881cbb3cb684338
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.0"
+ get_it:
+ dependency: "direct main"
+ description:
+ name: get_it
+ sha256: "529de303c739fca98cd7ece5fca500d8ff89649f1bb4b4e94fb20954abcd7468"
+ url: "https://pub.dev"
+ source: hosted
+ version: "7.6.0"
+ http_parser:
+ dependency: transitive
+ description:
+ name: http_parser
+ sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.0.2"
+ js:
+ dependency: transitive
+ description:
+ name: js
+ sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.6.7"
+ json_annotation:
+ dependency: transitive
+ description:
+ name: json_annotation
+ sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.8.1"
+ lints:
+ dependency: transitive
+ description:
+ name: lints
+ sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
+ main_page_view:
+ dependency: transitive
+ description:
+ path: "../features/main_page_view"
+ relative: true
+ source: path
+ version: "0.0.1"
+ matcher:
+ dependency: transitive
+ description:
+ name: matcher
+ sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.12.15"
+ material_color_utilities:
+ dependency: transitive
+ description:
+ name: material_color_utilities
+ sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.0"
+ meta:
+ dependency: transitive
+ description:
+ name: meta
+ sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.9.1"
+ navigation:
+ dependency: "direct main"
+ description:
+ path: "../navigation"
+ relative: true
+ source: path
+ version: "0.0.1"
+ nested:
+ dependency: transitive
+ description:
+ name: nested
+ sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.0"
+ order_history:
+ dependency: transitive
+ description:
+ path: "../features/order_history"
+ relative: true
+ source: path
+ version: "0.0.1"
+ path:
+ dependency: transitive
+ description:
+ name: path
+ sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.8.3"
+ path_parsing:
+ dependency: transitive
+ description:
+ name: path_parsing
+ sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
+ petitparser:
+ dependency: transitive
+ description:
+ name: petitparser
+ sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.4.0"
+ plugin_platform_interface:
+ dependency: transitive
+ description:
+ name: plugin_platform_interface
+ sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.4"
+ provider:
+ dependency: transitive
+ description:
+ name: provider
+ sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.0.5"
+ settings:
+ dependency: transitive
+ description:
+ path: "../features/settings"
+ relative: true
+ source: path
+ version: "0.0.1"
+ shopping_cart:
+ dependency: transitive
+ description:
+ path: "../features/shopping_cart"
+ relative: true
+ source: path
+ version: "0.0.1"
+ sky_engine:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.99"
+ source_span:
+ dependency: transitive
+ description:
+ name: source_span
+ sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.9.1"
+ stack_trace:
+ dependency: transitive
+ description:
+ name: stack_trace
+ sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.11.0"
+ stream_channel:
+ dependency: transitive
+ description:
+ name: stream_channel
+ sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
+ string_scanner:
+ dependency: transitive
+ description:
+ name: string_scanner
+ sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.0"
+ term_glyph:
+ dependency: transitive
+ description:
+ name: term_glyph
+ sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.1"
+ test_api:
+ dependency: transitive
+ description:
+ name: test_api
+ sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.1"
+ typed_data:
+ dependency: transitive
+ description:
+ name: typed_data
+ sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.2"
+ vector_graphics:
+ dependency: transitive
+ description:
+ name: vector_graphics
+ sha256: "670f6e07aca990b4a2bcdc08a784193c4ccdd1932620244c3a86bb72a0eac67f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.7"
+ vector_graphics_codec:
+ dependency: transitive
+ description:
+ name: vector_graphics_codec
+ sha256: "7451721781d967db9933b63f5733b1c4533022c0ba373a01bdd79d1a5457f69f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.7"
+ vector_graphics_compiler:
+ dependency: transitive
+ description:
+ name: vector_graphics_compiler
+ sha256: "80a13c613c8bde758b1464a1755a7b3a8f2b6cec61fbf0f5a53c94c30f03ba2e"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.7"
+ vector_math:
+ dependency: transitive
+ description:
+ name: vector_math
+ sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.4"
+ xml:
+ dependency: transitive
+ description:
+ name: xml
+ sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.3.0"
+sdks:
+ dart: ">=3.0.5 <4.0.0"
+ flutter: ">=3.7.0-0"
diff --git a/core/pubspec.yaml b/core/pubspec.yaml
new file mode 100644
index 0000000..a90be60
--- /dev/null
+++ b/core/pubspec.yaml
@@ -0,0 +1,30 @@
+name: core
+version: 0.0.1
+publish_to: none
+description: Project core module
+
+environment:
+ sdk: '>=3.0.0 <4.0.0'
+ flutter: ">=1.17.0"
+
+dependencies:
+ flutter:
+ sdk: flutter
+ data:
+ path: ../data
+ domain:
+ path: ../domain
+ navigation:
+ path: ../navigation
+
+ cloud_firestore: ^4.8.1
+ firebase_core: ^2.14.0
+
+ get_it: ^7.6.0
+ flutter_bloc: ^8.1.2
+
+dev_dependencies:
+ flutter_test:
+ sdk: flutter
+
+ flutter_lints: ^2.0.0
diff --git a/core_ui/analysis_options.yaml b/core_ui/analysis_options.yaml
new file mode 100644
index 0000000..a5744c1
--- /dev/null
+++ b/core_ui/analysis_options.yaml
@@ -0,0 +1,4 @@
+include: package:flutter_lints/flutter.yaml
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/core_ui/lib/core_ui.dart b/core_ui/lib/core_ui.dart
new file mode 100644
index 0000000..e3c80de
--- /dev/null
+++ b/core_ui/lib/core_ui.dart
@@ -0,0 +1,4 @@
+library core_ui;
+
+export 'src/theme/theme.dart';
+export 'src/widgets/widgets.dart';
diff --git a/core_ui/lib/src/theme/app_colors.dart b/core_ui/lib/src/theme/app_colors.dart
new file mode 100644
index 0000000..5635a6f
--- /dev/null
+++ b/core_ui/lib/src/theme/app_colors.dart
@@ -0,0 +1,33 @@
+import 'package:flutter/material.dart';
+
+class AppColors {
+ ///general colors
+ static const Color primaryColor = Color(0xFFF5A12E);
+ static const Color primaryLightColor = Color(0xFFFFE0B2);
+ static const Color primaryDarkColor = Color(0xFF393D38);
+
+ static const Color secondaryColor = Color(0xFFF5A12E);
+ static const Color secondaryDarkColor = Color(0xFFF69818);
+ static const Color unselectedItemColor = Color(0xFF9D9D9E);
+
+ ///text colors
+ static const Color titleTextColor = Color(0xFF282828);
+ static const Color titleLightTextColor = Color(0xFFE2E2E3);
+ static const Color titleGreyTextColor = Color(0xFFC5C5C9);
+ static const Color titleDarkGreyTextColor = Color(0xFF86868A);
+ static const Color descriptionTextColor = Color(0xFF3B3B3B);
+ static const Color primaryButtonTextColor = Color(0xFFF4F4F4);
+
+ ///background colors
+ static const Color backgroundColor = Color(0xFFF3EFEF);
+ static const Color backgroundBottomNavigationBarColor = Color(0xFFFCFCFC);
+ static const Color backgroundItemColor = Color(0xFFFFE0B2);
+ static const Color backgroundItemDarkColor = Color(0xFF9E773A);
+ static const Color backgroundDarkColor = Color(0xFFA27938);
+
+ ///gradient
+ static List primaryGradient = [
+ primaryLightColor,
+ primaryColor,
+ ];
+}
diff --git a/core_ui/lib/src/theme/app_styles.dart b/core_ui/lib/src/theme/app_styles.dart
new file mode 100644
index 0000000..53d4878
--- /dev/null
+++ b/core_ui/lib/src/theme/app_styles.dart
@@ -0,0 +1,16 @@
+import 'package:flutter/material.dart';
+
+class AppStyles {
+ static final defaultBorderRadius = BorderRadius.circular(15);
+ static final largeBorderRadius = BorderRadius.circular(80);
+
+ static final boxShadow = BoxShadow(
+ color: const Color(0xFFC0C2BF).withOpacity(0.2),
+ spreadRadius: 0,
+ blurRadius: 50,
+ offset: const Offset(
+ 0,
+ 3,
+ ),
+ );
+}
diff --git a/core_ui/lib/src/theme/app_text_styles.dart b/core_ui/lib/src/theme/app_text_styles.dart
new file mode 100644
index 0000000..e348e0a
--- /dev/null
+++ b/core_ui/lib/src/theme/app_text_styles.dart
@@ -0,0 +1,68 @@
+import 'package:flutter/material.dart';
+
+class AppTextStyles {
+ static const String _merriweatherFamily = 'Merriweather';
+
+ static TextStyle size14WeightBoldText(Color color) {
+ return TextStyle(
+ fontFamily: _merriweatherFamily,
+ fontSize: 14,
+ fontWeight: FontWeight.w600,
+ color: color,
+ );
+ }
+
+ static TextStyle size16WeightMediumText(Color color) {
+ return TextStyle(
+ fontFamily: _merriweatherFamily,
+ fontSize: 16,
+ fontWeight: FontWeight.w400,
+ color: color,
+ );
+ }
+
+ static TextStyle size16WeightSemiBoldText(Color color) {
+ return TextStyle(
+ fontFamily: _merriweatherFamily,
+ fontSize: 16,
+ fontWeight: FontWeight.w600,
+ color: color,
+ );
+ }
+
+ static TextStyle size18WeightSemiBoldText(Color color) {
+ return TextStyle(
+ fontFamily: _merriweatherFamily,
+ fontSize: 18,
+ fontWeight: FontWeight.w600,
+ color: color,
+ );
+ }
+
+ static TextStyle size20WeightSemiBoldText(Color color) {
+ return TextStyle(
+ fontFamily: _merriweatherFamily,
+ fontSize: 20,
+ fontWeight: FontWeight.w600,
+ color: color,
+ );
+ }
+
+ static TextStyle size22WeightSemiBoldText(Color color) {
+ return TextStyle(
+ fontFamily: _merriweatherFamily,
+ fontSize: 22,
+ fontWeight: FontWeight.w600,
+ color: color,
+ );
+ }
+
+ static TextStyle size24WeightBoldText(Color color) {
+ return TextStyle(
+ fontFamily: _merriweatherFamily,
+ fontSize: 24,
+ fontWeight: FontWeight.w700,
+ color: color,
+ );
+ }
+}
diff --git a/core_ui/lib/src/theme/app_theme.dart b/core_ui/lib/src/theme/app_theme.dart
new file mode 100644
index 0000000..95cd7ec
--- /dev/null
+++ b/core_ui/lib/src/theme/app_theme.dart
@@ -0,0 +1,92 @@
+import 'package:core_ui/core_ui.dart';
+import 'package:flutter/material.dart';
+
+class AppTheme {
+ ThemeData lightThemeData = ThemeData(
+ scaffoldBackgroundColor: AppColors.backgroundColor,
+ useMaterial3: true,
+ primaryColor: AppColors.primaryColor,
+ canvasColor: AppColors.secondaryColor,
+ cardColor: AppColors.backgroundItemColor,
+ disabledColor: AppColors.unselectedItemColor,
+
+ /// text styles
+ textTheme: TextTheme(
+ titleLarge: AppTextStyles.size20WeightSemiBoldText(
+ AppColors.titleTextColor,
+ ),
+ titleMedium: AppTextStyles.size18WeightSemiBoldText(
+ AppColors.secondaryColor,
+ ),
+ titleSmall: AppTextStyles.size16WeightMediumText(
+ AppColors.titleDarkGreyTextColor,
+ ),
+ bodyMedium: AppTextStyles.size16WeightSemiBoldText(
+ AppColors.secondaryColor,
+ ),
+ bodyLarge: AppTextStyles.size18WeightSemiBoldText(
+ AppColors.titleTextColor,
+ ),
+ ),
+
+ /// app bar styles
+ appBarTheme: AppBarTheme(
+ titleSpacing: 30,
+ backgroundColor: AppColors.primaryColor,
+ titleTextStyle: AppTextStyles.size24WeightBoldText(
+ AppColors.primaryButtonTextColor,
+ ),
+ ),
+
+ /// navigation bar styles
+ bottomNavigationBarTheme: const BottomNavigationBarThemeData(
+ backgroundColor: AppColors.backgroundBottomNavigationBarColor,
+ selectedItemColor: AppColors.primaryColor,
+ unselectedItemColor: AppColors.unselectedItemColor,
+ ),
+ );
+
+ ThemeData darkThemeData = ThemeData(
+ scaffoldBackgroundColor: AppColors.backgroundDarkColor,
+ useMaterial3: true,
+ primaryColor: AppColors.primaryLightColor,
+ canvasColor: AppColors.secondaryColor,
+ cardColor: AppColors.backgroundItemDarkColor,
+ disabledColor: AppColors.titleDarkGreyTextColor,
+
+ /// text styles
+ textTheme: TextTheme(
+ titleLarge: AppTextStyles.size20WeightSemiBoldText(
+ AppColors.titleLightTextColor,
+ ),
+ titleMedium: AppTextStyles.size18WeightSemiBoldText(
+ AppColors.secondaryDarkColor,
+ ),
+ titleSmall: AppTextStyles.size16WeightMediumText(
+ AppColors.titleGreyTextColor,
+ ),
+ bodyMedium: AppTextStyles.size16WeightSemiBoldText(
+ AppColors.secondaryDarkColor,
+ ),
+ bodyLarge: AppTextStyles.size18WeightSemiBoldText(
+ AppColors.titleLightTextColor,
+ ),
+ ),
+
+ /// app bar styles
+ appBarTheme: AppBarTheme(
+ titleSpacing: 30,
+ backgroundColor: AppColors.primaryDarkColor,
+ titleTextStyle: AppTextStyles.size24WeightBoldText(
+ AppColors.primaryButtonTextColor,
+ ),
+ ),
+
+ /// navigation bar styles
+ bottomNavigationBarTheme: const BottomNavigationBarThemeData(
+ backgroundColor: AppColors.primaryDarkColor,
+ selectedItemColor: AppColors.primaryLightColor,
+ unselectedItemColor: AppColors.primaryButtonTextColor,
+ ),
+ );
+}
diff --git a/core_ui/lib/src/theme/theme.dart b/core_ui/lib/src/theme/theme.dart
new file mode 100644
index 0000000..416d0ec
--- /dev/null
+++ b/core_ui/lib/src/theme/theme.dart
@@ -0,0 +1,4 @@
+export 'app_colors.dart';
+export 'app_styles.dart';
+export 'app_text_styles.dart';
+export 'app_theme.dart';
diff --git a/core_ui/lib/src/widgets/app_bar.dart b/core_ui/lib/src/widgets/app_bar.dart
new file mode 100644
index 0000000..3d14f81
--- /dev/null
+++ b/core_ui/lib/src/widgets/app_bar.dart
@@ -0,0 +1,44 @@
+import 'package:core/core.dart';
+import 'package:flutter/material.dart';
+import 'package:main_page_view/main_page.dart';
+
+import '../../core_ui.dart';
+
+class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
+ const CustomAppBar({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return BlocBuilder(
+ builder: (BuildContext context, AppThemeState state) {
+ return AppBar(
+ title: const Text('Food Delivery'),
+ backgroundColor: Theme.of(context).appBarTheme.backgroundColor,
+ titleSpacing: Theme.of(context).appBarTheme.titleSpacing,
+ titleTextStyle: Theme.of(context).appBarTheme.titleTextStyle,
+ actions: [
+ Padding(
+ padding: const EdgeInsets.only(right: 10),
+ child: IconButton(
+ icon: Icon(
+ state.isLight
+ ? Icons.brightness_4_rounded
+ : Icons.brightness_2_outlined,
+ ),
+ color: AppColors.backgroundColor,
+ onPressed: () {
+ context.read().add(
+ (AppThemeChangingEvent()),
+ );
+ },
+ ),
+ ),
+ ],
+ );
+ },
+ );
+ }
+
+ @override
+ Size get preferredSize => const Size.fromHeight(kToolbarHeight);
+}
diff --git a/core_ui/lib/src/widgets/bottom_navigation_bar.dart b/core_ui/lib/src/widgets/bottom_navigation_bar.dart
new file mode 100644
index 0000000..b4005c5
--- /dev/null
+++ b/core_ui/lib/src/widgets/bottom_navigation_bar.dart
@@ -0,0 +1,47 @@
+import 'package:flutter/material.dart';
+
+class CustomBottomNavigationBar extends StatelessWidget {
+ final int currentIndex;
+ final void Function(int) onTap;
+
+ const CustomBottomNavigationBar({
+ Key? key,
+ required this.currentIndex,
+ required this.onTap,
+ }) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ final List items = [
+ const BottomNavigationBarItem(
+ icon: Icon(Icons.home_outlined),
+ label: 'Home',
+ ),
+ const BottomNavigationBarItem(
+ icon: Icon(Icons.shopping_cart_outlined),
+ label: 'Cart',
+ ),
+ const BottomNavigationBarItem(
+ icon: Icon(Icons.history_outlined),
+ label: 'Orders',
+ ),
+ const BottomNavigationBarItem(
+ icon: Icon(Icons.settings),
+ label: 'Settings',
+ )
+ ];
+
+ return BottomNavigationBar(
+ currentIndex: currentIndex,
+ onTap: onTap,
+ items: items,
+ type: BottomNavigationBarType.fixed,
+ backgroundColor:
+ Theme.of(context).bottomNavigationBarTheme.backgroundColor,
+ selectedItemColor:
+ Theme.of(context).bottomNavigationBarTheme.selectedItemColor,
+ unselectedItemColor:
+ Theme.of(context).bottomNavigationBarTheme.unselectedItemColor,
+ );
+ }
+}
diff --git a/core_ui/lib/src/widgets/buttons/buttons.dart b/core_ui/lib/src/widgets/buttons/buttons.dart
new file mode 100644
index 0000000..ca35c5d
--- /dev/null
+++ b/core_ui/lib/src/widgets/buttons/buttons.dart
@@ -0,0 +1 @@
+export 'primary_button.dart';
diff --git a/core_ui/lib/src/widgets/buttons/primary_button.dart b/core_ui/lib/src/widgets/buttons/primary_button.dart
new file mode 100644
index 0000000..e8433c6
--- /dev/null
+++ b/core_ui/lib/src/widgets/buttons/primary_button.dart
@@ -0,0 +1,36 @@
+import 'package:core_ui/core_ui.dart';
+import 'package:flutter/material.dart';
+
+class PrimaryButton extends StatelessWidget {
+ final VoidCallback onPressed;
+ final String buttonTitle;
+
+ const PrimaryButton({
+ required this.onPressed,
+ required this.buttonTitle,
+ super.key,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ return ElevatedButton(
+ onPressed: onPressed,
+ style: ElevatedButton.styleFrom(
+ backgroundColor: AppColors.primaryColor,
+ shape: const RoundedRectangleBorder(
+ borderRadius: BorderRadius.all(Radius.circular(15)),
+ ),
+ ),
+ child: Container(
+ padding: const EdgeInsets.symmetric(horizontal: 10, vertical: 10),
+ child: Text(
+ buttonTitle,
+ textAlign: TextAlign.center,
+ style: AppTextStyles.size22WeightSemiBoldText(
+ AppColors.primaryButtonTextColor,
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/core_ui/lib/src/widgets/custom_bullet_point.dart b/core_ui/lib/src/widgets/custom_bullet_point.dart
new file mode 100644
index 0000000..49e56a1
--- /dev/null
+++ b/core_ui/lib/src/widgets/custom_bullet_point.dart
@@ -0,0 +1,19 @@
+import 'package:flutter/material.dart';
+
+class CustomDotPoint extends StatelessWidget {
+ const CustomDotPoint({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ final Size size = MediaQuery.of(context).size;
+
+ return Container(
+ height: size.height * 0.01,
+ width: size.width * 0.01,
+ decoration: BoxDecoration(
+ color: Theme.of(context).primaryColor,
+ shape: BoxShape.circle,
+ ),
+ );
+ }
+}
diff --git a/core_ui/lib/src/widgets/image_placeholder.dart b/core_ui/lib/src/widgets/image_placeholder.dart
new file mode 100644
index 0000000..c9a01a7
--- /dev/null
+++ b/core_ui/lib/src/widgets/image_placeholder.dart
@@ -0,0 +1,32 @@
+import 'package:flutter/material.dart';
+
+import '../../core_ui.dart';
+
+class ImagePlaceholder extends StatelessWidget {
+ final IconData iconData;
+ final double iconSize;
+
+ const ImagePlaceholder({
+ Key? key,
+ required this.iconData,
+ required this.iconSize,
+ }) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ decoration: BoxDecoration(
+ gradient: LinearGradient(
+ colors: AppColors.primaryGradient,
+ begin: Alignment.topLeft,
+ end: Alignment.bottomRight,
+ ),
+ ),
+ child: Icon(
+ iconData,
+ color: AppColors.primaryButtonTextColor,
+ size: iconSize,
+ ),
+ );
+ }
+}
diff --git a/core_ui/lib/src/widgets/loading_indicator.dart b/core_ui/lib/src/widgets/loading_indicator.dart
new file mode 100644
index 0000000..0eaa2fd
--- /dev/null
+++ b/core_ui/lib/src/widgets/loading_indicator.dart
@@ -0,0 +1,17 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_spinkit/flutter_spinkit.dart';
+
+import '../../core_ui.dart';
+
+class LoadingIndicator extends StatelessWidget {
+ const LoadingIndicator({Key? key}) : super(key: key);
+
+ @override
+ Widget build(BuildContext context) {
+ return const Center(
+ child: SpinKitSpinningLines(
+ color: AppColors.primaryColor,
+ ),
+ );
+ }
+}
diff --git a/core_ui/lib/src/widgets/widgets.dart b/core_ui/lib/src/widgets/widgets.dart
new file mode 100644
index 0000000..76b95fd
--- /dev/null
+++ b/core_ui/lib/src/widgets/widgets.dart
@@ -0,0 +1,6 @@
+export 'image_placeholder.dart';
+export 'loading_indicator.dart';
+export 'bottom_navigation_bar.dart';
+export 'app_bar.dart';
+export 'buttons/buttons.dart';
+export 'custom_bullet_point.dart';
diff --git a/core_ui/pubspec.lock b/core_ui/pubspec.lock
new file mode 100644
index 0000000..90392cf
--- /dev/null
+++ b/core_ui/pubspec.lock
@@ -0,0 +1,466 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+ _flutterfire_internals:
+ dependency: transitive
+ description:
+ name: _flutterfire_internals
+ sha256: a742f71d7f3484253a623b30e19256aa4668ecbb3de6ad1beb0bcf8d4777ecd8
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.3"
+ args:
+ dependency: transitive
+ description:
+ name: args
+ sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.2"
+ async:
+ dependency: transitive
+ description:
+ name: async
+ sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.11.0"
+ auto_route:
+ dependency: transitive
+ description:
+ name: auto_route
+ sha256: "12047baeca0e01df93165ef33275b32119d72699ab9a49dc64c20e78f586f96d"
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.0.4"
+ bloc:
+ dependency: transitive
+ description:
+ name: bloc
+ sha256: "3820f15f502372d979121de1f6b97bfcf1630ebff8fe1d52fb2b0bfa49be5b49"
+ url: "https://pub.dev"
+ source: hosted
+ version: "8.1.2"
+ boolean_selector:
+ dependency: transitive
+ description:
+ name: boolean_selector
+ sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
+ characters:
+ dependency: transitive
+ description:
+ name: characters
+ sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.0"
+ clock:
+ dependency: transitive
+ description:
+ name: clock
+ sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.1"
+ cloud_firestore:
+ dependency: transitive
+ description:
+ name: cloud_firestore
+ sha256: "5bbc1f5bffa79af54ca035b92b57f81c6fb35ee5471ead67e29c8e12de8432f8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.8.2"
+ cloud_firestore_platform_interface:
+ dependency: transitive
+ description:
+ name: cloud_firestore_platform_interface
+ sha256: "8e0aafeb727087f84710275d59a101b2acf2290ffbb3b111aab70423f8350d5d"
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.15.2"
+ cloud_firestore_web:
+ dependency: transitive
+ description:
+ name: cloud_firestore_web
+ sha256: bbf0ebb9d1e9251caa00e8727389313c64cb4240c1c31f895971c52d0c782316
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.6.2"
+ collection:
+ dependency: transitive
+ description:
+ name: collection
+ sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.17.1"
+ core:
+ dependency: "direct main"
+ description:
+ path: "../core"
+ relative: true
+ source: path
+ version: "0.0.1"
+ data:
+ dependency: transitive
+ description:
+ path: "../data"
+ relative: true
+ source: path
+ version: "0.0.1"
+ dio:
+ dependency: transitive
+ description:
+ name: dio
+ sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.0.6"
+ domain:
+ dependency: "direct main"
+ description:
+ path: "../domain"
+ relative: true
+ source: path
+ version: "0.0.1"
+ fake_async:
+ dependency: transitive
+ description:
+ name: fake_async
+ sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.1"
+ firebase_core:
+ dependency: transitive
+ description:
+ name: firebase_core
+ sha256: a4a99204da264a0aa9d54a332ea0315ce7b0768075139c77abefe98093dd98be
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.14.0"
+ firebase_core_platform_interface:
+ dependency: transitive
+ description:
+ name: firebase_core_platform_interface
+ sha256: b63e3be6c96ef5c33bdec1aab23c91eb00696f6452f0519401d640938c94cba2
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.8.0"
+ firebase_core_web:
+ dependency: transitive
+ description:
+ name: firebase_core_web
+ sha256: "0fd5c4b228de29b55fac38aed0d9e42514b3d3bd47675de52bf7f8fccaf922fa"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.6.0"
+ flutter:
+ dependency: "direct main"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ flutter_bloc:
+ dependency: transitive
+ description:
+ name: flutter_bloc
+ sha256: e74efb89ee6945bcbce74a5b3a5a3376b088e5f21f55c263fc38cbdc6237faae
+ url: "https://pub.dev"
+ source: hosted
+ version: "8.1.3"
+ flutter_lints:
+ dependency: "direct dev"
+ description:
+ name: flutter_lints
+ sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.2"
+ flutter_spinkit:
+ dependency: "direct main"
+ description:
+ name: flutter_spinkit
+ sha256: b39c753e909d4796906c5696a14daf33639a76e017136c8d82bf3e620ce5bb8e
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.2.0"
+ flutter_svg:
+ dependency: transitive
+ description:
+ name: flutter_svg
+ sha256: "8c5d68a82add3ca76d792f058b186a0599414f279f00ece4830b9b231b570338"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.7"
+ 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_annotation:
+ dependency: transitive
+ description:
+ name: freezed_annotation
+ sha256: aeac15850ef1b38ee368d4c53ba9a847e900bb2c53a4db3f6881cbb3cb684338
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.0"
+ get_it:
+ dependency: transitive
+ description:
+ name: get_it
+ sha256: "529de303c739fca98cd7ece5fca500d8ff89649f1bb4b4e94fb20954abcd7468"
+ url: "https://pub.dev"
+ source: hosted
+ version: "7.6.0"
+ http_parser:
+ dependency: transitive
+ description:
+ name: http_parser
+ sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.0.2"
+ js:
+ dependency: transitive
+ description:
+ name: js
+ sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.6.7"
+ json_annotation:
+ dependency: transitive
+ description:
+ name: json_annotation
+ sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.8.1"
+ lints:
+ dependency: transitive
+ description:
+ name: lints
+ sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
+ main_page_view:
+ dependency: "direct main"
+ description:
+ path: "../features/main_page_view"
+ relative: true
+ source: path
+ version: "0.0.1"
+ matcher:
+ dependency: transitive
+ description:
+ name: matcher
+ sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.12.15"
+ material_color_utilities:
+ dependency: transitive
+ description:
+ name: material_color_utilities
+ sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.0"
+ meta:
+ dependency: transitive
+ description:
+ name: meta
+ sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.9.1"
+ navigation:
+ dependency: "direct main"
+ description:
+ path: "../navigation"
+ relative: true
+ source: path
+ version: "0.0.1"
+ nested:
+ dependency: transitive
+ description:
+ name: nested
+ sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.0"
+ order_history:
+ dependency: transitive
+ description:
+ path: "../features/order_history"
+ relative: true
+ source: path
+ version: "0.0.1"
+ path:
+ dependency: transitive
+ description:
+ name: path
+ sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.8.3"
+ path_parsing:
+ dependency: transitive
+ description:
+ name: path_parsing
+ sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
+ petitparser:
+ dependency: transitive
+ description:
+ name: petitparser
+ sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.4.0"
+ plugin_platform_interface:
+ dependency: transitive
+ description:
+ name: plugin_platform_interface
+ sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.4"
+ provider:
+ dependency: transitive
+ description:
+ name: provider
+ sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.0.5"
+ settings:
+ dependency: transitive
+ description:
+ path: "../features/settings"
+ relative: true
+ source: path
+ version: "0.0.1"
+ shopping_cart:
+ dependency: transitive
+ description:
+ path: "../features/shopping_cart"
+ relative: true
+ source: path
+ version: "0.0.1"
+ sky_engine:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.99"
+ source_span:
+ dependency: transitive
+ description:
+ name: source_span
+ sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.9.1"
+ stack_trace:
+ dependency: transitive
+ description:
+ name: stack_trace
+ sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.11.0"
+ stream_channel:
+ dependency: transitive
+ description:
+ name: stream_channel
+ sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
+ string_scanner:
+ dependency: transitive
+ description:
+ name: string_scanner
+ sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.0"
+ term_glyph:
+ dependency: transitive
+ description:
+ name: term_glyph
+ sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.1"
+ test_api:
+ dependency: transitive
+ description:
+ name: test_api
+ sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.1"
+ typed_data:
+ dependency: transitive
+ description:
+ name: typed_data
+ sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.2"
+ vector_graphics:
+ dependency: transitive
+ description:
+ name: vector_graphics
+ sha256: "670f6e07aca990b4a2bcdc08a784193c4ccdd1932620244c3a86bb72a0eac67f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.7"
+ vector_graphics_codec:
+ dependency: transitive
+ description:
+ name: vector_graphics_codec
+ sha256: "7451721781d967db9933b63f5733b1c4533022c0ba373a01bdd79d1a5457f69f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.7"
+ vector_graphics_compiler:
+ dependency: transitive
+ description:
+ name: vector_graphics_compiler
+ sha256: "80a13c613c8bde758b1464a1755a7b3a8f2b6cec61fbf0f5a53c94c30f03ba2e"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.7"
+ vector_math:
+ dependency: transitive
+ description:
+ name: vector_math
+ sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.4"
+ xml:
+ dependency: transitive
+ description:
+ name: xml
+ sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.3.0"
+sdks:
+ dart: ">=3.0.5 <4.0.0"
+ flutter: ">=3.7.0-0"
diff --git a/core_ui/pubspec.yaml b/core_ui/pubspec.yaml
new file mode 100644
index 0000000..96db448
--- /dev/null
+++ b/core_ui/pubspec.yaml
@@ -0,0 +1,28 @@
+name: core_ui
+version: 0.0.1
+publish_to: none
+description: Project Core UI module
+
+environment:
+ sdk: '>=3.0.5 <4.0.0'
+ flutter: ">=1.17.0"
+
+dependencies:
+ flutter:
+ sdk: flutter
+
+ flutter_spinkit: ^5.2.0
+
+ core:
+ path: ../core
+ domain:
+ path: ../domain
+ main_page_view:
+ path: ../features/main_page_view
+ navigation:
+ path: ../navigation
+
+dev_dependencies:
+ flutter_test:
+ sdk: flutter
+ flutter_lints: ^2.0.0
diff --git a/data/analysis_options.yaml b/data/analysis_options.yaml
new file mode 100644
index 0000000..a5744c1
--- /dev/null
+++ b/data/analysis_options.yaml
@@ -0,0 +1,4 @@
+include: package:flutter_lints/flutter.yaml
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/data/lib/data.dart b/data/lib/data.dart
new file mode 100644
index 0000000..f123f7a
--- /dev/null
+++ b/data/lib/data.dart
@@ -0,0 +1,3 @@
+library data;
+
+export 'package:dio/dio.dart';
diff --git a/data/lib/entity/menu_item_entity.dart b/data/lib/entity/menu_item_entity.dart
new file mode 100644
index 0000000..71128a3
--- /dev/null
+++ b/data/lib/entity/menu_item_entity.dart
@@ -0,0 +1,19 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'menu_item_entity.freezed.dart';
+part 'menu_item_entity.g.dart';
+
+@freezed
+class MenuItemEntity with _$MenuItemEntity {
+ factory MenuItemEntity({
+ required int id,
+ required String title,
+ required double cost,
+ required String image,
+ required String description,
+ required List ingredients,
+ }) = _MenuItemEntity;
+
+ factory MenuItemEntity.fromJson(Map json) =>
+ _$MenuItemEntityFromJson(json);
+}
diff --git a/data/lib/entity/menu_item_entity.freezed.dart b/data/lib/entity/menu_item_entity.freezed.dart
new file mode 100644
index 0000000..b63c55e
--- /dev/null
+++ b/data/lib/entity/menu_item_entity.freezed.dart
@@ -0,0 +1,264 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// 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 'menu_item_entity.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
+
+MenuItemEntity _$MenuItemEntityFromJson(Map json) {
+ return _MenuItemEntity.fromJson(json);
+}
+
+/// @nodoc
+mixin _$MenuItemEntity {
+ int get id => throw _privateConstructorUsedError;
+ String get title => throw _privateConstructorUsedError;
+ double get cost => throw _privateConstructorUsedError;
+ String get image => throw _privateConstructorUsedError;
+ String get description => throw _privateConstructorUsedError;
+ List get ingredients => throw _privateConstructorUsedError;
+
+ Map toJson() => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $MenuItemEntityCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $MenuItemEntityCopyWith<$Res> {
+ factory $MenuItemEntityCopyWith(
+ MenuItemEntity value, $Res Function(MenuItemEntity) then) =
+ _$MenuItemEntityCopyWithImpl<$Res, MenuItemEntity>;
+ @useResult
+ $Res call(
+ {int id,
+ String title,
+ double cost,
+ String image,
+ String description,
+ List ingredients});
+}
+
+/// @nodoc
+class _$MenuItemEntityCopyWithImpl<$Res, $Val extends MenuItemEntity>
+ implements $MenuItemEntityCopyWith<$Res> {
+ _$MenuItemEntityCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? title = null,
+ Object? cost = null,
+ Object? image = null,
+ Object? description = null,
+ Object? ingredients = null,
+ }) {
+ return _then(_value.copyWith(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as int,
+ title: null == title
+ ? _value.title
+ : title // ignore: cast_nullable_to_non_nullable
+ as String,
+ cost: null == cost
+ ? _value.cost
+ : cost // ignore: cast_nullable_to_non_nullable
+ as double,
+ image: null == image
+ ? _value.image
+ : image // ignore: cast_nullable_to_non_nullable
+ as String,
+ description: null == description
+ ? _value.description
+ : description // ignore: cast_nullable_to_non_nullable
+ as String,
+ ingredients: null == ingredients
+ ? _value.ingredients
+ : ingredients // ignore: cast_nullable_to_non_nullable
+ as List,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$_MenuItemEntityCopyWith<$Res>
+ implements $MenuItemEntityCopyWith<$Res> {
+ factory _$$_MenuItemEntityCopyWith(
+ _$_MenuItemEntity value, $Res Function(_$_MenuItemEntity) then) =
+ __$$_MenuItemEntityCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call(
+ {int id,
+ String title,
+ double cost,
+ String image,
+ String description,
+ List ingredients});
+}
+
+/// @nodoc
+class __$$_MenuItemEntityCopyWithImpl<$Res>
+ extends _$MenuItemEntityCopyWithImpl<$Res, _$_MenuItemEntity>
+ implements _$$_MenuItemEntityCopyWith<$Res> {
+ __$$_MenuItemEntityCopyWithImpl(
+ _$_MenuItemEntity _value, $Res Function(_$_MenuItemEntity) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? title = null,
+ Object? cost = null,
+ Object? image = null,
+ Object? description = null,
+ Object? ingredients = null,
+ }) {
+ return _then(_$_MenuItemEntity(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as int,
+ title: null == title
+ ? _value.title
+ : title // ignore: cast_nullable_to_non_nullable
+ as String,
+ cost: null == cost
+ ? _value.cost
+ : cost // ignore: cast_nullable_to_non_nullable
+ as double,
+ image: null == image
+ ? _value.image
+ : image // ignore: cast_nullable_to_non_nullable
+ as String,
+ description: null == description
+ ? _value.description
+ : description // ignore: cast_nullable_to_non_nullable
+ as String,
+ ingredients: null == ingredients
+ ? _value._ingredients
+ : ingredients // ignore: cast_nullable_to_non_nullable
+ as List,
+ ));
+ }
+}
+
+/// @nodoc
+@JsonSerializable()
+class _$_MenuItemEntity implements _MenuItemEntity {
+ _$_MenuItemEntity(
+ {required this.id,
+ required this.title,
+ required this.cost,
+ required this.image,
+ required this.description,
+ required final List ingredients})
+ : _ingredients = ingredients;
+
+ factory _$_MenuItemEntity.fromJson(Map json) =>
+ _$$_MenuItemEntityFromJson(json);
+
+ @override
+ final int id;
+ @override
+ final String title;
+ @override
+ final double cost;
+ @override
+ final String image;
+ @override
+ final String description;
+ final List _ingredients;
+ @override
+ List get ingredients {
+ if (_ingredients is EqualUnmodifiableListView) return _ingredients;
+ // ignore: implicit_dynamic_type
+ return EqualUnmodifiableListView(_ingredients);
+ }
+
+ @override
+ String toString() {
+ return 'MenuItemEntity(id: $id, title: $title, cost: $cost, image: $image, description: $description, ingredients: $ingredients)';
+ }
+
+ @override
+ bool operator ==(dynamic other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$_MenuItemEntity &&
+ (identical(other.id, id) || other.id == id) &&
+ (identical(other.title, title) || other.title == title) &&
+ (identical(other.cost, cost) || other.cost == cost) &&
+ (identical(other.image, image) || other.image == image) &&
+ (identical(other.description, description) ||
+ other.description == description) &&
+ const DeepCollectionEquality()
+ .equals(other._ingredients, _ingredients));
+ }
+
+ @JsonKey(ignore: true)
+ @override
+ int get hashCode => Object.hash(runtimeType, id, title, cost, image,
+ description, const DeepCollectionEquality().hash(_ingredients));
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$_MenuItemEntityCopyWith<_$_MenuItemEntity> get copyWith =>
+ __$$_MenuItemEntityCopyWithImpl<_$_MenuItemEntity>(this, _$identity);
+
+ @override
+ Map toJson() {
+ return _$$_MenuItemEntityToJson(
+ this,
+ );
+ }
+}
+
+abstract class _MenuItemEntity implements MenuItemEntity {
+ factory _MenuItemEntity(
+ {required final int id,
+ required final String title,
+ required final double cost,
+ required final String image,
+ required final String description,
+ required final List ingredients}) = _$_MenuItemEntity;
+
+ factory _MenuItemEntity.fromJson(Map json) =
+ _$_MenuItemEntity.fromJson;
+
+ @override
+ int get id;
+ @override
+ String get title;
+ @override
+ double get cost;
+ @override
+ String get image;
+ @override
+ String get description;
+ @override
+ List get ingredients;
+ @override
+ @JsonKey(ignore: true)
+ _$$_MenuItemEntityCopyWith<_$_MenuItemEntity> get copyWith =>
+ throw _privateConstructorUsedError;
+}
diff --git a/data/lib/entity/menu_item_entity.g.dart b/data/lib/entity/menu_item_entity.g.dart
new file mode 100644
index 0000000..80ecda9
--- /dev/null
+++ b/data/lib/entity/menu_item_entity.g.dart
@@ -0,0 +1,29 @@
+// GENERATED CODE - DO NOT MODIFY BY HAND
+
+part of 'menu_item_entity.dart';
+
+// **************************************************************************
+// JsonSerializableGenerator
+// **************************************************************************
+
+_$_MenuItemEntity _$$_MenuItemEntityFromJson(Map json) =>
+ _$_MenuItemEntity(
+ id: json['id'] as int,
+ title: json['title'] as String,
+ cost: (json['cost'] as num).toDouble(),
+ image: json['image'] as String,
+ description: json['description'] as String,
+ ingredients: (json['ingredients'] as List)
+ .map((e) => e as String)
+ .toList(),
+ );
+
+Map _$$_MenuItemEntityToJson(_$_MenuItemEntity instance) =>
+ {
+ 'id': instance.id,
+ 'title': instance.title,
+ 'cost': instance.cost,
+ 'image': instance.image,
+ 'description': instance.description,
+ 'ingredients': instance.ingredients,
+ };
diff --git a/data/lib/mappers/menu_item_mapper.dart b/data/lib/mappers/menu_item_mapper.dart
new file mode 100644
index 0000000..c6c29b4
--- /dev/null
+++ b/data/lib/mappers/menu_item_mapper.dart
@@ -0,0 +1,27 @@
+import 'package:domain/models/menu_item_model/menu_item_model.dart';
+
+import '../entity/menu_item_entity.dart';
+
+abstract class MenuItemMapper {
+ static MenuItemEntity toEntity(MenuItemModel model) {
+ return MenuItemEntity(
+ id: model.id,
+ title: model.title,
+ cost: model.cost,
+ image: model.image,
+ description: model.description,
+ ingredients: model.ingredients,
+ );
+ }
+
+ static MenuItemModel toModel(MenuItemEntity entity) {
+ return MenuItemModel(
+ id: entity.id,
+ title: entity.title,
+ cost: entity.cost,
+ image: entity.image,
+ description: entity.description,
+ ingredients: entity.ingredients,
+ );
+ }
+}
diff --git a/data/lib/providers/menu_provider.dart b/data/lib/providers/menu_provider.dart
new file mode 100644
index 0000000..be3c852
--- /dev/null
+++ b/data/lib/providers/menu_provider.dart
@@ -0,0 +1,18 @@
+import 'package:cloud_firestore/cloud_firestore.dart';
+import 'package:data/entity/menu_item_entity.dart';
+
+class MenuDataProvider {
+ final FirebaseFirestore _firestore;
+
+ MenuDataProvider(this._firestore);
+
+ Future> fetchMenuItems() async {
+ final querySnapshot = await _firestore.collection('menu').get();
+
+ return querySnapshot.docs
+ .map(
+ (doc) => MenuItemEntity.fromJson(doc.data()),
+ )
+ .toList();
+ }
+}
diff --git a/data/lib/repositories/menu_repository_impl/menu_repository_impl.dart b/data/lib/repositories/menu_repository_impl/menu_repository_impl.dart
new file mode 100644
index 0000000..283c2fc
--- /dev/null
+++ b/data/lib/repositories/menu_repository_impl/menu_repository_impl.dart
@@ -0,0 +1,24 @@
+import 'dart:async';
+
+import 'package:data/entity/menu_item_entity.dart';
+import 'package:domain/models/menu_item_model/menu_item_model.dart';
+import 'package:domain/repositories/menu_repository.dart';
+
+import '../../mappers/menu_item_mapper.dart';
+import '../../providers/menu_provider.dart';
+
+class MenuRepositoryImpl implements MenuRepository {
+ final MenuDataProvider _menuDataProvider;
+
+ MenuRepositoryImpl({required MenuDataProvider menuDataProvider})
+ : _menuDataProvider = menuDataProvider;
+
+ @override
+ Future> fetchMenuItems() async {
+ final List menuItems =
+ await _menuDataProvider.fetchMenuItems();
+ return menuItems
+ .map((MenuItemEntity e) => MenuItemMapper.toModel(e))
+ .toList();
+ }
+}
diff --git a/data/pubspec.lock b/data/pubspec.lock
new file mode 100644
index 0000000..c09e190
--- /dev/null
+++ b/data/pubspec.lock
@@ -0,0 +1,778 @@
+# Generated by pub
+# See https://dart.dev/tools/pub/glossary#lockfile
+packages:
+ _fe_analyzer_shared:
+ dependency: transitive
+ description:
+ name: _fe_analyzer_shared
+ sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a
+ url: "https://pub.dev"
+ source: hosted
+ version: "61.0.0"
+ _flutterfire_internals:
+ dependency: transitive
+ description:
+ name: _flutterfire_internals
+ sha256: a742f71d7f3484253a623b30e19256aa4668ecbb3de6ad1beb0bcf8d4777ecd8
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.3"
+ analyzer:
+ dependency: transitive
+ description:
+ name: analyzer
+ sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.13.0"
+ args:
+ dependency: transitive
+ description:
+ name: args
+ sha256: eef6c46b622e0494a36c5a12d10d77fb4e855501a91c1b9ef9339326e58f0596
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.2"
+ async:
+ dependency: transitive
+ description:
+ name: async
+ sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.11.0"
+ auto_route:
+ dependency: transitive
+ description:
+ name: auto_route
+ sha256: "12047baeca0e01df93165ef33275b32119d72699ab9a49dc64c20e78f586f96d"
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.0.4"
+ bloc:
+ dependency: transitive
+ description:
+ name: bloc
+ sha256: "3820f15f502372d979121de1f6b97bfcf1630ebff8fe1d52fb2b0bfa49be5b49"
+ url: "https://pub.dev"
+ source: hosted
+ version: "8.1.2"
+ boolean_selector:
+ dependency: transitive
+ description:
+ name: boolean_selector
+ sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
+ build:
+ dependency: transitive
+ description:
+ name: build
+ sha256: "80184af8b6cb3e5c1c4ec6d8544d27711700bc3e6d2efad04238c7b5290889f0"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.1"
+ build_config:
+ dependency: transitive
+ description:
+ name: build_config
+ sha256: bf80fcfb46a29945b423bd9aad884590fb1dc69b330a4d4700cac476af1708d1
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.1"
+ build_daemon:
+ dependency: transitive
+ description:
+ name: build_daemon
+ sha256: "5f02d73eb2ba16483e693f80bee4f088563a820e47d1027d4cdfe62b5bb43e65"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.0.0"
+ build_resolvers:
+ dependency: transitive
+ description:
+ name: build_resolvers
+ sha256: "6c4dd11d05d056e76320b828a1db0fc01ccd376922526f8e9d6c796a5adbac20"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.1"
+ build_runner:
+ dependency: "direct dev"
+ description:
+ name: build_runner
+ sha256: "10c6bcdbf9d049a0b666702cf1cee4ddfdc38f02a19d35ae392863b47519848b"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.6"
+ build_runner_core:
+ dependency: transitive
+ description:
+ name: build_runner_core
+ sha256: "6d6ee4276b1c5f34f21fdf39425202712d2be82019983d52f351c94aafbc2c41"
+ url: "https://pub.dev"
+ source: hosted
+ version: "7.2.10"
+ 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: "598a2a682e2a7a90f08ba39c0aaa9374c5112340f0a2e275f61b59389543d166"
+ url: "https://pub.dev"
+ source: hosted
+ version: "8.6.1"
+ characters:
+ dependency: transitive
+ description:
+ name: characters
+ sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.0"
+ checked_yaml:
+ dependency: transitive
+ description:
+ name: checked_yaml
+ sha256: feb6bed21949061731a7a75fc5d2aa727cf160b91af9a3e464c5e3a32e28b5ff
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.3"
+ clock:
+ dependency: transitive
+ description:
+ name: clock
+ sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.1"
+ cloud_firestore:
+ dependency: transitive
+ description:
+ name: cloud_firestore
+ sha256: "5bbc1f5bffa79af54ca035b92b57f81c6fb35ee5471ead67e29c8e12de8432f8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.8.2"
+ cloud_firestore_platform_interface:
+ dependency: transitive
+ description:
+ name: cloud_firestore_platform_interface
+ sha256: "8e0aafeb727087f84710275d59a101b2acf2290ffbb3b111aab70423f8350d5d"
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.15.2"
+ cloud_firestore_web:
+ dependency: transitive
+ description:
+ name: cloud_firestore_web
+ sha256: bbf0ebb9d1e9251caa00e8727389313c64cb4240c1c31f895971c52d0c782316
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.6.2"
+ code_builder:
+ dependency: transitive
+ description:
+ name: code_builder
+ sha256: "4ad01d6e56db961d29661561effde45e519939fdaeb46c351275b182eac70189"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.5.0"
+ collection:
+ dependency: transitive
+ description:
+ name: collection
+ sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.17.1"
+ convert:
+ dependency: transitive
+ description:
+ name: convert
+ sha256: "0f08b14755d163f6e2134cb58222dd25ea2a2ee8a195e53983d57c075324d592"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.1"
+ core:
+ dependency: "direct main"
+ description:
+ path: "../core"
+ relative: true
+ source: path
+ version: "0.0.1"
+ core_ui:
+ dependency: transitive
+ description:
+ path: "../core_ui"
+ relative: true
+ source: path
+ version: "0.0.1"
+ crypto:
+ dependency: transitive
+ description:
+ name: crypto
+ sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.0.3"
+ dart_style:
+ dependency: transitive
+ description:
+ name: dart_style
+ sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.2"
+ dio:
+ dependency: "direct main"
+ description:
+ name: dio
+ sha256: "7d328c4d898a61efc3cd93655a0955858e29a0aa647f0f9e02d59b3bb275e2e8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.0.6"
+ domain:
+ dependency: "direct main"
+ description:
+ path: "../domain"
+ relative: true
+ source: path
+ version: "0.0.1"
+ fake_async:
+ dependency: transitive
+ description:
+ name: fake_async
+ sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.1"
+ file:
+ dependency: transitive
+ description:
+ name: file
+ sha256: "5fc22d7c25582e38ad9a8515372cd9a93834027aacf1801cf01164dac0ffa08c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "7.0.0"
+ firebase_core:
+ dependency: transitive
+ description:
+ name: firebase_core
+ sha256: a4a99204da264a0aa9d54a332ea0315ce7b0768075139c77abefe98093dd98be
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.14.0"
+ firebase_core_platform_interface:
+ dependency: transitive
+ description:
+ name: firebase_core_platform_interface
+ sha256: b63e3be6c96ef5c33bdec1aab23c91eb00696f6452f0519401d640938c94cba2
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.8.0"
+ firebase_core_web:
+ dependency: transitive
+ description:
+ name: firebase_core_web
+ sha256: "0fd5c4b228de29b55fac38aed0d9e42514b3d3bd47675de52bf7f8fccaf922fa"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.6.0"
+ fixnum:
+ dependency: transitive
+ description:
+ name: fixnum
+ sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.0"
+ flutter:
+ dependency: "direct main"
+ description: flutter
+ source: sdk
+ version: "0.0.0"
+ flutter_bloc:
+ dependency: transitive
+ description:
+ name: flutter_bloc
+ sha256: e74efb89ee6945bcbce74a5b3a5a3376b088e5f21f55c263fc38cbdc6237faae
+ url: "https://pub.dev"
+ source: hosted
+ version: "8.1.3"
+ flutter_lints:
+ dependency: "direct dev"
+ description:
+ name: flutter_lints
+ sha256: "2118df84ef0c3ca93f96123a616ae8540879991b8b57af2f81b76a7ada49b2a4"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.2"
+ flutter_spinkit:
+ dependency: transitive
+ description:
+ name: flutter_spinkit
+ sha256: b39c753e909d4796906c5696a14daf33639a76e017136c8d82bf3e620ce5bb8e
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.2.0"
+ flutter_svg:
+ dependency: transitive
+ description:
+ name: flutter_svg
+ sha256: "8c5d68a82add3ca76d792f058b186a0599414f279f00ece4830b9b231b570338"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.0.7"
+ 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 dev"
+ description:
+ name: freezed
+ sha256: a9520490532087cf38bf3f7de478ab6ebeb5f68bb1eb2641546d92719b224445
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.5"
+ freezed_annotation:
+ dependency: "direct main"
+ description:
+ name: freezed_annotation
+ sha256: aeac15850ef1b38ee368d4c53ba9a847e900bb2c53a4db3f6881cbb3cb684338
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.2.0"
+ frontend_server_client:
+ dependency: transitive
+ description:
+ name: frontend_server_client
+ sha256: "408e3ca148b31c20282ad6f37ebfa6f4bdc8fede5b74bc2f08d9d92b55db3612"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.2.0"
+ get_it:
+ dependency: transitive
+ description:
+ name: get_it
+ sha256: "529de303c739fca98cd7ece5fca500d8ff89649f1bb4b4e94fb20954abcd7468"
+ url: "https://pub.dev"
+ source: hosted
+ version: "7.6.0"
+ glob:
+ dependency: transitive
+ description:
+ name: glob
+ sha256: "0e7014b3b7d4dac1ca4d6114f82bf1782ee86745b9b42a92c9289c23d8a0ab63"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.2"
+ graphs:
+ dependency: transitive
+ description:
+ name: graphs
+ sha256: aedc5a15e78fc65a6e23bcd927f24c64dd995062bcd1ca6eda65a3cff92a4d19
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.3.1"
+ http_multi_server:
+ dependency: transitive
+ description:
+ name: http_multi_server
+ sha256: "97486f20f9c2f7be8f514851703d0119c3596d14ea63227af6f7a481ef2b2f8b"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.2.1"
+ http_parser:
+ dependency: transitive
+ description:
+ name: http_parser
+ sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b"
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.0.2"
+ io:
+ dependency: transitive
+ description:
+ name: io
+ sha256: "2ec25704aba361659e10e3e5f5d672068d332fc8ac516421d483a11e5cbd061e"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.4"
+ js:
+ dependency: transitive
+ description:
+ name: js
+ sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.6.7"
+ json_annotation:
+ dependency: "direct main"
+ description:
+ name: json_annotation
+ sha256: b10a7b2ff83d83c777edba3c6a0f97045ddadd56c944e1a23a3fdf43a1bf4467
+ url: "https://pub.dev"
+ source: hosted
+ version: "4.8.1"
+ json_serializable:
+ dependency: "direct dev"
+ description:
+ name: json_serializable
+ sha256: aa1f5a8912615733e0fdc7a02af03308933c93235bdc8d50d0b0c8a8ccb0b969
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.7.1"
+ lints:
+ dependency: transitive
+ description:
+ name: lints
+ sha256: "0a217c6c989d21039f1498c3ed9f3ed71b354e69873f13a8dfc3c9fe76f1b452"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
+ logging:
+ dependency: transitive
+ description:
+ name: logging
+ sha256: "623a88c9594aa774443aa3eb2d41807a48486b5613e67599fb4c41c0ad47c340"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.0"
+ main_page_view:
+ dependency: transitive
+ description:
+ path: "../features/main_page_view"
+ relative: true
+ source: path
+ version: "0.0.1"
+ matcher:
+ dependency: transitive
+ description:
+ name: matcher
+ sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.12.15"
+ material_color_utilities:
+ dependency: transitive
+ description:
+ name: material_color_utilities
+ sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.2.0"
+ meta:
+ dependency: transitive
+ description:
+ name: meta
+ sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.9.1"
+ mime:
+ dependency: transitive
+ description:
+ name: mime
+ sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.4"
+ navigation:
+ dependency: transitive
+ description:
+ path: "../navigation"
+ relative: true
+ source: path
+ version: "0.0.1"
+ nested:
+ dependency: transitive
+ description:
+ name: nested
+ sha256: "03bac4c528c64c95c722ec99280375a6f2fc708eec17c7b3f07253b626cd2a20"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.0"
+ order_history:
+ dependency: transitive
+ description:
+ path: "../features/order_history"
+ relative: true
+ source: path
+ version: "0.0.1"
+ package_config:
+ dependency: transitive
+ description:
+ name: package_config
+ sha256: "1c5b77ccc91e4823a5af61ee74e6b972db1ef98c2ff5a18d3161c982a55448bd"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.0"
+ path:
+ dependency: transitive
+ description:
+ name: path
+ sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.8.3"
+ path_parsing:
+ dependency: transitive
+ description:
+ name: path_parsing
+ sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
+ petitparser:
+ dependency: transitive
+ description:
+ name: petitparser
+ sha256: cb3798bef7fc021ac45b308f4b51208a152792445cce0448c9a4ba5879dd8750
+ url: "https://pub.dev"
+ source: hosted
+ version: "5.4.0"
+ plugin_platform_interface:
+ dependency: transitive
+ description:
+ name: plugin_platform_interface
+ sha256: "6a2128648c854906c53fa8e33986fc0247a1116122f9534dd20e3ab9e16a32bc"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.4"
+ pool:
+ dependency: transitive
+ description:
+ name: pool
+ sha256: "20fe868b6314b322ea036ba325e6fc0711a22948856475e2c2b6306e8ab39c2a"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.5.1"
+ provider:
+ dependency: transitive
+ description:
+ name: provider
+ sha256: cdbe7530b12ecd9eb455bdaa2fcb8d4dad22e80b8afb4798b41479d5ce26847f
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.0.5"
+ pub_semver:
+ dependency: transitive
+ description:
+ name: pub_semver
+ sha256: "40d3ab1bbd474c4c2328c91e3a7df8c6dd629b79ece4c4bd04bee496a224fb0c"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.4"
+ pubspec_parse:
+ dependency: transitive
+ description:
+ name: pubspec_parse
+ sha256: c63b2876e58e194e4b0828fcb080ad0e06d051cb607a6be51a9e084f47cb9367
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.3"
+ settings:
+ dependency: transitive
+ description:
+ path: "../features/settings"
+ relative: true
+ source: path
+ version: "0.0.1"
+ shelf:
+ dependency: transitive
+ description:
+ name: shelf
+ sha256: ad29c505aee705f41a4d8963641f91ac4cee3c8fad5947e033390a7bd8180fa4
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.4.1"
+ shelf_web_socket:
+ dependency: transitive
+ description:
+ name: shelf_web_socket
+ sha256: "9ca081be41c60190ebcb4766b2486a7d50261db7bd0f5d9615f2d653637a84c1"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.4"
+ shopping_cart:
+ dependency: transitive
+ description:
+ path: "../features/shopping_cart"
+ relative: true
+ source: path
+ version: "0.0.1"
+ sky_engine:
+ dependency: transitive
+ description: flutter
+ source: sdk
+ version: "0.0.99"
+ source_gen:
+ dependency: transitive
+ description:
+ name: source_gen
+ sha256: fc0da689e5302edb6177fdd964efcb7f58912f43c28c2047a808f5bfff643d16
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.4.0"
+ source_helper:
+ dependency: transitive
+ description:
+ name: source_helper
+ sha256: "6adebc0006c37dd63fe05bca0a929b99f06402fc95aa35bf36d67f5c06de01fd"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.4"
+ source_span:
+ dependency: transitive
+ description:
+ name: source_span
+ sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.9.1"
+ stack_trace:
+ dependency: transitive
+ description:
+ name: stack_trace
+ sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.11.0"
+ stream_channel:
+ dependency: transitive
+ description:
+ name: stream_channel
+ sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.1"
+ stream_transform:
+ dependency: transitive
+ description:
+ name: stream_transform
+ sha256: "14a00e794c7c11aa145a170587321aedce29769c08d7f58b1d141da75e3b1c6f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.0"
+ string_scanner:
+ dependency: transitive
+ description:
+ name: string_scanner
+ sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.0"
+ term_glyph:
+ dependency: transitive
+ description:
+ name: term_glyph
+ sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.2.1"
+ test_api:
+ dependency: transitive
+ description:
+ name: test_api
+ sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.5.1"
+ timing:
+ dependency: transitive
+ description:
+ name: timing
+ sha256: "70a3b636575d4163c477e6de42f247a23b315ae20e86442bebe32d3cabf61c32"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.0.1"
+ typed_data:
+ dependency: transitive
+ description:
+ name: typed_data
+ sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.3.2"
+ vector_graphics:
+ dependency: transitive
+ description:
+ name: vector_graphics
+ sha256: "670f6e07aca990b4a2bcdc08a784193c4ccdd1932620244c3a86bb72a0eac67f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.7"
+ vector_graphics_codec:
+ dependency: transitive
+ description:
+ name: vector_graphics_codec
+ sha256: "7451721781d967db9933b63f5733b1c4533022c0ba373a01bdd79d1a5457f69f"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.7"
+ vector_graphics_compiler:
+ dependency: transitive
+ description:
+ name: vector_graphics_compiler
+ sha256: "80a13c613c8bde758b1464a1755a7b3a8f2b6cec61fbf0f5a53c94c30f03ba2e"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.7"
+ vector_math:
+ dependency: transitive
+ description:
+ name: vector_math
+ sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.1.4"
+ watcher:
+ dependency: transitive
+ description:
+ name: watcher
+ sha256: "3d2ad6751b3c16cf07c7fca317a1413b3f26530319181b37e3b9039b84fc01d8"
+ url: "https://pub.dev"
+ source: hosted
+ version: "1.1.0"
+ web_socket_channel:
+ dependency: transitive
+ description:
+ name: web_socket_channel
+ sha256: d88238e5eac9a42bb43ca4e721edba3c08c6354d4a53063afaa568516217621b
+ url: "https://pub.dev"
+ source: hosted
+ version: "2.4.0"
+ xml:
+ dependency: transitive
+ description:
+ name: xml
+ sha256: "5bc72e1e45e941d825fd7468b9b4cc3b9327942649aeb6fc5cdbf135f0a86e84"
+ url: "https://pub.dev"
+ source: hosted
+ version: "6.3.0"
+ yaml:
+ dependency: transitive
+ description:
+ name: yaml
+ sha256: "75769501ea3489fca56601ff33454fe45507ea3bfb014161abc3b43ae25989d5"
+ url: "https://pub.dev"
+ source: hosted
+ version: "3.1.2"
+sdks:
+ dart: ">=3.0.5 <4.0.0"
+ flutter: ">=3.7.0-0"
diff --git a/data/pubspec.yaml b/data/pubspec.yaml
new file mode 100644
index 0000000..f7dadfa
--- /dev/null
+++ b/data/pubspec.yaml
@@ -0,0 +1,28 @@
+name: data
+description: Project data module.
+version: 0.0.1
+publish_to: none
+
+environment:
+ sdk: '>=3.0.5 <4.0.0'
+ flutter: ">=1.17.0"
+
+dependencies:
+ flutter:
+ sdk: flutter
+ core:
+ path: ../core
+ domain:
+ path: ../domain
+
+ dio: ^4.0.6
+ freezed_annotation: ^2.2.0
+ json_annotation: ^4.8.1
+
+dev_dependencies:
+ flutter_test:
+ sdk: flutter
+ flutter_lints: ^2.0.0
+ json_serializable: ^6.7.0
+ build_runner: ^2.4.5
+ freezed: ^2.3.5
diff --git a/domain/analysis_options.yaml b/domain/analysis_options.yaml
new file mode 100644
index 0000000..a5744c1
--- /dev/null
+++ b/domain/analysis_options.yaml
@@ -0,0 +1,4 @@
+include: package:flutter_lints/flutter.yaml
+
+# Additional information about this file can be found at
+# https://dart.dev/guides/language/analysis-options
diff --git a/domain/lib/domain.dart b/domain/lib/domain.dart
new file mode 100644
index 0000000..bb77d0f
--- /dev/null
+++ b/domain/lib/domain.dart
@@ -0,0 +1,3 @@
+library domain;
+
+export 'package:domain/repositories/menu_repository.dart';
diff --git a/domain/lib/models/menu_item_model/menu_item_model.dart b/domain/lib/models/menu_item_model/menu_item_model.dart
new file mode 100644
index 0000000..f4e0cea
--- /dev/null
+++ b/domain/lib/models/menu_item_model/menu_item_model.dart
@@ -0,0 +1,15 @@
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'menu_item_model.freezed.dart';
+
+@freezed
+class MenuItemModel with _$MenuItemModel {
+ factory MenuItemModel({
+ required int id,
+ required String title,
+ required double cost,
+ required String image,
+ required String description,
+ required List ingredients,
+ }) = _MenuItemModel;
+}
diff --git a/domain/lib/models/menu_item_model/menu_item_model.freezed.dart b/domain/lib/models/menu_item_model/menu_item_model.freezed.dart
new file mode 100644
index 0000000..94ad7a8
--- /dev/null
+++ b/domain/lib/models/menu_item_model/menu_item_model.freezed.dart
@@ -0,0 +1,245 @@
+// coverage:ignore-file
+// GENERATED CODE - DO NOT MODIFY BY HAND
+// 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 'menu_item_model.dart';
+
+// **************************************************************************
+// FreezedGenerator
+// **************************************************************************
+
+T _$identity(T value) => value;
+
+final _privateConstructorUsedError = UnsupportedError(
+ 'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#custom-getters-and-methods');
+
+/// @nodoc
+mixin _$MenuItemModel {
+ int get id => throw _privateConstructorUsedError;
+ String get title => throw _privateConstructorUsedError;
+ double get cost => throw _privateConstructorUsedError;
+ String get image => throw _privateConstructorUsedError;
+ String get description => throw _privateConstructorUsedError;
+ List get ingredients => throw _privateConstructorUsedError;
+
+ @JsonKey(ignore: true)
+ $MenuItemModelCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $MenuItemModelCopyWith<$Res> {
+ factory $MenuItemModelCopyWith(
+ MenuItemModel value, $Res Function(MenuItemModel) then) =
+ _$MenuItemModelCopyWithImpl<$Res, MenuItemModel>;
+ @useResult
+ $Res call(
+ {int id,
+ String title,
+ double cost,
+ String image,
+ String description,
+ List ingredients});
+}
+
+/// @nodoc
+class _$MenuItemModelCopyWithImpl<$Res, $Val extends MenuItemModel>
+ implements $MenuItemModelCopyWith<$Res> {
+ _$MenuItemModelCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? title = null,
+ Object? cost = null,
+ Object? image = null,
+ Object? description = null,
+ Object? ingredients = null,
+ }) {
+ return _then(_value.copyWith(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as int,
+ title: null == title
+ ? _value.title
+ : title // ignore: cast_nullable_to_non_nullable
+ as String,
+ cost: null == cost
+ ? _value.cost
+ : cost // ignore: cast_nullable_to_non_nullable
+ as double,
+ image: null == image
+ ? _value.image
+ : image // ignore: cast_nullable_to_non_nullable
+ as String,
+ description: null == description
+ ? _value.description
+ : description // ignore: cast_nullable_to_non_nullable
+ as String,
+ ingredients: null == ingredients
+ ? _value.ingredients
+ : ingredients // ignore: cast_nullable_to_non_nullable
+ as List,
+ ) as $Val);
+ }
+}
+
+/// @nodoc
+abstract class _$$_MenuItemModelCopyWith<$Res>
+ implements $MenuItemModelCopyWith<$Res> {
+ factory _$$_MenuItemModelCopyWith(
+ _$_MenuItemModel value, $Res Function(_$_MenuItemModel) then) =
+ __$$_MenuItemModelCopyWithImpl<$Res>;
+ @override
+ @useResult
+ $Res call(
+ {int id,
+ String title,
+ double cost,
+ String image,
+ String description,
+ List ingredients});
+}
+
+/// @nodoc
+class __$$_MenuItemModelCopyWithImpl<$Res>
+ extends _$MenuItemModelCopyWithImpl<$Res, _$_MenuItemModel>
+ implements _$$_MenuItemModelCopyWith<$Res> {
+ __$$_MenuItemModelCopyWithImpl(
+ _$_MenuItemModel _value, $Res Function(_$_MenuItemModel) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? id = null,
+ Object? title = null,
+ Object? cost = null,
+ Object? image = null,
+ Object? description = null,
+ Object? ingredients = null,
+ }) {
+ return _then(_$_MenuItemModel(
+ id: null == id
+ ? _value.id
+ : id // ignore: cast_nullable_to_non_nullable
+ as int,
+ title: null == title
+ ? _value.title
+ : title // ignore: cast_nullable_to_non_nullable
+ as String,
+ cost: null == cost
+ ? _value.cost
+ : cost // ignore: cast_nullable_to_non_nullable
+ as double,
+ image: null == image
+ ? _value.image
+ : image // ignore: cast_nullable_to_non_nullable
+ as String,
+ description: null == description
+ ? _value.description
+ : description // ignore: cast_nullable_to_non_nullable
+ as String,
+ ingredients: null == ingredients
+ ? _value._ingredients
+ : ingredients // ignore: cast_nullable_to_non_nullable
+ as List,
+ ));
+ }
+}
+
+/// @nodoc
+
+class _$_MenuItemModel implements _MenuItemModel {
+ _$_MenuItemModel(
+ {required this.id,
+ required this.title,
+ required this.cost,
+ required this.image,
+ required this.description,
+ required final List ingredients})
+ : _ingredients = ingredients;
+
+ @override
+ final int id;
+ @override
+ final String title;
+ @override
+ final double cost;
+ @override
+ final String image;
+ @override
+ final String description;
+ final List _ingredients;
+ @override
+ List get ingredients {
+ if (_ingredients is EqualUnmodifiableListView) return _ingredients;
+ // ignore: implicit_dynamic_type
+ return EqualUnmodifiableListView(_ingredients);
+ }
+
+ @override
+ String toString() {
+ return 'MenuItemModel(id: $id, title: $title, cost: $cost, image: $image, description: $description, ingredients: $ingredients)';
+ }
+
+ @override
+ bool operator ==(dynamic other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$_MenuItemModel &&
+ (identical(other.id, id) || other.id == id) &&
+ (identical(other.title, title) || other.title == title) &&
+ (identical(other.cost, cost) || other.cost == cost) &&
+ (identical(other.image, image) || other.image == image) &&
+ (identical(other.description, description) ||
+ other.description == description) &&
+ const DeepCollectionEquality()
+ .equals(other._ingredients, _ingredients));
+ }
+
+ @override
+ int get hashCode => Object.hash(runtimeType, id, title, cost, image,
+ description, const DeepCollectionEquality().hash(_ingredients));
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$_MenuItemModelCopyWith<_$_MenuItemModel> get copyWith =>
+ __$$_MenuItemModelCopyWithImpl<_$_MenuItemModel>(this, _$identity);
+}
+
+abstract class _MenuItemModel implements MenuItemModel {
+ factory _MenuItemModel(
+ {required final int id,
+ required final String title,
+ required final double cost,
+ required final String image,
+ required final String description,
+ required final List ingredients}) = _$_MenuItemModel;
+
+ @override
+ int get id;
+ @override
+ String get title;
+ @override
+ double get cost;
+ @override
+ String get image;
+ @override
+ String get description;
+ @override
+ List get ingredients;
+ @override
+ @JsonKey(ignore: true)
+ _$$_MenuItemModelCopyWith<_$_MenuItemModel> get copyWith =>
+ throw _privateConstructorUsedError;
+}
diff --git a/domain/lib/models/shopping_cart_model/shopping_cart_item_model.dart b/domain/lib/models/shopping_cart_model/shopping_cart_item_model.dart
new file mode 100644
index 0000000..34eccb9
--- /dev/null
+++ b/domain/lib/models/shopping_cart_model/shopping_cart_item_model.dart
@@ -0,0 +1,26 @@
+import '../menu_item_model/menu_item_model.dart';
+
+class ShoppingCartItemModel {
+ final MenuItemModel menuItem;
+ int amount;
+
+ ShoppingCartItemModel({
+ required this.menuItem,
+ required this.amount,
+ });
+
+ ShoppingCartItemModel copyWith({
+ MenuItemModel? menuItem,
+ int? amount,
+ }) {
+ return ShoppingCartItemModel(
+ menuItem: menuItem ?? this.menuItem,
+ amount: amount ?? this.amount,
+ );
+ }
+
+ List