diff --git a/.DS_Store b/.DS_Store
index 3d1c4439..4bd8225b 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/README.md b/README.md
index 39b2d892..d7368d78 100644
--- a/README.md
+++ b/README.md
@@ -1,59 +1 @@
-
-# eatvio_app
-### Системные требования
-
-- Flutter (Channel stable, 3.19.0, on Ubuntu 22.04.3 LTS 6.2.0-39-generic, locale en_US.UTF-8)
-- Android Studio (version 2023.1)
-- VS Code (version 1.85.0)
-- Android SDK (version 34.0.0) - устанавливается из Android Studio (Tools->SDK Manager->Android Command Line Tools)
-- Эмулятор (2 available)
-
-### Структура приложения
-
-```
-.
-├── android - Папка для крмпиляции Android приложения
-├── assets - Медиа и шрифты
-├── ios - Папка для крмпиляции iOS приложения
-├── lib - Основной код
- ├── main.dart - Файл из которого компилируется приложение
- ├── presentation - Виджеты экранов (верстка)
- ├── routes - Роутер (пути до экранов)
- └── theme - Темы и оформление
- └── widgets - Кастомные виджеты
-├── pubspec.yaml - Пакеты
-
-```
-
-
-### Как запускать?
-
-Для запуска на эмуляторе в программе VS Code скомпилируйте и запустите файл main.dart (предварительно необходимо установить эмулятор в Android Studio или подключите устройство в режиме разработчика через USB)
-
-Для тестирования на устройствах Android в корневой папке проекта выполните команду
-
-`# flutter build apk`
-
-после чего `.apk` файл скомпилируется в директории `build/app/outputs/flutter-apk/app-release.apk`
-
-Данный файл установит приложение на устройство с актуальной версией OS
-
-### Библиотеки и инструменты
-
- - **flutter_bloc** - контроль состояний
- - **cached_network_image** - кеширование картинок из веба
- - **flutter_svg** - работа с изображениями
- - **equatable** - сравнение без оператора "=="
- - **validators** - валидация
- - **hive** - локальная бд (1)
- - **hive_flutter** - локальная бд (2)
- - **isar_flutter_libs** - локальная бд (3)
- - **path_provider** - динамичкские пути до файлов
- - **fl_chart** - построение графиков
- - **flutter_spinkit** - прелоадеры
- - **flutter_dotenv** - переменные окружения
-
-
-### Поддержка
-
-Telegram: @maxx_kim (https://t.me/maxx_kim)
+# eatvio_app
\ No newline at end of file
diff --git a/android/settings.gradle b/android/settings.gradle
index 83b4cf1d..5a6de5ce 100644
--- a/android/settings.gradle
+++ b/android/settings.gradle
@@ -19,7 +19,7 @@ pluginManagement {
plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.1" apply false
- id "org.jetbrains.kotlin.android" version "1.9.10" apply false
+ id "org.jetbrains.kotlin.android" version "2.0.20" apply false
}
include ":app"
diff --git a/assets/audio/recive_message.wav b/assets/audio/recive_message.wav
new file mode 100644
index 00000000..db342a8f
Binary files /dev/null and b/assets/audio/recive_message.wav differ
diff --git a/assets/audio/send_message.wav b/assets/audio/send_message.wav
new file mode 100644
index 00000000..ec643aa1
Binary files /dev/null and b/assets/audio/send_message.wav differ
diff --git a/assets/icons/calendar.svg b/assets/icons/calendar.svg
new file mode 100644
index 00000000..e9d97952
--- /dev/null
+++ b/assets/icons/calendar.svg
@@ -0,0 +1,29 @@
+
+
+
+
diff --git a/assets/icons/diets.svg b/assets/icons/diets.svg
new file mode 100644
index 00000000..7714b3fa
--- /dev/null
+++ b/assets/icons/diets.svg
@@ -0,0 +1,24 @@
+
+
+
+
diff --git a/lib/app_router.dart b/lib/app_router.dart
index 83485d40..f872ddc9 100644
--- a/lib/app_router.dart
+++ b/lib/app_router.dart
@@ -13,6 +13,8 @@ import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart';
import 'package:eatvio_app/features/feed/models/feed_blog_post_model.dart';
import 'package:eatvio_app/features/feed/models/recipes_model.dart';
import 'package:eatvio_app/features/feed/presentation/pages/feed_screen.dart';
+import 'package:eatvio_app/features/menu/presentation/pages/menu_screen.dart';
+import 'package:eatvio_app/features/notifications/presentation/pages/notifications_screen.dart';
import 'package:eatvio_app/features/profile/presentation/pages/profile_screen.dart';
import 'package:eatvio_app/features/recipes/presentation/pages/about_recipes_screen.dart';
import 'package:eatvio_app/features/recipes/presentation/pages/recipe_create_screen.dart';
@@ -24,7 +26,6 @@ import 'package:eatvio_app/presentation/diets/diet_select_screen/diet_select_scr
import 'package:eatvio_app/presentation/feed/blog_post_edit_screen/blog_post_edit_screen.dart';
import 'package:eatvio_app/presentation/glossary/glossary_screen/glossary_screen.dart';
import 'package:eatvio_app/presentation/plans/plan_select_screen/plan_select_screen.dart';
-import 'package:eatvio_app/presentation/profile/my_profile_screen/my_profile_screen.dart';
import 'package:eatvio_app/presentation/profile/my_profile_screen/my_settings_screen.dart';
import 'package:eatvio_app/presentation/recipe/recipe_select_screen/recipe_select_screen.dart';
import 'package:flutter/material.dart';
@@ -62,32 +63,43 @@ class AppRouter {
},
routes: [
GoRoute(
+ pageBuilder: (context, state) => NoTransitionPage(child: ProfileScreen()),
path: '/my-profile-screen',
name: 'myProfileScreen',
redirect: (context, state) async {
await context.read().runInitialization();
return null;
},
- builder: (context, state) => MyProfileScreen(),
),
GoRoute(
+ pageBuilder: (context, state) => NoTransitionPage(child: FeedScreen()),
path: '/feed-screen',
name: 'feedScreen',
- builder: (context, state) => FeedScreen(),
),
GoRoute(
- path: '/diary-screen',
- name: 'diaryScreen',
- builder: (context, state) {
- if (state.extra != null)
- return DiaryScreen(diaryID: state.extra as String);
- else
- return DiaryScreen(diaryID: '0');
- }),
+ pageBuilder: (context, state) {
+ if (state.extra != null)
+ return NoTransitionPage(child: DiaryScreen(diaryID: state.extra as String));
+ else
+ return NoTransitionPage(child: DiaryScreen(diaryID: '0'));
+ },
+ path: '/diary-screen',
+ name: 'diaryScreen',
+ ),
GoRoute(
+ pageBuilder: (context, state) => NoTransitionPage(child: ChatSelectScreen()),
path: '/chat-select-screen',
name: 'chatSelectScreen',
- builder: (context, state) => ChatSelectScreen(),
+ ),
+ GoRoute(
+ pageBuilder: (context, state) => NoTransitionPage(child: NotificationsScreen()),
+ path: '/notifications-screen',
+ name: 'notificationsScreen',
+ ),
+ GoRoute(
+ pageBuilder: (context, state) => NoTransitionPage(child: MenuScreen()),
+ path: '/menu-screen',
+ name: 'menuScreen',
),
],
),
diff --git a/lib/core/app_export.dart b/lib/core/app_export.dart
index 76a79551..88b3fe01 100644
--- a/lib/core/app_export.dart
+++ b/lib/core/app_export.dart
@@ -3,7 +3,6 @@ export 'package:eatvio_app/core/errors/exceptions.dart';
export 'package:eatvio_app/core/utils/date_time_utils.dart';
export 'package:eatvio_app/core/utils/image_constant.dart';
export 'package:eatvio_app/core/utils/logger.dart';
-export 'package:eatvio_app/core/utils/pref_utils.dart';
export 'package:eatvio_app/core/utils/size_utils.dart';
export 'package:eatvio_app/data/models/selectionPopupModel/selection_popup_model.dart';
export 'package:eatvio_app/localization/app_localization.dart';
@@ -12,6 +11,4 @@ export 'package:eatvio_app/theme/custom_text_style.dart';
export 'package:eatvio_app/theme/theme_helper.dart';
export 'package:eatvio_app/widgets/custom_image_view.dart';
export 'package:flutter_bloc/flutter_bloc.dart';
-
-export '../theme/bloc/theme_bloc.dart';
export '../theme/custom_button_style.dart';
diff --git a/lib/core/initialization_cubit/initialization_cubit.dart b/lib/core/initialization_cubit/initialization_cubit.dart
index 29a42f69..518abeba 100644
--- a/lib/core/initialization_cubit/initialization_cubit.dart
+++ b/lib/core/initialization_cubit/initialization_cubit.dart
@@ -27,7 +27,7 @@ class InitializationCubit extends Cubit {
privateNotificationChannel.subscribe();
privateNotificationChannel.bindToAll().listen((event) {
- sl().incrementCounter();
+ sl().incrementCounter(event.name);
});
}
diff --git a/lib/core/initialization_cubit/initialization_state.freezed.dart b/lib/core/initialization_cubit/initialization_state.freezed.dart
index b0535c68..3364e440 100644
--- a/lib/core/initialization_cubit/initialization_state.freezed.dart
+++ b/lib/core/initialization_cubit/initialization_state.freezed.dart
@@ -84,9 +84,6 @@ class _$InitializationStateCopyWithImpl<$Res, $Val extends InitializationState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
-
- /// Create a copy of InitializationState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -103,9 +100,6 @@ class __$$InitializationStateImplCopyWithImpl<$Res>
__$$InitializationStateImplCopyWithImpl(_$InitializationStateImpl _value,
$Res Function(_$InitializationStateImpl) _then)
: super(_value, _then);
-
- /// Create a copy of InitializationState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -224,9 +218,6 @@ class __$$InitializationStateLoadingImplCopyWithImpl<$Res>
_$InitializationStateLoadingImpl _value,
$Res Function(_$InitializationStateLoadingImpl) _then)
: super(_value, _then);
-
- /// Create a copy of InitializationState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -348,8 +339,6 @@ class __$$InitializationStateSuccessImplCopyWithImpl<$Res>
$Res Function(_$InitializationStateSuccessImpl) _then)
: super(_value, _then);
- /// Create a copy of InitializationState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -388,9 +377,7 @@ class _$InitializationStateSuccessImpl implements InitializationStateSuccess {
@override
int get hashCode => Object.hash(runtimeType, client);
- /// Create a copy of InitializationState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl>
@@ -478,10 +465,7 @@ abstract class InitializationStateSuccess implements InitializationState {
_$InitializationStateSuccessImpl;
PusherChannelsClient get client;
-
- /// Create a copy of InitializationState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$InitializationStateSuccessImplCopyWith<_$InitializationStateSuccessImpl>
get copyWith => throw _privateConstructorUsedError;
}
@@ -506,8 +490,6 @@ class __$$InitializationStateErrorImplCopyWithImpl<$Res>
$Res Function(_$InitializationStateErrorImpl) _then)
: super(_value, _then);
- /// Create a copy of InitializationState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -547,9 +529,7 @@ class _$InitializationStateErrorImpl implements InitializationStateError {
@override
int get hashCode => Object.hash(runtimeType, errorMessage);
- /// Create a copy of InitializationState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl>
@@ -636,10 +616,7 @@ abstract class InitializationStateError implements InitializationState {
_$InitializationStateErrorImpl;
String get errorMessage;
-
- /// Create a copy of InitializationState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$InitializationStateErrorImplCopyWith<_$InitializationStateErrorImpl>
get copyWith => throw _privateConstructorUsedError;
}
diff --git a/lib/core/token_storage.dart b/lib/core/token_storage.dart
index 1179241b..c73e2aba 100644
--- a/lib/core/token_storage.dart
+++ b/lib/core/token_storage.dart
@@ -1,6 +1,6 @@
import 'package:dio/dio.dart';
import 'package:eatvio_app/locator_service.dart';
-import 'package:hive_flutter/hive_flutter.dart';
+import 'package:flutter_secure_storage/flutter_secure_storage.dart';
abstract class TokenStorage {
static _addTokenToDioHeader(String token) {
@@ -8,22 +8,20 @@ abstract class TokenStorage {
}
static haveTokenInStorage() async {
- final box = await Hive.openBox('token');
- final token = box.get('token');
- if (token == null) {
+ if (await FlutterSecureStorage().read(key: 'token') == null) {
return false;
} else {
- _addTokenToDioHeader(token);
+ _addTokenToDioHeader((await FlutterSecureStorage().read(key: 'token'))!);
return true;
}
}
- static Future getTokenFromStorage() async => (await Hive.openBox('token')).get('token');
+ static Future getTokenFromStorage() async => (await FlutterSecureStorage().read(key: 'token'))!;
static saveTokenInStorage(String token) async {
- (await Hive.openBox('token')).put('token', token);
+ await FlutterSecureStorage().write(key: 'token', value: token);
_addTokenToDioHeader(token);
}
- static removeTokenInStorage() async => (await Hive.openBox('token')).delete('token');
+ static removeTokenInStorage() async => (await FlutterSecureStorage().delete(key: 'token'));
}
diff --git a/lib/core/utils/pref_utils.dart b/lib/core/utils/pref_utils.dart
deleted file mode 100644
index 9c49a3d2..00000000
--- a/lib/core/utils/pref_utils.dart
+++ /dev/null
@@ -1,34 +0,0 @@
-import 'package:shared_preferences/shared_preferences.dart';
-
-class PrefUtils {
- static SharedPreferences? _sharedPreferences;
-
- PrefUtils() {
- // init();
- SharedPreferences.getInstance().then((value) {
- _sharedPreferences = value;
- });
- }
-
- Future init() async {
- _sharedPreferences ??= await SharedPreferences.getInstance();
- print('SharedPreference Initialized');
- }
-
- ///will clear all the data stored in preference
- void clearPreferencesData() async {
- _sharedPreferences!.clear();
- }
-
- Future setThemeData(String value) {
- return _sharedPreferences!.setString('themeData', value);
- }
-
- String getThemeData() {
- try {
- return _sharedPreferences!.getString('themeData')!;
- } catch (e) {
- return 'primary';
- }
- }
-}
diff --git a/lib/data/models/selectionPopupModel/selection_popup_model.freezed.dart b/lib/data/models/selectionPopupModel/selection_popup_model.freezed.dart
index 97ab368c..917785c7 100644
--- a/lib/data/models/selectionPopupModel/selection_popup_model.freezed.dart
+++ b/lib/data/models/selectionPopupModel/selection_popup_model.freezed.dart
@@ -21,9 +21,7 @@ mixin _$SelectionPopupModel {
dynamic get value => throw _privateConstructorUsedError;
bool get isSelected => throw _privateConstructorUsedError;
- /// Create a copy of SelectionPopupModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$SelectionPopupModelCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -47,8 +45,6 @@ class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of SelectionPopupModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -97,8 +93,6 @@ class __$$SelectionPopupModelImplCopyWithImpl<$Res>
$Res Function(_$SelectionPopupModelImpl) _then)
: super(_value, _then);
- /// Create a copy of SelectionPopupModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -165,9 +159,7 @@ class _$SelectionPopupModelImpl implements _SelectionPopupModel {
int get hashCode => Object.hash(runtimeType, id, title,
const DeepCollectionEquality().hash(value), isSelected);
- /// Create a copy of SelectionPopupModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
@@ -190,11 +182,8 @@ abstract class _SelectionPopupModel implements SelectionPopupModel {
dynamic get value;
@override
bool get isSelected;
-
- /// Create a copy of SelectionPopupModel
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/data/models/tokenModel/token_model.dart b/lib/data/models/tokenModel/token_model.dart
deleted file mode 100644
index ce310e2e..00000000
--- a/lib/data/models/tokenModel/token_model.dart
+++ /dev/null
@@ -1,10 +0,0 @@
-import 'package:hive/hive.dart';
-
-/// https://pub.dev/packages/flutter_secure_storage TODO replace hive to secure_storage for token storage
-@HiveType(typeId: 0)
-class TokenModel {
- @HiveField(0)
- String token;
-
- TokenModel({required this.token});
-}
diff --git a/lib/data/models/userRegistrationModel/user_registration_model.freezed.dart b/lib/data/models/userRegistrationModel/user_registration_model.freezed.dart
index fd835a26..4a15327c 100644
--- a/lib/data/models/userRegistrationModel/user_registration_model.freezed.dart
+++ b/lib/data/models/userRegistrationModel/user_registration_model.freezed.dart
@@ -68,12 +68,8 @@ mixin _$UserRegistrationSheet {
@JsonKey(name: 'activity_coefficient')
double get activityCoefficient => throw _privateConstructorUsedError;
- /// Serializes this UserRegistrationSheet to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of UserRegistrationSheet
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$UserRegistrationSheetCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -125,8 +121,6 @@ class _$UserRegistrationSheetCopyWithImpl<$Res,
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of UserRegistrationSheet
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -319,8 +313,6 @@ class __$$UserRegistrationSheetImplCopyWithImpl<$Res>
$Res Function(_$UserRegistrationSheetImpl) _then)
: super(_value, _then);
- /// Create a copy of UserRegistrationSheet
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -635,7 +627,7 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
other.activityCoefficient == activityCoefficient));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hashAll([
runtimeType,
@@ -668,9 +660,7 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet {
activityCoefficient
]);
- /// Create a copy of UserRegistrationSheet
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
@@ -797,11 +787,8 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet {
@override
@JsonKey(name: 'activity_coefficient')
double get activityCoefficient;
-
- /// Create a copy of UserRegistrationSheet
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl>
get copyWith => throw _privateConstructorUsedError;
}
diff --git a/lib/features/blog_post_create/presentation/pages/blog_post_create_screen.dart b/lib/features/blog_post_create/presentation/pages/blog_post_create_screen.dart
index e1414dbe..d8fc116e 100644
--- a/lib/features/blog_post_create/presentation/pages/blog_post_create_screen.dart
+++ b/lib/features/blog_post_create/presentation/pages/blog_post_create_screen.dart
@@ -78,7 +78,7 @@ class _BlogPostCreateScreenState extends State {
floatingActionButton: SizedBox(
width: MediaQuery.of(context).size.width - 32,
child: FloatingActionButton.extended(
- heroTag: 'nextButtonRegistration',
+ heroTag: 'createBlogPost',
highlightElevation: 0,
elevation: 0,
focusElevation: 0,
diff --git a/lib/features/bottom_navigation_bar/presentation/bloc/new_messages_cubit/new_messages_state.freezed.dart b/lib/features/bottom_navigation_bar/presentation/bloc/new_messages_cubit/new_messages_state.freezed.dart
index 7c5d7ffd..02a1c4bd 100644
--- a/lib/features/bottom_navigation_bar/presentation/bloc/new_messages_cubit/new_messages_state.freezed.dart
+++ b/lib/features/bottom_navigation_bar/presentation/bloc/new_messages_cubit/new_messages_state.freezed.dart
@@ -84,9 +84,6 @@ class _$NewMessagesStateCopyWithImpl<$Res, $Val extends NewMessagesState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
-
- /// Create a copy of NewMessagesState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -103,9 +100,6 @@ class __$$NewMessagesStateImplCopyWithImpl<$Res>
__$$NewMessagesStateImplCopyWithImpl(_$NewMessagesStateImpl _value,
$Res Function(_$NewMessagesStateImpl) _then)
: super(_value, _then);
-
- /// Create a copy of NewMessagesState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -221,9 +215,6 @@ class __$$NewMessagesStateEmptyImplCopyWithImpl<$Res>
__$$NewMessagesStateEmptyImplCopyWithImpl(_$NewMessagesStateEmptyImpl _value,
$Res Function(_$NewMessagesStateEmptyImpl) _then)
: super(_value, _then);
-
- /// Create a copy of NewMessagesState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -344,8 +335,6 @@ class __$$NewMessagesStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$NewMessagesStateLoadedImpl) _then)
: super(_value, _then);
- /// Create a copy of NewMessagesState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -385,9 +374,7 @@ class _$NewMessagesStateLoadedImpl implements NewMessagesStateLoaded {
@override
int get hashCode => Object.hash(runtimeType, messagesCount);
- /// Create a copy of NewMessagesState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl>
@@ -474,10 +461,7 @@ abstract class NewMessagesStateLoaded implements NewMessagesState {
_$NewMessagesStateLoadedImpl;
int get messagesCount;
-
- /// Create a copy of NewMessagesState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl>
get copyWith => throw _privateConstructorUsedError;
}
@@ -500,8 +484,6 @@ class __$$NewMessagesStateErrorImplCopyWithImpl<$Res>
$Res Function(_$NewMessagesStateErrorImpl) _then)
: super(_value, _then);
- /// Create a copy of NewMessagesState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -541,9 +523,7 @@ class _$NewMessagesStateErrorImpl implements NewMessagesStateError {
@override
int get hashCode => Object.hash(runtimeType, errorMessage);
- /// Create a copy of NewMessagesState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl>
@@ -630,10 +610,7 @@ abstract class NewMessagesStateError implements NewMessagesState {
_$NewMessagesStateErrorImpl;
String get errorMessage;
-
- /// Create a copy of NewMessagesState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl>
get copyWith => throw _privateConstructorUsedError;
}
diff --git a/lib/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_cubit.dart b/lib/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_cubit.dart
index ba5634cc..8a22b6d5 100644
--- a/lib/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_cubit.dart
+++ b/lib/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_cubit.dart
@@ -3,11 +3,18 @@ import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/noti
class NotificationsCubit extends Cubit {
int _notificationsCount = 0;
+ List notifications = [];
NotificationsCubit() : super(const NotificationsState.empty());
- incrementCounter() {
+ incrementCounter(String data) {
_notificationsCount++;
- emit(NotificationsState.loaded(notificationsCount: _notificationsCount));
+ notifications.add(data);
+ emit(
+ NotificationsState.loaded(
+ notifications: notifications,
+ notificationsCount: _notificationsCount,
+ ),
+ );
}
}
diff --git a/lib/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_state.dart b/lib/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_state.dart
index 0f20a051..d44c7b2b 100644
--- a/lib/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_state.dart
+++ b/lib/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_state.dart
@@ -9,6 +9,7 @@ abstract class NotificationsState with _$NotificationsState {
const factory NotificationsState.empty() = NotificationsStateEmpty;
const factory NotificationsState.loaded({
+ required List notifications,
required int notificationsCount,
}) = NotificationsStateLoaded;
diff --git a/lib/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_state.freezed.dart b/lib/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_state.freezed.dart
index 2b969b98..4ba18f06 100644
--- a/lib/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_state.freezed.dart
+++ b/lib/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_state.freezed.dart
@@ -20,7 +20,9 @@ mixin _$NotificationsState {
TResult when(
TResult Function() $default, {
required TResult Function() empty,
- required TResult Function(int notificationsCount) loaded,
+ required TResult Function(
+ List notifications, int notificationsCount)
+ loaded,
required TResult Function(String errorMessage) error,
}) =>
throw _privateConstructorUsedError;
@@ -28,7 +30,8 @@ mixin _$NotificationsState {
TResult? whenOrNull(
TResult? Function()? $default, {
TResult? Function()? empty,
- TResult? Function(int notificationsCount)? loaded,
+ TResult? Function(List notifications, int notificationsCount)?
+ loaded,
TResult? Function(String errorMessage)? error,
}) =>
throw _privateConstructorUsedError;
@@ -36,7 +39,8 @@ mixin _$NotificationsState {
TResult maybeWhen(
TResult Function()? $default, {
TResult Function()? empty,
- TResult Function(int notificationsCount)? loaded,
+ TResult Function(List notifications, int notificationsCount)?
+ loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) =>
@@ -84,9 +88,6 @@ class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
-
- /// Create a copy of NotificationsState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -103,9 +104,6 @@ class __$$NotificationsStateImplCopyWithImpl<$Res>
__$$NotificationsStateImplCopyWithImpl(_$NotificationsStateImpl _value,
$Res Function(_$NotificationsStateImpl) _then)
: super(_value, _then);
-
- /// Create a copy of NotificationsState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -132,7 +130,9 @@ class _$NotificationsStateImpl implements _NotificationsState {
TResult when(
TResult Function() $default, {
required TResult Function() empty,
- required TResult Function(int notificationsCount) loaded,
+ required TResult Function(
+ List notifications, int notificationsCount)
+ loaded,
required TResult Function(String errorMessage) error,
}) {
return $default();
@@ -143,7 +143,8 @@ class _$NotificationsStateImpl implements _NotificationsState {
TResult? whenOrNull(
TResult? Function()? $default, {
TResult? Function()? empty,
- TResult? Function(int notificationsCount)? loaded,
+ TResult? Function(List notifications, int notificationsCount)?
+ loaded,
TResult? Function(String errorMessage)? error,
}) {
return $default?.call();
@@ -154,7 +155,8 @@ class _$NotificationsStateImpl implements _NotificationsState {
TResult maybeWhen(
TResult Function()? $default, {
TResult Function()? empty,
- TResult Function(int notificationsCount)? loaded,
+ TResult Function(List notifications, int notificationsCount)?
+ loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -223,9 +225,6 @@ class __$$NotificationsStateEmptyImplCopyWithImpl<$Res>
_$NotificationsStateEmptyImpl _value,
$Res Function(_$NotificationsStateEmptyImpl) _then)
: super(_value, _then);
-
- /// Create a copy of NotificationsState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -253,7 +252,9 @@ class _$NotificationsStateEmptyImpl implements NotificationsStateEmpty {
TResult when(
TResult Function() $default, {
required TResult Function() empty,
- required TResult Function(int notificationsCount) loaded,
+ required TResult Function(
+ List notifications, int notificationsCount)
+ loaded,
required TResult Function(String errorMessage) error,
}) {
return empty();
@@ -264,7 +265,8 @@ class _$NotificationsStateEmptyImpl implements NotificationsStateEmpty {
TResult? whenOrNull(
TResult? Function()? $default, {
TResult? Function()? empty,
- TResult? Function(int notificationsCount)? loaded,
+ TResult? Function(List notifications, int notificationsCount)?
+ loaded,
TResult? Function(String errorMessage)? error,
}) {
return empty?.call();
@@ -275,7 +277,8 @@ class _$NotificationsStateEmptyImpl implements NotificationsStateEmpty {
TResult maybeWhen(
TResult Function()? $default, {
TResult Function()? empty,
- TResult Function(int notificationsCount)? loaded,
+ TResult Function(List notifications, int notificationsCount)?
+ loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -334,7 +337,7 @@ abstract class _$$NotificationsStateLoadedImplCopyWith<$Res> {
$Res Function(_$NotificationsStateLoadedImpl) then) =
__$$NotificationsStateLoadedImplCopyWithImpl<$Res>;
@useResult
- $Res call({int notificationsCount});
+ $Res call({List notifications, int notificationsCount});
}
/// @nodoc
@@ -347,14 +350,17 @@ class __$$NotificationsStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$NotificationsStateLoadedImpl) _then)
: super(_value, _then);
- /// Create a copy of NotificationsState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
+ Object? notifications = null,
Object? notificationsCount = null,
}) {
return _then(_$NotificationsStateLoadedImpl(
+ notifications: null == notifications
+ ? _value._notifications
+ : notifications // ignore: cast_nullable_to_non_nullable
+ as List,
notificationsCount: null == notificationsCount
? _value.notificationsCount
: notificationsCount // ignore: cast_nullable_to_non_nullable
@@ -366,14 +372,25 @@ class __$$NotificationsStateLoadedImplCopyWithImpl<$Res>
/// @nodoc
class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
- const _$NotificationsStateLoadedImpl({required this.notificationsCount});
+ const _$NotificationsStateLoadedImpl(
+ {required final List notifications,
+ required this.notificationsCount})
+ : _notifications = notifications;
+
+ final List _notifications;
+ @override
+ List get notifications {
+ if (_notifications is EqualUnmodifiableListView) return _notifications;
+ // ignore: implicit_dynamic_type
+ return EqualUnmodifiableListView(_notifications);
+ }
@override
final int notificationsCount;
@override
String toString() {
- return 'NotificationsState.loaded(notificationsCount: $notificationsCount)';
+ return 'NotificationsState.loaded(notifications: $notifications, notificationsCount: $notificationsCount)';
}
@override
@@ -381,16 +398,17 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$NotificationsStateLoadedImpl &&
+ const DeepCollectionEquality()
+ .equals(other._notifications, _notifications) &&
(identical(other.notificationsCount, notificationsCount) ||
other.notificationsCount == notificationsCount));
}
@override
- int get hashCode => Object.hash(runtimeType, notificationsCount);
+ int get hashCode => Object.hash(runtimeType,
+ const DeepCollectionEquality().hash(_notifications), notificationsCount);
- /// Create a copy of NotificationsState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl>
@@ -402,10 +420,12 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
TResult when(
TResult Function() $default, {
required TResult Function() empty,
- required TResult Function(int notificationsCount) loaded,
+ required TResult Function(
+ List notifications, int notificationsCount)
+ loaded,
required TResult Function(String errorMessage) error,
}) {
- return loaded(notificationsCount);
+ return loaded(notifications, notificationsCount);
}
@override
@@ -413,10 +433,11 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
TResult? whenOrNull(
TResult? Function()? $default, {
TResult? Function()? empty,
- TResult? Function(int notificationsCount)? loaded,
+ TResult? Function(List notifications, int notificationsCount)?
+ loaded,
TResult? Function(String errorMessage)? error,
}) {
- return loaded?.call(notificationsCount);
+ return loaded?.call(notifications, notificationsCount);
}
@override
@@ -424,12 +445,13 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
TResult maybeWhen(
TResult Function()? $default, {
TResult Function()? empty,
- TResult Function(int notificationsCount)? loaded,
+ TResult Function(List notifications, int notificationsCount)?
+ loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
if (loaded != null) {
- return loaded(notificationsCount);
+ return loaded(notifications, notificationsCount);
}
return orElse();
}
@@ -474,13 +496,12 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
abstract class NotificationsStateLoaded implements NotificationsState {
const factory NotificationsStateLoaded(
- {required final int notificationsCount}) = _$NotificationsStateLoadedImpl;
+ {required final List notifications,
+ required final int notificationsCount}) = _$NotificationsStateLoadedImpl;
+ List get notifications;
int get notificationsCount;
-
- /// Create a copy of NotificationsState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl>
get copyWith => throw _privateConstructorUsedError;
}
@@ -505,8 +526,6 @@ class __$$NotificationsStateErrorImplCopyWithImpl<$Res>
$Res Function(_$NotificationsStateErrorImpl) _then)
: super(_value, _then);
- /// Create a copy of NotificationsState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -546,9 +565,7 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
@override
int get hashCode => Object.hash(runtimeType, errorMessage);
- /// Create a copy of NotificationsState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl>
@@ -560,7 +577,9 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
TResult when(
TResult Function() $default, {
required TResult Function() empty,
- required TResult Function(int notificationsCount) loaded,
+ required TResult Function(
+ List notifications, int notificationsCount)
+ loaded,
required TResult Function(String errorMessage) error,
}) {
return error(errorMessage);
@@ -571,7 +590,8 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
TResult? whenOrNull(
TResult? Function()? $default, {
TResult? Function()? empty,
- TResult? Function(int notificationsCount)? loaded,
+ TResult? Function(List notifications, int notificationsCount)?
+ loaded,
TResult? Function(String errorMessage)? error,
}) {
return error?.call(errorMessage);
@@ -582,7 +602,8 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError {
TResult maybeWhen(
TResult Function()? $default, {
TResult Function()? empty,
- TResult Function(int notificationsCount)? loaded,
+ TResult Function(List notifications, int notificationsCount)?
+ loaded,
TResult Function(String errorMessage)? error,
required TResult orElse(),
}) {
@@ -635,10 +656,7 @@ abstract class NotificationsStateError implements NotificationsState {
_$NotificationsStateErrorImpl;
String get errorMessage;
-
- /// Create a copy of NotificationsState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl>
get copyWith => throw _privateConstructorUsedError;
}
diff --git a/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_cubit.dart b/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_cubit.dart
new file mode 100644
index 00000000..e2bfd48b
--- /dev/null
+++ b/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_cubit.dart
@@ -0,0 +1,22 @@
+import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_state.dart';
+import 'package:eatvio_app/features/profile/repositories/profile_repository.dart';
+import 'package:flutter_bloc/flutter_bloc.dart';
+
+class ProfileAvatarCubit extends Cubit {
+ final ProfileRepository profileRepository;
+
+ ProfileAvatarCubit({
+ required this.profileRepository,
+ }) : super(const ProfileAvatarState.loading());
+
+ getMyProfile() async {
+ try {
+ emit(ProfileAvatarState.loaded(
+ profile: await profileRepository.getMyProfile(),
+ ));
+ } catch (e) {
+ emit(ProfileAvatarState.error(errorMessage: e.toString()));
+ print(e);
+ }
+ }
+}
\ No newline at end of file
diff --git a/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_state.dart b/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_state.dart
new file mode 100644
index 00000000..fe90fb6f
--- /dev/null
+++ b/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_state.dart
@@ -0,0 +1,19 @@
+import 'package:eatvio_app/features/profile/models/profile_model.dart';
+import 'package:freezed_annotation/freezed_annotation.dart';
+
+part 'profile_avatar_state.freezed.dart';
+
+@freezed
+abstract class ProfileAvatarState with _$ProfileAvatarState {
+ const factory ProfileAvatarState() = _ProfileAvatarState;
+
+ const factory ProfileAvatarState.loading() = ProfileAvatarStateLoading;
+
+ const factory ProfileAvatarState.loaded({
+ required ProfileModel profile,
+ }) = ProfileAvatarStateLoaded;
+
+ const factory ProfileAvatarState.error({
+ required String errorMessage,
+ }) = ProfileAvatarStateError;
+}
diff --git a/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_state.freezed.dart b/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_state.freezed.dart
new file mode 100644
index 00000000..5d8de7ff
--- /dev/null
+++ b/lib/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_state.freezed.dart
@@ -0,0 +1,630 @@
+// 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 'profile_avatar_state.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#adding-getters-and-methods-to-our-models');
+
+/// @nodoc
+mixin _$ProfileAvatarState {
+ @optionalTypeArgs
+ TResult when(
+ TResult Function() $default, {
+ required TResult Function() loading,
+ required TResult Function(ProfileModel profile) loaded,
+ required TResult Function(String errorMessage) error,
+ }) =>
+ throw _privateConstructorUsedError;
+ @optionalTypeArgs
+ TResult? whenOrNull(
+ TResult? Function()? $default, {
+ TResult? Function()? loading,
+ TResult? Function(ProfileModel profile)? loaded,
+ TResult? Function(String errorMessage)? error,
+ }) =>
+ throw _privateConstructorUsedError;
+ @optionalTypeArgs
+ TResult maybeWhen(
+ TResult Function()? $default, {
+ TResult Function()? loading,
+ TResult Function(ProfileModel profile)? loaded,
+ TResult Function(String errorMessage)? error,
+ required TResult orElse(),
+ }) =>
+ throw _privateConstructorUsedError;
+ @optionalTypeArgs
+ TResult map(
+ TResult Function(_ProfileAvatarState value) $default, {
+ required TResult Function(ProfileAvatarStateLoading value) loading,
+ required TResult Function(ProfileAvatarStateLoaded value) loaded,
+ required TResult Function(ProfileAvatarStateError value) error,
+ }) =>
+ throw _privateConstructorUsedError;
+ @optionalTypeArgs
+ TResult? mapOrNull(
+ TResult? Function(_ProfileAvatarState value)? $default, {
+ TResult? Function(ProfileAvatarStateLoading value)? loading,
+ TResult? Function(ProfileAvatarStateLoaded value)? loaded,
+ TResult? Function(ProfileAvatarStateError value)? error,
+ }) =>
+ throw _privateConstructorUsedError;
+ @optionalTypeArgs
+ TResult maybeMap(
+ TResult Function(_ProfileAvatarState value)? $default, {
+ TResult Function(ProfileAvatarStateLoading value)? loading,
+ TResult Function(ProfileAvatarStateLoaded value)? loaded,
+ TResult Function(ProfileAvatarStateError value)? error,
+ required TResult orElse(),
+ }) =>
+ throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class $ProfileAvatarStateCopyWith<$Res> {
+ factory $ProfileAvatarStateCopyWith(
+ ProfileAvatarState value, $Res Function(ProfileAvatarState) then) =
+ _$ProfileAvatarStateCopyWithImpl<$Res, ProfileAvatarState>;
+}
+
+/// @nodoc
+class _$ProfileAvatarStateCopyWithImpl<$Res, $Val extends ProfileAvatarState>
+ implements $ProfileAvatarStateCopyWith<$Res> {
+ _$ProfileAvatarStateCopyWithImpl(this._value, this._then);
+
+ // ignore: unused_field
+ final $Val _value;
+ // ignore: unused_field
+ final $Res Function($Val) _then;
+}
+
+/// @nodoc
+abstract class _$$ProfileAvatarStateImplCopyWith<$Res> {
+ factory _$$ProfileAvatarStateImplCopyWith(_$ProfileAvatarStateImpl value,
+ $Res Function(_$ProfileAvatarStateImpl) then) =
+ __$$ProfileAvatarStateImplCopyWithImpl<$Res>;
+}
+
+/// @nodoc
+class __$$ProfileAvatarStateImplCopyWithImpl<$Res>
+ extends _$ProfileAvatarStateCopyWithImpl<$Res, _$ProfileAvatarStateImpl>
+ implements _$$ProfileAvatarStateImplCopyWith<$Res> {
+ __$$ProfileAvatarStateImplCopyWithImpl(_$ProfileAvatarStateImpl _value,
+ $Res Function(_$ProfileAvatarStateImpl) _then)
+ : super(_value, _then);
+}
+
+/// @nodoc
+
+class _$ProfileAvatarStateImpl implements _ProfileAvatarState {
+ const _$ProfileAvatarStateImpl();
+
+ @override
+ String toString() {
+ return 'ProfileAvatarState()';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType && other is _$ProfileAvatarStateImpl);
+ }
+
+ @override
+ int get hashCode => runtimeType.hashCode;
+
+ @override
+ @optionalTypeArgs
+ TResult when(
+ TResult Function() $default, {
+ required TResult Function() loading,
+ required TResult Function(ProfileModel profile) loaded,
+ required TResult Function(String errorMessage) error,
+ }) {
+ return $default();
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult? whenOrNull(
+ TResult? Function()? $default, {
+ TResult? Function()? loading,
+ TResult? Function(ProfileModel profile)? loaded,
+ TResult? Function(String errorMessage)? error,
+ }) {
+ return $default?.call();
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult maybeWhen(
+ TResult Function()? $default, {
+ TResult Function()? loading,
+ TResult Function(ProfileModel profile)? loaded,
+ TResult Function(String errorMessage)? error,
+ required TResult orElse(),
+ }) {
+ if ($default != null) {
+ return $default();
+ }
+ return orElse();
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult map(
+ TResult Function(_ProfileAvatarState value) $default, {
+ required TResult Function(ProfileAvatarStateLoading value) loading,
+ required TResult Function(ProfileAvatarStateLoaded value) loaded,
+ required TResult Function(ProfileAvatarStateError value) error,
+ }) {
+ return $default(this);
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult? mapOrNull(
+ TResult? Function(_ProfileAvatarState value)? $default, {
+ TResult? Function(ProfileAvatarStateLoading value)? loading,
+ TResult? Function(ProfileAvatarStateLoaded value)? loaded,
+ TResult? Function(ProfileAvatarStateError value)? error,
+ }) {
+ return $default?.call(this);
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult maybeMap(
+ TResult Function(_ProfileAvatarState value)? $default, {
+ TResult Function(ProfileAvatarStateLoading value)? loading,
+ TResult Function(ProfileAvatarStateLoaded value)? loaded,
+ TResult Function(ProfileAvatarStateError value)? error,
+ required TResult orElse(),
+ }) {
+ if ($default != null) {
+ return $default(this);
+ }
+ return orElse();
+ }
+}
+
+abstract class _ProfileAvatarState implements ProfileAvatarState {
+ const factory _ProfileAvatarState() = _$ProfileAvatarStateImpl;
+}
+
+/// @nodoc
+abstract class _$$ProfileAvatarStateLoadingImplCopyWith<$Res> {
+ factory _$$ProfileAvatarStateLoadingImplCopyWith(
+ _$ProfileAvatarStateLoadingImpl value,
+ $Res Function(_$ProfileAvatarStateLoadingImpl) then) =
+ __$$ProfileAvatarStateLoadingImplCopyWithImpl<$Res>;
+}
+
+/// @nodoc
+class __$$ProfileAvatarStateLoadingImplCopyWithImpl<$Res>
+ extends _$ProfileAvatarStateCopyWithImpl<$Res,
+ _$ProfileAvatarStateLoadingImpl>
+ implements _$$ProfileAvatarStateLoadingImplCopyWith<$Res> {
+ __$$ProfileAvatarStateLoadingImplCopyWithImpl(
+ _$ProfileAvatarStateLoadingImpl _value,
+ $Res Function(_$ProfileAvatarStateLoadingImpl) _then)
+ : super(_value, _then);
+}
+
+/// @nodoc
+
+class _$ProfileAvatarStateLoadingImpl implements ProfileAvatarStateLoading {
+ const _$ProfileAvatarStateLoadingImpl();
+
+ @override
+ String toString() {
+ return 'ProfileAvatarState.loading()';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$ProfileAvatarStateLoadingImpl);
+ }
+
+ @override
+ int get hashCode => runtimeType.hashCode;
+
+ @override
+ @optionalTypeArgs
+ TResult when(
+ TResult Function() $default, {
+ required TResult Function() loading,
+ required TResult Function(ProfileModel profile) loaded,
+ required TResult Function(String errorMessage) error,
+ }) {
+ return loading();
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult? whenOrNull(
+ TResult? Function()? $default, {
+ TResult? Function()? loading,
+ TResult? Function(ProfileModel profile)? loaded,
+ TResult? Function(String errorMessage)? error,
+ }) {
+ return loading?.call();
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult maybeWhen(
+ TResult Function()? $default, {
+ TResult Function()? loading,
+ TResult Function(ProfileModel profile)? loaded,
+ TResult Function(String errorMessage)? error,
+ required TResult orElse(),
+ }) {
+ if (loading != null) {
+ return loading();
+ }
+ return orElse();
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult map(
+ TResult Function(_ProfileAvatarState value) $default, {
+ required TResult Function(ProfileAvatarStateLoading value) loading,
+ required TResult Function(ProfileAvatarStateLoaded value) loaded,
+ required TResult Function(ProfileAvatarStateError value) error,
+ }) {
+ return loading(this);
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult? mapOrNull(
+ TResult? Function(_ProfileAvatarState value)? $default, {
+ TResult? Function(ProfileAvatarStateLoading value)? loading,
+ TResult? Function(ProfileAvatarStateLoaded value)? loaded,
+ TResult? Function(ProfileAvatarStateError value)? error,
+ }) {
+ return loading?.call(this);
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult maybeMap(
+ TResult Function(_ProfileAvatarState value)? $default, {
+ TResult Function(ProfileAvatarStateLoading value)? loading,
+ TResult Function(ProfileAvatarStateLoaded value)? loaded,
+ TResult Function(ProfileAvatarStateError value)? error,
+ required TResult orElse(),
+ }) {
+ if (loading != null) {
+ return loading(this);
+ }
+ return orElse();
+ }
+}
+
+abstract class ProfileAvatarStateLoading implements ProfileAvatarState {
+ const factory ProfileAvatarStateLoading() = _$ProfileAvatarStateLoadingImpl;
+}
+
+/// @nodoc
+abstract class _$$ProfileAvatarStateLoadedImplCopyWith<$Res> {
+ factory _$$ProfileAvatarStateLoadedImplCopyWith(
+ _$ProfileAvatarStateLoadedImpl value,
+ $Res Function(_$ProfileAvatarStateLoadedImpl) then) =
+ __$$ProfileAvatarStateLoadedImplCopyWithImpl<$Res>;
+ @useResult
+ $Res call({ProfileModel profile});
+
+ $ProfileModelCopyWith<$Res> get profile;
+}
+
+/// @nodoc
+class __$$ProfileAvatarStateLoadedImplCopyWithImpl<$Res>
+ extends _$ProfileAvatarStateCopyWithImpl<$Res,
+ _$ProfileAvatarStateLoadedImpl>
+ implements _$$ProfileAvatarStateLoadedImplCopyWith<$Res> {
+ __$$ProfileAvatarStateLoadedImplCopyWithImpl(
+ _$ProfileAvatarStateLoadedImpl _value,
+ $Res Function(_$ProfileAvatarStateLoadedImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? profile = null,
+ }) {
+ return _then(_$ProfileAvatarStateLoadedImpl(
+ profile: null == profile
+ ? _value.profile
+ : profile // ignore: cast_nullable_to_non_nullable
+ as ProfileModel,
+ ));
+ }
+
+ @override
+ @pragma('vm:prefer-inline')
+ $ProfileModelCopyWith<$Res> get profile {
+ return $ProfileModelCopyWith<$Res>(_value.profile, (value) {
+ return _then(_value.copyWith(profile: value));
+ });
+ }
+}
+
+/// @nodoc
+
+class _$ProfileAvatarStateLoadedImpl implements ProfileAvatarStateLoaded {
+ const _$ProfileAvatarStateLoadedImpl({required this.profile});
+
+ @override
+ final ProfileModel profile;
+
+ @override
+ String toString() {
+ return 'ProfileAvatarState.loaded(profile: $profile)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$ProfileAvatarStateLoadedImpl &&
+ (identical(other.profile, profile) || other.profile == profile));
+ }
+
+ @override
+ int get hashCode => Object.hash(runtimeType, profile);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl>
+ get copyWith => __$$ProfileAvatarStateLoadedImplCopyWithImpl<
+ _$ProfileAvatarStateLoadedImpl>(this, _$identity);
+
+ @override
+ @optionalTypeArgs
+ TResult when(
+ TResult Function() $default, {
+ required TResult Function() loading,
+ required TResult Function(ProfileModel profile) loaded,
+ required TResult Function(String errorMessage) error,
+ }) {
+ return loaded(profile);
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult? whenOrNull(
+ TResult? Function()? $default, {
+ TResult? Function()? loading,
+ TResult? Function(ProfileModel profile)? loaded,
+ TResult? Function(String errorMessage)? error,
+ }) {
+ return loaded?.call(profile);
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult maybeWhen(
+ TResult Function()? $default, {
+ TResult Function()? loading,
+ TResult Function(ProfileModel profile)? loaded,
+ TResult Function(String errorMessage)? error,
+ required TResult orElse(),
+ }) {
+ if (loaded != null) {
+ return loaded(profile);
+ }
+ return orElse();
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult map(
+ TResult Function(_ProfileAvatarState value) $default, {
+ required TResult Function(ProfileAvatarStateLoading value) loading,
+ required TResult Function(ProfileAvatarStateLoaded value) loaded,
+ required TResult Function(ProfileAvatarStateError value) error,
+ }) {
+ return loaded(this);
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult? mapOrNull(
+ TResult? Function(_ProfileAvatarState value)? $default, {
+ TResult? Function(ProfileAvatarStateLoading value)? loading,
+ TResult? Function(ProfileAvatarStateLoaded value)? loaded,
+ TResult? Function(ProfileAvatarStateError value)? error,
+ }) {
+ return loaded?.call(this);
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult maybeMap(
+ TResult Function(_ProfileAvatarState value)? $default, {
+ TResult Function(ProfileAvatarStateLoading value)? loading,
+ TResult Function(ProfileAvatarStateLoaded value)? loaded,
+ TResult Function(ProfileAvatarStateError value)? error,
+ required TResult orElse(),
+ }) {
+ if (loaded != null) {
+ return loaded(this);
+ }
+ return orElse();
+ }
+}
+
+abstract class ProfileAvatarStateLoaded implements ProfileAvatarState {
+ const factory ProfileAvatarStateLoaded(
+ {required final ProfileModel profile}) = _$ProfileAvatarStateLoadedImpl;
+
+ ProfileModel get profile;
+ @JsonKey(ignore: true)
+ _$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl>
+ get copyWith => throw _privateConstructorUsedError;
+}
+
+/// @nodoc
+abstract class _$$ProfileAvatarStateErrorImplCopyWith<$Res> {
+ factory _$$ProfileAvatarStateErrorImplCopyWith(
+ _$ProfileAvatarStateErrorImpl value,
+ $Res Function(_$ProfileAvatarStateErrorImpl) then) =
+ __$$ProfileAvatarStateErrorImplCopyWithImpl<$Res>;
+ @useResult
+ $Res call({String errorMessage});
+}
+
+/// @nodoc
+class __$$ProfileAvatarStateErrorImplCopyWithImpl<$Res>
+ extends _$ProfileAvatarStateCopyWithImpl<$Res,
+ _$ProfileAvatarStateErrorImpl>
+ implements _$$ProfileAvatarStateErrorImplCopyWith<$Res> {
+ __$$ProfileAvatarStateErrorImplCopyWithImpl(
+ _$ProfileAvatarStateErrorImpl _value,
+ $Res Function(_$ProfileAvatarStateErrorImpl) _then)
+ : super(_value, _then);
+
+ @pragma('vm:prefer-inline')
+ @override
+ $Res call({
+ Object? errorMessage = null,
+ }) {
+ return _then(_$ProfileAvatarStateErrorImpl(
+ errorMessage: null == errorMessage
+ ? _value.errorMessage
+ : errorMessage // ignore: cast_nullable_to_non_nullable
+ as String,
+ ));
+ }
+}
+
+/// @nodoc
+
+class _$ProfileAvatarStateErrorImpl implements ProfileAvatarStateError {
+ const _$ProfileAvatarStateErrorImpl({required this.errorMessage});
+
+ @override
+ final String errorMessage;
+
+ @override
+ String toString() {
+ return 'ProfileAvatarState.error(errorMessage: $errorMessage)';
+ }
+
+ @override
+ bool operator ==(Object other) {
+ return identical(this, other) ||
+ (other.runtimeType == runtimeType &&
+ other is _$ProfileAvatarStateErrorImpl &&
+ (identical(other.errorMessage, errorMessage) ||
+ other.errorMessage == errorMessage));
+ }
+
+ @override
+ int get hashCode => Object.hash(runtimeType, errorMessage);
+
+ @JsonKey(ignore: true)
+ @override
+ @pragma('vm:prefer-inline')
+ _$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl>
+ get copyWith => __$$ProfileAvatarStateErrorImplCopyWithImpl<
+ _$ProfileAvatarStateErrorImpl>(this, _$identity);
+
+ @override
+ @optionalTypeArgs
+ TResult when(
+ TResult Function() $default, {
+ required TResult Function() loading,
+ required TResult Function(ProfileModel profile) loaded,
+ required TResult Function(String errorMessage) error,
+ }) {
+ return error(errorMessage);
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult? whenOrNull(
+ TResult? Function()? $default, {
+ TResult? Function()? loading,
+ TResult? Function(ProfileModel profile)? loaded,
+ TResult? Function(String errorMessage)? error,
+ }) {
+ return error?.call(errorMessage);
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult maybeWhen(
+ TResult Function()? $default, {
+ TResult Function()? loading,
+ TResult Function(ProfileModel profile)? loaded,
+ TResult Function(String errorMessage)? error,
+ required TResult orElse(),
+ }) {
+ if (error != null) {
+ return error(errorMessage);
+ }
+ return orElse();
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult map(
+ TResult Function(_ProfileAvatarState value) $default, {
+ required TResult Function(ProfileAvatarStateLoading value) loading,
+ required TResult Function(ProfileAvatarStateLoaded value) loaded,
+ required TResult Function(ProfileAvatarStateError value) error,
+ }) {
+ return error(this);
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult? mapOrNull(
+ TResult? Function(_ProfileAvatarState value)? $default, {
+ TResult? Function(ProfileAvatarStateLoading value)? loading,
+ TResult? Function(ProfileAvatarStateLoaded value)? loaded,
+ TResult? Function(ProfileAvatarStateError value)? error,
+ }) {
+ return error?.call(this);
+ }
+
+ @override
+ @optionalTypeArgs
+ TResult maybeMap(
+ TResult Function(_ProfileAvatarState value)? $default, {
+ TResult Function(ProfileAvatarStateLoading value)? loading,
+ TResult Function(ProfileAvatarStateLoaded value)? loaded,
+ TResult Function(ProfileAvatarStateError value)? error,
+ required TResult orElse(),
+ }) {
+ if (error != null) {
+ return error(this);
+ }
+ return orElse();
+ }
+}
+
+abstract class ProfileAvatarStateError implements ProfileAvatarState {
+ const factory ProfileAvatarStateError({required final String errorMessage}) =
+ _$ProfileAvatarStateErrorImpl;
+
+ String get errorMessage;
+ @JsonKey(ignore: true)
+ _$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl>
+ get copyWith => throw _privateConstructorUsedError;
+}
diff --git a/lib/features/bottom_navigation_bar/presentation/widgets/bottom_navigation_bar_widget.dart b/lib/features/bottom_navigation_bar/presentation/widgets/bottom_navigation_bar_widget.dart
index b3f74075..356d3cc7 100644
--- a/lib/features/bottom_navigation_bar/presentation/widgets/bottom_navigation_bar_widget.dart
+++ b/lib/features/bottom_navigation_bar/presentation/widgets/bottom_navigation_bar_widget.dart
@@ -4,7 +4,8 @@ import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/new_
import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/new_messages_cubit/new_messages_state.dart';
import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_cubit.dart';
import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_state.dart';
-import 'package:eatvio_app/widgets/custom_navigation_menu.dart';
+import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_cubit.dart';
+import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/profile_avatar_cubit/profile_avatar_state.dart';
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import 'package:go_router/go_router.dart';
@@ -44,22 +45,10 @@ class _BottomNavigationBarWidgetState extends State {
GoRouter.of(context).replace('/chat-select-screen');
break;
case 4:
+ GoRouter.of(context).replace('/notifications-screen');
break;
case 5:
- final RenderBox overlay = Overlay.of(context).context.findRenderObject() as RenderBox;
- final size = overlay.size;
- showMenu(
- context: context,
- color: Colors.white,
- shadowColor: Colors.white,
- surfaceTintColor: Colors.white,
- items: [
- PopupMenuItem(
- child: CustomNavigationMenu(),
- ),
- ],
- position: RelativeRect.fromLTRB(size.width, size.height, 0, 0),
- );
+ GoRouter.of(context).replace('/menu-screen');
break;
}
}
@@ -68,119 +57,154 @@ class _BottomNavigationBarWidgetState extends State {
Widget build(BuildContext context) {
return Scaffold(
body: widget.child,
- bottomNavigationBar: BottomNavigationBar(
- type: BottomNavigationBarType.fixed,
- onTap: _onItemTapped,
- selectedFontSize: 12,
- unselectedFontSize: 12,
- selectedItemColor: appTheme.blueA400,
- currentIndex: currentBottomNavBarIndex,
- items: [
- BottomNavigationBarItem(
- label: '',
- icon: SvgPicture.asset(
- ImageConstant.imgLogo,
- ),
- ),
- BottomNavigationBarItem(
- label: 'Лента',
- icon: SvgPicture.asset(
- colorFilter: ColorFilter.mode(Colors.grey, BlendMode.srcIn),
- width: 24,
- height: 24,
- ImageConstant.icnFeed,
- ),
- activeIcon: SvgPicture.asset(
- ImageConstant.icnFeed,
- width: 24,
- height: 24,
- colorFilter: ColorFilter.mode(
- appTheme.blueA400,
- BlendMode.srcIn,
+ bottomNavigationBar: SizedBox(
+ height: 58,
+ child: BottomNavigationBar(
+ type: BottomNavigationBarType.fixed,
+ onTap: _onItemTapped,
+ selectedFontSize: 10,
+ unselectedFontSize: 10,
+ selectedItemColor: appTheme.blueA400,
+ currentIndex: currentBottomNavBarIndex,
+ items: [
+ BottomNavigationBarItem(
+ label: '',
+ icon: SvgPicture.asset(
+ ImageConstant.imgLogo,
+ height: 32,
),
),
- ),
- BottomNavigationBarItem(
- label: "diary".tr,
- icon: SvgPicture.asset(
- colorFilter: ColorFilter.mode(Colors.grey, BlendMode.srcIn),
- ImageConstant.icnDiary,
- width: 24,
- height: 24,
- ),
- activeIcon: SvgPicture.asset(
- ImageConstant.icnDiary,
- width: 24,
- height: 24,
- colorFilter: ColorFilter.mode(
- appTheme.blueA400,
- BlendMode.srcIn,
+ BottomNavigationBarItem(
+ label: 'Лента',
+ icon: Padding(
+ padding: const EdgeInsets.only(bottom: 2),
+ child: SvgPicture.asset(
+ colorFilter: ColorFilter.mode(Colors.grey, BlendMode.srcIn),
+ width: 20,
+ height: 20,
+ ImageConstant.icnFeed,
+ ),
+ ),
+ activeIcon: Padding(
+ padding: const EdgeInsets.only(bottom: 2),
+ child: SvgPicture.asset(
+ ImageConstant.icnFeed,
+ width: 20,
+ height: 20,
+ colorFilter: ColorFilter.mode(
+ appTheme.blueA400,
+ BlendMode.srcIn,
+ ),
+ ),
),
),
- ),
- BottomNavigationBarItem(
- label: "chat".tr,
- icon: BlocBuilder(
- builder: (BuildContext context, NewMessagesState state) {
- return badges.Badge(
- position: badges.BadgePosition.topEnd(),
- badgeContent: Text(
- (state is NewMessagesStateLoaded) ? state.messagesCount.toString() : '0',
- style: TextStyle(
- color: Colors.white,
+ BottomNavigationBarItem(
+ label: "diary".tr,
+ icon: Padding(
+ padding: const EdgeInsets.only(bottom: 2),
+ child: SvgPicture.asset(
+ colorFilter: ColorFilter.mode(Colors.grey, BlendMode.srcIn),
+ ImageConstant.icnDiary,
+ width: 20,
+ height: 20,
+ ),
+ ),
+ activeIcon: Padding(
+ padding: const EdgeInsets.only(bottom: 2),
+ child: SvgPicture.asset(
+ ImageConstant.icnDiary,
+ width: 20,
+ height: 20,
+ colorFilter: ColorFilter.mode(
+ appTheme.blueA400,
+ BlendMode.srcIn,
+ ),
+ ),
+ ),
+ ),
+ BottomNavigationBarItem(
+ label: "chat".tr,
+ icon: BlocBuilder(
+ builder: (BuildContext context, NewMessagesState state) {
+ return badges.Badge(
+ position: badges.BadgePosition.topEnd(),
+ badgeAnimation: badges.BadgeAnimation.fade(),
+ badgeContent: Text(
+ (state is NewMessagesStateLoaded) ? state.messagesCount.toString() : '0',
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 8,
+ ),
),
- ),
- child: SvgPicture.asset(
- ImageConstant.icnChat,
- width: 24,
- height: 24,
- colorFilter: currentBottomNavBarIndex == 3
- ? ColorFilter.mode(
- appTheme.blueA400,
- BlendMode.srcIn,
- )
- : ColorFilter.mode(Colors.grey, BlendMode.srcIn),
- ),
- );
- },
- ),
- ),
- BottomNavigationBarItem(
- label: '',
- icon: BlocBuilder(
- builder: (BuildContext context, NotificationsState state) {
- return badges.Badge(
- position: badges.BadgePosition.topEnd(),
- badgeContent: Text(
- (state is NotificationsStateLoaded) ? state.notificationsCount.toString() : '0',
- style: TextStyle(
- color: Colors.white,
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 2),
+ child: SvgPicture.asset(
+ ImageConstant.icnChat,
+ width: 20,
+ height: 20,
+ colorFilter: currentBottomNavBarIndex == 3
+ ? ColorFilter.mode(
+ appTheme.blueA400,
+ BlendMode.srcIn,
+ )
+ : ColorFilter.mode(Colors.grey, BlendMode.srcIn),
+ ),
),
- ),
- child: SvgPicture.asset(
- ImageConstant.icnBell,
- colorFilter: currentBottomNavBarIndex == 4
- ? ColorFilter.mode(
- appTheme.blueA400,
- BlendMode.srcIn,
- )
- : ColorFilter.mode(Colors.grey, BlendMode.srcIn),
- width: 24,
- height: 24,
- ),
- );
- },
+ );
+ },
+ ),
),
- ),
- BottomNavigationBarItem(
- label: '',
- icon: Image.asset(
- ImageConstant.imgEllipse1,
- width: 32,
- height: 32,
+ BottomNavigationBarItem(
+ label: 'Уведомления',
+ icon: BlocBuilder(
+ builder: (BuildContext context, NotificationsState state) {
+ return badges.Badge(
+ position: badges.BadgePosition.topEnd(),
+ badgeAnimation: badges.BadgeAnimation.fade(),
+ badgeContent: Text(
+ (state is NotificationsStateLoaded) ? state.notificationsCount.toString() : '0',
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 8,
+ ),
+ ),
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 2),
+ child: SvgPicture.asset(
+ ImageConstant.icnBell,
+ colorFilter: currentBottomNavBarIndex == 4
+ ? ColorFilter.mode(
+ appTheme.blueA400,
+ BlendMode.srcIn,
+ )
+ : ColorFilter.mode(Colors.grey, BlendMode.srcIn),
+ width: 20,
+ height: 20,
+ ),
+ ),
+ );
+ },
+ ),
),
- ),
- ],
+ BottomNavigationBarItem(
+ label: '',
+ icon: BlocBuilder(
+ builder: (BuildContext context, ProfileAvatarState state) {
+ if (state is ProfileAvatarStateLoaded && state.profile.user.profilePhotoUrl.isNotEmpty) {
+ return CircleAvatar(
+ backgroundImage: NetworkImage(state.profile.user.profilePhotoUrl),
+ radius: 16,
+ );
+ }
+ return CircleAvatar(
+ radius: 16,
+ backgroundColor: Colors.black12,
+ );
+ },
+ ),
+ ),
+ ],
+ ),
),
);
}
diff --git a/lib/features/calendar/models/calendar_model.freezed.dart b/lib/features/calendar/models/calendar_model.freezed.dart
index d10fc8f2..5e47f848 100644
--- a/lib/features/calendar/models/calendar_model.freezed.dart
+++ b/lib/features/calendar/models/calendar_model.freezed.dart
@@ -25,12 +25,8 @@ mixin _$CalendarModel {
throw _privateConstructorUsedError;
Object? get diary => throw _privateConstructorUsedError;
- /// Serializes this CalendarModel to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of CalendarModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$CalendarModelCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -57,8 +53,6 @@ class _$CalendarModelCopyWithImpl<$Res, $Val extends CalendarModel>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of CalendarModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -103,8 +97,6 @@ class __$$CalendarModelImplCopyWithImpl<$Res>
_$CalendarModelImpl _value, $Res Function(_$CalendarModelImpl) _then)
: super(_value, _then);
- /// Create a copy of CalendarModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -165,7 +157,7 @@ class _$CalendarModelImpl implements _CalendarModel {
const DeepCollectionEquality().equals(other.diary, diary));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -173,9 +165,7 @@ class _$CalendarModelImpl implements _CalendarModel {
is_current_day_included_in_the_chosen_diet_progression,
const DeepCollectionEquality().hash(diary));
- /// Create a copy of CalendarModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$CalendarModelImplCopyWith<_$CalendarModelImpl> get copyWith =>
@@ -205,11 +195,8 @@ abstract class _CalendarModel implements CalendarModel {
bool get is_current_day_included_in_the_chosen_diet_progression;
@override
Object? get diary;
-
- /// Create a copy of CalendarModel
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$CalendarModelImplCopyWith<_$CalendarModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/calendar/presentation/bloc/calendar_state.freezed.dart b/lib/features/calendar/presentation/bloc/calendar_state.freezed.dart
index 0e7bdbcd..c71d5226 100644
--- a/lib/features/calendar/presentation/bloc/calendar_state.freezed.dart
+++ b/lib/features/calendar/presentation/bloc/calendar_state.freezed.dart
@@ -84,9 +84,6 @@ class _$CalendarStateCopyWithImpl<$Res, $Val extends CalendarState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
-
- /// Create a copy of CalendarState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -103,9 +100,6 @@ class __$$CalendarStateImplCopyWithImpl<$Res>
__$$CalendarStateImplCopyWithImpl(
_$CalendarStateImpl _value, $Res Function(_$CalendarStateImpl) _then)
: super(_value, _then);
-
- /// Create a copy of CalendarState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -220,9 +214,6 @@ class __$$CalendarStateLoadingImplCopyWithImpl<$Res>
__$$CalendarStateLoadingImplCopyWithImpl(_$CalendarStateLoadingImpl _value,
$Res Function(_$CalendarStateLoadingImpl) _then)
: super(_value, _then);
-
- /// Create a copy of CalendarState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -341,8 +332,6 @@ class __$$CalendarStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$CalendarStateLoadedImpl) _then)
: super(_value, _then);
- /// Create a copy of CalendarState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -390,9 +379,7 @@ class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_calendarList));
- /// Create a copy of CalendarState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith =>
@@ -480,10 +467,7 @@ abstract class CalendarStateLoaded implements CalendarState {
_$CalendarStateLoadedImpl;
List get calendarList;
-
- /// Create a copy of CalendarState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -505,8 +489,6 @@ class __$$CalendarStateErrorImplCopyWithImpl<$Res>
$Res Function(_$CalendarStateErrorImpl) _then)
: super(_value, _then);
- /// Create a copy of CalendarState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -546,9 +528,7 @@ class _$CalendarStateErrorImpl implements CalendarStateError {
@override
int get hashCode => Object.hash(runtimeType, errorMessage);
- /// Create a copy of CalendarState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith =>
@@ -635,10 +615,7 @@ abstract class CalendarStateError implements CalendarState {
_$CalendarStateErrorImpl;
String get errorMessage;
-
- /// Create a copy of CalendarState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/models/chat_message_model.freezed.dart b/lib/features/chat/models/chat_message_model.freezed.dart
index 8f921425..76a91cbc 100644
--- a/lib/features/chat/models/chat_message_model.freezed.dart
+++ b/lib/features/chat/models/chat_message_model.freezed.dart
@@ -29,12 +29,8 @@ mixin _$ChatMessageModel {
@JsonKey(name: 'updated_at')
String get updatedAt => throw _privateConstructorUsedError;
- /// Serializes this ChatMessageModel to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of ChatMessageModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$ChatMessageModelCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -63,8 +59,6 @@ class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of ChatMessageModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -123,8 +117,6 @@ class __$$ChatMessageModelImplCopyWithImpl<$Res>
$Res Function(_$ChatMessageModelImpl) _then)
: super(_value, _then);
- /// Create a copy of ChatMessageModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -215,14 +207,12 @@ class _$ChatMessageModelImpl implements _ChatMessageModel {
other.updatedAt == updatedAt));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, id, data,
const DeepCollectionEquality().hash(_mediaData), authorId, updatedAt);
- /// Create a copy of ChatMessageModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
@@ -262,11 +252,8 @@ abstract class _ChatMessageModel implements ChatMessageModel {
@override
@JsonKey(name: 'updated_at')
String get updatedAt;
-
- /// Create a copy of ChatMessageModel
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/models/chat_messages_model.freezed.dart b/lib/features/chat/models/chat_messages_model.freezed.dart
index 852b33e4..a970241c 100644
--- a/lib/features/chat/models/chat_messages_model.freezed.dart
+++ b/lib/features/chat/models/chat_messages_model.freezed.dart
@@ -24,12 +24,8 @@ mixin _$ChatMessagesModel {
List get messagesList => throw _privateConstructorUsedError;
ChatMetaModel get meta => throw _privateConstructorUsedError;
- /// Serializes this ChatMessagesModel to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of ChatMessagesModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$ChatMessagesModelCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -57,8 +53,6 @@ class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of ChatMessagesModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -77,8 +71,6 @@ class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel>
) as $Val);
}
- /// Create a copy of ChatMessagesModel
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ChatMetaModelCopyWith<$Res> get meta {
@@ -112,8 +104,6 @@ class __$$ChatMessagesModelImplCopyWithImpl<$Res>
$Res Function(_$ChatMessagesModelImpl) _then)
: super(_value, _then);
- /// Create a copy of ChatMessagesModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -172,14 +162,12 @@ class _$ChatMessagesModelImpl implements _ChatMessagesModel {
(identical(other.meta, meta) || other.meta == meta));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_messagesList), meta);
- /// Create a copy of ChatMessagesModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
@@ -208,11 +196,8 @@ abstract class _ChatMessagesModel implements ChatMessagesModel {
List get messagesList;
@override
ChatMetaModel get meta;
-
- /// Create a copy of ChatMessagesModel
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/models/chat_meta_model.freezed.dart b/lib/features/chat/models/chat_meta_model.freezed.dart
index e8e4e96b..11ecb9e2 100644
--- a/lib/features/chat/models/chat_meta_model.freezed.dart
+++ b/lib/features/chat/models/chat_meta_model.freezed.dart
@@ -23,12 +23,8 @@ mixin _$ChatMetaModel {
@JsonKey(name: "last_page")
int get lastPage => throw _privateConstructorUsedError;
- /// Serializes this ChatMetaModel to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of ChatMetaModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$ChatMetaModelCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -52,8 +48,6 @@ class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of ChatMetaModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -87,8 +81,6 @@ class __$$ChatMetaModelImplCopyWithImpl<$Res>
_$ChatMetaModelImpl _value, $Res Function(_$ChatMetaModelImpl) _then)
: super(_value, _then);
- /// Create a copy of ChatMetaModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -130,13 +122,11 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
other.lastPage == lastPage));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, lastPage);
- /// Create a copy of ChatMetaModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
@@ -161,11 +151,8 @@ abstract class _ChatMetaModel implements ChatMetaModel {
@override
@JsonKey(name: "last_page")
int get lastPage;
-
- /// Create a copy of ChatMetaModel
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$ChatMetaModelImplCopyWith<_$ChatMetaModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/models/chat_room_model.freezed.dart b/lib/features/chat/models/chat_room_model.freezed.dart
index 6afb3a94..5a0b6e62 100644
--- a/lib/features/chat/models/chat_room_model.freezed.dart
+++ b/lib/features/chat/models/chat_room_model.freezed.dart
@@ -26,12 +26,8 @@ mixin _$ChatRoomModel {
throw _privateConstructorUsedError;
Map get users => throw _privateConstructorUsedError;
- /// Serializes this ChatRoomModel to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of ChatRoomModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$ChatRoomModelCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -61,8 +57,6 @@ class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of ChatRoomModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -86,8 +80,6 @@ class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel>
) as $Val);
}
- /// Create a copy of ChatRoomModel
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings {
@@ -124,8 +116,6 @@ class __$$ChatRoomModelImplCopyWithImpl<$Res>
_$ChatRoomModelImpl _value, $Res Function(_$ChatRoomModelImpl) _then)
: super(_value, _then);
- /// Create a copy of ChatRoomModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -191,14 +181,12 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
const DeepCollectionEquality().equals(other._users, _users));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, id, chatRoomSettings,
const DeepCollectionEquality().hash(_users));
- /// Create a copy of ChatRoomModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
@@ -229,11 +217,8 @@ abstract class _ChatRoomModel implements ChatRoomModel {
ChatRoomSettingsModel get chatRoomSettings;
@override
Map get users;
-
- /// Create a copy of ChatRoomModel
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$ChatRoomModelImplCopyWith<_$ChatRoomModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/models/chat_room_preview_model.freezed.dart b/lib/features/chat/models/chat_room_preview_model.freezed.dart
index 4b006cf0..8d41bd4b 100644
--- a/lib/features/chat/models/chat_room_preview_model.freezed.dart
+++ b/lib/features/chat/models/chat_room_preview_model.freezed.dart
@@ -23,12 +23,8 @@ mixin _$ChatRoomPreviewModel {
@JsonKey(name: "chatRooms")
List get chatRooms => throw _privateConstructorUsedError;
- /// Serializes this ChatRoomPreviewModel to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of ChatRoomPreviewModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$ChatRoomPreviewModelCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -53,8 +49,6 @@ class _$ChatRoomPreviewModelCopyWithImpl<$Res,
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of ChatRoomPreviewModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -88,8 +82,6 @@ class __$$ChatRoomPreviewModelImplCopyWithImpl<$Res>
$Res Function(_$ChatRoomPreviewModelImpl) _then)
: super(_value, _then);
- /// Create a copy of ChatRoomPreviewModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -137,14 +129,12 @@ class _$ChatRoomPreviewModelImpl implements _ChatRoomPreviewModel {
.equals(other._chatRooms, _chatRooms));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode =>
Object.hash(runtimeType, const DeepCollectionEquality().hash(_chatRooms));
- /// Create a copy of ChatRoomPreviewModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl>
@@ -171,11 +161,8 @@ abstract class _ChatRoomPreviewModel implements ChatRoomPreviewModel {
@override
@JsonKey(name: "chatRooms")
List get chatRooms;
-
- /// Create a copy of ChatRoomPreviewModel
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl>
get copyWith => throw _privateConstructorUsedError;
}
@@ -195,12 +182,8 @@ mixin _$ChatRoom {
@JsonKey(name: "users")
Users get users => throw _privateConstructorUsedError;
- /// Serializes this ChatRoom to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of ChatRoom
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$ChatRoomCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -229,8 +212,6 @@ class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of ChatRoom
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -259,8 +240,6 @@ class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom>
) as $Val);
}
- /// Create a copy of ChatRoom
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UsersCopyWith<$Res> get users {
@@ -296,8 +275,6 @@ class __$$ChatRoomImplCopyWithImpl<$Res>
_$ChatRoomImpl _value, $Res Function(_$ChatRoomImpl) _then)
: super(_value, _then);
- /// Create a copy of ChatRoom
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -370,14 +347,12 @@ class _$ChatRoomImpl implements _ChatRoom {
(identical(other.users, users) || other.users == users));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, id, roomName,
const DeepCollectionEquality().hash(lastMessage), users);
- /// Create a copy of ChatRoom
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith =>
@@ -413,11 +388,8 @@ abstract class _ChatRoom implements ChatRoom {
@override
@JsonKey(name: "users")
Users get users;
-
- /// Create a copy of ChatRoom
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$ChatRoomImplCopyWith<_$ChatRoomImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -443,12 +415,8 @@ mixin _$LastMessageClass {
@JsonKey(name: "updated_at")
DateTime get updatedAt => throw _privateConstructorUsedError;
- /// Serializes this LastMessageClass to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of LastMessageClass
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$LastMessageClassCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -480,8 +448,6 @@ class _$LastMessageClassCopyWithImpl<$Res, $Val extends LastMessageClass>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of LastMessageClass
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -553,8 +519,6 @@ class __$$LastMessageClassImplCopyWithImpl<$Res>
$Res Function(_$LastMessageClassImpl) _then)
: super(_value, _then);
- /// Create a copy of LastMessageClass
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -669,7 +633,7 @@ class _$LastMessageClassImpl implements _LastMessageClass {
other.updatedAt == updatedAt));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -681,9 +645,7 @@ class _$LastMessageClassImpl implements _LastMessageClass {
readByToUser,
updatedAt);
- /// Create a copy of LastMessageClass
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith =>
@@ -734,11 +696,8 @@ abstract class _LastMessageClass implements LastMessageClass {
@override
@JsonKey(name: "updated_at")
DateTime get updatedAt;
-
- /// Create a copy of LastMessageClass
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$LastMessageClassImplCopyWith<_$LastMessageClassImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -754,12 +713,8 @@ mixin _$Users {
@JsonKey(name: "to_chat_user")
ChatUser get toChatUser => throw _privateConstructorUsedError;
- /// Serializes this Users to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Users
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$UsersCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -786,8 +741,6 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Users
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -806,8 +759,6 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users>
) as $Val);
}
- /// Create a copy of Users
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ChatUserCopyWith<$Res> get fromChatUser {
@@ -816,8 +767,6 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users>
});
}
- /// Create a copy of Users
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ChatUserCopyWith<$Res> get toChatUser {
@@ -852,8 +801,6 @@ class __$$UsersImplCopyWithImpl<$Res>
_$UsersImpl _value, $Res Function(_$UsersImpl) _then)
: super(_value, _then);
- /// Create a copy of Users
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -906,13 +853,11 @@ class _$UsersImpl implements _Users {
other.toChatUser == toChatUser));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, fromChatUser, toChatUser);
- /// Create a copy of Users
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$UsersImplCopyWith<_$UsersImpl> get copyWith =>
@@ -940,11 +885,8 @@ abstract class _Users implements Users {
@override
@JsonKey(name: "to_chat_user")
ChatUser get toChatUser;
-
- /// Create a copy of Users
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$UsersImplCopyWith<_$UsersImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -964,12 +906,8 @@ mixin _$ChatUser {
@JsonKey(name: "profile_photo_url")
String get profilePhotoUrl => throw _privateConstructorUsedError;
- /// Serializes this ChatUser to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of ChatUser
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$ChatUserCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -996,8 +934,6 @@ class _$ChatUserCopyWithImpl<$Res, $Val extends ChatUser>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of ChatUser
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1050,8 +986,6 @@ class __$$ChatUserImplCopyWithImpl<$Res>
_$ChatUserImpl _value, $Res Function(_$ChatUserImpl) _then)
: super(_value, _then);
- /// Create a copy of ChatUser
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1124,14 +1058,12 @@ class _$ChatUserImpl implements _ChatUser {
other.profilePhotoUrl == profilePhotoUrl));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode =>
Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
- /// Create a copy of ChatUser
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith =>
@@ -1169,11 +1101,8 @@ abstract class _ChatUser implements ChatUser {
@override
@JsonKey(name: "profile_photo_url")
String get profilePhotoUrl;
-
- /// Create a copy of ChatUser
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$ChatUserImplCopyWith<_$ChatUserImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/models/chat_room_settings_model.freezed.dart b/lib/features/chat/models/chat_room_settings_model.freezed.dart
index 9d12eefa..4f217556 100644
--- a/lib/features/chat/models/chat_room_settings_model.freezed.dart
+++ b/lib/features/chat/models/chat_room_settings_model.freezed.dart
@@ -30,12 +30,8 @@ mixin _$ChatRoomSettingsModel {
@JsonKey(name: 'updated_at')
String get updatedAt => throw _privateConstructorUsedError;
- /// Serializes this ChatRoomSettingsModel to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of ChatRoomSettingsModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$ChatRoomSettingsModelCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -65,8 +61,6 @@ class _$ChatRoomSettingsModelCopyWithImpl<$Res,
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of ChatRoomSettingsModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -127,8 +121,6 @@ class __$$ChatRoomSettingsModelImplCopyWithImpl<$Res>
$Res Function(_$ChatRoomSettingsModelImpl) _then)
: super(_value, _then);
- /// Create a copy of ChatRoomSettingsModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -210,14 +202,12 @@ class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel {
other.updatedAt == updatedAt));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode =>
Object.hash(runtimeType, id, roomName, state, accessLevel, updatedAt);
- /// Create a copy of ChatRoomSettingsModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
@@ -257,11 +247,8 @@ abstract class _ChatRoomSettingsModel implements ChatRoomSettingsModel {
@override
@JsonKey(name: 'updated_at')
String get updatedAt;
-
- /// Create a copy of ChatRoomSettingsModel
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl>
get copyWith => throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/models/chat_user_model.freezed.dart b/lib/features/chat/models/chat_user_model.freezed.dart
index 94718168..095c09e2 100644
--- a/lib/features/chat/models/chat_user_model.freezed.dart
+++ b/lib/features/chat/models/chat_user_model.freezed.dart
@@ -27,12 +27,8 @@ mixin _$ChatUserModel {
@JsonKey(name: 'profile_photo_url')
String? get profilePhotoUrl => throw _privateConstructorUsedError;
- /// Serializes this ChatUserModel to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of ChatUserModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$ChatUserModelCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -60,8 +56,6 @@ class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of ChatUserModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -114,8 +108,6 @@ class __$$ChatUserModelImplCopyWithImpl<$Res>
_$ChatUserModelImpl _value, $Res Function(_$ChatUserModelImpl) _then)
: super(_value, _then);
- /// Create a copy of ChatUserModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -186,14 +178,12 @@ class _$ChatUserModelImpl implements _ChatUserModel {
other.profilePhotoUrl == profilePhotoUrl));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode =>
Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl);
- /// Create a copy of ChatUserModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
@@ -228,11 +218,8 @@ abstract class _ChatUserModel implements ChatUserModel {
@override
@JsonKey(name: 'profile_photo_url')
String? get profilePhotoUrl;
-
- /// Create a copy of ChatUserModel
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$ChatUserModelImplCopyWith<_$ChatUserModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/models/websocket_info_model.freezed.dart b/lib/features/chat/models/websocket_info_model.freezed.dart
index 9cddabee..cd383a2b 100644
--- a/lib/features/chat/models/websocket_info_model.freezed.dart
+++ b/lib/features/chat/models/websocket_info_model.freezed.dart
@@ -27,12 +27,8 @@ mixin _$WebsocketInfoModel {
@JsonKey(name: 'user_id')
int get userId => throw _privateConstructorUsedError;
- /// Serializes this WebsocketInfoModel to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of WebsocketInfoModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$WebsocketInfoModelCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -61,8 +57,6 @@ class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of WebsocketInfoModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -121,8 +115,6 @@ class __$$WebsocketInfoModelImplCopyWithImpl<$Res>
$Res Function(_$WebsocketInfoModelImpl) _then)
: super(_value, _then);
- /// Create a copy of WebsocketInfoModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -199,14 +191,12 @@ class _$WebsocketInfoModelImpl implements _WebsocketInfoModel {
(identical(other.userId, userId) || other.userId == userId));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode =>
Object.hash(runtimeType, key, host, port, cluster, userId);
- /// Create a copy of WebsocketInfoModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
@@ -244,11 +234,8 @@ abstract class _WebsocketInfoModel implements WebsocketInfoModel {
@override
@JsonKey(name: 'user_id')
int get userId;
-
- /// Create a copy of WebsocketInfoModel
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart b/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart
index 4a558925..9140a6bd 100644
--- a/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart
+++ b/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart
@@ -1,6 +1,7 @@
import 'dart:convert';
import 'dart:io';
+import 'package:audioplayers/audioplayers.dart';
import 'package:dart_pusher_channels/dart_pusher_channels.dart';
import 'package:easy_debounce/easy_debounce.dart';
import 'package:eatvio_app/core/constants/constants.dart';
@@ -65,7 +66,7 @@ class ChatRoomCubit extends Cubit {
final chatMessages = await chatRepository.getChatMessages(chatId, currentPage);
lastPage = chatMessages.meta.lastPage;
- await subscribeToChatChannel(initCubit: initializationCubit, chatId: chatId);
+ await _subscribeToChatChannel(initCubit: initializationCubit, chatId: chatId);
emit(ChatRoomState.loaded(
chatRoom: chatRoom,
@@ -79,7 +80,7 @@ class ChatRoomCubit extends Cubit {
}
}
- Future subscribeToChatChannel({
+ Future _subscribeToChatChannel({
required InitializationCubit initCubit,
required String chatId,
}) async {
@@ -98,7 +99,7 @@ class ChatRoomCubit extends Cubit {
privateChatChannel.subscribe();
privateChatChannel.bind('App\\Events\\ChatMessageUpdated').listen((event) {
- print(jsonDecode(event.data));
+ AudioPlayer().play((AssetSource('audio/recive_message.wav')));
List messagesList = [
ChatMessageModel.fromJson(jsonDecode(event.data)['message']),
...(state as ChatRoomStateLoaded).chatMessages,
@@ -147,6 +148,7 @@ class ChatRoomCubit extends Cubit {
data: data,
files: files,
);
+ AudioPlayer().play((AssetSource('audio/send_message.wav')));
}
@override
diff --git a/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_state.freezed.dart b/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_state.freezed.dart
index 4695b4ad..43bf9df9 100644
--- a/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_state.freezed.dart
+++ b/lib/features/chat/presentation/bloc/chat_room_cubit/chat_room_state.freezed.dart
@@ -90,9 +90,6 @@ class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
-
- /// Create a copy of ChatRoomState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -109,9 +106,6 @@ class __$$ChatRoomStateImplCopyWithImpl<$Res>
__$$ChatRoomStateImplCopyWithImpl(
_$ChatRoomStateImpl _value, $Res Function(_$ChatRoomStateImpl) _then)
: super(_value, _then);
-
- /// Create a copy of ChatRoomState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -232,9 +226,6 @@ class __$$ChatRoomStateLoadingImplCopyWithImpl<$Res>
__$$ChatRoomStateLoadingImplCopyWithImpl(_$ChatRoomStateLoadingImpl _value,
$Res Function(_$ChatRoomStateLoadingImpl) _then)
: super(_value, _then);
-
- /// Create a copy of ChatRoomState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -365,8 +356,6 @@ class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$ChatRoomStateLoadedImpl) _then)
: super(_value, _then);
- /// Create a copy of ChatRoomState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -395,8 +384,6 @@ class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res>
));
}
- /// Create a copy of ChatRoomState
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$ChatRoomModelCopyWith<$Res> get chatRoom {
@@ -455,9 +442,7 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded {
int get hashCode => Object.hash(runtimeType, chatRoom,
const DeepCollectionEquality().hash(_chatMessages), isTyping, isLoading);
- /// Create a copy of ChatRoomState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith =>
@@ -556,10 +541,7 @@ abstract class ChatRoomStateLoaded implements ChatRoomState {
List get chatMessages;
bool get isTyping;
bool get isLoading;
-
- /// Create a copy of ChatRoomState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -581,8 +563,6 @@ class __$$ChatRoomStateErrorImplCopyWithImpl<$Res>
$Res Function(_$ChatRoomStateErrorImpl) _then)
: super(_value, _then);
- /// Create a copy of ChatRoomState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -622,9 +602,7 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError {
@override
int get hashCode => Object.hash(runtimeType, errorMessage);
- /// Create a copy of ChatRoomState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
@@ -717,10 +695,7 @@ abstract class ChatRoomStateError implements ChatRoomState {
_$ChatRoomStateErrorImpl;
String get errorMessage;
-
- /// Create a copy of ChatRoomState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/presentation/bloc/chat_select_cubit/chat_select_state.freezed.dart b/lib/features/chat/presentation/bloc/chat_select_cubit/chat_select_state.freezed.dart
index 99fa9054..9a05918d 100644
--- a/lib/features/chat/presentation/bloc/chat_select_cubit/chat_select_state.freezed.dart
+++ b/lib/features/chat/presentation/bloc/chat_select_cubit/chat_select_state.freezed.dart
@@ -84,9 +84,6 @@ class _$ChatSelectStateCopyWithImpl<$Res, $Val extends ChatSelectState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
-
- /// Create a copy of ChatSelectState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -103,9 +100,6 @@ class __$$ChatSelectStateImplCopyWithImpl<$Res>
__$$ChatSelectStateImplCopyWithImpl(
_$ChatSelectStateImpl _value, $Res Function(_$ChatSelectStateImpl) _then)
: super(_value, _then);
-
- /// Create a copy of ChatSelectState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -222,9 +216,6 @@ class __$$ChatSelectStateLoadingImplCopyWithImpl<$Res>
_$ChatSelectStateLoadingImpl _value,
$Res Function(_$ChatSelectStateLoadingImpl) _then)
: super(_value, _then);
-
- /// Create a copy of ChatSelectState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -343,8 +334,6 @@ class __$$ChatSelectStateErrorImplCopyWithImpl<$Res>
$Res Function(_$ChatSelectStateErrorImpl) _then)
: super(_value, _then);
- /// Create a copy of ChatSelectState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -384,9 +373,7 @@ class _$ChatSelectStateErrorImpl implements ChatSelectStateError {
@override
int get hashCode => Object.hash(runtimeType, errorMessage);
- /// Create a copy of ChatSelectState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatSelectStateErrorImplCopyWith<_$ChatSelectStateErrorImpl>
@@ -474,10 +461,7 @@ abstract class ChatSelectStateError implements ChatSelectState {
_$ChatSelectStateErrorImpl;
String get errorMessage;
-
- /// Create a copy of ChatSelectState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$ChatSelectStateErrorImplCopyWith<_$ChatSelectStateErrorImpl>
get copyWith => throw _privateConstructorUsedError;
}
@@ -500,8 +484,6 @@ class __$$ChatSelectStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$ChatSelectStateLoadedImpl) _then)
: super(_value, _then);
- /// Create a copy of ChatSelectState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -548,9 +530,7 @@ class _$ChatSelectStateLoadedImpl implements ChatSelectStateLoaded {
int get hashCode =>
Object.hash(runtimeType, const DeepCollectionEquality().hash(_chatRooms));
- /// Create a copy of ChatSelectState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ChatSelectStateLoadedImplCopyWith<_$ChatSelectStateLoadedImpl>
@@ -637,10 +617,7 @@ abstract class ChatSelectStateLoaded implements ChatSelectState {
{required final List chatRooms}) = _$ChatSelectStateLoadedImpl;
List get chatRooms;
-
- /// Create a copy of ChatSelectState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$ChatSelectStateLoadedImplCopyWith<_$ChatSelectStateLoadedImpl>
get copyWith => throw _privateConstructorUsedError;
}
diff --git a/lib/features/chat/presentation/pages/chat_screen.dart b/lib/features/chat/presentation/pages/chat_screen.dart
index eed575cb..fac8c5eb 100644
--- a/lib/features/chat/presentation/pages/chat_screen.dart
+++ b/lib/features/chat/presentation/pages/chat_screen.dart
@@ -1,5 +1,4 @@
import 'dart:io';
-
import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/features/chat/presentation/bloc/chat_room_cubit/chat_room_cubit.dart';
import 'package:eatvio_app/features/chat/presentation/bloc/chat_room_cubit/chat_room_state.dart';
@@ -60,23 +59,29 @@ class _ChatScreenState extends State {
centerTitle: false,
title: Row(
children: [
- Container(
- width: 40,
- height: 40,
- alignment: Alignment.center,
- decoration: BoxDecoration(
- color: Color(0xFFEBF4FF),
- shape: BoxShape.circle,
+ if (state.chatRoom.users['to_chat_user']!.profilePhotoUrl != null)
+ CircleAvatar(
+ radius: 20,
+ foregroundImage: NetworkImage(state.chatRoom.users['to_chat_user']!.profilePhotoUrl!),
),
- child: Text(
- state.chatRoom.users['to_chat_user']!.name.split(' ').first[0] + state.chatRoom.users['to_chat_user']!.name.split(' ')[1][0],
- style: TextStyle(
- color: Color(0xFF7F9CF5),
- fontWeight: FontWeight.w400,
- fontSize: 20,
+ if (state.chatRoom.users['to_chat_user']!.profilePhotoUrl == null)
+ Container(
+ width: 40,
+ height: 40,
+ alignment: Alignment.center,
+ decoration: BoxDecoration(
+ color: Color(0xFFEBF4FF),
+ shape: BoxShape.circle,
+ ),
+ child: Text(
+ state.chatRoom.users['to_chat_user']!.name.split(' ').first[0] + state.chatRoom.users['to_chat_user']!.name.split(' ')[1][0],
+ style: TextStyle(
+ color: Color(0xFF7F9CF5),
+ fontWeight: FontWeight.w400,
+ fontSize: 20,
+ ),
),
),
- ),
SizedBox(width: 16),
Column(
crossAxisAlignment: CrossAxisAlignment.start,
@@ -214,7 +219,7 @@ class _ChatScreenState extends State {
),
SizedBox(width: 8),
SizedBox(
- width: mediaQueryData.size.width - 96,
+ width: MediaQuery.of(context).size.width - 96,
child: TextFormField(
controller: textEditingController,
maxLines: 5,
diff --git a/lib/features/chat/presentation/pages/chat_select_screen.dart b/lib/features/chat/presentation/pages/chat_select_screen.dart
index bdb3d9ce..74925e29 100644
--- a/lib/features/chat/presentation/pages/chat_select_screen.dart
+++ b/lib/features/chat/presentation/pages/chat_select_screen.dart
@@ -39,6 +39,7 @@ class _ChatSelectScreenState extends State {
title: Padding(
padding: const EdgeInsets.only(top: 8),
child: ChatSearchBarWidget(
+ onSuffixIconTap: () => context.read().getChatRooms(),
onChanged: (query) {
if (query.length > 2) {
EasyDebounce.debounce(
diff --git a/lib/features/chat/presentation/widgets/chat_bubble_widget.dart b/lib/features/chat/presentation/widgets/chat_bubble_widget.dart
index f65fb3bc..eeba8f1e 100644
--- a/lib/features/chat/presentation/widgets/chat_bubble_widget.dart
+++ b/lib/features/chat/presentation/widgets/chat_bubble_widget.dart
@@ -1,8 +1,7 @@
import 'package:cached_network_image/cached_network_image.dart';
import 'package:dismissible_page/dismissible_page.dart';
-import 'package:eatvio_app/core/constants/constants.dart';
+import 'package:eatvio_app/core/app_export.dart';
import 'package:eatvio_app/features/chat/presentation/pages/photo_view_screen.dart';
-import 'package:eatvio_app/theme/app_decoration.dart';
import 'package:flutter/material.dart';
import 'package:url_launcher/url_launcher.dart';
@@ -29,12 +28,17 @@ class ChatBubbleWidget extends StatelessWidget {
child: DecoratedBox(
decoration: BoxDecoration(
color: isCurrentUser ? Color(0xFF7F9CF5) : Colors.white,
- borderRadius: BorderRadiusStyle.circleBorder17,
+ borderRadius: mediaData.length > 0
+ ? BorderRadius.circular(24)
+ : BorderRadius.horizontal(
+ left: isCurrentUser ? Radius.circular(32) : Radius.circular(16),
+ right: isCurrentUser ? Radius.circular(16) : Radius.circular(24),
+ ),
),
child: Padding(
- padding: const EdgeInsets.all(12),
+ padding: mediaData.length > 0 ? EdgeInsets.all(8) : EdgeInsets.only(top: 8, bottom: 8, left: isCurrentUser ? 16 : 8, right: isCurrentUser ? 8 : 16),
child: Column(
- crossAxisAlignment: CrossAxisAlignment.start,
+ crossAxisAlignment: isCurrentUser ? CrossAxisAlignment.end : CrossAxisAlignment.start,
children: [
if (mediaData.isNotEmpty)
CustomScrollView(
@@ -86,7 +90,7 @@ class ChatBubbleWidget extends StatelessWidget {
tag: baseUrl + '/storage/' + '${mediaData[index]}',
transitionOnUserGestures: true,
child: ClipRRect(
- borderRadius: BorderRadiusStyle.roundedBorder8,
+ borderRadius: BorderRadius.circular(16),
child: CachedNetworkImage(
imageUrl: baseUrl + '/storage/' + '${mediaData[index]}',
),
@@ -103,10 +107,17 @@ class ChatBubbleWidget extends StatelessWidget {
if (text.isNotEmpty)
Text(
text,
- style: TextStyle(
- color: isCurrentUser ? Colors.white : Color(0xFF323F4B),
- ),
+ style: TextStyle(color: isCurrentUser ? Colors.white : Color(0xFF323F4B), height: 1),
),
+ SizedBox(height: 4),
+ Text(
+ DateTime.parse(sendTime).format('hh:mm'),
+ style: TextStyle(
+ color: isCurrentUser ? Colors.white.withOpacity(0.4) : Color(0xFF323F4B).withOpacity(0.4),
+ height: 1,
+ fontSize: 10,
+ ),
+ ),
],
),
),
diff --git a/lib/features/chat/presentation/widgets/chat_entry_widget.dart b/lib/features/chat/presentation/widgets/chat_entry_widget.dart
index 0054e8f2..b496047d 100644
--- a/lib/features/chat/presentation/widgets/chat_entry_widget.dart
+++ b/lib/features/chat/presentation/widgets/chat_entry_widget.dart
@@ -95,6 +95,7 @@ class _ChatEntryWidgetState extends State {
}
buildAvatarByUsername(String username) {
+ username = username.trim();
return Container(
width: 48,
height: 48,
diff --git a/lib/features/chat/presentation/widgets/chat_search_bar_widget.dart b/lib/features/chat/presentation/widgets/chat_search_bar_widget.dart
index d2baebb1..4889fdfd 100644
--- a/lib/features/chat/presentation/widgets/chat_search_bar_widget.dart
+++ b/lib/features/chat/presentation/widgets/chat_search_bar_widget.dart
@@ -25,6 +25,7 @@ class ChatSearchBarWidget extends StatelessWidget {
this.filled = true,
this.validator,
this.onChanged,
+ required this.onSuffixIconTap,
}) : super(key: key);
final Alignment? alignment;
@@ -69,6 +70,8 @@ class ChatSearchBarWidget extends StatelessWidget {
final Function(String)? onChanged;
+ final Function() onSuffixIconTap;
+
@override
Widget build(BuildContext context) {
return searchViewWidget(context);
@@ -111,7 +114,10 @@ class ChatSearchBarWidget extends StatelessWidget {
),
suffixIcon: suffix ??
IconButton(
- onPressed: () => controller!.clear(),
+ onPressed: () {
+ controller!.clear();
+ onSuffixIconTap();
+ },
icon: Icon(
Icons.clear,
color: Colors.grey.shade600,
diff --git a/lib/features/diary/models/diary_model.freezed.dart b/lib/features/diary/models/diary_model.freezed.dart
index ceabd5db..a02a4621 100644
--- a/lib/features/diary/models/diary_model.freezed.dart
+++ b/lib/features/diary/models/diary_model.freezed.dart
@@ -29,12 +29,8 @@ mixin _$DiaryModel {
DateTime? get wakeup => throw _privateConstructorUsedError;
DateTime? get retire => throw _privateConstructorUsedError;
- /// Serializes this DiaryModel to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of DiaryModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$DiaryModelCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -68,8 +64,6 @@ class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of DiaryModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -118,8 +112,6 @@ class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel>
) as $Val);
}
- /// Create a copy of DiaryModel
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$StateCopyWith<$Res> get state {
@@ -159,8 +151,6 @@ class __$$DiaryModelImplCopyWithImpl<$Res>
_$DiaryModelImpl _value, $Res Function(_$DiaryModelImpl) _then)
: super(_value, _then);
- /// Create a copy of DiaryModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -270,7 +260,7 @@ class _$DiaryModelImpl implements _DiaryModel {
(identical(other.retire, retire) || other.retire == retire));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -283,9 +273,7 @@ class _$DiaryModelImpl implements _DiaryModel {
wakeup,
retire);
- /// Create a copy of DiaryModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
@@ -329,11 +317,8 @@ abstract class _DiaryModel implements DiaryModel {
DateTime? get wakeup;
@override
DateTime? get retire;
-
- /// Create a copy of DiaryModel
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/diary/models/meal.freezed.dart b/lib/features/diary/models/meal.freezed.dart
index 2bd6c478..2c249b06 100644
--- a/lib/features/diary/models/meal.freezed.dart
+++ b/lib/features/diary/models/meal.freezed.dart
@@ -28,12 +28,8 @@ mixin _$Meal {
List get portions => throw _privateConstructorUsedError;
List get photos => throw _privateConstructorUsedError;
- /// Serializes this Meal to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Meal
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$MealCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -62,8 +58,6 @@ class _$MealCopyWithImpl<$Res, $Val extends Meal>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Meal
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -132,8 +126,6 @@ class __$$MealImplCopyWithImpl<$Res>
__$$MealImplCopyWithImpl(_$MealImpl _value, $Res Function(_$MealImpl) _then)
: super(_value, _then);
- /// Create a copy of Meal
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -240,7 +232,7 @@ class _$MealImpl implements _Meal {
const DeepCollectionEquality().equals(other._photos, _photos));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -252,9 +244,7 @@ class _$MealImpl implements _Meal {
const DeepCollectionEquality().hash(_portions),
const DeepCollectionEquality().hash(_photos));
- /// Create a copy of Meal
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
@@ -294,11 +284,8 @@ abstract class _Meal implements Meal {
List get portions;
@override
List get photos;
-
- /// Create a copy of Meal
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/diary/models/photo.freezed.dart b/lib/features/diary/models/photo.freezed.dart
index 8f5e0152..2d9c70bd 100644
--- a/lib/features/diary/models/photo.freezed.dart
+++ b/lib/features/diary/models/photo.freezed.dart
@@ -25,12 +25,8 @@ mixin _$Photo {
String get originalName => throw _privateConstructorUsedError;
String get path => throw _privateConstructorUsedError;
- /// Serializes this Photo to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Photo
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$PhotoCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -55,8 +51,6 @@ class _$PhotoCopyWithImpl<$Res, $Val extends Photo>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Photo
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -102,8 +96,6 @@ class __$$PhotoImplCopyWithImpl<$Res>
_$PhotoImpl _value, $Res Function(_$PhotoImpl) _then)
: super(_value, _then);
- /// Create a copy of Photo
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -163,13 +155,11 @@ class _$PhotoImpl implements _Photo {
(identical(other.path, path) || other.path == path));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, id, originalName, path);
- /// Create a copy of Photo
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
@@ -198,11 +188,8 @@ abstract class _Photo implements Photo {
String get originalName;
@override
String get path;
-
- /// Create a copy of Photo
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/diary/models/portion.freezed.dart b/lib/features/diary/models/portion.freezed.dart
index 4bef02d4..77627c29 100644
--- a/lib/features/diary/models/portion.freezed.dart
+++ b/lib/features/diary/models/portion.freezed.dart
@@ -26,12 +26,8 @@ mixin _$Portion {
String get portion => throw _privateConstructorUsedError;
bool get from_diet => throw _privateConstructorUsedError;
- /// Serializes this Portion to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Portion
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$PortionCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -58,8 +54,6 @@ class _$PortionCopyWithImpl<$Res, $Val extends Portion>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Portion
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -117,8 +111,6 @@ class __$$PortionImplCopyWithImpl<$Res>
_$PortionImpl _value, $Res Function(_$PortionImpl) _then)
: super(_value, _then);
- /// Create a copy of Portion
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -197,14 +189,12 @@ class _$PortionImpl implements _Portion {
other.from_diet == from_diet));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode =>
Object.hash(runtimeType, id, product_name, quantity, portion, from_diet);
- /// Create a copy of Portion
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
@@ -238,11 +228,8 @@ abstract class _Portion implements Portion {
String get portion;
@override
bool get from_diet;
-
- /// Create a copy of Portion
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/diary/models/product.freezed.dart b/lib/features/diary/models/product.freezed.dart
index 610656fb..d30ada33 100644
--- a/lib/features/diary/models/product.freezed.dart
+++ b/lib/features/diary/models/product.freezed.dart
@@ -23,12 +23,8 @@ mixin _$Product {
int get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
- /// Serializes this Product to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Product
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$ProductCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -50,8 +46,6 @@ class _$ProductCopyWithImpl<$Res, $Val extends Product>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Product
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -89,8 +83,6 @@ class __$$ProductImplCopyWithImpl<$Res>
_$ProductImpl _value, $Res Function(_$ProductImpl) _then)
: super(_value, _then);
- /// Create a copy of Product
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -137,13 +129,11 @@ class _$ProductImpl implements _Product {
(identical(other.name, name) || other.name == name));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, id, name);
- /// Create a copy of Product
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
@@ -167,11 +157,8 @@ abstract class _Product implements Product {
int get id;
@override
String get name;
-
- /// Create a copy of Product
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/diary/models/state.freezed.dart b/lib/features/diary/models/state.freezed.dart
index 6b9c50fb..599ec29f 100644
--- a/lib/features/diary/models/state.freezed.dart
+++ b/lib/features/diary/models/state.freezed.dart
@@ -23,12 +23,8 @@ mixin _$State {
bool get has_chosen_diet => throw _privateConstructorUsedError;
bool get has_chosen_plan => throw _privateConstructorUsedError;
- /// Serializes this State to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of State
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$StateCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -50,8 +46,6 @@ class _$StateCopyWithImpl<$Res, $Val extends State>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of State
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -89,8 +83,6 @@ class __$$StateImplCopyWithImpl<$Res>
_$StateImpl _value, $Res Function(_$StateImpl) _then)
: super(_value, _then);
- /// Create a copy of State
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -140,14 +132,12 @@ class _$StateImpl implements _State {
other.has_chosen_plan == has_chosen_plan));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode =>
Object.hash(runtimeType, has_chosen_diet, has_chosen_plan);
- /// Create a copy of State
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$StateImplCopyWith<_$StateImpl> get copyWith =>
@@ -172,11 +162,8 @@ abstract class _State implements State {
bool get has_chosen_diet;
@override
bool get has_chosen_plan;
-
- /// Create a copy of State
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$StateImplCopyWith<_$StateImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/diary/presentation/bloc/diary_state.freezed.dart b/lib/features/diary/presentation/bloc/diary_state.freezed.dart
index 98d7019f..5a9bbc12 100644
--- a/lib/features/diary/presentation/bloc/diary_state.freezed.dart
+++ b/lib/features/diary/presentation/bloc/diary_state.freezed.dart
@@ -174,9 +174,6 @@ class _$DiaryStateCopyWithImpl<$Res, $Val extends DiaryState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
-
- /// Create a copy of DiaryState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -193,9 +190,6 @@ class __$$DiaryStateImplCopyWithImpl<$Res>
__$$DiaryStateImplCopyWithImpl(
_$DiaryStateImpl _value, $Res Function(_$DiaryStateImpl) _then)
: super(_value, _then);
-
- /// Create a copy of DiaryState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -403,8 +397,6 @@ class __$$DiaryStateLoadingImplCopyWithImpl<$Res>
$Res Function(_$DiaryStateLoadingImpl) _then)
: super(_value, _then);
- /// Create a copy of DiaryState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -443,9 +435,7 @@ class _$DiaryStateLoadingImpl implements DiaryStateLoading {
@override
int get hashCode => Object.hash(runtimeType, id);
- /// Create a copy of DiaryState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith =>
@@ -621,10 +611,7 @@ abstract class DiaryStateLoading implements DiaryState {
const factory DiaryStateLoading({final int? id}) = _$DiaryStateLoadingImpl;
int? get id;
-
- /// Create a copy of DiaryState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -679,8 +666,6 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$DiaryStateLoadedImpl) _then)
: super(_value, _then);
- /// Create a copy of DiaryState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -834,8 +819,6 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
));
}
- /// Create a copy of DiaryState
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DiaryModelCopyWith<$Res> get diary {
@@ -844,8 +827,6 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
});
}
- /// Create a copy of DiaryState
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$MealCopyWith<$Res> get currentMeal {
@@ -854,8 +835,6 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
});
}
- /// Create a copy of DiaryState
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$SelectionPopupModelCopyWith<$Res> get portionController {
@@ -1121,9 +1100,7 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
const DeepCollectionEquality().hash(_chartDataCounted)
]);
- /// Create a copy of DiaryState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
@@ -1443,10 +1420,7 @@ abstract class DiaryStateLoaded implements DiaryState {
bool get isLoading;
bool get isAdded;
List? get chartDataCounted;
-
- /// Create a copy of DiaryState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -1468,8 +1442,6 @@ class __$$DiaryStateErrorImplCopyWithImpl<$Res>
_$DiaryStateErrorImpl _value, $Res Function(_$DiaryStateErrorImpl) _then)
: super(_value, _then);
- /// Create a copy of DiaryState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1509,9 +1481,7 @@ class _$DiaryStateErrorImpl implements DiaryStateError {
@override
int get hashCode => Object.hash(runtimeType, errorMessage);
- /// Create a copy of DiaryState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith =>
@@ -1688,10 +1658,7 @@ abstract class DiaryStateError implements DiaryState {
_$DiaryStateErrorImpl;
String get errorMessage;
-
- /// Create a copy of DiaryState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/diary/presentation/pages/diary_screen.dart b/lib/features/diary/presentation/pages/diary_screen.dart
index 7556fece..d79b4aab 100644
--- a/lib/features/diary/presentation/pages/diary_screen.dart
+++ b/lib/features/diary/presentation/pages/diary_screen.dart
@@ -18,7 +18,7 @@ import 'package:flutter/services.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter_form_builder/flutter_form_builder.dart';
import 'package:image_picker/image_picker.dart';
-// import 'package:syncfusion_flutter_charts/charts.dart';
+import 'package:syncfusion_flutter_charts/charts.dart';
class DiaryScreen extends StatelessWidget {
final String? diaryID;
@@ -136,30 +136,30 @@ class DiaryScreen extends StatelessWidget {
Text(
"от дневной суточной нормы",
),
- // Transform.rotate(
- // angle: -1.5708,
- // child: ClipRect(
- // child: Align(
- // alignment: Alignment.centerRight,
- // widthFactor: 0.5,
- // child: SfCircularChart(
- // series: [
- // RadialBarSeries(
- // dataSource: state.chartDataCounted,
- // xValueMapper: (NutritionData data, _) => data.category,
- // yValueMapper: (NutritionData data, _) => data.nutrition,
- // pointColorMapper: (NutritionData data, _) => data.color,
- // trackColor: Color.fromRGBO(59, 130, 246, 1),
- // trackOpacity: 0.1,
- // gap: "8%",
- // radius: "110%",
- // innerRadius: '20%', // Измените значение по вашему усмотрению
- // )
- // ],
- // ),
- // ),
- // ),
- // ),
+ Transform.rotate(
+ angle: -1.5708,
+ child: ClipRect(
+ child: Align(
+ alignment: Alignment.centerRight,
+ widthFactor: 0.5,
+ child: SfCircularChart(
+ series: [
+ RadialBarSeries(
+ dataSource: state.chartDataCounted,
+ xValueMapper: (NutritionData data, _) => data.category,
+ yValueMapper: (NutritionData data, _) => data.nutrition,
+ pointColorMapper: (NutritionData data, _) => data.color,
+ trackColor: Color.fromRGBO(59, 130, 246, 1),
+ trackOpacity: 0.1,
+ gap: "8%",
+ radius: "110%",
+ innerRadius: '20%', // Измените значение по вашему усмотрению
+ )
+ ],
+ ),
+ ),
+ ),
+ ),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
@@ -201,6 +201,7 @@ class DiaryScreen extends StatelessWidget {
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.only(left: 4, right: 4),
child: FloatingActionButton.extended(
+ heroTag: 'endDayButton',
highlightElevation: 0,
elevation: 0,
focusElevation: 0,
@@ -264,6 +265,7 @@ class DiaryScreen extends StatelessWidget {
width: MediaQuery.of(context).size.width,
padding: EdgeInsets.only(left: 4, right: 4),
child: FloatingActionButton.extended(
+ heroTag: 'addProduct',
highlightElevation: 0,
elevation: 0,
focusElevation: 0,
diff --git a/lib/features/diets/presentation/pages/about_diet_screen.dart b/lib/features/diets/presentation/pages/about_diet_screen.dart
index 931b2eaf..42aa3bf4 100644
--- a/lib/features/diets/presentation/pages/about_diet_screen.dart
+++ b/lib/features/diets/presentation/pages/about_diet_screen.dart
@@ -2,13 +2,11 @@ import 'dart:io';
import 'package:cached_network_image/cached_network_image.dart';
import 'package:eatvio_app/core/app_export.dart';
-import 'package:eatvio_app/core/constants/constants.dart';
import 'package:eatvio_app/features/feed/models/comment_model.dart';
import 'package:eatvio_app/features/feed/models/diets_pagination_model.dart' as Diets;
import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_cubit.dart';
import 'package:eatvio_app/features/feed/presentation/bloc/comments_cubit/comments_state.dart';
import 'package:eatvio_app/locator_service.dart';
-import 'package:eatvio_app/theme/theme_helper.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:go_router/go_router.dart';
diff --git a/lib/features/feed/models/comment_model.freezed.dart b/lib/features/feed/models/comment_model.freezed.dart
index 9dc150e4..3f088135 100644
--- a/lib/features/feed/models/comment_model.freezed.dart
+++ b/lib/features/feed/models/comment_model.freezed.dart
@@ -27,12 +27,8 @@ mixin _$Comment {
@JsonKey(name: "meta")
Meta get meta => throw _privateConstructorUsedError;
- /// Serializes this Comment to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Comment
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$CommentCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -60,8 +56,6 @@ class _$CommentCopyWithImpl<$Res, $Val extends Comment>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Comment
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -85,8 +79,6 @@ class _$CommentCopyWithImpl<$Res, $Val extends Comment>
) as $Val);
}
- /// Create a copy of Comment
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$LinksCopyWith<$Res> get links {
@@ -95,8 +87,6 @@ class _$CommentCopyWithImpl<$Res, $Val extends Comment>
});
}
- /// Create a copy of Comment
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$MetaCopyWith<$Res> get meta {
@@ -132,8 +122,6 @@ class __$$CommentImplCopyWithImpl<$Res>
_$CommentImpl _value, $Res Function(_$CommentImpl) _then)
: super(_value, _then);
- /// Create a copy of Comment
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -201,14 +189,12 @@ class _$CommentImpl implements _Comment {
(identical(other.meta, meta) || other.meta == meta));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
- /// Create a copy of Comment
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
@@ -239,11 +225,8 @@ abstract class _Comment implements Comment {
@override
@JsonKey(name: "meta")
Meta get meta;
-
- /// Create a copy of Comment
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$CommentImplCopyWith<_$CommentImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -265,12 +248,8 @@ mixin _$Datum {
@JsonKey(name: "children_comments")
List get childrenComments => throw _privateConstructorUsedError;
- /// Serializes this Datum to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Datum
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$DatumCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -297,8 +276,6 @@ class _$DatumCopyWithImpl<$Res, $Val extends Datum>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Datum
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -356,8 +333,6 @@ class __$$DatumImplCopyWithImpl<$Res>
_$DatumImpl _value, $Res Function(_$DatumImpl) _then)
: super(_value, _then);
- /// Create a copy of Datum
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -449,7 +424,7 @@ class _$DatumImpl implements _Datum {
.equals(other._childrenComments, _childrenComments));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -459,9 +434,7 @@ class _$DatumImpl implements _Datum {
body,
const DeepCollectionEquality().hash(_childrenComments));
- /// Create a copy of Datum
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$DatumImplCopyWith<_$DatumImpl> get copyWith =>
@@ -502,11 +475,8 @@ abstract class _Datum implements Datum {
@override
@JsonKey(name: "children_comments")
List get childrenComments;
-
- /// Create a copy of Datum
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$DatumImplCopyWith<_$DatumImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -526,12 +496,8 @@ mixin _$Links {
@JsonKey(name: "next")
dynamic get next => throw _privateConstructorUsedError;
- /// Serializes this Links to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Links
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$LinksCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -557,8 +523,6 @@ class _$LinksCopyWithImpl<$Res, $Val extends Links>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Links
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -610,8 +574,6 @@ class __$$LinksImplCopyWithImpl<$Res>
_$LinksImpl _value, $Res Function(_$LinksImpl) _then)
: super(_value, _then);
- /// Create a copy of Links
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -682,7 +644,7 @@ class _$LinksImpl implements _Links {
const DeepCollectionEquality().equals(other.next, next));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -691,9 +653,7 @@ class _$LinksImpl implements _Links {
const DeepCollectionEquality().hash(prev),
const DeepCollectionEquality().hash(next));
- /// Create a copy of Links
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$LinksImplCopyWith<_$LinksImpl> get copyWith =>
@@ -728,11 +688,8 @@ abstract class _Links implements Links {
@override
@JsonKey(name: "next")
dynamic get next;
-
- /// Create a copy of Links
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$LinksImplCopyWith<_$LinksImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -760,12 +717,8 @@ mixin _$Meta {
@JsonKey(name: "total")
int get total => throw _privateConstructorUsedError;
- /// Serializes this Meta to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Meta
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$MetaCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -795,8 +748,6 @@ class _$MetaCopyWithImpl<$Res, $Val extends Meta>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Meta
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -871,8 +822,6 @@ class __$$MetaImplCopyWithImpl<$Res>
__$$MetaImplCopyWithImpl(_$MetaImpl _value, $Res Function(_$MetaImpl) _then)
: super(_value, _then);
- /// Create a copy of Meta
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -992,14 +941,12 @@ class _$MetaImpl implements _Meta {
(identical(other.total, total) || other.total == total));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, currentPage, from, lastPage,
const DeepCollectionEquality().hash(_links), path, perPage, to, total);
- /// Create a copy of Meta
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$MetaImplCopyWith<_$MetaImpl> get copyWith =>
@@ -1050,11 +997,8 @@ abstract class _Meta implements Meta {
@override
@JsonKey(name: "total")
int get total;
-
- /// Create a copy of Meta
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$MetaImplCopyWith<_$MetaImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -1072,12 +1016,8 @@ mixin _$Link {
@JsonKey(name: "active")
bool get active => throw _privateConstructorUsedError;
- /// Serializes this Link to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Link
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$LinkCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -1102,8 +1042,6 @@ class _$LinkCopyWithImpl<$Res, $Val extends Link>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Link
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1148,8 +1086,6 @@ class __$$LinkImplCopyWithImpl<$Res>
__$$LinkImplCopyWithImpl(_$LinkImpl _value, $Res Function(_$LinkImpl) _then)
: super(_value, _then);
- /// Create a copy of Link
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1210,13 +1146,11 @@ class _$LinkImpl implements _Link {
(identical(other.active, active) || other.active == active));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, url, label, active);
- /// Create a copy of Link
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$LinkImplCopyWith<_$LinkImpl> get copyWith =>
@@ -1247,11 +1181,8 @@ abstract class _Link implements Link {
@override
@JsonKey(name: "active")
bool get active;
-
- /// Create a copy of Link
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$LinkImplCopyWith<_$LinkImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/models/diets_pagination_model.freezed.dart b/lib/features/feed/models/diets_pagination_model.freezed.dart
index 5fa7d5dc..2c402671 100644
--- a/lib/features/feed/models/diets_pagination_model.freezed.dart
+++ b/lib/features/feed/models/diets_pagination_model.freezed.dart
@@ -27,12 +27,8 @@ mixin _$DietsPagination {
@JsonKey(name: "meta")
Meta get meta => throw _privateConstructorUsedError;
- /// Serializes this DietsPagination to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of DietsPagination
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$DietsPaginationCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -62,8 +58,6 @@ class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of DietsPagination
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -87,8 +81,6 @@ class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination>
) as $Val);
}
- /// Create a copy of DietsPagination
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$LinksCopyWith<$Res> get links {
@@ -97,8 +89,6 @@ class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination>
});
}
- /// Create a copy of DietsPagination
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$MetaCopyWith<$Res> get meta {
@@ -135,8 +125,6 @@ class __$$DietsPaginationImplCopyWithImpl<$Res>
_$DietsPaginationImpl _value, $Res Function(_$DietsPaginationImpl) _then)
: super(_value, _then);
- /// Create a copy of DietsPagination
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -204,14 +192,12 @@ class _$DietsPaginationImpl implements _DietsPagination {
(identical(other.meta, meta) || other.meta == meta));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
- /// Create a copy of DietsPagination
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith =>
@@ -244,11 +230,8 @@ abstract class _DietsPagination implements DietsPagination {
@override
@JsonKey(name: "meta")
Meta get meta;
-
- /// Create a copy of DietsPagination
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -285,12 +268,8 @@ mixin _$Datum {
@JsonKey(name: "total_comments")
int get totalComments => throw _privateConstructorUsedError;
- /// Serializes this Datum to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Datum
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$DatumCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -328,8 +307,6 @@ class _$DatumCopyWithImpl<$Res, $Val extends Datum>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Datum
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -398,8 +375,6 @@ class _$DatumCopyWithImpl<$Res, $Val extends Datum>
) as $Val);
}
- /// Create a copy of Datum
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$TypeCopyWith<$Res> get type {
@@ -408,8 +383,6 @@ class _$DatumCopyWithImpl<$Res, $Val extends Datum>
});
}
- /// Create a copy of Datum
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AuthorCopyWith<$Res> get author {
@@ -455,8 +428,6 @@ class __$$DatumImplCopyWithImpl<$Res>
_$DatumImpl _value, $Res Function(_$DatumImpl) _then)
: super(_value, _then);
- /// Create a copy of Datum
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -620,7 +591,7 @@ class _$DatumImpl implements _Datum {
other.totalComments == totalComments));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -637,9 +608,7 @@ class _$DatumImpl implements _Datum {
totalViews,
totalComments);
- /// Create a copy of Datum
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$DatumImplCopyWith<_$DatumImpl> get copyWith =>
@@ -708,11 +677,8 @@ abstract class _Datum implements Datum {
@override
@JsonKey(name: "total_comments")
int get totalComments;
-
- /// Create a copy of Datum
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$DatumImplCopyWith<_$DatumImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -732,12 +698,8 @@ mixin _$Author {
@JsonKey(name: "author_is_me")
bool get authorIsMe => throw _privateConstructorUsedError;
- /// Serializes this Author to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Author
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$AuthorCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -763,8 +725,6 @@ class _$AuthorCopyWithImpl<$Res, $Val extends Author>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Author
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -816,8 +776,6 @@ class __$$AuthorImplCopyWithImpl<$Res>
_$AuthorImpl _value, $Res Function(_$AuthorImpl) _then)
: super(_value, _then);
- /// Create a copy of Author
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -892,14 +850,12 @@ class _$AuthorImpl implements _Author {
other.authorIsMe == authorIsMe));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType, authorSlug, authorName, authorProfileIcon, authorIsMe);
- /// Create a copy of Author
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith =>
@@ -936,11 +892,8 @@ abstract class _Author implements Author {
@override
@JsonKey(name: "author_is_me")
bool get authorIsMe;
-
- /// Create a copy of Author
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$AuthorImplCopyWith<_$AuthorImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -960,12 +913,8 @@ mixin _$DailySchedule {
@JsonKey(name: "quantity")
int get quantity => throw _privateConstructorUsedError;
- /// Serializes this DailySchedule to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of DailySchedule
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$DailyScheduleCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -993,8 +942,6 @@ class _$DailyScheduleCopyWithImpl<$Res, $Val extends DailySchedule>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of DailySchedule
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1047,8 +994,6 @@ class __$$DailyScheduleImplCopyWithImpl<$Res>
_$DailyScheduleImpl _value, $Res Function(_$DailyScheduleImpl) _then)
: super(_value, _then);
- /// Create a copy of DailySchedule
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1120,13 +1065,11 @@ class _$DailyScheduleImpl implements _DailySchedule {
other.quantity == quantity));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, name, uniq, portion, quantity);
- /// Create a copy of DailySchedule
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith =>
@@ -1163,11 +1106,8 @@ abstract class _DailySchedule implements DailySchedule {
@override
@JsonKey(name: "quantity")
int get quantity;
-
- /// Create a copy of DailySchedule
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$DailyScheduleImplCopyWith<_$DailyScheduleImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -1187,12 +1127,8 @@ mixin _$Type {
@JsonKey(name: "meat")
bool? get meat => throw _privateConstructorUsedError;
- /// Serializes this Type to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Type
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$TypeCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -1218,8 +1154,6 @@ class _$TypeCopyWithImpl<$Res, $Val extends Type>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Type
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1270,8 +1204,6 @@ class __$$TypeImplCopyWithImpl<$Res>
__$$TypeImplCopyWithImpl(_$TypeImpl _value, $Res Function(_$TypeImpl) _then)
: super(_value, _then);
- /// Create a copy of Type
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1342,13 +1274,11 @@ class _$TypeImpl implements _Type {
(identical(other.meat, meat) || other.meat == meat));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, alko, veg, corb, meat);
- /// Create a copy of Type
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$TypeImplCopyWith<_$TypeImpl> get copyWith =>
@@ -1383,11 +1313,8 @@ abstract class _Type implements Type {
@override
@JsonKey(name: "meat")
bool? get meat;
-
- /// Create a copy of Type
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$TypeImplCopyWith<_$TypeImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -1407,12 +1334,8 @@ mixin _$Links {
@JsonKey(name: "next")
dynamic get next => throw _privateConstructorUsedError;
- /// Serializes this Links to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Links
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$LinksCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -1438,8 +1361,6 @@ class _$LinksCopyWithImpl<$Res, $Val extends Links>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Links
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1491,8 +1412,6 @@ class __$$LinksImplCopyWithImpl<$Res>
_$LinksImpl _value, $Res Function(_$LinksImpl) _then)
: super(_value, _then);
- /// Create a copy of Links
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1563,7 +1482,7 @@ class _$LinksImpl implements _Links {
const DeepCollectionEquality().equals(other.next, next));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -1572,9 +1491,7 @@ class _$LinksImpl implements _Links {
const DeepCollectionEquality().hash(prev),
const DeepCollectionEquality().hash(next));
- /// Create a copy of Links
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$LinksImplCopyWith<_$LinksImpl> get copyWith =>
@@ -1609,11 +1526,8 @@ abstract class _Links implements Links {
@override
@JsonKey(name: "next")
dynamic get next;
-
- /// Create a copy of Links
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$LinksImplCopyWith<_$LinksImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -1641,12 +1555,8 @@ mixin _$Meta {
@JsonKey(name: "total")
int get total => throw _privateConstructorUsedError;
- /// Serializes this Meta to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Meta
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$MetaCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -1676,8 +1586,6 @@ class _$MetaCopyWithImpl<$Res, $Val extends Meta>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Meta
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1752,8 +1660,6 @@ class __$$MetaImplCopyWithImpl<$Res>
__$$MetaImplCopyWithImpl(_$MetaImpl _value, $Res Function(_$MetaImpl) _then)
: super(_value, _then);
- /// Create a copy of Meta
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -1873,14 +1779,12 @@ class _$MetaImpl implements _Meta {
(identical(other.total, total) || other.total == total));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, currentPage, from, lastPage,
const DeepCollectionEquality().hash(_links), path, perPage, to, total);
- /// Create a copy of Meta
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$MetaImplCopyWith<_$MetaImpl> get copyWith =>
@@ -1931,11 +1835,8 @@ abstract class _Meta implements Meta {
@override
@JsonKey(name: "total")
int get total;
-
- /// Create a copy of Meta
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$MetaImplCopyWith<_$MetaImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -1953,12 +1854,8 @@ mixin _$Link {
@JsonKey(name: "active")
bool get active => throw _privateConstructorUsedError;
- /// Serializes this Link to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Link
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$LinkCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -1983,8 +1880,6 @@ class _$LinkCopyWithImpl<$Res, $Val extends Link>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Link
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -2029,8 +1924,6 @@ class __$$LinkImplCopyWithImpl<$Res>
__$$LinkImplCopyWithImpl(_$LinkImpl _value, $Res Function(_$LinkImpl) _then)
: super(_value, _then);
- /// Create a copy of Link
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -2091,13 +1984,11 @@ class _$LinkImpl implements _Link {
(identical(other.active, active) || other.active == active));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, url, label, active);
- /// Create a copy of Link
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$LinkImplCopyWith<_$LinkImpl> get copyWith =>
@@ -2128,11 +2019,8 @@ abstract class _Link implements Link {
@override
@JsonKey(name: "active")
bool get active;
-
- /// Create a copy of Link
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$LinkImplCopyWith<_$LinkImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/models/feed_blog_post_model.freezed.dart b/lib/features/feed/models/feed_blog_post_model.freezed.dart
index 89087373..08d5527a 100644
--- a/lib/features/feed/models/feed_blog_post_model.freezed.dart
+++ b/lib/features/feed/models/feed_blog_post_model.freezed.dart
@@ -41,12 +41,8 @@ mixin _$FeedBlogPostModel {
@JsonKey(name: "was_liked_by_me")
bool get wasLikedByMe => throw _privateConstructorUsedError;
- /// Serializes this FeedBlogPostModel to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of FeedBlogPostModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$FeedBlogPostModelCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -85,8 +81,6 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of FeedBlogPostModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -160,8 +154,6 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
) as $Val);
}
- /// Create a copy of FeedBlogPostModel
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AuthorCopyWith<$Res> get author {
@@ -206,8 +198,6 @@ class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
$Res Function(_$FeedBlogPostModelImpl) _then)
: super(_value, _then);
- /// Create a copy of FeedBlogPostModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -370,7 +360,7 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
other.wasLikedByMe == wasLikedByMe));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -388,9 +378,7 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
totalComments,
wasLikedByMe);
- /// Create a copy of FeedBlogPostModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
@@ -458,11 +446,8 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel {
@override
@JsonKey(name: "was_liked_by_me")
bool get wasLikedByMe;
-
- /// Create a copy of FeedBlogPostModel
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/models/feed_blog_post_settings_model.freezed.dart b/lib/features/feed/models/feed_blog_post_settings_model.freezed.dart
index 9bddceae..c680d82e 100644
--- a/lib/features/feed/models/feed_blog_post_settings_model.freezed.dart
+++ b/lib/features/feed/models/feed_blog_post_settings_model.freezed.dart
@@ -26,12 +26,8 @@ mixin _$FeedBlogPostSettingsModel {
throw _privateConstructorUsedError;
Meta get meta => throw _privateConstructorUsedError;
- /// Serializes this FeedBlogPostSettingsModel to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of FeedBlogPostSettingsModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$FeedBlogPostSettingsModelCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -60,8 +56,6 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of FeedBlogPostSettingsModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -80,8 +74,6 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<$Res,
) as $Val);
}
- /// Create a copy of FeedBlogPostSettingsModel
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$MetaCopyWith<$Res> get meta {
@@ -118,8 +110,6 @@ class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>
$Res Function(_$FeedBlogPostSettingsModelImpl) _then)
: super(_value, _then);
- /// Create a copy of FeedBlogPostSettingsModel
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -179,14 +169,12 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel {
(identical(other.meta, meta) || other.meta == meta));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType,
const DeepCollectionEquality().hash(_feedBlogPostList), meta);
- /// Create a copy of FeedBlogPostSettingsModel
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
@@ -215,11 +203,8 @@ abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel {
List get feedBlogPostList;
@override
Meta get meta;
-
- /// Create a copy of FeedBlogPostSettingsModel
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl>
get copyWith => throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/models/recipes_model.freezed.dart b/lib/features/feed/models/recipes_model.freezed.dart
index 9dd4f54e..26cd55e3 100644
--- a/lib/features/feed/models/recipes_model.freezed.dart
+++ b/lib/features/feed/models/recipes_model.freezed.dart
@@ -45,12 +45,8 @@ mixin _$Recipes {
int get viewsCount => throw _privateConstructorUsedError;
Author get author => throw _privateConstructorUsedError;
- /// Serializes this Recipes to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Recipes
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$RecipesCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -91,8 +87,6 @@ class _$RecipesCopyWithImpl<$Res, $Val extends Recipes>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Recipes
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -186,8 +180,6 @@ class _$RecipesCopyWithImpl<$Res, $Val extends Recipes>
) as $Val);
}
- /// Create a copy of Recipes
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AuthorCopyWith<$Res> get author {
@@ -235,8 +227,6 @@ class __$$RecipesImplCopyWithImpl<$Res>
_$RecipesImpl _value, $Res Function(_$RecipesImpl) _then)
: super(_value, _then);
- /// Create a copy of Recipes
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -450,7 +440,7 @@ class _$RecipesImpl implements _Recipes {
(identical(other.author, author) || other.author == author));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
@@ -472,9 +462,7 @@ class _$RecipesImpl implements _Recipes {
viewsCount,
author);
- /// Create a copy of Recipes
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
@@ -551,11 +539,8 @@ abstract class _Recipes implements Recipes {
int get viewsCount;
@override
Author get author;
-
- /// Create a copy of Recipes
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -570,12 +555,8 @@ mixin _$Ingredient {
String? get unit => throw _privateConstructorUsedError;
String get portion => throw _privateConstructorUsedError;
- /// Serializes this Ingredient to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Ingredient
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$IngredientCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -599,8 +580,6 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Ingredient
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -644,8 +623,6 @@ class __$$IngredientImplCopyWithImpl<$Res>
_$IngredientImpl _value, $Res Function(_$IngredientImpl) _then)
: super(_value, _then);
- /// Create a copy of Ingredient
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -701,13 +678,11 @@ class _$IngredientImpl implements _Ingredient {
(identical(other.portion, portion) || other.portion == portion));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, name, unit, portion);
- /// Create a copy of Ingredient
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
@@ -736,11 +711,8 @@ abstract class _Ingredient implements Ingredient {
String? get unit;
@override
String get portion;
-
- /// Create a copy of Ingredient
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -754,12 +726,8 @@ mixin _$Step {
String get image => throw _privateConstructorUsedError;
String get description => throw _privateConstructorUsedError;
- /// Serializes this Step to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Step
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$StepCopyWith get copyWith => throw _privateConstructorUsedError;
}
@@ -781,8 +749,6 @@ class _$StepCopyWithImpl<$Res, $Val extends Step>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Step
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -819,8 +785,6 @@ class __$$StepImplCopyWithImpl<$Res>
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then)
: super(_value, _then);
- /// Create a copy of Step
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -868,13 +832,11 @@ class _$StepImpl implements _Step {
other.description == description));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, image, description);
- /// Create a copy of Step
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
@@ -899,11 +861,8 @@ abstract class _Step implements Step {
String get image;
@override
String get description;
-
- /// Create a copy of Step
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/models/recipes_pagination_model.freezed.dart b/lib/features/feed/models/recipes_pagination_model.freezed.dart
index ca8e9f92..2f0d43fb 100644
--- a/lib/features/feed/models/recipes_pagination_model.freezed.dart
+++ b/lib/features/feed/models/recipes_pagination_model.freezed.dart
@@ -23,12 +23,8 @@ mixin _$RecipesPagination {
@JsonKey(name: 'data')
List get recipesList => throw _privateConstructorUsedError;
- /// Serializes this RecipesPagination to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of RecipesPagination
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
$RecipesPaginationCopyWith get copyWith =>
throw _privateConstructorUsedError;
}
@@ -52,8 +48,6 @@ class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination>
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of RecipesPagination
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -87,8 +81,6 @@ class __$$RecipesPaginationImplCopyWithImpl<$Res>
$Res Function(_$RecipesPaginationImpl) _then)
: super(_value, _then);
- /// Create a copy of RecipesPagination
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -136,14 +128,12 @@ class _$RecipesPaginationImpl implements _RecipesPagination {
.equals(other._recipesList, _recipesList));
}
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_recipesList));
- /// Create a copy of RecipesPagination
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
@@ -169,11 +159,8 @@ abstract class _RecipesPagination implements RecipesPagination {
@override
@JsonKey(name: 'data')
List get recipesList;
-
- /// Create a copy of RecipesPagination
- /// with the given fields replaced by the non-null parameter values.
@override
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/presentation/bloc/comments_cubit/comments_state.freezed.dart b/lib/features/feed/presentation/bloc/comments_cubit/comments_state.freezed.dart
index 297a668c..da3d0345 100644
--- a/lib/features/feed/presentation/bloc/comments_cubit/comments_state.freezed.dart
+++ b/lib/features/feed/presentation/bloc/comments_cubit/comments_state.freezed.dart
@@ -84,9 +84,6 @@ class _$CommentsStateCopyWithImpl<$Res, $Val extends CommentsState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
-
- /// Create a copy of CommentsState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -103,9 +100,6 @@ class __$$CommentsStateImplCopyWithImpl<$Res>
__$$CommentsStateImplCopyWithImpl(
_$CommentsStateImpl _value, $Res Function(_$CommentsStateImpl) _then)
: super(_value, _then);
-
- /// Create a copy of CommentsState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -220,9 +214,6 @@ class __$$CommentsStateLoadingImplCopyWithImpl<$Res>
__$$CommentsStateLoadingImplCopyWithImpl(_$CommentsStateLoadingImpl _value,
$Res Function(_$CommentsStateLoadingImpl) _then)
: super(_value, _then);
-
- /// Create a copy of CommentsState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -343,8 +334,6 @@ class __$$CommentsStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$CommentsStateLoadedImpl) _then)
: super(_value, _then);
- /// Create a copy of CommentsState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -358,8 +347,6 @@ class __$$CommentsStateLoadedImplCopyWithImpl<$Res>
));
}
- /// Create a copy of CommentsState
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$CommentCopyWith<$Res> get comment {
@@ -393,9 +380,7 @@ class _$CommentsStateLoadedImpl implements CommentsStateLoaded {
@override
int get hashCode => Object.hash(runtimeType, comment);
- /// Create a copy of CommentsState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith =>
@@ -482,10 +467,7 @@ abstract class CommentsStateLoaded implements CommentsState {
_$CommentsStateLoadedImpl;
Comment get comment;
-
- /// Create a copy of CommentsState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -507,8 +489,6 @@ class __$$CommentsStateErrorImplCopyWithImpl<$Res>
$Res Function(_$CommentsStateErrorImpl) _then)
: super(_value, _then);
- /// Create a copy of CommentsState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -548,9 +528,7 @@ class _$CommentsStateErrorImpl implements CommentsStateError {
@override
int get hashCode => Object.hash(runtimeType, errorMessage);
- /// Create a copy of CommentsState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith =>
@@ -637,10 +615,7 @@ abstract class CommentsStateError implements CommentsState {
_$CommentsStateErrorImpl;
String get errorMessage;
-
- /// Create a copy of CommentsState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/presentation/bloc/diets_cubit/diets_state.freezed.dart b/lib/features/feed/presentation/bloc/diets_cubit/diets_state.freezed.dart
index dd30f73d..adff30f5 100644
--- a/lib/features/feed/presentation/bloc/diets_cubit/diets_state.freezed.dart
+++ b/lib/features/feed/presentation/bloc/diets_cubit/diets_state.freezed.dart
@@ -84,9 +84,6 @@ class _$DietsStateCopyWithImpl<$Res, $Val extends DietsState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
-
- /// Create a copy of DietsState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -103,9 +100,6 @@ class __$$DietsStateImplCopyWithImpl<$Res>
__$$DietsStateImplCopyWithImpl(
_$DietsStateImpl _value, $Res Function(_$DietsStateImpl) _then)
: super(_value, _then);
-
- /// Create a copy of DietsState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -220,9 +214,6 @@ class __$$DietsStateLoadingImplCopyWithImpl<$Res>
__$$DietsStateLoadingImplCopyWithImpl(_$DietsStateLoadingImpl _value,
$Res Function(_$DietsStateLoadingImpl) _then)
: super(_value, _then);
-
- /// Create a copy of DietsState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -342,8 +333,6 @@ class __$$DietsStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$DietsStateLoadedImpl) _then)
: super(_value, _then);
- /// Create a copy of DietsState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -357,8 +346,6 @@ class __$$DietsStateLoadedImplCopyWithImpl<$Res>
));
}
- /// Create a copy of DietsState
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$DietsPaginationCopyWith<$Res> get diets {
@@ -392,9 +379,7 @@ class _$DietsStateLoadedImpl implements DietsStateLoaded {
@override
int get hashCode => Object.hash(runtimeType, diets);
- /// Create a copy of DietsState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith =>
@@ -481,10 +466,7 @@ abstract class DietsStateLoaded implements DietsState {
_$DietsStateLoadedImpl;
DietsPagination get diets;
-
- /// Create a copy of DietsState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$DietsStateLoadedImplCopyWith<_$DietsStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -506,8 +488,6 @@ class __$$DietsStateErrorImplCopyWithImpl<$Res>
_$DietsStateErrorImpl _value, $Res Function(_$DietsStateErrorImpl) _then)
: super(_value, _then);
- /// Create a copy of DietsState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -547,9 +527,7 @@ class _$DietsStateErrorImpl implements DietsStateError {
@override
int get hashCode => Object.hash(runtimeType, errorMessage);
- /// Create a copy of DietsState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith =>
@@ -636,10 +614,7 @@ abstract class DietsStateError implements DietsState {
_$DietsStateErrorImpl;
String get errorMessage;
-
- /// Create a copy of DietsState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$DietsStateErrorImplCopyWith<_$DietsStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/presentation/bloc/feed_cubit/feed_state.freezed.dart b/lib/features/feed/presentation/bloc/feed_cubit/feed_state.freezed.dart
index 70cb30d4..779dcdb5 100644
--- a/lib/features/feed/presentation/bloc/feed_cubit/feed_state.freezed.dart
+++ b/lib/features/feed/presentation/bloc/feed_cubit/feed_state.freezed.dart
@@ -87,9 +87,6 @@ class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
-
- /// Create a copy of FeedState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -106,9 +103,6 @@ class __$$FeedStateImplCopyWithImpl<$Res>
__$$FeedStateImplCopyWithImpl(
_$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then)
: super(_value, _then);
-
- /// Create a copy of FeedState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -227,9 +221,6 @@ class __$$FeedStateLoadingImplCopyWithImpl<$Res>
__$$FeedStateLoadingImplCopyWithImpl(_$FeedStateLoadingImpl _value,
$Res Function(_$FeedStateLoadingImpl) _then)
: super(_value, _then);
-
- /// Create a copy of FeedState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -351,8 +342,6 @@ class __$$FeedStateLoadedImplCopyWithImpl<$Res>
_$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then)
: super(_value, _then);
- /// Create a copy of FeedState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -412,9 +401,7 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded {
int get hashCode => Object.hash(runtimeType,
const DeepCollectionEquality().hash(_feedBlogPostList), isLoading);
- /// Create a copy of FeedState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
@@ -507,10 +494,7 @@ abstract class FeedStateLoaded implements FeedState {
List get feedBlogPostList;
bool get isLoading;
-
- /// Create a copy of FeedState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -532,8 +516,6 @@ class __$$FeedStateErrorImplCopyWithImpl<$Res>
_$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then)
: super(_value, _then);
- /// Create a copy of FeedState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -573,9 +555,7 @@ class _$FeedStateErrorImpl implements FeedStateError {
@override
int get hashCode => Object.hash(runtimeType, errorMessage);
- /// Create a copy of FeedState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
@@ -666,10 +646,7 @@ abstract class FeedStateError implements FeedState {
_$FeedStateErrorImpl;
String get errorMessage;
-
- /// Create a copy of FeedState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/presentation/bloc/recipes_cubit/recipes_state.freezed.dart b/lib/features/feed/presentation/bloc/recipes_cubit/recipes_state.freezed.dart
index 056ef8be..e8aa88e0 100644
--- a/lib/features/feed/presentation/bloc/recipes_cubit/recipes_state.freezed.dart
+++ b/lib/features/feed/presentation/bloc/recipes_cubit/recipes_state.freezed.dart
@@ -84,9 +84,6 @@ class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState>
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
-
- /// Create a copy of RecipesState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -103,9 +100,6 @@ class __$$RecipesStateImplCopyWithImpl<$Res>
__$$RecipesStateImplCopyWithImpl(
_$RecipesStateImpl _value, $Res Function(_$RecipesStateImpl) _then)
: super(_value, _then);
-
- /// Create a copy of RecipesState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -220,9 +214,6 @@ class __$$RecipesStateLoadingImplCopyWithImpl<$Res>
__$$RecipesStateLoadingImplCopyWithImpl(_$RecipesStateLoadingImpl _value,
$Res Function(_$RecipesStateLoadingImpl) _then)
: super(_value, _then);
-
- /// Create a copy of RecipesState
- /// with the given fields replaced by the non-null parameter values.
}
/// @nodoc
@@ -341,8 +332,6 @@ class __$$RecipesStateLoadedImplCopyWithImpl<$Res>
$Res Function(_$RecipesStateLoadedImpl) _then)
: super(_value, _then);
- /// Create a copy of RecipesState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -389,9 +378,7 @@ class _$RecipesStateLoadedImpl implements RecipesStateLoaded {
int get hashCode => Object.hash(
runtimeType, const DeepCollectionEquality().hash(_recipesList));
- /// Create a copy of RecipesState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
@@ -478,10 +465,7 @@ abstract class RecipesStateLoaded implements RecipesState {
_$RecipesStateLoadedImpl;
List get recipesList;
-
- /// Create a copy of RecipesState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$RecipesStateLoadedImplCopyWith<_$RecipesStateLoadedImpl> get copyWith =>
throw _privateConstructorUsedError;
}
@@ -503,8 +487,6 @@ class __$$RecipesStateErrorImplCopyWithImpl<$Res>
$Res Function(_$RecipesStateErrorImpl) _then)
: super(_value, _then);
- /// Create a copy of RecipesState
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -544,9 +526,7 @@ class _$RecipesStateErrorImpl implements RecipesStateError {
@override
int get hashCode => Object.hash(runtimeType, errorMessage);
- /// Create a copy of RecipesState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
@@ -633,10 +613,7 @@ abstract class RecipesStateError implements RecipesState {
_$RecipesStateErrorImpl;
String get errorMessage;
-
- /// Create a copy of RecipesState
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
+ @JsonKey(ignore: true)
_$$RecipesStateErrorImplCopyWith<_$RecipesStateErrorImpl> get copyWith =>
throw _privateConstructorUsedError;
}
diff --git a/lib/features/feed/services/feed_service.g.dart b/lib/features/feed/services/feed_service.g.dart
index ab608334..6ae8ffef 100644
--- a/lib/features/feed/services/feed_service.g.dart
+++ b/lib/features/feed/services/feed_service.g.dart
@@ -390,7 +390,9 @@ class _FeedService implements FeedService {
}
RequestOptions _setStreamType(RequestOptions requestOptions) {
- if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) {
+ if (T != dynamic &&
+ !(requestOptions.responseType == ResponseType.bytes ||
+ requestOptions.responseType == ResponseType.stream)) {
if (T == String) {
requestOptions.responseType = ResponseType.plain;
} else {
diff --git a/lib/features/menu/presentation/pages/menu_screen.dart b/lib/features/menu/presentation/pages/menu_screen.dart
new file mode 100644
index 00000000..010bf6d3
--- /dev/null
+++ b/lib/features/menu/presentation/pages/menu_screen.dart
@@ -0,0 +1,119 @@
+import 'package:dio/dio.dart';
+import 'package:eatvio_app/core/constants/constants.dart';
+import 'package:eatvio_app/core/token_storage.dart';
+import 'package:eatvio_app/core/utils/image_constant.dart';
+import 'package:eatvio_app/locator_service.dart';
+import 'package:flutter/material.dart';
+import 'package:flutter_svg/flutter_svg.dart';
+import 'package:go_router/go_router.dart';
+
+class MenuScreen extends StatelessWidget {
+ const MenuScreen({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('Меню'),
+ ),
+ body: SingleChildScrollView(
+ child: Column(
+ children: [
+ _tile(
+ title: 'Настройки профиля',
+ leading: ImageConstant.icnProfileSettings,
+ onTap: () => GoRouter.of(context).push('/my-settings-screen'),
+ ),
+ _divider(context),
+ _tile(
+ leading: ImageConstant.icnRecipes,
+ title: 'Мои рецепты',
+ onTap: () => GoRouter.of(context).push('/recipe-select-screen'),
+ ),
+ _divider(context),
+ _tile(
+ leading: 'assets/icons/diets.svg',
+ title: 'Мои диеты',
+ onTap: () => GoRouter.of(context).push('/diet-select-screen'),
+ ),
+ _divider(context),
+ _tile(
+ leading: ImageConstant.icnPlans,
+ title: 'Мои планы',
+ onTap: () => GoRouter.of(context).push('/plan-select-screen'),
+ ),
+ _divider(context),
+ _tile(
+ leading: 'assets/icons/calendar.svg',
+ title: 'Календарь',
+ onTap: () => GoRouter.of(context).push('/calendar-screen'),
+ ),
+ _divider(context),
+ _tile(
+ leading: ImageConstant.icnGlossary,
+ title: 'Глоссарий',
+ onTap: () => GoRouter.of(context).push('/glossary-screen'),
+ ),
+ _divider(context),
+ _tile(
+ leading: ImageConstant.icnSupport,
+ title: 'Поддержка',
+ onTap: () {},
+ ),
+ _divider(context),
+ _tile(
+ leading: ImageConstant.icnExit,
+ title: 'Выход',
+ onTap: _onTapLogout(context),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+
+ _tile({
+ required String title,
+ required String leading,
+ required Function() onTap,
+ }) {
+ return ListTile(
+ onTap: onTap,
+ leading: SvgPicture.asset(
+ leading,
+ height: 24,
+ width: 24,
+ ),
+ title: Text(title),
+ trailing: Icon(
+ Icons.arrow_forward_ios_rounded,
+ size: 12,
+ color: Colors.black38,
+ ),
+ );
+ }
+
+ _divider(BuildContext context) {
+ return Container(
+ height: 0.4,
+ width: MediaQuery.of(context).size.width - 32,
+ decoration: BoxDecoration(
+ color: Colors.black26,
+ borderRadius: BorderRadius.circular(16),
+ ),
+ );
+ }
+
+ _onTapLogout(BuildContext context) {
+ return () async {
+ final response = await sl().post(
+ baseUrl + '/api/profile/logout',
+ );
+
+ if (response.statusCode == 204) {
+ await TokenStorage.removeTokenInStorage();
+ GoRouter.of(context).go('/auth-screen');
+ }
+ };
+ }
+}
diff --git a/lib/features/notifications/presentation/pages/notifications_screen.dart b/lib/features/notifications/presentation/pages/notifications_screen.dart
new file mode 100644
index 00000000..10947cbf
--- /dev/null
+++ b/lib/features/notifications/presentation/pages/notifications_screen.dart
@@ -0,0 +1,27 @@
+import 'package:eatvio_app/core/app_export.dart';
+import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_cubit.dart';
+import 'package:eatvio_app/features/bottom_navigation_bar/presentation/bloc/notifications_cubit/notifications_state.dart';
+import 'package:flutter/material.dart';
+
+class NotificationsScreen extends StatelessWidget {
+ const NotificationsScreen({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return BlocBuilder(
+ builder: (BuildContext context, NotificationsState state) {
+ return Scaffold(
+ appBar: AppBar(
+ title: Text('Уведомления'),
+ ),
+ body: SingleChildScrollView(
+ padding: EdgeInsets.all(16),
+ child: Text(
+ state is NotificationsStateLoaded ? state.notifications.toString() : 'Уведомлений нет',
+ ),
+ ),
+ );
+ },
+ );
+ }
+}
diff --git a/lib/features/profile/models/profile_model.dart b/lib/features/profile/models/profile_model.dart
index 8ecf3b4f..6c72a1fa 100644
--- a/lib/features/profile/models/profile_model.dart
+++ b/lib/features/profile/models/profile_model.dart
@@ -1,24 +1,38 @@
import 'package:freezed_annotation/freezed_annotation.dart';
-
part 'profile_model.freezed.dart';
part 'profile_model.g.dart';
@freezed
-class Profile with _$Profile {
- const factory Profile({
+class ProfileModel with _$ProfileModel {
+ const factory ProfileModel({
@JsonKey(name: "user") required User user,
- @JsonKey(name: "chartPoints") required List chartPoints,
+ @JsonKey(name: "chartPoints") required List chartPoints,
@JsonKey(name: "userDetails") required UserDetails userDetails,
- @JsonKey(name: "circumferences") required List circumferences,
+ @JsonKey(name: "circumferences") required List circumferences,
@JsonKey(name: "finishedPlans") required List finishedPlans,
@JsonKey(name: "rejectedPlans") required List rejectedPlans,
@JsonKey(name: "startedPlan") required List startedPlan,
@JsonKey(name: "paidPlan") required List paidPlan,
@JsonKey(name: "requestedPlan") required List requestedPlan,
@JsonKey(name: "initedPlan") required List initedPlan,
- }) = _Profile;
+ }) = _ProfileModel;
- factory Profile.fromJson(Map json) => _$ProfileFromJson(json);
+ factory ProfileModel.fromJson(Map json) => _$ProfileModelFromJson(json);
+}
+
+@freezed
+class Circumference with _$Circumference {
+ const factory Circumference({
+ @JsonKey(name: "id") required int id,
+ @JsonKey(name: "user_id") required int userId,
+ @JsonKey(name: "chest_circumference") required int chestCircumference,
+ @JsonKey(name: "waist_circumference") required int waistCircumference,
+ @JsonKey(name: "hip_circumference") required int hipCircumference,
+ @JsonKey(name: "created_at") required DateTime createdAt,
+ @JsonKey(name: "updated_at") required DateTime updatedAt,
+ }) = _Circumference;
+
+ factory Circumference.fromJson(Map json) => _$CircumferenceFromJson(json);
}
@freezed
@@ -41,7 +55,7 @@ class User with _$User {
@JsonKey(name: "detailz") required UserDetails detailz,
}) = _User;
- factory User.fromJson(Map json) => _$UserFromJson(json);
+ factory User.fromJson(Map json) => _$UserFromJson(json);
}
@freezed
@@ -78,5 +92,19 @@ class UserDetails with _$UserDetails {
@JsonKey(name: "activity_coefficient") required double activityCoefficient,
}) = _UserDetails;
- factory UserDetails.fromJson(Map json) => _$UserDetailsFromJson(json);
+ factory UserDetails.fromJson(Map json) => _$UserDetailsFromJson(json);
+}
+
+@freezed
+class ChartPoint with _$ChartPoint {
+ const factory ChartPoint({
+ @JsonKey(name: "id") required int id,
+ @JsonKey(name: "user_id") required int userId,
+ @JsonKey(name: "weight") required int weight,
+ @JsonKey(name: "bmi") required String bmi,
+ @JsonKey(name: "created_at") required DateTime createdAt,
+ @JsonKey(name: "updated_at") required DateTime updatedAt,
+ }) = _ChartPoint;
+
+ factory ChartPoint.fromJson(Map json) => _$ChartPointFromJson(json);
}
diff --git a/lib/features/profile/models/profile_model.freezed.dart b/lib/features/profile/models/profile_model.freezed.dart
index 5319ba7c..0e5607b4 100644
--- a/lib/features/profile/models/profile_model.freezed.dart
+++ b/lib/features/profile/models/profile_model.freezed.dart
@@ -14,20 +14,20 @@ 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#adding-getters-and-methods-to-our-models');
-Profile _$ProfileFromJson(Map json) {
- return _Profile.fromJson(json);
+ProfileModel _$ProfileModelFromJson(Map json) {
+ return _ProfileModel.fromJson(json);
}
/// @nodoc
-mixin _$Profile {
+mixin _$ProfileModel {
@JsonKey(name: "user")
User get user => throw _privateConstructorUsedError;
@JsonKey(name: "chartPoints")
- List get chartPoints => throw _privateConstructorUsedError;
+ List get chartPoints => throw _privateConstructorUsedError;
@JsonKey(name: "userDetails")
UserDetails get userDetails => throw _privateConstructorUsedError;
@JsonKey(name: "circumferences")
- List get circumferences => throw _privateConstructorUsedError;
+ List get circumferences => throw _privateConstructorUsedError;
@JsonKey(name: "finishedPlans")
List get finishedPlans => throw _privateConstructorUsedError;
@JsonKey(name: "rejectedPlans")
@@ -41,25 +41,23 @@ mixin _$Profile {
@JsonKey(name: "initedPlan")
List get initedPlan => throw _privateConstructorUsedError;
- /// Serializes this Profile to a JSON map.
Map toJson() => throw _privateConstructorUsedError;
-
- /// Create a copy of Profile
- /// with the given fields replaced by the non-null parameter values.
- @JsonKey(includeFromJson: false, includeToJson: false)
- $ProfileCopyWith get copyWith => throw _privateConstructorUsedError;
+ @JsonKey(ignore: true)
+ $ProfileModelCopyWith get copyWith =>
+ throw _privateConstructorUsedError;
}
/// @nodoc
-abstract class $ProfileCopyWith<$Res> {
- factory $ProfileCopyWith(Profile value, $Res Function(Profile) then) =
- _$ProfileCopyWithImpl<$Res, Profile>;
+abstract class $ProfileModelCopyWith<$Res> {
+ factory $ProfileModelCopyWith(
+ ProfileModel value, $Res Function(ProfileModel) then) =
+ _$ProfileModelCopyWithImpl<$Res, ProfileModel>;
@useResult
$Res call(
{@JsonKey(name: "user") User user,
- @JsonKey(name: "chartPoints") List chartPoints,
+ @JsonKey(name: "chartPoints") List chartPoints,
@JsonKey(name: "userDetails") UserDetails userDetails,
- @JsonKey(name: "circumferences") List circumferences,
+ @JsonKey(name: "circumferences") List circumferences,
@JsonKey(name: "finishedPlans") List finishedPlans,
@JsonKey(name: "rejectedPlans") List rejectedPlans,
@JsonKey(name: "startedPlan") List startedPlan,
@@ -72,17 +70,15 @@ abstract class $ProfileCopyWith<$Res> {
}
/// @nodoc
-class _$ProfileCopyWithImpl<$Res, $Val extends Profile>
- implements $ProfileCopyWith<$Res> {
- _$ProfileCopyWithImpl(this._value, this._then);
+class _$ProfileModelCopyWithImpl<$Res, $Val extends ProfileModel>
+ implements $ProfileModelCopyWith<$Res> {
+ _$ProfileModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
- /// Create a copy of Profile
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -105,7 +101,7 @@ class _$ProfileCopyWithImpl<$Res, $Val extends Profile>
chartPoints: null == chartPoints
? _value.chartPoints
: chartPoints // ignore: cast_nullable_to_non_nullable
- as List,
+ as List,
userDetails: null == userDetails
? _value.userDetails
: userDetails // ignore: cast_nullable_to_non_nullable
@@ -113,7 +109,7 @@ class _$ProfileCopyWithImpl<$Res, $Val extends Profile>
circumferences: null == circumferences
? _value.circumferences
: circumferences // ignore: cast_nullable_to_non_nullable
- as List,
+ as List,
finishedPlans: null == finishedPlans
? _value.finishedPlans
: finishedPlans // ignore: cast_nullable_to_non_nullable
@@ -141,8 +137,6 @@ class _$ProfileCopyWithImpl<$Res, $Val extends Profile>
) as $Val);
}
- /// Create a copy of Profile
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserCopyWith<$Res> get user {
@@ -151,8 +145,6 @@ class _$ProfileCopyWithImpl<$Res, $Val extends Profile>
});
}
- /// Create a copy of Profile
- /// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$UserDetailsCopyWith<$Res> get userDetails {
@@ -163,17 +155,18 @@ class _$ProfileCopyWithImpl<$Res, $Val extends Profile>
}
/// @nodoc
-abstract class _$$ProfileImplCopyWith<$Res> implements $ProfileCopyWith<$Res> {
- factory _$$ProfileImplCopyWith(
- _$ProfileImpl value, $Res Function(_$ProfileImpl) then) =
- __$$ProfileImplCopyWithImpl<$Res>;
+abstract class _$$ProfileModelImplCopyWith<$Res>
+ implements $ProfileModelCopyWith<$Res> {
+ factory _$$ProfileModelImplCopyWith(
+ _$ProfileModelImpl value, $Res Function(_$ProfileModelImpl) then) =
+ __$$ProfileModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{@JsonKey(name: "user") User user,
- @JsonKey(name: "chartPoints") List chartPoints,
+ @JsonKey(name: "chartPoints") List chartPoints,
@JsonKey(name: "userDetails") UserDetails userDetails,
- @JsonKey(name: "circumferences") List circumferences,
+ @JsonKey(name: "circumferences") List circumferences,
@JsonKey(name: "finishedPlans") List finishedPlans,
@JsonKey(name: "rejectedPlans") List rejectedPlans,
@JsonKey(name: "startedPlan") List startedPlan,
@@ -188,15 +181,13 @@ abstract class _$$ProfileImplCopyWith<$Res> implements $ProfileCopyWith<$Res> {
}
/// @nodoc
-class __$$ProfileImplCopyWithImpl<$Res>
- extends _$ProfileCopyWithImpl<$Res, _$ProfileImpl>
- implements _$$ProfileImplCopyWith<$Res> {
- __$$ProfileImplCopyWithImpl(
- _$ProfileImpl _value, $Res Function(_$ProfileImpl) _then)
+class __$$ProfileModelImplCopyWithImpl<$Res>
+ extends _$ProfileModelCopyWithImpl<$Res, _$ProfileModelImpl>
+ implements _$$ProfileModelImplCopyWith<$Res> {
+ __$$ProfileModelImplCopyWithImpl(
+ _$ProfileModelImpl _value, $Res Function(_$ProfileModelImpl) _then)
: super(_value, _then);
- /// Create a copy of Profile
- /// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
@@ -211,7 +202,7 @@ class __$$ProfileImplCopyWithImpl<$Res>
Object? requestedPlan = null,
Object? initedPlan = null,
}) {
- return _then(_$ProfileImpl(
+ return _then(_$ProfileModelImpl(
user: null == user
? _value.user
: user // ignore: cast_nullable_to_non_nullable
@@ -219,7 +210,7 @@ class __$$ProfileImplCopyWithImpl<$Res>
chartPoints: null == chartPoints
? _value._chartPoints
: chartPoints // ignore: cast_nullable_to_non_nullable
- as List,
+ as List,
userDetails: null == userDetails
? _value.userDetails
: userDetails // ignore: cast_nullable_to_non_nullable
@@ -227,7 +218,7 @@ class __$$ProfileImplCopyWithImpl<$Res>
circumferences: null == circumferences
? _value._circumferences
: circumferences // ignore: cast_nullable_to_non_nullable
- as List