From fa817548d9005a36139e39d8ed98171ed61048b2 Mon Sep 17 00:00:00 2001 From: Username1548 Date: Tue, 18 Mar 2025 14:33:51 +0700 Subject: [PATCH] chat has been updated --- .../selection_popup_model.freezed.dart | 139 +- lib/core/models/pagination_model.freezed.dart | 591 ++--- lib/core/models/pagination_model.g.dart | 41 +- .../models/credentials_model.freezed.dart | 96 +- .../auth/models/credentials_model.g.dart | 17 +- .../auth/models/token_model.freezed.dart | 61 +- lib/features/auth/models/token_model.g.dart | 8 +- .../presentation/bloc/auth_state.freezed.dart | 115 +- .../blog_post_create_state.freezed.dart | 117 +- .../services/blog_post_service.g.dart | 20 +- .../new_messages_state.freezed.dart | 134 +- .../notifications_state.freezed.dart | 228 +- .../profile_avatar_state.freezed.dart | 145 +- .../models/calendar_model.freezed.dart | 130 +- .../bloc/calendar_state.freezed.dart | 146 +- .../calendar/services/calendar_service.g.dart | 12 +- .../models/chat_message_model.freezed.dart | 299 +-- .../chat/models/chat_message_model.g.dart | 44 +- .../models/chat_messages_model.freezed.dart | 131 +- .../chat/models/chat_messages_model.g.dart | 18 +- .../chat/models/chat_meta_model.freezed.dart | 72 +- .../chat/models/chat_meta_model.g.dart | 8 +- .../chat/models/chat_room_model.freezed.dart | 270 ++- .../chat/models/chat_room_model.g.dart | 15 +- .../chat_room_pagination_model.freezed.dart | 741 +++--- .../models/chat_room_pagination_model.g.dart | 37 +- .../chat_room_settings_model.freezed.dart | 205 +- .../models/chat_room_settings_model.g.dart | 32 +- lib/features/chat/models/chat_user_model.dart | 1 + .../chat/models/chat_user_model.freezed.dart | 186 +- .../chat/models/chat_user_model.g.dart | 2 + .../models/websocket_info_model.freezed.dart | 186 +- .../chat/models/websocket_info_model.g.dart | 32 +- .../chat_room_state.freezed.dart | 346 +-- .../bloc/chats_cubit/chats_state.freezed.dart | 199 +- .../chat/presentation/pages/chat_screen.dart | 72 +- .../widgets/about_order_button.dart | 53 + .../chat/presentation/widgets/order_card.dart | 6 +- .../chat/services/chat_service.g.dart | 10 +- .../models/complain_model.freezed.dart | 100 +- .../complaining/models/complain_model.g.dart | 2 +- .../cubit/complaining_state.freezed.dart | 245 +- .../consultant_profile_model.freezed.dart | 516 +++-- .../models/consultant_profile_model.g.dart | 88 +- .../register_consultant_state.freezed.dart | 114 +- .../services/consultant_service.g.dart | 10 +- .../models/rating_model.freezed.dart | 105 +- .../models/create_diet_model.freezed.dart | 288 +-- .../cubit/create_diet_state.freezed.dart | 515 +++-- .../services/create_diet_service.g.dart | 60 +- .../models/create_plan_model.freezed.dart | 253 ++- .../cubit/create_plan_state.freezed.dart | 189 +- .../services/create_plan_service.g.dart | 10 +- .../recipe_create_entity.freezed.dart | 533 +++-- .../models/ingredient.freezed.dart | 105 +- .../create_recipe/models/product.freezed.dart | 76 +- .../create_recipe/models/product.g.dart | 5 +- .../models/recipe_create_model.freezed.dart | 406 ++-- .../models/recipe_create_model.g.dart | 62 +- .../models/recipe_model.freezed.dart | 425 ++-- .../create_recipe/models/recipe_model.g.dart | 24 +- .../models/recipe_tag_model.freezed.dart | 320 +-- .../models/recipe_tag_model.g.dart | 19 +- .../create_recipe/models/step.freezed.dart | 73 +- lib/features/create_recipe/models/step.g.dart | 6 +- .../create_recipe_state.freezed.dart | 308 +-- .../services/recipe_service.g.dart | 10 +- .../diary/models/diary_day_model.freezed.dart | 1248 +++++----- .../diary/models/diary_day_model.g.dart | 88 +- .../models/diary_index_model.freezed.dart | 67 +- .../diary/models/diary_index_model.g.dart | 12 +- .../finish_diary_day_model.freezed.dart | 96 +- .../models/finish_diary_day_model.g.dart | 17 +- .../diary/models/nutrition_model.freezed.dart | 275 ++- .../diary/models/nutrition_model.g.dart | 40 +- .../product_moderation_model.freezed.dart | 205 +- .../models/product_moderation_model.g.dart | 32 +- .../bloc/diary_state.freezed.dart | 328 ++- .../diary/services/diary_service.g.dart | 22 +- .../models/diet_likes_model.freezed.dart | 116 +- .../diets/models/diet_likes_model.g.dart | 10 +- .../cubit/about_diet_state.freezed.dart | 180 +- .../feed/models/comment_model.freezed.dart | 368 +-- lib/features/feed/models/comment_model.g.dart | 14 +- .../diets_pagination_model.freezed.dart | 1478 ++++++------ .../feed/models/diets_pagination_model.g.dart | 173 +- .../models/feed_blog_post_model.freezed.dart | 427 ++-- .../feed/models/feed_blog_post_model.g.dart | 64 +- ...feed_blog_post_settings_model.freezed.dart | 154 +- .../feed_blog_post_settings_model.g.dart | 21 +- .../models/feed_consultant_model.freezed.dart | 421 ++-- .../feed/models/feed_consultant_model.g.dart | 81 +- .../models/plan_pagination_model.freezed.dart | 1069 +++++---- .../feed/models/plan_pagination_model.g.dart | 55 +- .../feed/models/recipes_model.freezed.dart | 822 ++++--- lib/features/feed/models/recipes_model.g.dart | 20 +- .../recipes_pagination_model.freezed.dart | 91 +- .../models/recipes_pagination_model.g.dart | 15 +- .../comments_state.freezed.dart | 141 +- .../consultants_state.freezed.dart | 241 +- .../bloc/diets_cubit/diets_state.freezed.dart | 271 ++- .../bloc/feed_cubit/feed_state.freezed.dart | 203 +- .../bloc/plans_cubit/plans_state.freezed.dart | 323 +-- .../profile_cubit/profile_state.freezed.dart | 57 +- .../recipes_cubit/recipes_state.freezed.dart | 237 +- .../models/glossary_model.freezed.dart | 585 ++--- .../glossary/models/glossary_model.g.dart | 32 +- .../cubit/my_diets_state.freezed.dart | 420 ++-- .../cubit/my_plans_state.freezed.dart | 379 ++-- .../models/chosen_plan_model.freezed.dart | 250 +- .../plans/models/chosen_plan_model.g.dart | 44 +- .../cubit/about_plan_state.freezed.dart | 153 +- .../profile/models/badge_model.freezed.dart | 169 +- ...chosen_diets_pagination_model.freezed.dart | 302 +-- .../chosen_diets_pagination_model.g.dart | 47 +- .../models/circumference_model.freezed.dart | 252 ++- .../profile/models/circumference_model.g.dart | 40 +- .../profile/models/profile_model.freezed.dart | 2011 +++++++++-------- .../profile/models/profile_model.g.dart | 268 +-- .../profile/models/sub_model.freezed.dart | 517 +++-- lib/features/profile/models/sub_model.g.dart | 25 +- .../profile/models/weight_model.freezed.dart | 203 +- .../bloc/plans_cubit/plans_state.freezed.dart | 130 +- .../profile_cubit/profile_state.freezed.dart | 450 ++-- .../bloc/sub_cubit/sub_state.freezed.dart | 109 +- .../profile/services/profile_service.g.dart | 71 +- .../cubit/about_recipe_state.freezed.dart | 141 +- .../models/location_model.freezed.dart | 124 +- .../user_registration_model.freezed.dart | 871 +++---- .../models/user_registration_model.g.dart | 126 +- .../registration_state.freezed.dart | 70 +- .../profile_settings_model.freezed.dart | 236 +- .../models/profile_settings_model.g.dart | 32 +- .../settings_state.freezed.dart | 300 ++- .../cubit/user_details_state.freezed.dart | 210 +- lib/generated/intl/messages_all.dart | 13 +- lib/generated/intl/messages_en.dart | 1049 +++++---- lib/generated/intl/messages_ru.dart | 646 +++--- lib/generated/l10n.dart | 974 ++------ lib/l10n/intl_en.arb | 3 +- 140 files changed, 16501 insertions(+), 14065 deletions(-) create mode 100644 lib/features/chat/presentation/widgets/about_order_button.dart diff --git a/lib/core/data/selectionPopupModel/selection_popup_model.freezed.dart b/lib/core/data/selectionPopupModel/selection_popup_model.freezed.dart index 97ab368c..5270e0b2 100644 --- a/lib/core/data/selectionPopupModel/selection_popup_model.freezed.dart +++ b/lib/core/data/selectionPopupModel/selection_popup_model.freezed.dart @@ -12,7 +12,8 @@ part of 'selection_popup_model.dart'; 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'); + '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 _$SelectionPopupModel { @@ -31,8 +32,9 @@ mixin _$SelectionPopupModel { /// @nodoc abstract class $SelectionPopupModelCopyWith<$Res> { factory $SelectionPopupModelCopyWith( - SelectionPopupModel value, $Res Function(SelectionPopupModel) then) = - _$SelectionPopupModelCopyWithImpl<$Res, SelectionPopupModel>; + SelectionPopupModel value, + $Res Function(SelectionPopupModel) then, + ) = _$SelectionPopupModelCopyWithImpl<$Res, SelectionPopupModel>; @useResult $Res call({int? id, String title, dynamic value, bool isSelected}); } @@ -57,33 +59,41 @@ class _$SelectionPopupModelCopyWithImpl<$Res, $Val extends SelectionPopupModel> Object? value = freezed, Object? isSelected = null, }) { - return _then(_value.copyWith( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - value: freezed == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as dynamic, - isSelected: null == isSelected - ? _value.isSelected - : isSelected // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + return _then( + _value.copyWith( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + value: + freezed == value + ? _value.value + : value // ignore: cast_nullable_to_non_nullable + as dynamic, + isSelected: + null == isSelected + ? _value.isSelected + : isSelected // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } } /// @nodoc abstract class _$$SelectionPopupModelImplCopyWith<$Res> implements $SelectionPopupModelCopyWith<$Res> { - factory _$$SelectionPopupModelImplCopyWith(_$SelectionPopupModelImpl value, - $Res Function(_$SelectionPopupModelImpl) then) = - __$$SelectionPopupModelImplCopyWithImpl<$Res>; + factory _$$SelectionPopupModelImplCopyWith( + _$SelectionPopupModelImpl value, + $Res Function(_$SelectionPopupModelImpl) then, + ) = __$$SelectionPopupModelImplCopyWithImpl<$Res>; @override @useResult $Res call({int? id, String title, dynamic value, bool isSelected}); @@ -93,9 +103,10 @@ abstract class _$$SelectionPopupModelImplCopyWith<$Res> class __$$SelectionPopupModelImplCopyWithImpl<$Res> extends _$SelectionPopupModelCopyWithImpl<$Res, _$SelectionPopupModelImpl> implements _$$SelectionPopupModelImplCopyWith<$Res> { - __$$SelectionPopupModelImplCopyWithImpl(_$SelectionPopupModelImpl _value, - $Res Function(_$SelectionPopupModelImpl) _then) - : super(_value, _then); + __$$SelectionPopupModelImplCopyWithImpl( + _$SelectionPopupModelImpl _value, + $Res Function(_$SelectionPopupModelImpl) _then, + ) : super(_value, _then); /// Create a copy of SelectionPopupModel /// with the given fields replaced by the non-null parameter values. @@ -107,32 +118,42 @@ class __$$SelectionPopupModelImplCopyWithImpl<$Res> Object? value = freezed, Object? isSelected = null, }) { - return _then(_$SelectionPopupModelImpl( - id: freezed == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int?, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - value: freezed == value - ? _value.value - : value // ignore: cast_nullable_to_non_nullable - as dynamic, - isSelected: null == isSelected - ? _value.isSelected - : isSelected // ignore: cast_nullable_to_non_nullable - as bool, - )); + return _then( + _$SelectionPopupModelImpl( + id: + freezed == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int?, + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + value: + freezed == value + ? _value.value + : value // ignore: cast_nullable_to_non_nullable + as dynamic, + isSelected: + null == isSelected + ? _value.isSelected + : isSelected // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } /// @nodoc class _$SelectionPopupModelImpl implements _SelectionPopupModel { - const _$SelectionPopupModelImpl( - {this.id, required this.title, this.value, this.isSelected = false}); + const _$SelectionPopupModelImpl({ + this.id, + required this.title, + this.value, + this.isSelected = false, + }); @override final int? id; @@ -162,8 +183,13 @@ class _$SelectionPopupModelImpl implements _SelectionPopupModel { } @override - int get hashCode => Object.hash(runtimeType, id, title, - const DeepCollectionEquality().hash(value), isSelected); + 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. @@ -172,15 +198,18 @@ class _$SelectionPopupModelImpl implements _SelectionPopupModel { @pragma('vm:prefer-inline') _$$SelectionPopupModelImplCopyWith<_$SelectionPopupModelImpl> get copyWith => __$$SelectionPopupModelImplCopyWithImpl<_$SelectionPopupModelImpl>( - this, _$identity); + this, + _$identity, + ); } abstract class _SelectionPopupModel implements SelectionPopupModel { - const factory _SelectionPopupModel( - {final int? id, - required final String title, - final dynamic value, - final bool isSelected}) = _$SelectionPopupModelImpl; + const factory _SelectionPopupModel({ + final int? id, + required final String title, + final dynamic value, + final bool isSelected, + }) = _$SelectionPopupModelImpl; @override int? get id; diff --git a/lib/core/models/pagination_model.freezed.dart b/lib/core/models/pagination_model.freezed.dart index 4d014abf..daeb8b5f 100644 --- a/lib/core/models/pagination_model.freezed.dart +++ b/lib/core/models/pagination_model.freezed.dart @@ -12,7 +12,8 @@ part of 'pagination_model.dart'; 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'); + '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', +); Links _$LinksFromJson(Map json) { return _Links.fromJson(json); @@ -43,11 +44,12 @@ abstract class $LinksCopyWith<$Res> { factory $LinksCopyWith(Links value, $Res Function(Links) then) = _$LinksCopyWithImpl<$Res, Links>; @useResult - $Res call( - {@JsonKey(name: "first") String first, - @JsonKey(name: "last") String last, - @JsonKey(name: "prev") dynamic prev, - @JsonKey(name: "next") dynamic next}); + $Res call({ + @JsonKey(name: "first") String first, + @JsonKey(name: "last") String last, + @JsonKey(name: "prev") dynamic prev, + @JsonKey(name: "next") dynamic next, + }); } /// @nodoc @@ -70,39 +72,48 @@ class _$LinksCopyWithImpl<$Res, $Val extends Links> Object? prev = freezed, Object? next = freezed, }) { - return _then(_value.copyWith( - first: null == first - ? _value.first - : first // ignore: cast_nullable_to_non_nullable - as String, - last: null == last - ? _value.last - : last // ignore: cast_nullable_to_non_nullable - as String, - prev: freezed == prev - ? _value.prev - : prev // ignore: cast_nullable_to_non_nullable - as dynamic, - next: freezed == next - ? _value.next - : next // ignore: cast_nullable_to_non_nullable - as dynamic, - ) as $Val); + return _then( + _value.copyWith( + first: + null == first + ? _value.first + : first // ignore: cast_nullable_to_non_nullable + as String, + last: + null == last + ? _value.last + : last // ignore: cast_nullable_to_non_nullable + as String, + prev: + freezed == prev + ? _value.prev + : prev // ignore: cast_nullable_to_non_nullable + as dynamic, + next: + freezed == next + ? _value.next + : next // ignore: cast_nullable_to_non_nullable + as dynamic, + ) + as $Val, + ); } } /// @nodoc abstract class _$$LinksImplCopyWith<$Res> implements $LinksCopyWith<$Res> { factory _$$LinksImplCopyWith( - _$LinksImpl value, $Res Function(_$LinksImpl) then) = - __$$LinksImplCopyWithImpl<$Res>; + _$LinksImpl value, + $Res Function(_$LinksImpl) then, + ) = __$$LinksImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "first") String first, - @JsonKey(name: "last") String last, - @JsonKey(name: "prev") dynamic prev, - @JsonKey(name: "next") dynamic next}); + $Res call({ + @JsonKey(name: "first") String first, + @JsonKey(name: "last") String last, + @JsonKey(name: "prev") dynamic prev, + @JsonKey(name: "next") dynamic next, + }); } /// @nodoc @@ -110,8 +121,9 @@ class __$$LinksImplCopyWithImpl<$Res> extends _$LinksCopyWithImpl<$Res, _$LinksImpl> implements _$$LinksImplCopyWith<$Res> { __$$LinksImplCopyWithImpl( - _$LinksImpl _value, $Res Function(_$LinksImpl) _then) - : super(_value, _then); + _$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. @@ -123,35 +135,42 @@ class __$$LinksImplCopyWithImpl<$Res> Object? prev = freezed, Object? next = freezed, }) { - return _then(_$LinksImpl( - first: null == first - ? _value.first - : first // ignore: cast_nullable_to_non_nullable - as String, - last: null == last - ? _value.last - : last // ignore: cast_nullable_to_non_nullable - as String, - prev: freezed == prev - ? _value.prev - : prev // ignore: cast_nullable_to_non_nullable - as dynamic, - next: freezed == next - ? _value.next - : next // ignore: cast_nullable_to_non_nullable - as dynamic, - )); + return _then( + _$LinksImpl( + first: + null == first + ? _value.first + : first // ignore: cast_nullable_to_non_nullable + as String, + last: + null == last + ? _value.last + : last // ignore: cast_nullable_to_non_nullable + as String, + prev: + freezed == prev + ? _value.prev + : prev // ignore: cast_nullable_to_non_nullable + as dynamic, + next: + freezed == next + ? _value.next + : next // ignore: cast_nullable_to_non_nullable + as dynamic, + ), + ); } } /// @nodoc @JsonSerializable() class _$LinksImpl implements _Links { - const _$LinksImpl( - {@JsonKey(name: "first") required this.first, - @JsonKey(name: "last") required this.last, - @JsonKey(name: "prev") required this.prev, - @JsonKey(name: "next") required this.next}); + const _$LinksImpl({ + @JsonKey(name: "first") required this.first, + @JsonKey(name: "last") required this.last, + @JsonKey(name: "prev") required this.prev, + @JsonKey(name: "next") required this.next, + }); factory _$LinksImpl.fromJson(Map json) => _$$LinksImplFromJson(json); @@ -188,11 +207,12 @@ class _$LinksImpl implements _Links { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - first, - last, - const DeepCollectionEquality().hash(prev), - const DeepCollectionEquality().hash(next)); + runtimeType, + first, + last, + const DeepCollectionEquality().hash(prev), + const DeepCollectionEquality().hash(next), + ); /// Create a copy of Links /// with the given fields replaced by the non-null parameter values. @@ -204,18 +224,17 @@ class _$LinksImpl implements _Links { @override Map toJson() { - return _$$LinksImplToJson( - this, - ); + return _$$LinksImplToJson(this); } } abstract class _Links implements Links { - const factory _Links( - {@JsonKey(name: "first") required final String first, - @JsonKey(name: "last") required final String last, - @JsonKey(name: "prev") required final dynamic prev, - @JsonKey(name: "next") required final dynamic next}) = _$LinksImpl; + const factory _Links({ + @JsonKey(name: "first") required final String first, + @JsonKey(name: "last") required final String last, + @JsonKey(name: "prev") required final dynamic prev, + @JsonKey(name: "next") required final dynamic next, + }) = _$LinksImpl; factory _Links.fromJson(Map json) = _$LinksImpl.fromJson; @@ -281,17 +300,18 @@ abstract class $MetaCopyWith<$Res> { factory $MetaCopyWith(Meta value, $Res Function(Meta) then) = _$MetaCopyWithImpl<$Res, Meta>; @useResult - $Res call( - {@JsonKey(name: "current_page") int currentPage, - @JsonKey(name: "from") dynamic from, - @JsonKey(name: "last_page") int lastPage, - @JsonKey(name: "links") List links, - @JsonKey(name: "path") String? path, - @JsonKey(name: "per_page") int perPage, - @JsonKey(name: "to") dynamic to, - @JsonKey(name: "total") int total, - @JsonKey(name: "total_min_price") int? totalMinPrice, - @JsonKey(name: "total_max_price") int? totalMaxPrice}); + $Res call({ + @JsonKey(name: "current_page") int currentPage, + @JsonKey(name: "from") dynamic from, + @JsonKey(name: "last_page") int lastPage, + @JsonKey(name: "links") List links, + @JsonKey(name: "path") String? path, + @JsonKey(name: "per_page") int perPage, + @JsonKey(name: "to") dynamic to, + @JsonKey(name: "total") int total, + @JsonKey(name: "total_min_price") int? totalMinPrice, + @JsonKey(name: "total_max_price") int? totalMaxPrice, + }); } /// @nodoc @@ -320,69 +340,84 @@ class _$MetaCopyWithImpl<$Res, $Val extends Meta> Object? totalMinPrice = freezed, Object? totalMaxPrice = freezed, }) { - return _then(_value.copyWith( - currentPage: null == currentPage - ? _value.currentPage - : currentPage // ignore: cast_nullable_to_non_nullable - as int, - from: freezed == from - ? _value.from - : from // ignore: cast_nullable_to_non_nullable - as dynamic, - lastPage: null == lastPage - ? _value.lastPage - : lastPage // ignore: cast_nullable_to_non_nullable - as int, - links: null == links - ? _value.links - : links // ignore: cast_nullable_to_non_nullable - as List, - path: freezed == path - ? _value.path - : path // ignore: cast_nullable_to_non_nullable - as String?, - perPage: null == perPage - ? _value.perPage - : perPage // ignore: cast_nullable_to_non_nullable - as int, - to: freezed == to - ? _value.to - : to // ignore: cast_nullable_to_non_nullable - as dynamic, - total: null == total - ? _value.total - : total // ignore: cast_nullable_to_non_nullable - as int, - totalMinPrice: freezed == totalMinPrice - ? _value.totalMinPrice - : totalMinPrice // ignore: cast_nullable_to_non_nullable - as int?, - totalMaxPrice: freezed == totalMaxPrice - ? _value.totalMaxPrice - : totalMaxPrice // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); + return _then( + _value.copyWith( + currentPage: + null == currentPage + ? _value.currentPage + : currentPage // ignore: cast_nullable_to_non_nullable + as int, + from: + freezed == from + ? _value.from + : from // ignore: cast_nullable_to_non_nullable + as dynamic, + lastPage: + null == lastPage + ? _value.lastPage + : lastPage // ignore: cast_nullable_to_non_nullable + as int, + links: + null == links + ? _value.links + : links // ignore: cast_nullable_to_non_nullable + as List, + path: + freezed == path + ? _value.path + : path // ignore: cast_nullable_to_non_nullable + as String?, + perPage: + null == perPage + ? _value.perPage + : perPage // ignore: cast_nullable_to_non_nullable + as int, + to: + freezed == to + ? _value.to + : to // ignore: cast_nullable_to_non_nullable + as dynamic, + total: + null == total + ? _value.total + : total // ignore: cast_nullable_to_non_nullable + as int, + totalMinPrice: + freezed == totalMinPrice + ? _value.totalMinPrice + : totalMinPrice // ignore: cast_nullable_to_non_nullable + as int?, + totalMaxPrice: + freezed == totalMaxPrice + ? _value.totalMaxPrice + : totalMaxPrice // ignore: cast_nullable_to_non_nullable + as int?, + ) + as $Val, + ); } } /// @nodoc abstract class _$$MetaImplCopyWith<$Res> implements $MetaCopyWith<$Res> { factory _$$MetaImplCopyWith( - _$MetaImpl value, $Res Function(_$MetaImpl) then) = - __$$MetaImplCopyWithImpl<$Res>; + _$MetaImpl value, + $Res Function(_$MetaImpl) then, + ) = __$$MetaImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "current_page") int currentPage, - @JsonKey(name: "from") dynamic from, - @JsonKey(name: "last_page") int lastPage, - @JsonKey(name: "links") List links, - @JsonKey(name: "path") String? path, - @JsonKey(name: "per_page") int perPage, - @JsonKey(name: "to") dynamic to, - @JsonKey(name: "total") int total, - @JsonKey(name: "total_min_price") int? totalMinPrice, - @JsonKey(name: "total_max_price") int? totalMaxPrice}); + $Res call({ + @JsonKey(name: "current_page") int currentPage, + @JsonKey(name: "from") dynamic from, + @JsonKey(name: "last_page") int lastPage, + @JsonKey(name: "links") List links, + @JsonKey(name: "path") String? path, + @JsonKey(name: "per_page") int perPage, + @JsonKey(name: "to") dynamic to, + @JsonKey(name: "total") int total, + @JsonKey(name: "total_min_price") int? totalMinPrice, + @JsonKey(name: "total_max_price") int? totalMaxPrice, + }); } /// @nodoc @@ -390,7 +425,7 @@ class __$$MetaImplCopyWithImpl<$Res> extends _$MetaCopyWithImpl<$Res, _$MetaImpl> implements _$$MetaImplCopyWith<$Res> { __$$MetaImplCopyWithImpl(_$MetaImpl _value, $Res Function(_$MetaImpl) _then) - : super(_value, _then); + : super(_value, _then); /// Create a copy of Meta /// with the given fields replaced by the non-null parameter values. @@ -408,66 +443,78 @@ class __$$MetaImplCopyWithImpl<$Res> Object? totalMinPrice = freezed, Object? totalMaxPrice = freezed, }) { - return _then(_$MetaImpl( - currentPage: null == currentPage - ? _value.currentPage - : currentPage // ignore: cast_nullable_to_non_nullable - as int, - from: freezed == from - ? _value.from - : from // ignore: cast_nullable_to_non_nullable - as dynamic, - lastPage: null == lastPage - ? _value.lastPage - : lastPage // ignore: cast_nullable_to_non_nullable - as int, - links: null == links - ? _value._links - : links // ignore: cast_nullable_to_non_nullable - as List, - path: freezed == path - ? _value.path - : path // ignore: cast_nullable_to_non_nullable - as String?, - perPage: null == perPage - ? _value.perPage - : perPage // ignore: cast_nullable_to_non_nullable - as int, - to: freezed == to - ? _value.to - : to // ignore: cast_nullable_to_non_nullable - as dynamic, - total: null == total - ? _value.total - : total // ignore: cast_nullable_to_non_nullable - as int, - totalMinPrice: freezed == totalMinPrice - ? _value.totalMinPrice - : totalMinPrice // ignore: cast_nullable_to_non_nullable - as int?, - totalMaxPrice: freezed == totalMaxPrice - ? _value.totalMaxPrice - : totalMaxPrice // ignore: cast_nullable_to_non_nullable - as int?, - )); + return _then( + _$MetaImpl( + currentPage: + null == currentPage + ? _value.currentPage + : currentPage // ignore: cast_nullable_to_non_nullable + as int, + from: + freezed == from + ? _value.from + : from // ignore: cast_nullable_to_non_nullable + as dynamic, + lastPage: + null == lastPage + ? _value.lastPage + : lastPage // ignore: cast_nullable_to_non_nullable + as int, + links: + null == links + ? _value._links + : links // ignore: cast_nullable_to_non_nullable + as List, + path: + freezed == path + ? _value.path + : path // ignore: cast_nullable_to_non_nullable + as String?, + perPage: + null == perPage + ? _value.perPage + : perPage // ignore: cast_nullable_to_non_nullable + as int, + to: + freezed == to + ? _value.to + : to // ignore: cast_nullable_to_non_nullable + as dynamic, + total: + null == total + ? _value.total + : total // ignore: cast_nullable_to_non_nullable + as int, + totalMinPrice: + freezed == totalMinPrice + ? _value.totalMinPrice + : totalMinPrice // ignore: cast_nullable_to_non_nullable + as int?, + totalMaxPrice: + freezed == totalMaxPrice + ? _value.totalMaxPrice + : totalMaxPrice // ignore: cast_nullable_to_non_nullable + as int?, + ), + ); } } /// @nodoc @JsonSerializable() class _$MetaImpl implements _Meta { - const _$MetaImpl( - {@JsonKey(name: "current_page") required this.currentPage, - @JsonKey(name: "from") required this.from, - @JsonKey(name: "last_page") required this.lastPage, - @JsonKey(name: "links") required final List links, - @JsonKey(name: "path") this.path, - @JsonKey(name: "per_page") required this.perPage, - @JsonKey(name: "to") required this.to, - @JsonKey(name: "total") required this.total, - @JsonKey(name: "total_min_price") this.totalMinPrice, - @JsonKey(name: "total_max_price") this.totalMaxPrice}) - : _links = links; + const _$MetaImpl({ + @JsonKey(name: "current_page") required this.currentPage, + @JsonKey(name: "from") required this.from, + @JsonKey(name: "last_page") required this.lastPage, + @JsonKey(name: "links") required final List links, + @JsonKey(name: "path") this.path, + @JsonKey(name: "per_page") required this.perPage, + @JsonKey(name: "to") required this.to, + @JsonKey(name: "total") required this.total, + @JsonKey(name: "total_min_price") this.totalMinPrice, + @JsonKey(name: "total_max_price") this.totalMaxPrice, + }) : _links = links; factory _$MetaImpl.fromJson(Map json) => _$$MetaImplFromJson(json); @@ -538,17 +585,18 @@ class _$MetaImpl implements _Meta { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - currentPage, - const DeepCollectionEquality().hash(from), - lastPage, - const DeepCollectionEquality().hash(_links), - path, - perPage, - const DeepCollectionEquality().hash(to), - total, - totalMinPrice, - totalMaxPrice); + runtimeType, + currentPage, + const DeepCollectionEquality().hash(from), + lastPage, + const DeepCollectionEquality().hash(_links), + path, + perPage, + const DeepCollectionEquality().hash(to), + total, + totalMinPrice, + totalMaxPrice, + ); /// Create a copy of Meta /// with the given fields replaced by the non-null parameter values. @@ -560,24 +608,23 @@ class _$MetaImpl implements _Meta { @override Map toJson() { - return _$$MetaImplToJson( - this, - ); + return _$$MetaImplToJson(this); } } abstract class _Meta implements Meta { - const factory _Meta( - {@JsonKey(name: "current_page") required final int currentPage, - @JsonKey(name: "from") required final dynamic from, - @JsonKey(name: "last_page") required final int lastPage, - @JsonKey(name: "links") required final List links, - @JsonKey(name: "path") final String? path, - @JsonKey(name: "per_page") required final int perPage, - @JsonKey(name: "to") required final dynamic to, - @JsonKey(name: "total") required final int total, - @JsonKey(name: "total_min_price") final int? totalMinPrice, - @JsonKey(name: "total_max_price") final int? totalMaxPrice}) = _$MetaImpl; + const factory _Meta({ + @JsonKey(name: "current_page") required final int currentPage, + @JsonKey(name: "from") required final dynamic from, + @JsonKey(name: "last_page") required final int lastPage, + @JsonKey(name: "links") required final List links, + @JsonKey(name: "path") final String? path, + @JsonKey(name: "per_page") required final int perPage, + @JsonKey(name: "to") required final dynamic to, + @JsonKey(name: "total") required final int total, + @JsonKey(name: "total_min_price") final int? totalMinPrice, + @JsonKey(name: "total_max_price") final int? totalMaxPrice, + }) = _$MetaImpl; factory _Meta.fromJson(Map json) = _$MetaImpl.fromJson; @@ -647,10 +694,11 @@ abstract class $LinkCopyWith<$Res> { factory $LinkCopyWith(Link value, $Res Function(Link) then) = _$LinkCopyWithImpl<$Res, Link>; @useResult - $Res call( - {@JsonKey(name: "url") String? url, - @JsonKey(name: "label") String? label, - @JsonKey(name: "active") bool? active}); + $Res call({ + @JsonKey(name: "url") String? url, + @JsonKey(name: "label") String? label, + @JsonKey(name: "active") bool? active, + }); } /// @nodoc @@ -672,34 +720,42 @@ class _$LinkCopyWithImpl<$Res, $Val extends Link> Object? label = freezed, Object? active = freezed, }) { - return _then(_value.copyWith( - url: freezed == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - label: freezed == label - ? _value.label - : label // ignore: cast_nullable_to_non_nullable - as String?, - active: freezed == active - ? _value.active - : active // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); + return _then( + _value.copyWith( + url: + freezed == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as String?, + label: + freezed == label + ? _value.label + : label // ignore: cast_nullable_to_non_nullable + as String?, + active: + freezed == active + ? _value.active + : active // ignore: cast_nullable_to_non_nullable + as bool?, + ) + as $Val, + ); } } /// @nodoc abstract class _$$LinkImplCopyWith<$Res> implements $LinkCopyWith<$Res> { factory _$$LinkImplCopyWith( - _$LinkImpl value, $Res Function(_$LinkImpl) then) = - __$$LinkImplCopyWithImpl<$Res>; + _$LinkImpl value, + $Res Function(_$LinkImpl) then, + ) = __$$LinkImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "url") String? url, - @JsonKey(name: "label") String? label, - @JsonKey(name: "active") bool? active}); + $Res call({ + @JsonKey(name: "url") String? url, + @JsonKey(name: "label") String? label, + @JsonKey(name: "active") bool? active, + }); } /// @nodoc @@ -707,7 +763,7 @@ class __$$LinkImplCopyWithImpl<$Res> extends _$LinkCopyWithImpl<$Res, _$LinkImpl> implements _$$LinkImplCopyWith<$Res> { __$$LinkImplCopyWithImpl(_$LinkImpl _value, $Res Function(_$LinkImpl) _then) - : super(_value, _then); + : super(_value, _then); /// Create a copy of Link /// with the given fields replaced by the non-null parameter values. @@ -718,30 +774,36 @@ class __$$LinkImplCopyWithImpl<$Res> Object? label = freezed, Object? active = freezed, }) { - return _then(_$LinkImpl( - url: freezed == url - ? _value.url - : url // ignore: cast_nullable_to_non_nullable - as String?, - label: freezed == label - ? _value.label - : label // ignore: cast_nullable_to_non_nullable - as String?, - active: freezed == active - ? _value.active - : active // ignore: cast_nullable_to_non_nullable - as bool?, - )); + return _then( + _$LinkImpl( + url: + freezed == url + ? _value.url + : url // ignore: cast_nullable_to_non_nullable + as String?, + label: + freezed == label + ? _value.label + : label // ignore: cast_nullable_to_non_nullable + as String?, + active: + freezed == active + ? _value.active + : active // ignore: cast_nullable_to_non_nullable + as bool?, + ), + ); } } /// @nodoc @JsonSerializable() class _$LinkImpl implements _Link { - const _$LinkImpl( - {@JsonKey(name: "url") this.url, - @JsonKey(name: "label") this.label, - @JsonKey(name: "active") this.active}); + const _$LinkImpl({ + @JsonKey(name: "url") this.url, + @JsonKey(name: "label") this.label, + @JsonKey(name: "active") this.active, + }); factory _$LinkImpl.fromJson(Map json) => _$$LinkImplFromJson(json); @@ -785,17 +847,16 @@ class _$LinkImpl implements _Link { @override Map toJson() { - return _$$LinkImplToJson( - this, - ); + return _$$LinkImplToJson(this); } } abstract class _Link implements Link { - const factory _Link( - {@JsonKey(name: "url") final String? url, - @JsonKey(name: "label") final String? label, - @JsonKey(name: "active") final bool? active}) = _$LinkImpl; + const factory _Link({ + @JsonKey(name: "url") final String? url, + @JsonKey(name: "label") final String? label, + @JsonKey(name: "active") final bool? active, + }) = _$LinkImpl; factory _Link.fromJson(Map json) = _$LinkImpl.fromJson; diff --git a/lib/core/models/pagination_model.g.dart b/lib/core/models/pagination_model.g.dart index b89eb0b8..f9ac6cc1 100644 --- a/lib/core/models/pagination_model.g.dart +++ b/lib/core/models/pagination_model.g.dart @@ -7,11 +7,11 @@ part of 'pagination_model.dart'; // ************************************************************************** _$LinksImpl _$$LinksImplFromJson(Map json) => _$LinksImpl( - first: json['first'] as String, - last: json['last'] as String, - prev: json['prev'], - next: json['next'], - ); + first: json['first'] as String, + last: json['last'] as String, + prev: json['prev'], + next: json['next'], +); Map _$$LinksImplToJson(_$LinksImpl instance) => { @@ -22,19 +22,20 @@ Map _$$LinksImplToJson(_$LinksImpl instance) => }; _$MetaImpl _$$MetaImplFromJson(Map json) => _$MetaImpl( - currentPage: (json['current_page'] as num).toInt(), - from: json['from'], - lastPage: (json['last_page'] as num).toInt(), - links: (json['links'] as List) + currentPage: (json['current_page'] as num).toInt(), + from: json['from'], + lastPage: (json['last_page'] as num).toInt(), + links: + (json['links'] as List) .map((e) => Link.fromJson(e as Map)) .toList(), - path: json['path'] as String?, - perPage: (json['per_page'] as num).toInt(), - to: json['to'], - total: (json['total'] as num).toInt(), - totalMinPrice: (json['total_min_price'] as num?)?.toInt(), - totalMaxPrice: (json['total_max_price'] as num?)?.toInt(), - ); + path: json['path'] as String?, + perPage: (json['per_page'] as num).toInt(), + to: json['to'], + total: (json['total'] as num).toInt(), + totalMinPrice: (json['total_min_price'] as num?)?.toInt(), + totalMaxPrice: (json['total_max_price'] as num?)?.toInt(), +); Map _$$MetaImplToJson(_$MetaImpl instance) => { @@ -51,10 +52,10 @@ Map _$$MetaImplToJson(_$MetaImpl instance) => }; _$LinkImpl _$$LinkImplFromJson(Map json) => _$LinkImpl( - url: json['url'] as String?, - label: json['label'] as String?, - active: json['active'] as bool?, - ); + url: json['url'] as String?, + label: json['label'] as String?, + active: json['active'] as bool?, +); Map _$$LinkImplToJson(_$LinkImpl instance) => { diff --git a/lib/features/auth/models/credentials_model.freezed.dart b/lib/features/auth/models/credentials_model.freezed.dart index 270a5a99..73b2871e 100644 --- a/lib/features/auth/models/credentials_model.freezed.dart +++ b/lib/features/auth/models/credentials_model.freezed.dart @@ -12,7 +12,8 @@ part of 'credentials_model.dart'; 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'); + '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', +); CredentialsModel _$CredentialsModelFromJson(Map json) { return _CredentialsModel.fromJson(json); @@ -36,8 +37,9 @@ mixin _$CredentialsModel { /// @nodoc abstract class $CredentialsModelCopyWith<$Res> { factory $CredentialsModelCopyWith( - CredentialsModel value, $Res Function(CredentialsModel) then) = - _$CredentialsModelCopyWithImpl<$Res, CredentialsModel>; + CredentialsModel value, + $Res Function(CredentialsModel) then, + ) = _$CredentialsModelCopyWithImpl<$Res, CredentialsModel>; @useResult $Res call({String email, String password}); } @@ -56,29 +58,32 @@ class _$CredentialsModelCopyWithImpl<$Res, $Val extends CredentialsModel> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? email = null, - Object? password = null, - }) { - return _then(_value.copyWith( - email: null == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? email = null, Object? password = null}) { + return _then( + _value.copyWith( + email: + null == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as String, + password: + null == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc abstract class _$$CredentialsModelImplCopyWith<$Res> implements $CredentialsModelCopyWith<$Res> { - factory _$$CredentialsModelImplCopyWith(_$CredentialsModelImpl value, - $Res Function(_$CredentialsModelImpl) then) = - __$$CredentialsModelImplCopyWithImpl<$Res>; + factory _$$CredentialsModelImplCopyWith( + _$CredentialsModelImpl value, + $Res Function(_$CredentialsModelImpl) then, + ) = __$$CredentialsModelImplCopyWithImpl<$Res>; @override @useResult $Res call({String email, String password}); @@ -88,28 +93,30 @@ abstract class _$$CredentialsModelImplCopyWith<$Res> class __$$CredentialsModelImplCopyWithImpl<$Res> extends _$CredentialsModelCopyWithImpl<$Res, _$CredentialsModelImpl> implements _$$CredentialsModelImplCopyWith<$Res> { - __$$CredentialsModelImplCopyWithImpl(_$CredentialsModelImpl _value, - $Res Function(_$CredentialsModelImpl) _then) - : super(_value, _then); + __$$CredentialsModelImplCopyWithImpl( + _$CredentialsModelImpl _value, + $Res Function(_$CredentialsModelImpl) _then, + ) : super(_value, _then); /// Create a copy of CredentialsModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? email = null, - Object? password = null, - }) { - return _then(_$CredentialsModelImpl( - email: null == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? email = null, Object? password = null}) { + return _then( + _$CredentialsModelImpl( + email: + null == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as String, + password: + null == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -152,20 +159,21 @@ class _$CredentialsModelImpl implements _CredentialsModel { @pragma('vm:prefer-inline') _$$CredentialsModelImplCopyWith<_$CredentialsModelImpl> get copyWith => __$$CredentialsModelImplCopyWithImpl<_$CredentialsModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$CredentialsModelImplToJson( - this, - ); + return _$$CredentialsModelImplToJson(this); } } abstract class _CredentialsModel implements CredentialsModel { - const factory _CredentialsModel( - {required final String email, - required final String password}) = _$CredentialsModelImpl; + const factory _CredentialsModel({ + required final String email, + required final String password, + }) = _$CredentialsModelImpl; factory _CredentialsModel.fromJson(Map json) = _$CredentialsModelImpl.fromJson; diff --git a/lib/features/auth/models/credentials_model.g.dart b/lib/features/auth/models/credentials_model.g.dart index eb2c98e8..a7dcefc4 100644 --- a/lib/features/auth/models/credentials_model.g.dart +++ b/lib/features/auth/models/credentials_model.g.dart @@ -7,15 +7,12 @@ part of 'credentials_model.dart'; // ************************************************************************** _$CredentialsModelImpl _$$CredentialsModelImplFromJson( - Map json) => - _$CredentialsModelImpl( - email: json['email'] as String, - password: json['password'] as String, - ); + Map json, +) => _$CredentialsModelImpl( + email: json['email'] as String, + password: json['password'] as String, +); Map _$$CredentialsModelImplToJson( - _$CredentialsModelImpl instance) => - { - 'email': instance.email, - 'password': instance.password, - }; + _$CredentialsModelImpl instance, +) => {'email': instance.email, 'password': instance.password}; diff --git a/lib/features/auth/models/token_model.freezed.dart b/lib/features/auth/models/token_model.freezed.dart index ec0210f4..d04c0545 100644 --- a/lib/features/auth/models/token_model.freezed.dart +++ b/lib/features/auth/models/token_model.freezed.dart @@ -12,7 +12,8 @@ part of 'token_model.dart'; 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'); + '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', +); TokenModel _$TokenModelFromJson(Map json) { return _TokenModel.fromJson(json); @@ -35,8 +36,9 @@ mixin _$TokenModel { /// @nodoc abstract class $TokenModelCopyWith<$Res> { factory $TokenModelCopyWith( - TokenModel value, $Res Function(TokenModel) then) = - _$TokenModelCopyWithImpl<$Res, TokenModel>; + TokenModel value, + $Res Function(TokenModel) then, + ) = _$TokenModelCopyWithImpl<$Res, TokenModel>; @useResult $Res call({String token}); } @@ -55,15 +57,17 @@ class _$TokenModelCopyWithImpl<$Res, $Val extends TokenModel> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? token = null, - }) { - return _then(_value.copyWith( - token: null == token - ? _value.token - : token // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? token = null}) { + return _then( + _value.copyWith( + token: + null == token + ? _value.token + : token // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } @@ -71,8 +75,9 @@ class _$TokenModelCopyWithImpl<$Res, $Val extends TokenModel> abstract class _$$TokenModelImplCopyWith<$Res> implements $TokenModelCopyWith<$Res> { factory _$$TokenModelImplCopyWith( - _$TokenModelImpl value, $Res Function(_$TokenModelImpl) then) = - __$$TokenModelImplCopyWithImpl<$Res>; + _$TokenModelImpl value, + $Res Function(_$TokenModelImpl) then, + ) = __$$TokenModelImplCopyWithImpl<$Res>; @override @useResult $Res call({String token}); @@ -83,22 +88,24 @@ class __$$TokenModelImplCopyWithImpl<$Res> extends _$TokenModelCopyWithImpl<$Res, _$TokenModelImpl> implements _$$TokenModelImplCopyWith<$Res> { __$$TokenModelImplCopyWithImpl( - _$TokenModelImpl _value, $Res Function(_$TokenModelImpl) _then) - : super(_value, _then); + _$TokenModelImpl _value, + $Res Function(_$TokenModelImpl) _then, + ) : super(_value, _then); /// Create a copy of TokenModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? token = null, - }) { - return _then(_$TokenModelImpl( - token: null == token - ? _value.token - : token // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? token = null}) { + return _then( + _$TokenModelImpl( + token: + null == token + ? _value.token + : token // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -140,9 +147,7 @@ class _$TokenModelImpl implements _TokenModel { @override Map toJson() { - return _$$TokenModelImplToJson( - this, - ); + return _$$TokenModelImplToJson(this); } } diff --git a/lib/features/auth/models/token_model.g.dart b/lib/features/auth/models/token_model.g.dart index f2ea4bd9..41be8b6d 100644 --- a/lib/features/auth/models/token_model.g.dart +++ b/lib/features/auth/models/token_model.g.dart @@ -7,11 +7,7 @@ part of 'token_model.dart'; // ************************************************************************** _$TokenModelImpl _$$TokenModelImplFromJson(Map json) => - _$TokenModelImpl( - token: json['token'] as String, - ); + _$TokenModelImpl(token: json['token'] as String); Map _$$TokenModelImplToJson(_$TokenModelImpl instance) => - { - 'token': instance.token, - }; + {'token': instance.token}; diff --git a/lib/features/auth/presentation/bloc/auth_state.freezed.dart b/lib/features/auth/presentation/bloc/auth_state.freezed.dart index c0be41a8..0ee0756e 100644 --- a/lib/features/auth/presentation/bloc/auth_state.freezed.dart +++ b/lib/features/auth/presentation/bloc/auth_state.freezed.dart @@ -12,7 +12,8 @@ part of 'auth_state.dart'; 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'); + '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 _$AuthState { @@ -22,16 +23,14 @@ mixin _$AuthState { required TResult Function() loading, required TResult Function(String token) loaded, required TResult Function(String errorMessage) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, TResult? Function(String token)? loaded, TResult? Function(String errorMessage)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { @@ -39,24 +38,21 @@ mixin _$AuthState { TResult Function(String token)? loaded, TResult Function(String errorMessage)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult map( TResult Function(_AuthState value) $default, { required TResult Function(AuthStateLoading value) loading, required TResult Function(AuthStateLoaded value) loaded, required TResult Function(AuthStateError value) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull( TResult? Function(_AuthState value)? $default, { TResult? Function(AuthStateLoading value)? loading, TResult? Function(AuthStateLoaded value)? loaded, TResult? Function(AuthStateError value)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_AuthState value)? $default, { @@ -64,8 +60,7 @@ mixin _$AuthState { TResult Function(AuthStateLoaded value)? loaded, TResult Function(AuthStateError value)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc @@ -91,8 +86,9 @@ class _$AuthStateCopyWithImpl<$Res, $Val extends AuthState> /// @nodoc abstract class _$$AuthStateImplCopyWith<$Res> { factory _$$AuthStateImplCopyWith( - _$AuthStateImpl value, $Res Function(_$AuthStateImpl) then) = - __$$AuthStateImplCopyWithImpl<$Res>; + _$AuthStateImpl value, + $Res Function(_$AuthStateImpl) then, + ) = __$$AuthStateImplCopyWithImpl<$Res>; } /// @nodoc @@ -100,8 +96,9 @@ class __$$AuthStateImplCopyWithImpl<$Res> extends _$AuthStateCopyWithImpl<$Res, _$AuthStateImpl> implements _$$AuthStateImplCopyWith<$Res> { __$$AuthStateImplCopyWithImpl( - _$AuthStateImpl _value, $Res Function(_$AuthStateImpl) _then) - : super(_value, _then); + _$AuthStateImpl _value, + $Res Function(_$AuthStateImpl) _then, + ) : super(_value, _then); /// Create a copy of AuthState /// with the given fields replaced by the non-null parameter values. @@ -207,18 +204,20 @@ abstract class _AuthState implements AuthState { /// @nodoc abstract class _$$AuthStateLoadingImplCopyWith<$Res> { - factory _$$AuthStateLoadingImplCopyWith(_$AuthStateLoadingImpl value, - $Res Function(_$AuthStateLoadingImpl) then) = - __$$AuthStateLoadingImplCopyWithImpl<$Res>; + factory _$$AuthStateLoadingImplCopyWith( + _$AuthStateLoadingImpl value, + $Res Function(_$AuthStateLoadingImpl) then, + ) = __$$AuthStateLoadingImplCopyWithImpl<$Res>; } /// @nodoc class __$$AuthStateLoadingImplCopyWithImpl<$Res> extends _$AuthStateCopyWithImpl<$Res, _$AuthStateLoadingImpl> implements _$$AuthStateLoadingImplCopyWith<$Res> { - __$$AuthStateLoadingImplCopyWithImpl(_$AuthStateLoadingImpl _value, - $Res Function(_$AuthStateLoadingImpl) _then) - : super(_value, _then); + __$$AuthStateLoadingImplCopyWithImpl( + _$AuthStateLoadingImpl _value, + $Res Function(_$AuthStateLoadingImpl) _then, + ) : super(_value, _then); /// Create a copy of AuthState /// with the given fields replaced by the non-null parameter values. @@ -324,9 +323,10 @@ abstract class AuthStateLoading implements AuthState { /// @nodoc abstract class _$$AuthStateLoadedImplCopyWith<$Res> { - factory _$$AuthStateLoadedImplCopyWith(_$AuthStateLoadedImpl value, - $Res Function(_$AuthStateLoadedImpl) then) = - __$$AuthStateLoadedImplCopyWithImpl<$Res>; + factory _$$AuthStateLoadedImplCopyWith( + _$AuthStateLoadedImpl value, + $Res Function(_$AuthStateLoadedImpl) then, + ) = __$$AuthStateLoadedImplCopyWithImpl<$Res>; @useResult $Res call({String token}); } @@ -336,22 +336,24 @@ class __$$AuthStateLoadedImplCopyWithImpl<$Res> extends _$AuthStateCopyWithImpl<$Res, _$AuthStateLoadedImpl> implements _$$AuthStateLoadedImplCopyWith<$Res> { __$$AuthStateLoadedImplCopyWithImpl( - _$AuthStateLoadedImpl _value, $Res Function(_$AuthStateLoadedImpl) _then) - : super(_value, _then); + _$AuthStateLoadedImpl _value, + $Res Function(_$AuthStateLoadedImpl) _then, + ) : super(_value, _then); /// Create a copy of AuthState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? token = null, - }) { - return _then(_$AuthStateLoadedImpl( - token: null == token - ? _value.token - : token // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? token = null}) { + return _then( + _$AuthStateLoadedImpl( + token: + null == token + ? _value.token + : token // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -386,7 +388,9 @@ class _$AuthStateLoadedImpl implements AuthStateLoaded { @pragma('vm:prefer-inline') _$$AuthStateLoadedImplCopyWith<_$AuthStateLoadedImpl> get copyWith => __$$AuthStateLoadedImplCopyWithImpl<_$AuthStateLoadedImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs @@ -478,9 +482,10 @@ abstract class AuthStateLoaded implements AuthState { /// @nodoc abstract class _$$AuthStateErrorImplCopyWith<$Res> { - factory _$$AuthStateErrorImplCopyWith(_$AuthStateErrorImpl value, - $Res Function(_$AuthStateErrorImpl) then) = - __$$AuthStateErrorImplCopyWithImpl<$Res>; + factory _$$AuthStateErrorImplCopyWith( + _$AuthStateErrorImpl value, + $Res Function(_$AuthStateErrorImpl) then, + ) = __$$AuthStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String errorMessage}); } @@ -490,22 +495,24 @@ class __$$AuthStateErrorImplCopyWithImpl<$Res> extends _$AuthStateCopyWithImpl<$Res, _$AuthStateErrorImpl> implements _$$AuthStateErrorImplCopyWith<$Res> { __$$AuthStateErrorImplCopyWithImpl( - _$AuthStateErrorImpl _value, $Res Function(_$AuthStateErrorImpl) _then) - : super(_value, _then); + _$AuthStateErrorImpl _value, + $Res Function(_$AuthStateErrorImpl) _then, + ) : super(_value, _then); /// Create a copy of AuthState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? errorMessage = null, - }) { - return _then(_$AuthStateErrorImpl( - errorMessage: null == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? errorMessage = null}) { + return _then( + _$AuthStateErrorImpl( + errorMessage: + null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -541,7 +548,9 @@ class _$AuthStateErrorImpl implements AuthStateError { @pragma('vm:prefer-inline') _$$AuthStateErrorImplCopyWith<_$AuthStateErrorImpl> get copyWith => __$$AuthStateErrorImplCopyWithImpl<_$AuthStateErrorImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs diff --git a/lib/features/blog_post_create/bloc/blog_post_create_cubit/blog_post_create_state.freezed.dart b/lib/features/blog_post_create/bloc/blog_post_create_cubit/blog_post_create_state.freezed.dart index d9a702c6..973a9bca 100644 --- a/lib/features/blog_post_create/bloc/blog_post_create_cubit/blog_post_create_state.freezed.dart +++ b/lib/features/blog_post_create/bloc/blog_post_create_cubit/blog_post_create_state.freezed.dart @@ -12,7 +12,8 @@ part of 'blog_post_create_state.dart'; 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'); + '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 _$BlogPostCreateState { @@ -22,16 +23,14 @@ mixin _$BlogPostCreateState { required TResult Function() loading, required TResult Function() loaded, required TResult Function(String errorMessage) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, TResult? Function()? loaded, TResult? Function(String errorMessage)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { @@ -39,24 +38,21 @@ mixin _$BlogPostCreateState { TResult Function()? loaded, TResult Function(String errorMessage)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult map( TResult Function(_BlogPostCreateState value) $default, { required TResult Function(BlogPostCreateStateLoading value) loading, required TResult Function(BlogPostCreateStateLoaded value) loaded, required TResult Function(BlogPostCreateStateError value) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull( TResult? Function(_BlogPostCreateState value)? $default, { TResult? Function(BlogPostCreateStateLoading value)? loading, TResult? Function(BlogPostCreateStateLoaded value)? loaded, TResult? Function(BlogPostCreateStateError value)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_BlogPostCreateState value)? $default, { @@ -64,15 +60,15 @@ mixin _$BlogPostCreateState { TResult Function(BlogPostCreateStateLoaded value)? loaded, TResult Function(BlogPostCreateStateError value)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc abstract class $BlogPostCreateStateCopyWith<$Res> { factory $BlogPostCreateStateCopyWith( - BlogPostCreateState value, $Res Function(BlogPostCreateState) then) = - _$BlogPostCreateStateCopyWithImpl<$Res, BlogPostCreateState>; + BlogPostCreateState value, + $Res Function(BlogPostCreateState) then, + ) = _$BlogPostCreateStateCopyWithImpl<$Res, BlogPostCreateState>; } /// @nodoc @@ -91,18 +87,20 @@ class _$BlogPostCreateStateCopyWithImpl<$Res, $Val extends BlogPostCreateState> /// @nodoc abstract class _$$BlogPostCreateStateImplCopyWith<$Res> { - factory _$$BlogPostCreateStateImplCopyWith(_$BlogPostCreateStateImpl value, - $Res Function(_$BlogPostCreateStateImpl) then) = - __$$BlogPostCreateStateImplCopyWithImpl<$Res>; + factory _$$BlogPostCreateStateImplCopyWith( + _$BlogPostCreateStateImpl value, + $Res Function(_$BlogPostCreateStateImpl) then, + ) = __$$BlogPostCreateStateImplCopyWithImpl<$Res>; } /// @nodoc class __$$BlogPostCreateStateImplCopyWithImpl<$Res> extends _$BlogPostCreateStateCopyWithImpl<$Res, _$BlogPostCreateStateImpl> implements _$$BlogPostCreateStateImplCopyWith<$Res> { - __$$BlogPostCreateStateImplCopyWithImpl(_$BlogPostCreateStateImpl _value, - $Res Function(_$BlogPostCreateStateImpl) _then) - : super(_value, _then); + __$$BlogPostCreateStateImplCopyWithImpl( + _$BlogPostCreateStateImpl _value, + $Res Function(_$BlogPostCreateStateImpl) _then, + ) : super(_value, _then); /// Create a copy of BlogPostCreateState /// with the given fields replaced by the non-null parameter values. @@ -210,20 +208,23 @@ abstract class _BlogPostCreateState implements BlogPostCreateState { /// @nodoc abstract class _$$BlogPostCreateStateLoadingImplCopyWith<$Res> { factory _$$BlogPostCreateStateLoadingImplCopyWith( - _$BlogPostCreateStateLoadingImpl value, - $Res Function(_$BlogPostCreateStateLoadingImpl) then) = - __$$BlogPostCreateStateLoadingImplCopyWithImpl<$Res>; + _$BlogPostCreateStateLoadingImpl value, + $Res Function(_$BlogPostCreateStateLoadingImpl) then, + ) = __$$BlogPostCreateStateLoadingImplCopyWithImpl<$Res>; } /// @nodoc class __$$BlogPostCreateStateLoadingImplCopyWithImpl<$Res> - extends _$BlogPostCreateStateCopyWithImpl<$Res, - _$BlogPostCreateStateLoadingImpl> + extends + _$BlogPostCreateStateCopyWithImpl< + $Res, + _$BlogPostCreateStateLoadingImpl + > implements _$$BlogPostCreateStateLoadingImplCopyWith<$Res> { __$$BlogPostCreateStateLoadingImplCopyWithImpl( - _$BlogPostCreateStateLoadingImpl _value, - $Res Function(_$BlogPostCreateStateLoadingImpl) _then) - : super(_value, _then); + _$BlogPostCreateStateLoadingImpl _value, + $Res Function(_$BlogPostCreateStateLoadingImpl) _then, + ) : super(_value, _then); /// Create a copy of BlogPostCreateState /// with the given fields replaced by the non-null parameter values. @@ -331,20 +332,20 @@ abstract class BlogPostCreateStateLoading implements BlogPostCreateState { /// @nodoc abstract class _$$BlogPostCreateStateLoadedImplCopyWith<$Res> { factory _$$BlogPostCreateStateLoadedImplCopyWith( - _$BlogPostCreateStateLoadedImpl value, - $Res Function(_$BlogPostCreateStateLoadedImpl) then) = - __$$BlogPostCreateStateLoadedImplCopyWithImpl<$Res>; + _$BlogPostCreateStateLoadedImpl value, + $Res Function(_$BlogPostCreateStateLoadedImpl) then, + ) = __$$BlogPostCreateStateLoadedImplCopyWithImpl<$Res>; } /// @nodoc class __$$BlogPostCreateStateLoadedImplCopyWithImpl<$Res> - extends _$BlogPostCreateStateCopyWithImpl<$Res, - _$BlogPostCreateStateLoadedImpl> + extends + _$BlogPostCreateStateCopyWithImpl<$Res, _$BlogPostCreateStateLoadedImpl> implements _$$BlogPostCreateStateLoadedImplCopyWith<$Res> { __$$BlogPostCreateStateLoadedImplCopyWithImpl( - _$BlogPostCreateStateLoadedImpl _value, - $Res Function(_$BlogPostCreateStateLoadedImpl) _then) - : super(_value, _then); + _$BlogPostCreateStateLoadedImpl _value, + $Res Function(_$BlogPostCreateStateLoadedImpl) _then, + ) : super(_value, _then); /// Create a copy of BlogPostCreateState /// with the given fields replaced by the non-null parameter values. @@ -452,36 +453,37 @@ abstract class BlogPostCreateStateLoaded implements BlogPostCreateState { /// @nodoc abstract class _$$BlogPostCreateStateErrorImplCopyWith<$Res> { factory _$$BlogPostCreateStateErrorImplCopyWith( - _$BlogPostCreateStateErrorImpl value, - $Res Function(_$BlogPostCreateStateErrorImpl) then) = - __$$BlogPostCreateStateErrorImplCopyWithImpl<$Res>; + _$BlogPostCreateStateErrorImpl value, + $Res Function(_$BlogPostCreateStateErrorImpl) then, + ) = __$$BlogPostCreateStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String errorMessage}); } /// @nodoc class __$$BlogPostCreateStateErrorImplCopyWithImpl<$Res> - extends _$BlogPostCreateStateCopyWithImpl<$Res, - _$BlogPostCreateStateErrorImpl> + extends + _$BlogPostCreateStateCopyWithImpl<$Res, _$BlogPostCreateStateErrorImpl> implements _$$BlogPostCreateStateErrorImplCopyWith<$Res> { __$$BlogPostCreateStateErrorImplCopyWithImpl( - _$BlogPostCreateStateErrorImpl _value, - $Res Function(_$BlogPostCreateStateErrorImpl) _then) - : super(_value, _then); + _$BlogPostCreateStateErrorImpl _value, + $Res Function(_$BlogPostCreateStateErrorImpl) _then, + ) : super(_value, _then); /// Create a copy of BlogPostCreateState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? errorMessage = null, - }) { - return _then(_$BlogPostCreateStateErrorImpl( - errorMessage: null == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? errorMessage = null}) { + return _then( + _$BlogPostCreateStateErrorImpl( + errorMessage: + null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -516,8 +518,9 @@ class _$BlogPostCreateStateErrorImpl implements BlogPostCreateStateError { @override @pragma('vm:prefer-inline') _$$BlogPostCreateStateErrorImplCopyWith<_$BlogPostCreateStateErrorImpl> - get copyWith => __$$BlogPostCreateStateErrorImplCopyWithImpl< - _$BlogPostCreateStateErrorImpl>(this, _$identity); + get copyWith => __$$BlogPostCreateStateErrorImplCopyWithImpl< + _$BlogPostCreateStateErrorImpl + >(this, _$identity); @override @optionalTypeArgs @@ -604,5 +607,5 @@ abstract class BlogPostCreateStateError implements BlogPostCreateState { /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) _$$BlogPostCreateStateErrorImplCopyWith<_$BlogPostCreateStateErrorImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/features/blog_post_create/services/blog_post_service.g.dart b/lib/features/blog_post_create/services/blog_post_service.g.dart index a93ef727..aa430049 100644 --- a/lib/features/blog_post_create/services/blog_post_service.g.dart +++ b/lib/features/blog_post_create/services/blog_post_service.g.dart @@ -25,11 +25,11 @@ class _BlogPostService implements BlogPostService { final _data = formData; final _options = _setStreamType( Options( - method: 'POST', - headers: _headers, - extra: _extra, - contentType: 'multipart/form-data', - ) + method: 'POST', + headers: _headers, + extra: _extra, + contentType: 'multipart/form-data', + ) .compose( _dio.options, '/api/blogPosts/create/published', @@ -52,11 +52,11 @@ class _BlogPostService implements BlogPostService { final _data = formData; final _options = _setStreamType( Options( - method: 'POST', - headers: _headers, - extra: _extra, - contentType: 'multipart/form-data', - ) + method: 'POST', + headers: _headers, + extra: _extra, + contentType: 'multipart/form-data', + ) .compose( _dio.options, '/api/blogPosts/update/${id}', 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..621cd1bb 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 @@ -12,7 +12,8 @@ part of 'new_messages_state.dart'; 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'); + '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 _$NewMessagesState { @@ -22,16 +23,14 @@ mixin _$NewMessagesState { required TResult Function() empty, required TResult Function(int messagesCount) loaded, required TResult Function(String errorMessage) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? empty, TResult? Function(int messagesCount)? loaded, TResult? Function(String errorMessage)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { @@ -39,24 +38,21 @@ mixin _$NewMessagesState { TResult Function(int messagesCount)? loaded, TResult Function(String errorMessage)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult map( TResult Function(_NewMessagesState value) $default, { required TResult Function(NewMessagesStateEmpty value) empty, required TResult Function(NewMessagesStateLoaded value) loaded, required TResult Function(NewMessagesStateError value) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull( TResult? Function(_NewMessagesState value)? $default, { TResult? Function(NewMessagesStateEmpty value)? empty, TResult? Function(NewMessagesStateLoaded value)? loaded, TResult? Function(NewMessagesStateError value)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_NewMessagesState value)? $default, { @@ -64,15 +60,15 @@ mixin _$NewMessagesState { TResult Function(NewMessagesStateLoaded value)? loaded, TResult Function(NewMessagesStateError value)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc abstract class $NewMessagesStateCopyWith<$Res> { factory $NewMessagesStateCopyWith( - NewMessagesState value, $Res Function(NewMessagesState) then) = - _$NewMessagesStateCopyWithImpl<$Res, NewMessagesState>; + NewMessagesState value, + $Res Function(NewMessagesState) then, + ) = _$NewMessagesStateCopyWithImpl<$Res, NewMessagesState>; } /// @nodoc @@ -91,18 +87,20 @@ class _$NewMessagesStateCopyWithImpl<$Res, $Val extends NewMessagesState> /// @nodoc abstract class _$$NewMessagesStateImplCopyWith<$Res> { - factory _$$NewMessagesStateImplCopyWith(_$NewMessagesStateImpl value, - $Res Function(_$NewMessagesStateImpl) then) = - __$$NewMessagesStateImplCopyWithImpl<$Res>; + factory _$$NewMessagesStateImplCopyWith( + _$NewMessagesStateImpl value, + $Res Function(_$NewMessagesStateImpl) then, + ) = __$$NewMessagesStateImplCopyWithImpl<$Res>; } /// @nodoc class __$$NewMessagesStateImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateImpl> implements _$$NewMessagesStateImplCopyWith<$Res> { - __$$NewMessagesStateImplCopyWithImpl(_$NewMessagesStateImpl _value, - $Res Function(_$NewMessagesStateImpl) _then) - : super(_value, _then); + __$$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. @@ -209,18 +207,19 @@ abstract class _NewMessagesState implements NewMessagesState { /// @nodoc abstract class _$$NewMessagesStateEmptyImplCopyWith<$Res> { factory _$$NewMessagesStateEmptyImplCopyWith( - _$NewMessagesStateEmptyImpl value, - $Res Function(_$NewMessagesStateEmptyImpl) then) = - __$$NewMessagesStateEmptyImplCopyWithImpl<$Res>; + _$NewMessagesStateEmptyImpl value, + $Res Function(_$NewMessagesStateEmptyImpl) then, + ) = __$$NewMessagesStateEmptyImplCopyWithImpl<$Res>; } /// @nodoc class __$$NewMessagesStateEmptyImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateEmptyImpl> implements _$$NewMessagesStateEmptyImplCopyWith<$Res> { - __$$NewMessagesStateEmptyImplCopyWithImpl(_$NewMessagesStateEmptyImpl _value, - $Res Function(_$NewMessagesStateEmptyImpl) _then) - : super(_value, _then); + __$$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. @@ -328,9 +327,9 @@ abstract class NewMessagesStateEmpty implements NewMessagesState { /// @nodoc abstract class _$$NewMessagesStateLoadedImplCopyWith<$Res> { factory _$$NewMessagesStateLoadedImplCopyWith( - _$NewMessagesStateLoadedImpl value, - $Res Function(_$NewMessagesStateLoadedImpl) then) = - __$$NewMessagesStateLoadedImplCopyWithImpl<$Res>; + _$NewMessagesStateLoadedImpl value, + $Res Function(_$NewMessagesStateLoadedImpl) then, + ) = __$$NewMessagesStateLoadedImplCopyWithImpl<$Res>; @useResult $Res call({int messagesCount}); } @@ -340,23 +339,24 @@ class __$$NewMessagesStateLoadedImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateLoadedImpl> implements _$$NewMessagesStateLoadedImplCopyWith<$Res> { __$$NewMessagesStateLoadedImplCopyWithImpl( - _$NewMessagesStateLoadedImpl _value, - $Res Function(_$NewMessagesStateLoadedImpl) _then) - : super(_value, _then); + _$NewMessagesStateLoadedImpl _value, + $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({ - Object? messagesCount = null, - }) { - return _then(_$NewMessagesStateLoadedImpl( - messagesCount: null == messagesCount - ? _value.messagesCount - : messagesCount // ignore: cast_nullable_to_non_nullable - as int, - )); + $Res call({Object? messagesCount = null}) { + return _then( + _$NewMessagesStateLoadedImpl( + messagesCount: + null == messagesCount + ? _value.messagesCount + : messagesCount // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } @@ -391,8 +391,11 @@ class _$NewMessagesStateLoadedImpl implements NewMessagesStateLoaded { @override @pragma('vm:prefer-inline') _$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl> - get copyWith => __$$NewMessagesStateLoadedImplCopyWithImpl< - _$NewMessagesStateLoadedImpl>(this, _$identity); + get copyWith => + __$$NewMessagesStateLoadedImplCopyWithImpl<_$NewMessagesStateLoadedImpl>( + this, + _$identity, + ); @override @optionalTypeArgs @@ -479,15 +482,15 @@ abstract class NewMessagesStateLoaded implements NewMessagesState { /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) _$$NewMessagesStateLoadedImplCopyWith<_$NewMessagesStateLoadedImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class _$$NewMessagesStateErrorImplCopyWith<$Res> { factory _$$NewMessagesStateErrorImplCopyWith( - _$NewMessagesStateErrorImpl value, - $Res Function(_$NewMessagesStateErrorImpl) then) = - __$$NewMessagesStateErrorImplCopyWithImpl<$Res>; + _$NewMessagesStateErrorImpl value, + $Res Function(_$NewMessagesStateErrorImpl) then, + ) = __$$NewMessagesStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String errorMessage}); } @@ -496,23 +499,25 @@ abstract class _$$NewMessagesStateErrorImplCopyWith<$Res> { class __$$NewMessagesStateErrorImplCopyWithImpl<$Res> extends _$NewMessagesStateCopyWithImpl<$Res, _$NewMessagesStateErrorImpl> implements _$$NewMessagesStateErrorImplCopyWith<$Res> { - __$$NewMessagesStateErrorImplCopyWithImpl(_$NewMessagesStateErrorImpl _value, - $Res Function(_$NewMessagesStateErrorImpl) _then) - : super(_value, _then); + __$$NewMessagesStateErrorImplCopyWithImpl( + _$NewMessagesStateErrorImpl _value, + $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({ - Object? errorMessage = null, - }) { - return _then(_$NewMessagesStateErrorImpl( - errorMessage: null == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? errorMessage = null}) { + return _then( + _$NewMessagesStateErrorImpl( + errorMessage: + null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -547,8 +552,11 @@ class _$NewMessagesStateErrorImpl implements NewMessagesStateError { @override @pragma('vm:prefer-inline') _$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl> - get copyWith => __$$NewMessagesStateErrorImplCopyWithImpl< - _$NewMessagesStateErrorImpl>(this, _$identity); + get copyWith => + __$$NewMessagesStateErrorImplCopyWithImpl<_$NewMessagesStateErrorImpl>( + this, + _$identity, + ); @override @optionalTypeArgs @@ -635,5 +643,5 @@ abstract class NewMessagesStateError implements NewMessagesState { /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) _$$NewMessagesStateErrorImplCopyWith<_$NewMessagesStateErrorImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } 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 d634b318..6a162c25 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 @@ -12,7 +12,8 @@ part of 'notifications_state.dart'; 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'); + '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 _$NotificationsState { @@ -21,46 +22,43 @@ mixin _$NotificationsState { TResult Function() $default, { required TResult Function() empty, required TResult Function( - List notifications, int notificationsCount) - loaded, + List notifications, + int notificationsCount, + ) + loaded, required TResult Function(String errorMessage) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? empty, TResult? Function(List notifications, int notificationsCount)? - loaded, + loaded, TResult? Function(String errorMessage)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { TResult Function()? empty, TResult Function(List notifications, int notificationsCount)? - loaded, + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult map( TResult Function(_NotificationsState value) $default, { required TResult Function(NotificationsStateEmpty value) empty, required TResult Function(NotificationsStateLoaded value) loaded, required TResult Function(NotificationsStateError value) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull( TResult? Function(_NotificationsState value)? $default, { TResult? Function(NotificationsStateEmpty value)? empty, TResult? Function(NotificationsStateLoaded value)? loaded, TResult? Function(NotificationsStateError value)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_NotificationsState value)? $default, { @@ -68,15 +66,15 @@ mixin _$NotificationsState { TResult Function(NotificationsStateLoaded value)? loaded, TResult Function(NotificationsStateError value)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc abstract class $NotificationsStateCopyWith<$Res> { factory $NotificationsStateCopyWith( - NotificationsState value, $Res Function(NotificationsState) then) = - _$NotificationsStateCopyWithImpl<$Res, NotificationsState>; + NotificationsState value, + $Res Function(NotificationsState) then, + ) = _$NotificationsStateCopyWithImpl<$Res, NotificationsState>; } /// @nodoc @@ -95,18 +93,20 @@ class _$NotificationsStateCopyWithImpl<$Res, $Val extends NotificationsState> /// @nodoc abstract class _$$NotificationsStateImplCopyWith<$Res> { - factory _$$NotificationsStateImplCopyWith(_$NotificationsStateImpl value, - $Res Function(_$NotificationsStateImpl) then) = - __$$NotificationsStateImplCopyWithImpl<$Res>; + factory _$$NotificationsStateImplCopyWith( + _$NotificationsStateImpl value, + $Res Function(_$NotificationsStateImpl) then, + ) = __$$NotificationsStateImplCopyWithImpl<$Res>; } /// @nodoc class __$$NotificationsStateImplCopyWithImpl<$Res> extends _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateImpl> implements _$$NotificationsStateImplCopyWith<$Res> { - __$$NotificationsStateImplCopyWithImpl(_$NotificationsStateImpl _value, - $Res Function(_$NotificationsStateImpl) _then) - : super(_value, _then); + __$$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. @@ -137,8 +137,10 @@ class _$NotificationsStateImpl implements _NotificationsState { TResult Function() $default, { required TResult Function() empty, required TResult Function( - List notifications, int notificationsCount) - loaded, + List notifications, + int notificationsCount, + ) + loaded, required TResult Function(String errorMessage) error, }) { return $default(); @@ -150,7 +152,7 @@ class _$NotificationsStateImpl implements _NotificationsState { TResult? Function()? $default, { TResult? Function()? empty, TResult? Function(List notifications, int notificationsCount)? - loaded, + loaded, TResult? Function(String errorMessage)? error, }) { return $default?.call(); @@ -162,7 +164,7 @@ class _$NotificationsStateImpl implements _NotificationsState { TResult Function()? $default, { TResult Function()? empty, TResult Function(List notifications, int notificationsCount)? - loaded, + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -217,20 +219,20 @@ abstract class _NotificationsState implements NotificationsState { /// @nodoc abstract class _$$NotificationsStateEmptyImplCopyWith<$Res> { factory _$$NotificationsStateEmptyImplCopyWith( - _$NotificationsStateEmptyImpl value, - $Res Function(_$NotificationsStateEmptyImpl) then) = - __$$NotificationsStateEmptyImplCopyWithImpl<$Res>; + _$NotificationsStateEmptyImpl value, + $Res Function(_$NotificationsStateEmptyImpl) then, + ) = __$$NotificationsStateEmptyImplCopyWithImpl<$Res>; } /// @nodoc class __$$NotificationsStateEmptyImplCopyWithImpl<$Res> - extends _$NotificationsStateCopyWithImpl<$Res, - _$NotificationsStateEmptyImpl> + extends + _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateEmptyImpl> implements _$$NotificationsStateEmptyImplCopyWith<$Res> { __$$NotificationsStateEmptyImplCopyWithImpl( - _$NotificationsStateEmptyImpl _value, - $Res Function(_$NotificationsStateEmptyImpl) _then) - : super(_value, _then); + _$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. @@ -262,8 +264,10 @@ class _$NotificationsStateEmptyImpl implements NotificationsStateEmpty { TResult Function() $default, { required TResult Function() empty, required TResult Function( - List notifications, int notificationsCount) - loaded, + List notifications, + int notificationsCount, + ) + loaded, required TResult Function(String errorMessage) error, }) { return empty(); @@ -275,7 +279,7 @@ class _$NotificationsStateEmptyImpl implements NotificationsStateEmpty { TResult? Function()? $default, { TResult? Function()? empty, TResult? Function(List notifications, int notificationsCount)? - loaded, + loaded, TResult? Function(String errorMessage)? error, }) { return empty?.call(); @@ -287,7 +291,7 @@ class _$NotificationsStateEmptyImpl implements NotificationsStateEmpty { TResult Function()? $default, { TResult Function()? empty, TResult Function(List notifications, int notificationsCount)? - loaded, + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -342,51 +346,52 @@ abstract class NotificationsStateEmpty implements NotificationsState { /// @nodoc abstract class _$$NotificationsStateLoadedImplCopyWith<$Res> { factory _$$NotificationsStateLoadedImplCopyWith( - _$NotificationsStateLoadedImpl value, - $Res Function(_$NotificationsStateLoadedImpl) then) = - __$$NotificationsStateLoadedImplCopyWithImpl<$Res>; + _$NotificationsStateLoadedImpl value, + $Res Function(_$NotificationsStateLoadedImpl) then, + ) = __$$NotificationsStateLoadedImplCopyWithImpl<$Res>; @useResult $Res call({List notifications, int notificationsCount}); } /// @nodoc class __$$NotificationsStateLoadedImplCopyWithImpl<$Res> - extends _$NotificationsStateCopyWithImpl<$Res, - _$NotificationsStateLoadedImpl> + extends + _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateLoadedImpl> implements _$$NotificationsStateLoadedImplCopyWith<$Res> { __$$NotificationsStateLoadedImplCopyWithImpl( - _$NotificationsStateLoadedImpl _value, - $Res Function(_$NotificationsStateLoadedImpl) _then) - : super(_value, _then); + _$NotificationsStateLoadedImpl _value, + $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 - as int, - )); + $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 + as int, + ), + ); } } /// @nodoc class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded { - const _$NotificationsStateLoadedImpl( - {required final List notifications, - required this.notificationsCount}) - : _notifications = notifications; + const _$NotificationsStateLoadedImpl({ + required final List notifications, + required this.notificationsCount, + }) : _notifications = notifications; final List _notifications; @override @@ -409,15 +414,20 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded { return identical(this, other) || (other.runtimeType == runtimeType && other is _$NotificationsStateLoadedImpl && - const DeepCollectionEquality() - .equals(other._notifications, _notifications) && + const DeepCollectionEquality().equals( + other._notifications, + _notifications, + ) && (identical(other.notificationsCount, notificationsCount) || other.notificationsCount == notificationsCount)); } @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(_notifications), 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. @@ -425,8 +435,9 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded { @override @pragma('vm:prefer-inline') _$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl> - get copyWith => __$$NotificationsStateLoadedImplCopyWithImpl< - _$NotificationsStateLoadedImpl>(this, _$identity); + get copyWith => __$$NotificationsStateLoadedImplCopyWithImpl< + _$NotificationsStateLoadedImpl + >(this, _$identity); @override @optionalTypeArgs @@ -434,8 +445,10 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded { TResult Function() $default, { required TResult Function() empty, required TResult Function( - List notifications, int notificationsCount) - loaded, + List notifications, + int notificationsCount, + ) + loaded, required TResult Function(String errorMessage) error, }) { return loaded(notifications, notificationsCount); @@ -447,7 +460,7 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded { TResult? Function()? $default, { TResult? Function()? empty, TResult? Function(List notifications, int notificationsCount)? - loaded, + loaded, TResult? Function(String errorMessage)? error, }) { return loaded?.call(notifications, notificationsCount); @@ -459,7 +472,7 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded { TResult Function()? $default, { TResult Function()? empty, TResult Function(List notifications, int notificationsCount)? - loaded, + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -508,9 +521,10 @@ class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded { } abstract class NotificationsStateLoaded implements NotificationsState { - const factory NotificationsStateLoaded( - {required final List notifications, - required final int notificationsCount}) = _$NotificationsStateLoadedImpl; + const factory NotificationsStateLoaded({ + required final List notifications, + required final int notificationsCount, + }) = _$NotificationsStateLoadedImpl; List get notifications; int get notificationsCount; @@ -519,42 +533,43 @@ abstract class NotificationsStateLoaded implements NotificationsState { /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) _$$NotificationsStateLoadedImplCopyWith<_$NotificationsStateLoadedImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class _$$NotificationsStateErrorImplCopyWith<$Res> { factory _$$NotificationsStateErrorImplCopyWith( - _$NotificationsStateErrorImpl value, - $Res Function(_$NotificationsStateErrorImpl) then) = - __$$NotificationsStateErrorImplCopyWithImpl<$Res>; + _$NotificationsStateErrorImpl value, + $Res Function(_$NotificationsStateErrorImpl) then, + ) = __$$NotificationsStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String errorMessage}); } /// @nodoc class __$$NotificationsStateErrorImplCopyWithImpl<$Res> - extends _$NotificationsStateCopyWithImpl<$Res, - _$NotificationsStateErrorImpl> + extends + _$NotificationsStateCopyWithImpl<$Res, _$NotificationsStateErrorImpl> implements _$$NotificationsStateErrorImplCopyWith<$Res> { __$$NotificationsStateErrorImplCopyWithImpl( - _$NotificationsStateErrorImpl _value, - $Res Function(_$NotificationsStateErrorImpl) _then) - : super(_value, _then); + _$NotificationsStateErrorImpl _value, + $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({ - Object? errorMessage = null, - }) { - return _then(_$NotificationsStateErrorImpl( - errorMessage: null == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? errorMessage = null}) { + return _then( + _$NotificationsStateErrorImpl( + errorMessage: + null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -589,8 +604,9 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError { @override @pragma('vm:prefer-inline') _$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl> - get copyWith => __$$NotificationsStateErrorImplCopyWithImpl< - _$NotificationsStateErrorImpl>(this, _$identity); + get copyWith => __$$NotificationsStateErrorImplCopyWithImpl< + _$NotificationsStateErrorImpl + >(this, _$identity); @override @optionalTypeArgs @@ -598,8 +614,10 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError { TResult Function() $default, { required TResult Function() empty, required TResult Function( - List notifications, int notificationsCount) - loaded, + List notifications, + int notificationsCount, + ) + loaded, required TResult Function(String errorMessage) error, }) { return error(errorMessage); @@ -611,7 +629,7 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError { TResult? Function()? $default, { TResult? Function()? empty, TResult? Function(List notifications, int notificationsCount)? - loaded, + loaded, TResult? Function(String errorMessage)? error, }) { return error?.call(errorMessage); @@ -623,7 +641,7 @@ class _$NotificationsStateErrorImpl implements NotificationsStateError { TResult Function()? $default, { TResult Function()? empty, TResult Function(List notifications, int notificationsCount)? - loaded, + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -681,5 +699,5 @@ abstract class NotificationsStateError implements NotificationsState { /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) _$$NotificationsStateErrorImplCopyWith<_$NotificationsStateErrorImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } 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 index b629d579..270c829f 100644 --- 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 @@ -12,7 +12,8 @@ part of 'profile_avatar_state.dart'; 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'); + '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 { @@ -22,16 +23,14 @@ mixin _$ProfileAvatarState { required TResult Function() loading, required TResult Function(ProfileModel profile) loaded, required TResult Function(String errorMessage) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, TResult? Function(ProfileModel profile)? loaded, TResult? Function(String errorMessage)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { @@ -39,24 +38,21 @@ mixin _$ProfileAvatarState { TResult Function(ProfileModel profile)? loaded, TResult Function(String errorMessage)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => 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; + }) => 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; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_ProfileAvatarState value)? $default, { @@ -64,15 +60,15 @@ mixin _$ProfileAvatarState { TResult Function(ProfileAvatarStateLoaded value)? loaded, TResult Function(ProfileAvatarStateError value)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc abstract class $ProfileAvatarStateCopyWith<$Res> { factory $ProfileAvatarStateCopyWith( - ProfileAvatarState value, $Res Function(ProfileAvatarState) then) = - _$ProfileAvatarStateCopyWithImpl<$Res, ProfileAvatarState>; + ProfileAvatarState value, + $Res Function(ProfileAvatarState) then, + ) = _$ProfileAvatarStateCopyWithImpl<$Res, ProfileAvatarState>; } /// @nodoc @@ -91,18 +87,20 @@ class _$ProfileAvatarStateCopyWithImpl<$Res, $Val extends ProfileAvatarState> /// @nodoc abstract class _$$ProfileAvatarStateImplCopyWith<$Res> { - factory _$$ProfileAvatarStateImplCopyWith(_$ProfileAvatarStateImpl value, - $Res Function(_$ProfileAvatarStateImpl) then) = - __$$ProfileAvatarStateImplCopyWithImpl<$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); + __$$ProfileAvatarStateImplCopyWithImpl( + _$ProfileAvatarStateImpl _value, + $Res Function(_$ProfileAvatarStateImpl) _then, + ) : super(_value, _then); /// Create a copy of ProfileAvatarState /// with the given fields replaced by the non-null parameter values. @@ -209,20 +207,20 @@ abstract class _ProfileAvatarState implements ProfileAvatarState { /// @nodoc abstract class _$$ProfileAvatarStateLoadingImplCopyWith<$Res> { factory _$$ProfileAvatarStateLoadingImplCopyWith( - _$ProfileAvatarStateLoadingImpl value, - $Res Function(_$ProfileAvatarStateLoadingImpl) then) = - __$$ProfileAvatarStateLoadingImplCopyWithImpl<$Res>; + _$ProfileAvatarStateLoadingImpl value, + $Res Function(_$ProfileAvatarStateLoadingImpl) then, + ) = __$$ProfileAvatarStateLoadingImplCopyWithImpl<$Res>; } /// @nodoc class __$$ProfileAvatarStateLoadingImplCopyWithImpl<$Res> - extends _$ProfileAvatarStateCopyWithImpl<$Res, - _$ProfileAvatarStateLoadingImpl> + extends + _$ProfileAvatarStateCopyWithImpl<$Res, _$ProfileAvatarStateLoadingImpl> implements _$$ProfileAvatarStateLoadingImplCopyWith<$Res> { __$$ProfileAvatarStateLoadingImplCopyWithImpl( - _$ProfileAvatarStateLoadingImpl _value, - $Res Function(_$ProfileAvatarStateLoadingImpl) _then) - : super(_value, _then); + _$ProfileAvatarStateLoadingImpl _value, + $Res Function(_$ProfileAvatarStateLoadingImpl) _then, + ) : super(_value, _then); /// Create a copy of ProfileAvatarState /// with the given fields replaced by the non-null parameter values. @@ -330,9 +328,9 @@ abstract class ProfileAvatarStateLoading implements ProfileAvatarState { /// @nodoc abstract class _$$ProfileAvatarStateLoadedImplCopyWith<$Res> { factory _$$ProfileAvatarStateLoadedImplCopyWith( - _$ProfileAvatarStateLoadedImpl value, - $Res Function(_$ProfileAvatarStateLoadedImpl) then) = - __$$ProfileAvatarStateLoadedImplCopyWithImpl<$Res>; + _$ProfileAvatarStateLoadedImpl value, + $Res Function(_$ProfileAvatarStateLoadedImpl) then, + ) = __$$ProfileAvatarStateLoadedImplCopyWithImpl<$Res>; @useResult $Res call({ProfileModel profile}); @@ -341,27 +339,28 @@ abstract class _$$ProfileAvatarStateLoadedImplCopyWith<$Res> { /// @nodoc class __$$ProfileAvatarStateLoadedImplCopyWithImpl<$Res> - extends _$ProfileAvatarStateCopyWithImpl<$Res, - _$ProfileAvatarStateLoadedImpl> + extends + _$ProfileAvatarStateCopyWithImpl<$Res, _$ProfileAvatarStateLoadedImpl> implements _$$ProfileAvatarStateLoadedImplCopyWith<$Res> { __$$ProfileAvatarStateLoadedImplCopyWithImpl( - _$ProfileAvatarStateLoadedImpl _value, - $Res Function(_$ProfileAvatarStateLoadedImpl) _then) - : super(_value, _then); + _$ProfileAvatarStateLoadedImpl _value, + $Res Function(_$ProfileAvatarStateLoadedImpl) _then, + ) : super(_value, _then); /// Create a copy of ProfileAvatarState /// with the given fields replaced by the non-null parameter values. @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, - )); + $Res call({Object? profile = null}) { + return _then( + _$ProfileAvatarStateLoadedImpl( + profile: + null == profile + ? _value.profile + : profile // ignore: cast_nullable_to_non_nullable + as ProfileModel, + ), + ); } /// Create a copy of ProfileAvatarState @@ -405,8 +404,9 @@ class _$ProfileAvatarStateLoadedImpl implements ProfileAvatarStateLoaded { @override @pragma('vm:prefer-inline') _$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl> - get copyWith => __$$ProfileAvatarStateLoadedImplCopyWithImpl< - _$ProfileAvatarStateLoadedImpl>(this, _$identity); + get copyWith => __$$ProfileAvatarStateLoadedImplCopyWithImpl< + _$ProfileAvatarStateLoadedImpl + >(this, _$identity); @override @optionalTypeArgs @@ -484,8 +484,9 @@ class _$ProfileAvatarStateLoadedImpl implements ProfileAvatarStateLoaded { } abstract class ProfileAvatarStateLoaded implements ProfileAvatarState { - const factory ProfileAvatarStateLoaded( - {required final ProfileModel profile}) = _$ProfileAvatarStateLoadedImpl; + const factory ProfileAvatarStateLoaded({ + required final ProfileModel profile, + }) = _$ProfileAvatarStateLoadedImpl; ProfileModel get profile; @@ -493,42 +494,43 @@ abstract class ProfileAvatarStateLoaded implements ProfileAvatarState { /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) _$$ProfileAvatarStateLoadedImplCopyWith<_$ProfileAvatarStateLoadedImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class _$$ProfileAvatarStateErrorImplCopyWith<$Res> { factory _$$ProfileAvatarStateErrorImplCopyWith( - _$ProfileAvatarStateErrorImpl value, - $Res Function(_$ProfileAvatarStateErrorImpl) then) = - __$$ProfileAvatarStateErrorImplCopyWithImpl<$Res>; + _$ProfileAvatarStateErrorImpl value, + $Res Function(_$ProfileAvatarStateErrorImpl) then, + ) = __$$ProfileAvatarStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String errorMessage}); } /// @nodoc class __$$ProfileAvatarStateErrorImplCopyWithImpl<$Res> - extends _$ProfileAvatarStateCopyWithImpl<$Res, - _$ProfileAvatarStateErrorImpl> + extends + _$ProfileAvatarStateCopyWithImpl<$Res, _$ProfileAvatarStateErrorImpl> implements _$$ProfileAvatarStateErrorImplCopyWith<$Res> { __$$ProfileAvatarStateErrorImplCopyWithImpl( - _$ProfileAvatarStateErrorImpl _value, - $Res Function(_$ProfileAvatarStateErrorImpl) _then) - : super(_value, _then); + _$ProfileAvatarStateErrorImpl _value, + $Res Function(_$ProfileAvatarStateErrorImpl) _then, + ) : super(_value, _then); /// Create a copy of ProfileAvatarState /// with the given fields replaced by the non-null parameter values. @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, - )); + $Res call({Object? errorMessage = null}) { + return _then( + _$ProfileAvatarStateErrorImpl( + errorMessage: + null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -563,8 +565,9 @@ class _$ProfileAvatarStateErrorImpl implements ProfileAvatarStateError { @override @pragma('vm:prefer-inline') _$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl> - get copyWith => __$$ProfileAvatarStateErrorImplCopyWithImpl< - _$ProfileAvatarStateErrorImpl>(this, _$identity); + get copyWith => __$$ProfileAvatarStateErrorImplCopyWithImpl< + _$ProfileAvatarStateErrorImpl + >(this, _$identity); @override @optionalTypeArgs @@ -651,5 +654,5 @@ abstract class ProfileAvatarStateError implements ProfileAvatarState { /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) _$$ProfileAvatarStateErrorImplCopyWith<_$ProfileAvatarStateErrorImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/features/calendar/models/calendar_model.freezed.dart b/lib/features/calendar/models/calendar_model.freezed.dart index d10fc8f2..b7ca39ce 100644 --- a/lib/features/calendar/models/calendar_model.freezed.dart +++ b/lib/features/calendar/models/calendar_model.freezed.dart @@ -12,7 +12,8 @@ part of 'calendar_model.dart'; 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'); + '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', +); CalendarModel _$CalendarModelFromJson(Map json) { return _CalendarModel.fromJson(json); @@ -38,13 +39,15 @@ mixin _$CalendarModel { /// @nodoc abstract class $CalendarModelCopyWith<$Res> { factory $CalendarModelCopyWith( - CalendarModel value, $Res Function(CalendarModel) then) = - _$CalendarModelCopyWithImpl<$Res, CalendarModel>; + CalendarModel value, + $Res Function(CalendarModel) then, + ) = _$CalendarModelCopyWithImpl<$Res, CalendarModel>; @useResult - $Res call( - {String date, - bool is_current_day_included_in_the_chosen_diet_progression, - Object? diary}); + $Res call({ + String date, + bool is_current_day_included_in_the_chosen_diet_progression, + Object? diary, + }); } /// @nodoc @@ -66,18 +69,23 @@ class _$CalendarModelCopyWithImpl<$Res, $Val extends CalendarModel> Object? is_current_day_included_in_the_chosen_diet_progression = null, Object? diary = freezed, }) { - return _then(_value.copyWith( - date: null == date - ? _value.date - : date // ignore: cast_nullable_to_non_nullable - as String, - is_current_day_included_in_the_chosen_diet_progression: null == - is_current_day_included_in_the_chosen_diet_progression - ? _value.is_current_day_included_in_the_chosen_diet_progression - : is_current_day_included_in_the_chosen_diet_progression // ignore: cast_nullable_to_non_nullable - as bool, - diary: freezed == diary ? _value.diary : diary, - ) as $Val); + return _then( + _value.copyWith( + date: + null == date + ? _value.date + : date // ignore: cast_nullable_to_non_nullable + as String, + is_current_day_included_in_the_chosen_diet_progression: + null == is_current_day_included_in_the_chosen_diet_progression + ? _value + .is_current_day_included_in_the_chosen_diet_progression + : is_current_day_included_in_the_chosen_diet_progression // ignore: cast_nullable_to_non_nullable + as bool, + diary: freezed == diary ? _value.diary : diary, + ) + as $Val, + ); } } @@ -85,14 +93,16 @@ class _$CalendarModelCopyWithImpl<$Res, $Val extends CalendarModel> abstract class _$$CalendarModelImplCopyWith<$Res> implements $CalendarModelCopyWith<$Res> { factory _$$CalendarModelImplCopyWith( - _$CalendarModelImpl value, $Res Function(_$CalendarModelImpl) then) = - __$$CalendarModelImplCopyWithImpl<$Res>; + _$CalendarModelImpl value, + $Res Function(_$CalendarModelImpl) then, + ) = __$$CalendarModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String date, - bool is_current_day_included_in_the_chosen_diet_progression, - Object? diary}); + $Res call({ + String date, + bool is_current_day_included_in_the_chosen_diet_progression, + Object? diary, + }); } /// @nodoc @@ -100,8 +110,9 @@ class __$$CalendarModelImplCopyWithImpl<$Res> extends _$CalendarModelCopyWithImpl<$Res, _$CalendarModelImpl> implements _$$CalendarModelImplCopyWith<$Res> { __$$CalendarModelImplCopyWithImpl( - _$CalendarModelImpl _value, $Res Function(_$CalendarModelImpl) _then) - : super(_value, _then); + _$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. @@ -112,28 +123,32 @@ class __$$CalendarModelImplCopyWithImpl<$Res> Object? is_current_day_included_in_the_chosen_diet_progression = null, Object? diary = freezed, }) { - return _then(_$CalendarModelImpl( - date: null == date - ? _value.date - : date // ignore: cast_nullable_to_non_nullable - as String, - is_current_day_included_in_the_chosen_diet_progression: null == - is_current_day_included_in_the_chosen_diet_progression - ? _value.is_current_day_included_in_the_chosen_diet_progression - : is_current_day_included_in_the_chosen_diet_progression // ignore: cast_nullable_to_non_nullable - as bool, - diary: freezed == diary ? _value.diary : diary, - )); + return _then( + _$CalendarModelImpl( + date: + null == date + ? _value.date + : date // ignore: cast_nullable_to_non_nullable + as String, + is_current_day_included_in_the_chosen_diet_progression: + null == is_current_day_included_in_the_chosen_diet_progression + ? _value.is_current_day_included_in_the_chosen_diet_progression + : is_current_day_included_in_the_chosen_diet_progression // ignore: cast_nullable_to_non_nullable + as bool, + diary: freezed == diary ? _value.diary : diary, + ), + ); } } /// @nodoc @JsonSerializable() class _$CalendarModelImpl implements _CalendarModel { - const _$CalendarModelImpl( - {required this.date, - required this.is_current_day_included_in_the_chosen_diet_progression, - this.diary}); + const _$CalendarModelImpl({ + required this.date, + required this.is_current_day_included_in_the_chosen_diet_progression, + this.diary, + }); factory _$CalendarModelImpl.fromJson(Map json) => _$$CalendarModelImplFromJson(json); @@ -157,9 +172,9 @@ class _$CalendarModelImpl implements _CalendarModel { other is _$CalendarModelImpl && (identical(other.date, date) || other.date == date) && (identical( - other - .is_current_day_included_in_the_chosen_diet_progression, - is_current_day_included_in_the_chosen_diet_progression) || + other.is_current_day_included_in_the_chosen_diet_progression, + is_current_day_included_in_the_chosen_diet_progression, + ) || other.is_current_day_included_in_the_chosen_diet_progression == is_current_day_included_in_the_chosen_diet_progression) && const DeepCollectionEquality().equals(other.diary, diary)); @@ -168,10 +183,11 @@ class _$CalendarModelImpl implements _CalendarModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - date, - is_current_day_included_in_the_chosen_diet_progression, - const DeepCollectionEquality().hash(diary)); + runtimeType, + date, + 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. @@ -183,18 +199,16 @@ class _$CalendarModelImpl implements _CalendarModel { @override Map toJson() { - return _$$CalendarModelImplToJson( - this, - ); + return _$$CalendarModelImplToJson(this); } } abstract class _CalendarModel implements CalendarModel { - const factory _CalendarModel( - {required final String date, - required final bool - is_current_day_included_in_the_chosen_diet_progression, - final Object? diary}) = _$CalendarModelImpl; + const factory _CalendarModel({ + required final String date, + required final bool is_current_day_included_in_the_chosen_diet_progression, + final Object? diary, + }) = _$CalendarModelImpl; factory _CalendarModel.fromJson(Map json) = _$CalendarModelImpl.fromJson; diff --git a/lib/features/calendar/presentation/bloc/calendar_state.freezed.dart b/lib/features/calendar/presentation/bloc/calendar_state.freezed.dart index 0e7bdbcd..442215e5 100644 --- a/lib/features/calendar/presentation/bloc/calendar_state.freezed.dart +++ b/lib/features/calendar/presentation/bloc/calendar_state.freezed.dart @@ -12,7 +12,8 @@ part of 'calendar_state.dart'; 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'); + '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 _$CalendarState { @@ -22,16 +23,14 @@ mixin _$CalendarState { required TResult Function() loading, required TResult Function(List calendarList) loaded, required TResult Function(String errorMessage) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, TResult? Function(List calendarList)? loaded, TResult? Function(String errorMessage)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { @@ -39,24 +38,21 @@ mixin _$CalendarState { TResult Function(List calendarList)? loaded, TResult Function(String errorMessage)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult map( TResult Function(_CalendarState value) $default, { required TResult Function(CalendarStateLoading value) loading, required TResult Function(CalendarStateLoaded value) loaded, required TResult Function(CalendarStateError value) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull( TResult? Function(_CalendarState value)? $default, { TResult? Function(CalendarStateLoading value)? loading, TResult? Function(CalendarStateLoaded value)? loaded, TResult? Function(CalendarStateError value)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_CalendarState value)? $default, { @@ -64,15 +60,15 @@ mixin _$CalendarState { TResult Function(CalendarStateLoaded value)? loaded, TResult Function(CalendarStateError value)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc abstract class $CalendarStateCopyWith<$Res> { factory $CalendarStateCopyWith( - CalendarState value, $Res Function(CalendarState) then) = - _$CalendarStateCopyWithImpl<$Res, CalendarState>; + CalendarState value, + $Res Function(CalendarState) then, + ) = _$CalendarStateCopyWithImpl<$Res, CalendarState>; } /// @nodoc @@ -92,8 +88,9 @@ class _$CalendarStateCopyWithImpl<$Res, $Val extends CalendarState> /// @nodoc abstract class _$$CalendarStateImplCopyWith<$Res> { factory _$$CalendarStateImplCopyWith( - _$CalendarStateImpl value, $Res Function(_$CalendarStateImpl) then) = - __$$CalendarStateImplCopyWithImpl<$Res>; + _$CalendarStateImpl value, + $Res Function(_$CalendarStateImpl) then, + ) = __$$CalendarStateImplCopyWithImpl<$Res>; } /// @nodoc @@ -101,8 +98,9 @@ class __$$CalendarStateImplCopyWithImpl<$Res> extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateImpl> implements _$$CalendarStateImplCopyWith<$Res> { __$$CalendarStateImplCopyWithImpl( - _$CalendarStateImpl _value, $Res Function(_$CalendarStateImpl) _then) - : super(_value, _then); + _$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. @@ -208,18 +206,20 @@ abstract class _CalendarState implements CalendarState { /// @nodoc abstract class _$$CalendarStateLoadingImplCopyWith<$Res> { - factory _$$CalendarStateLoadingImplCopyWith(_$CalendarStateLoadingImpl value, - $Res Function(_$CalendarStateLoadingImpl) then) = - __$$CalendarStateLoadingImplCopyWithImpl<$Res>; + factory _$$CalendarStateLoadingImplCopyWith( + _$CalendarStateLoadingImpl value, + $Res Function(_$CalendarStateLoadingImpl) then, + ) = __$$CalendarStateLoadingImplCopyWithImpl<$Res>; } /// @nodoc class __$$CalendarStateLoadingImplCopyWithImpl<$Res> extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateLoadingImpl> implements _$$CalendarStateLoadingImplCopyWith<$Res> { - __$$CalendarStateLoadingImplCopyWithImpl(_$CalendarStateLoadingImpl _value, - $Res Function(_$CalendarStateLoadingImpl) _then) - : super(_value, _then); + __$$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. @@ -326,9 +326,10 @@ abstract class CalendarStateLoading implements CalendarState { /// @nodoc abstract class _$$CalendarStateLoadedImplCopyWith<$Res> { - factory _$$CalendarStateLoadedImplCopyWith(_$CalendarStateLoadedImpl value, - $Res Function(_$CalendarStateLoadedImpl) then) = - __$$CalendarStateLoadedImplCopyWithImpl<$Res>; + factory _$$CalendarStateLoadedImplCopyWith( + _$CalendarStateLoadedImpl value, + $Res Function(_$CalendarStateLoadedImpl) then, + ) = __$$CalendarStateLoadedImplCopyWithImpl<$Res>; @useResult $Res call({List calendarList}); } @@ -337,32 +338,34 @@ abstract class _$$CalendarStateLoadedImplCopyWith<$Res> { class __$$CalendarStateLoadedImplCopyWithImpl<$Res> extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateLoadedImpl> implements _$$CalendarStateLoadedImplCopyWith<$Res> { - __$$CalendarStateLoadedImplCopyWithImpl(_$CalendarStateLoadedImpl _value, - $Res Function(_$CalendarStateLoadedImpl) _then) - : super(_value, _then); + __$$CalendarStateLoadedImplCopyWithImpl( + _$CalendarStateLoadedImpl _value, + $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({ - Object? calendarList = null, - }) { - return _then(_$CalendarStateLoadedImpl( - calendarList: null == calendarList - ? _value._calendarList - : calendarList // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? calendarList = null}) { + return _then( + _$CalendarStateLoadedImpl( + calendarList: + null == calendarList + ? _value._calendarList + : calendarList // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } /// @nodoc class _$CalendarStateLoadedImpl implements CalendarStateLoaded { - const _$CalendarStateLoadedImpl( - {required final List calendarList}) - : _calendarList = calendarList; + const _$CalendarStateLoadedImpl({ + required final List calendarList, + }) : _calendarList = calendarList; final List _calendarList; @override @@ -382,13 +385,17 @@ class _$CalendarStateLoadedImpl implements CalendarStateLoaded { return identical(this, other) || (other.runtimeType == runtimeType && other is _$CalendarStateLoadedImpl && - const DeepCollectionEquality() - .equals(other._calendarList, _calendarList)); + const DeepCollectionEquality().equals( + other._calendarList, + _calendarList, + )); } @override int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_calendarList)); + runtimeType, + const DeepCollectionEquality().hash(_calendarList), + ); /// Create a copy of CalendarState /// with the given fields replaced by the non-null parameter values. @@ -397,7 +404,9 @@ class _$CalendarStateLoadedImpl implements CalendarStateLoaded { @pragma('vm:prefer-inline') _$$CalendarStateLoadedImplCopyWith<_$CalendarStateLoadedImpl> get copyWith => __$$CalendarStateLoadedImplCopyWithImpl<_$CalendarStateLoadedImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs @@ -475,9 +484,9 @@ class _$CalendarStateLoadedImpl implements CalendarStateLoaded { } abstract class CalendarStateLoaded implements CalendarState { - const factory CalendarStateLoaded( - {required final List calendarList}) = - _$CalendarStateLoadedImpl; + const factory CalendarStateLoaded({ + required final List calendarList, + }) = _$CalendarStateLoadedImpl; List get calendarList; @@ -490,9 +499,10 @@ abstract class CalendarStateLoaded implements CalendarState { /// @nodoc abstract class _$$CalendarStateErrorImplCopyWith<$Res> { - factory _$$CalendarStateErrorImplCopyWith(_$CalendarStateErrorImpl value, - $Res Function(_$CalendarStateErrorImpl) then) = - __$$CalendarStateErrorImplCopyWithImpl<$Res>; + factory _$$CalendarStateErrorImplCopyWith( + _$CalendarStateErrorImpl value, + $Res Function(_$CalendarStateErrorImpl) then, + ) = __$$CalendarStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String errorMessage}); } @@ -501,23 +511,25 @@ abstract class _$$CalendarStateErrorImplCopyWith<$Res> { class __$$CalendarStateErrorImplCopyWithImpl<$Res> extends _$CalendarStateCopyWithImpl<$Res, _$CalendarStateErrorImpl> implements _$$CalendarStateErrorImplCopyWith<$Res> { - __$$CalendarStateErrorImplCopyWithImpl(_$CalendarStateErrorImpl _value, - $Res Function(_$CalendarStateErrorImpl) _then) - : super(_value, _then); + __$$CalendarStateErrorImplCopyWithImpl( + _$CalendarStateErrorImpl _value, + $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({ - Object? errorMessage = null, - }) { - return _then(_$CalendarStateErrorImpl( - errorMessage: null == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? errorMessage = null}) { + return _then( + _$CalendarStateErrorImpl( + errorMessage: + null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -553,7 +565,9 @@ class _$CalendarStateErrorImpl implements CalendarStateError { @pragma('vm:prefer-inline') _$$CalendarStateErrorImplCopyWith<_$CalendarStateErrorImpl> get copyWith => __$$CalendarStateErrorImplCopyWithImpl<_$CalendarStateErrorImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs diff --git a/lib/features/calendar/services/calendar_service.g.dart b/lib/features/calendar/services/calendar_service.g.dart index 5055d002..4c32230a 100644 --- a/lib/features/calendar/services/calendar_service.g.dart +++ b/lib/features/calendar/services/calendar_service.g.dart @@ -36,11 +36,13 @@ class _CalendarService implements CalendarService { final _result = await _dio.fetch>(_options); late List _value; try { - _value = _result.data! - .map( - (dynamic i) => CalendarModel.fromJson(i as Map), - ) - .toList(); + _value = + _result.data! + .map( + (dynamic i) => + CalendarModel.fromJson(i as Map), + ) + .toList(); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; diff --git a/lib/features/chat/models/chat_message_model.freezed.dart b/lib/features/chat/models/chat_message_model.freezed.dart index 3cddc329..0d2f62c4 100644 --- a/lib/features/chat/models/chat_message_model.freezed.dart +++ b/lib/features/chat/models/chat_message_model.freezed.dart @@ -12,7 +12,8 @@ part of 'chat_message_model.dart'; 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'); + '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', +); ChatMessageModel _$ChatMessageModelFromJson(Map json) { return _ChatMessageModel.fromJson(json); @@ -48,18 +49,20 @@ mixin _$ChatMessageModel { /// @nodoc abstract class $ChatMessageModelCopyWith<$Res> { factory $ChatMessageModelCopyWith( - ChatMessageModel value, $Res Function(ChatMessageModel) then) = - _$ChatMessageModelCopyWithImpl<$Res, ChatMessageModel>; + ChatMessageModel value, + $Res Function(ChatMessageModel) then, + ) = _$ChatMessageModelCopyWithImpl<$Res, ChatMessageModel>; @useResult - $Res call( - {int id, - String data, - @JsonKey(name: 'media_data') List? mediaData, - @JsonKey(name: 'author_id') int authorId, - @JsonKey(name: 'updated_at', fromJson: parseDate) DateTime updatedAt, - @JsonKey(name: 'read_by_to_user', defaultValue: false) bool isRead, - @JsonKey(name: 'is_author_message_auth_user') bool? isCurrentUserAuthor, - @JsonKey(name: 'room_id') String? roomId}); + $Res call({ + int id, + String data, + @JsonKey(name: 'media_data') List? mediaData, + @JsonKey(name: 'author_id') int authorId, + @JsonKey(name: 'updated_at', fromJson: parseDate) DateTime updatedAt, + @JsonKey(name: 'read_by_to_user', defaultValue: false) bool isRead, + @JsonKey(name: 'is_author_message_auth_user') bool? isCurrentUserAuthor, + @JsonKey(name: 'room_id') String? roomId, + }); } /// @nodoc @@ -86,69 +89,83 @@ class _$ChatMessageModelCopyWithImpl<$Res, $Val extends ChatMessageModel> Object? isCurrentUserAuthor = freezed, Object? roomId = freezed, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as String, - mediaData: freezed == mediaData - ? _value.mediaData - : mediaData // ignore: cast_nullable_to_non_nullable - as List?, - authorId: null == authorId - ? _value.authorId - : authorId // ignore: cast_nullable_to_non_nullable - as int, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - isRead: null == isRead - ? _value.isRead - : isRead // ignore: cast_nullable_to_non_nullable - as bool, - isCurrentUserAuthor: freezed == isCurrentUserAuthor - ? _value.isCurrentUserAuthor - : isCurrentUserAuthor // ignore: cast_nullable_to_non_nullable - as bool?, - roomId: freezed == roomId - ? _value.roomId - : roomId // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + data: + null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as String, + mediaData: + freezed == mediaData + ? _value.mediaData + : mediaData // ignore: cast_nullable_to_non_nullable + as List?, + authorId: + null == authorId + ? _value.authorId + : authorId // ignore: cast_nullable_to_non_nullable + as int, + updatedAt: + null == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + isRead: + null == isRead + ? _value.isRead + : isRead // ignore: cast_nullable_to_non_nullable + as bool, + isCurrentUserAuthor: + freezed == isCurrentUserAuthor + ? _value.isCurrentUserAuthor + : isCurrentUserAuthor // ignore: cast_nullable_to_non_nullable + as bool?, + roomId: + freezed == roomId + ? _value.roomId + : roomId // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc abstract class _$$ChatMessageModelImplCopyWith<$Res> implements $ChatMessageModelCopyWith<$Res> { - factory _$$ChatMessageModelImplCopyWith(_$ChatMessageModelImpl value, - $Res Function(_$ChatMessageModelImpl) then) = - __$$ChatMessageModelImplCopyWithImpl<$Res>; + factory _$$ChatMessageModelImplCopyWith( + _$ChatMessageModelImpl value, + $Res Function(_$ChatMessageModelImpl) then, + ) = __$$ChatMessageModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - String data, - @JsonKey(name: 'media_data') List? mediaData, - @JsonKey(name: 'author_id') int authorId, - @JsonKey(name: 'updated_at', fromJson: parseDate) DateTime updatedAt, - @JsonKey(name: 'read_by_to_user', defaultValue: false) bool isRead, - @JsonKey(name: 'is_author_message_auth_user') bool? isCurrentUserAuthor, - @JsonKey(name: 'room_id') String? roomId}); + $Res call({ + int id, + String data, + @JsonKey(name: 'media_data') List? mediaData, + @JsonKey(name: 'author_id') int authorId, + @JsonKey(name: 'updated_at', fromJson: parseDate) DateTime updatedAt, + @JsonKey(name: 'read_by_to_user', defaultValue: false) bool isRead, + @JsonKey(name: 'is_author_message_auth_user') bool? isCurrentUserAuthor, + @JsonKey(name: 'room_id') String? roomId, + }); } /// @nodoc class __$$ChatMessageModelImplCopyWithImpl<$Res> extends _$ChatMessageModelCopyWithImpl<$Res, _$ChatMessageModelImpl> implements _$$ChatMessageModelImplCopyWith<$Res> { - __$$ChatMessageModelImplCopyWithImpl(_$ChatMessageModelImpl _value, - $Res Function(_$ChatMessageModelImpl) _then) - : super(_value, _then); + __$$ChatMessageModelImplCopyWithImpl( + _$ChatMessageModelImpl _value, + $Res Function(_$ChatMessageModelImpl) _then, + ) : super(_value, _then); /// Create a copy of ChatMessageModel /// with the given fields replaced by the non-null parameter values. @@ -164,58 +181,67 @@ class __$$ChatMessageModelImplCopyWithImpl<$Res> Object? isCurrentUserAuthor = freezed, Object? roomId = freezed, }) { - return _then(_$ChatMessageModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as String, - mediaData: freezed == mediaData - ? _value._mediaData - : mediaData // ignore: cast_nullable_to_non_nullable - as List?, - authorId: null == authorId - ? _value.authorId - : authorId // ignore: cast_nullable_to_non_nullable - as int, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - isRead: null == isRead - ? _value.isRead - : isRead // ignore: cast_nullable_to_non_nullable - as bool, - isCurrentUserAuthor: freezed == isCurrentUserAuthor - ? _value.isCurrentUserAuthor - : isCurrentUserAuthor // ignore: cast_nullable_to_non_nullable - as bool?, - roomId: freezed == roomId - ? _value.roomId - : roomId // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$ChatMessageModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + data: + null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as String, + mediaData: + freezed == mediaData + ? _value._mediaData + : mediaData // ignore: cast_nullable_to_non_nullable + as List?, + authorId: + null == authorId + ? _value.authorId + : authorId // ignore: cast_nullable_to_non_nullable + as int, + updatedAt: + null == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + isRead: + null == isRead + ? _value.isRead + : isRead // ignore: cast_nullable_to_non_nullable + as bool, + isCurrentUserAuthor: + freezed == isCurrentUserAuthor + ? _value.isCurrentUserAuthor + : isCurrentUserAuthor // ignore: cast_nullable_to_non_nullable + as bool?, + roomId: + freezed == roomId + ? _value.roomId + : roomId // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } /// @nodoc @JsonSerializable() class _$ChatMessageModelImpl implements _ChatMessageModel { - const _$ChatMessageModelImpl( - {required this.id, - required this.data, - @JsonKey(name: 'media_data') required final List? mediaData, - @JsonKey(name: 'author_id') required this.authorId, - @JsonKey(name: 'updated_at', fromJson: parseDate) required this.updatedAt, - @JsonKey(name: 'read_by_to_user', defaultValue: false) - required this.isRead, - @JsonKey(name: 'is_author_message_auth_user') - required this.isCurrentUserAuthor, - @JsonKey(name: 'room_id') required this.roomId}) - : _mediaData = mediaData; + const _$ChatMessageModelImpl({ + required this.id, + required this.data, + @JsonKey(name: 'media_data') required final List? mediaData, + @JsonKey(name: 'author_id') required this.authorId, + @JsonKey(name: 'updated_at', fromJson: parseDate) required this.updatedAt, + @JsonKey(name: 'read_by_to_user', defaultValue: false) required this.isRead, + @JsonKey(name: 'is_author_message_auth_user') + required this.isCurrentUserAuthor, + @JsonKey(name: 'room_id') required this.roomId, + }) : _mediaData = mediaData; factory _$ChatMessageModelImpl.fromJson(Map json) => _$$ChatMessageModelImplFromJson(json); @@ -263,8 +289,10 @@ class _$ChatMessageModelImpl implements _ChatMessageModel { other is _$ChatMessageModelImpl && (identical(other.id, id) || other.id == id) && (identical(other.data, data) || other.data == data) && - const DeepCollectionEquality() - .equals(other._mediaData, _mediaData) && + const DeepCollectionEquality().equals( + other._mediaData, + _mediaData, + ) && (identical(other.authorId, authorId) || other.authorId == authorId) && (identical(other.updatedAt, updatedAt) || @@ -278,15 +306,16 @@ class _$ChatMessageModelImpl implements _ChatMessageModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - id, - data, - const DeepCollectionEquality().hash(_mediaData), - authorId, - updatedAt, - isRead, - isCurrentUserAuthor, - roomId); + runtimeType, + id, + data, + const DeepCollectionEquality().hash(_mediaData), + authorId, + updatedAt, + isRead, + isCurrentUserAuthor, + roomId, + ); /// Create a copy of ChatMessageModel /// with the given fields replaced by the non-null parameter values. @@ -295,30 +324,30 @@ class _$ChatMessageModelImpl implements _ChatMessageModel { @pragma('vm:prefer-inline') _$$ChatMessageModelImplCopyWith<_$ChatMessageModelImpl> get copyWith => __$$ChatMessageModelImplCopyWithImpl<_$ChatMessageModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$ChatMessageModelImplToJson( - this, - ); + return _$$ChatMessageModelImplToJson(this); } } abstract class _ChatMessageModel implements ChatMessageModel { - const factory _ChatMessageModel( - {required final int id, - required final String data, - @JsonKey(name: 'media_data') required final List? mediaData, - @JsonKey(name: 'author_id') required final int authorId, - @JsonKey(name: 'updated_at', fromJson: parseDate) - required final DateTime updatedAt, - @JsonKey(name: 'read_by_to_user', defaultValue: false) - required final bool isRead, - @JsonKey(name: 'is_author_message_auth_user') - required final bool? isCurrentUserAuthor, - @JsonKey(name: 'room_id') required final String? roomId}) = - _$ChatMessageModelImpl; + const factory _ChatMessageModel({ + required final int id, + required final String data, + @JsonKey(name: 'media_data') required final List? mediaData, + @JsonKey(name: 'author_id') required final int authorId, + @JsonKey(name: 'updated_at', fromJson: parseDate) + required final DateTime updatedAt, + @JsonKey(name: 'read_by_to_user', defaultValue: false) + required final bool isRead, + @JsonKey(name: 'is_author_message_auth_user') + required final bool? isCurrentUserAuthor, + @JsonKey(name: 'room_id') required final String? roomId, + }) = _$ChatMessageModelImpl; factory _ChatMessageModel.fromJson(Map json) = _$ChatMessageModelImpl.fromJson; diff --git a/lib/features/chat/models/chat_message_model.g.dart b/lib/features/chat/models/chat_message_model.g.dart index de7ea3c3..aedebde0 100644 --- a/lib/features/chat/models/chat_message_model.g.dart +++ b/lib/features/chat/models/chat_message_model.g.dart @@ -7,27 +7,27 @@ part of 'chat_message_model.dart'; // ************************************************************************** _$ChatMessageModelImpl _$$ChatMessageModelImplFromJson( - Map json) => - _$ChatMessageModelImpl( - id: (json['id'] as num).toInt(), - data: json['data'] as String, - mediaData: json['media_data'] as List?, - authorId: (json['author_id'] as num).toInt(), - updatedAt: parseDate(json['updated_at'] as String), - isRead: json['read_by_to_user'] as bool? ?? false, - isCurrentUserAuthor: json['is_author_message_auth_user'] as bool?, - roomId: json['room_id'] as String?, - ); + Map json, +) => _$ChatMessageModelImpl( + id: (json['id'] as num).toInt(), + data: json['data'] as String, + mediaData: json['media_data'] as List?, + authorId: (json['author_id'] as num).toInt(), + updatedAt: parseDate(json['updated_at'] as String), + isRead: json['read_by_to_user'] as bool? ?? false, + isCurrentUserAuthor: json['is_author_message_auth_user'] as bool?, + roomId: json['room_id'] as String?, +); Map _$$ChatMessageModelImplToJson( - _$ChatMessageModelImpl instance) => - { - 'id': instance.id, - 'data': instance.data, - 'media_data': instance.mediaData, - 'author_id': instance.authorId, - 'updated_at': instance.updatedAt.toIso8601String(), - 'read_by_to_user': instance.isRead, - 'is_author_message_auth_user': instance.isCurrentUserAuthor, - 'room_id': instance.roomId, - }; + _$ChatMessageModelImpl instance, +) => { + 'id': instance.id, + 'data': instance.data, + 'media_data': instance.mediaData, + 'author_id': instance.authorId, + 'updated_at': instance.updatedAt.toIso8601String(), + 'read_by_to_user': instance.isRead, + 'is_author_message_auth_user': instance.isCurrentUserAuthor, + 'room_id': instance.roomId, +}; diff --git a/lib/features/chat/models/chat_messages_model.freezed.dart b/lib/features/chat/models/chat_messages_model.freezed.dart index 852b33e4..1679286b 100644 --- a/lib/features/chat/models/chat_messages_model.freezed.dart +++ b/lib/features/chat/models/chat_messages_model.freezed.dart @@ -12,7 +12,8 @@ part of 'chat_messages_model.dart'; 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'); + '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', +); ChatMessagesModel _$ChatMessagesModelFromJson(Map json) { return _ChatMessagesModel.fromJson(json); @@ -37,12 +38,14 @@ mixin _$ChatMessagesModel { /// @nodoc abstract class $ChatMessagesModelCopyWith<$Res> { factory $ChatMessagesModelCopyWith( - ChatMessagesModel value, $Res Function(ChatMessagesModel) then) = - _$ChatMessagesModelCopyWithImpl<$Res, ChatMessagesModel>; + ChatMessagesModel value, + $Res Function(ChatMessagesModel) then, + ) = _$ChatMessagesModelCopyWithImpl<$Res, ChatMessagesModel>; @useResult - $Res call( - {@JsonKey(name: 'data') List messagesList, - ChatMetaModel meta}); + $Res call({ + @JsonKey(name: 'data') List messagesList, + ChatMetaModel meta, + }); $ChatMetaModelCopyWith<$Res> get meta; } @@ -61,20 +64,22 @@ class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? messagesList = null, - Object? meta = null, - }) { - return _then(_value.copyWith( - messagesList: null == messagesList - ? _value.messagesList - : messagesList // ignore: cast_nullable_to_non_nullable - as List, - meta: null == meta - ? _value.meta - : meta // ignore: cast_nullable_to_non_nullable - as ChatMetaModel, - ) as $Val); + $Res call({Object? messagesList = null, Object? meta = null}) { + return _then( + _value.copyWith( + messagesList: + null == messagesList + ? _value.messagesList + : messagesList // ignore: cast_nullable_to_non_nullable + as List, + meta: + null == meta + ? _value.meta + : meta // ignore: cast_nullable_to_non_nullable + as ChatMetaModel, + ) + as $Val, + ); } /// Create a copy of ChatMessagesModel @@ -91,14 +96,16 @@ class _$ChatMessagesModelCopyWithImpl<$Res, $Val extends ChatMessagesModel> /// @nodoc abstract class _$$ChatMessagesModelImplCopyWith<$Res> implements $ChatMessagesModelCopyWith<$Res> { - factory _$$ChatMessagesModelImplCopyWith(_$ChatMessagesModelImpl value, - $Res Function(_$ChatMessagesModelImpl) then) = - __$$ChatMessagesModelImplCopyWithImpl<$Res>; + factory _$$ChatMessagesModelImplCopyWith( + _$ChatMessagesModelImpl value, + $Res Function(_$ChatMessagesModelImpl) then, + ) = __$$ChatMessagesModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: 'data') List messagesList, - ChatMetaModel meta}); + $Res call({ + @JsonKey(name: 'data') List messagesList, + ChatMetaModel meta, + }); @override $ChatMetaModelCopyWith<$Res> get meta; @@ -108,39 +115,40 @@ abstract class _$$ChatMessagesModelImplCopyWith<$Res> class __$$ChatMessagesModelImplCopyWithImpl<$Res> extends _$ChatMessagesModelCopyWithImpl<$Res, _$ChatMessagesModelImpl> implements _$$ChatMessagesModelImplCopyWith<$Res> { - __$$ChatMessagesModelImplCopyWithImpl(_$ChatMessagesModelImpl _value, - $Res Function(_$ChatMessagesModelImpl) _then) - : super(_value, _then); + __$$ChatMessagesModelImplCopyWithImpl( + _$ChatMessagesModelImpl _value, + $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({ - Object? messagesList = null, - Object? meta = null, - }) { - return _then(_$ChatMessagesModelImpl( - messagesList: null == messagesList - ? _value._messagesList - : messagesList // ignore: cast_nullable_to_non_nullable - as List, - meta: null == meta - ? _value.meta - : meta // ignore: cast_nullable_to_non_nullable - as ChatMetaModel, - )); + $Res call({Object? messagesList = null, Object? meta = null}) { + return _then( + _$ChatMessagesModelImpl( + messagesList: + null == messagesList + ? _value._messagesList + : messagesList // ignore: cast_nullable_to_non_nullable + as List, + meta: + null == meta + ? _value.meta + : meta // ignore: cast_nullable_to_non_nullable + as ChatMetaModel, + ), + ); } } /// @nodoc @JsonSerializable() class _$ChatMessagesModelImpl implements _ChatMessagesModel { - const _$ChatMessagesModelImpl( - {@JsonKey(name: 'data') - required final List messagesList, - required this.meta}) - : _messagesList = messagesList; + const _$ChatMessagesModelImpl({ + @JsonKey(name: 'data') required final List messagesList, + required this.meta, + }) : _messagesList = messagesList; factory _$ChatMessagesModelImpl.fromJson(Map json) => _$$ChatMessagesModelImplFromJson(json); @@ -167,15 +175,20 @@ class _$ChatMessagesModelImpl implements _ChatMessagesModel { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ChatMessagesModelImpl && - const DeepCollectionEquality() - .equals(other._messagesList, _messagesList) && + const DeepCollectionEquality().equals( + other._messagesList, + _messagesList, + ) && (identical(other.meta, meta) || other.meta == meta)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_messagesList), meta); + runtimeType, + const DeepCollectionEquality().hash(_messagesList), + meta, + ); /// Create a copy of ChatMessagesModel /// with the given fields replaced by the non-null parameter values. @@ -184,21 +197,21 @@ class _$ChatMessagesModelImpl implements _ChatMessagesModel { @pragma('vm:prefer-inline') _$$ChatMessagesModelImplCopyWith<_$ChatMessagesModelImpl> get copyWith => __$$ChatMessagesModelImplCopyWithImpl<_$ChatMessagesModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$ChatMessagesModelImplToJson( - this, - ); + return _$$ChatMessagesModelImplToJson(this); } } abstract class _ChatMessagesModel implements ChatMessagesModel { - const factory _ChatMessagesModel( - {@JsonKey(name: 'data') - required final List messagesList, - required final ChatMetaModel meta}) = _$ChatMessagesModelImpl; + const factory _ChatMessagesModel({ + @JsonKey(name: 'data') required final List messagesList, + required final ChatMetaModel meta, + }) = _$ChatMessagesModelImpl; factory _ChatMessagesModel.fromJson(Map json) = _$ChatMessagesModelImpl.fromJson; diff --git a/lib/features/chat/models/chat_messages_model.g.dart b/lib/features/chat/models/chat_messages_model.g.dart index 6216cd83..a2722718 100644 --- a/lib/features/chat/models/chat_messages_model.g.dart +++ b/lib/features/chat/models/chat_messages_model.g.dart @@ -7,17 +7,15 @@ part of 'chat_messages_model.dart'; // ************************************************************************** _$ChatMessagesModelImpl _$$ChatMessagesModelImplFromJson( - Map json) => - _$ChatMessagesModelImpl( - messagesList: (json['data'] as List) + Map json, +) => _$ChatMessagesModelImpl( + messagesList: + (json['data'] as List) .map((e) => ChatMessageModel.fromJson(e as Map)) .toList(), - meta: ChatMetaModel.fromJson(json['meta'] as Map), - ); + meta: ChatMetaModel.fromJson(json['meta'] as Map), +); Map _$$ChatMessagesModelImplToJson( - _$ChatMessagesModelImpl instance) => - { - 'data': instance.messagesList, - 'meta': instance.meta, - }; + _$ChatMessagesModelImpl instance, +) => {'data': instance.messagesList, 'meta': instance.meta}; diff --git a/lib/features/chat/models/chat_meta_model.freezed.dart b/lib/features/chat/models/chat_meta_model.freezed.dart index e8e4e96b..0ac5e1b1 100644 --- a/lib/features/chat/models/chat_meta_model.freezed.dart +++ b/lib/features/chat/models/chat_meta_model.freezed.dart @@ -12,7 +12,8 @@ part of 'chat_meta_model.dart'; 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'); + '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', +); ChatMetaModel _$ChatMetaModelFromJson(Map json) { return _ChatMetaModel.fromJson(json); @@ -36,8 +37,9 @@ mixin _$ChatMetaModel { /// @nodoc abstract class $ChatMetaModelCopyWith<$Res> { factory $ChatMetaModelCopyWith( - ChatMetaModel value, $Res Function(ChatMetaModel) then) = - _$ChatMetaModelCopyWithImpl<$Res, ChatMetaModel>; + ChatMetaModel value, + $Res Function(ChatMetaModel) then, + ) = _$ChatMetaModelCopyWithImpl<$Res, ChatMetaModel>; @useResult $Res call({@JsonKey(name: "last_page") int lastPage}); } @@ -56,15 +58,17 @@ class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? lastPage = null, - }) { - return _then(_value.copyWith( - lastPage: null == lastPage - ? _value.lastPage - : lastPage // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + $Res call({Object? lastPage = null}) { + return _then( + _value.copyWith( + lastPage: + null == lastPage + ? _value.lastPage + : lastPage // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } } @@ -72,8 +76,9 @@ class _$ChatMetaModelCopyWithImpl<$Res, $Val extends ChatMetaModel> abstract class _$$ChatMetaModelImplCopyWith<$Res> implements $ChatMetaModelCopyWith<$Res> { factory _$$ChatMetaModelImplCopyWith( - _$ChatMetaModelImpl value, $Res Function(_$ChatMetaModelImpl) then) = - __$$ChatMetaModelImplCopyWithImpl<$Res>; + _$ChatMetaModelImpl value, + $Res Function(_$ChatMetaModelImpl) then, + ) = __$$ChatMetaModelImplCopyWithImpl<$Res>; @override @useResult $Res call({@JsonKey(name: "last_page") int lastPage}); @@ -84,30 +89,33 @@ class __$$ChatMetaModelImplCopyWithImpl<$Res> extends _$ChatMetaModelCopyWithImpl<$Res, _$ChatMetaModelImpl> implements _$$ChatMetaModelImplCopyWith<$Res> { __$$ChatMetaModelImplCopyWithImpl( - _$ChatMetaModelImpl _value, $Res Function(_$ChatMetaModelImpl) _then) - : super(_value, _then); + _$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({ - Object? lastPage = null, - }) { - return _then(_$ChatMetaModelImpl( - lastPage: null == lastPage - ? _value.lastPage - : lastPage // ignore: cast_nullable_to_non_nullable - as int, - )); + $Res call({Object? lastPage = null}) { + return _then( + _$ChatMetaModelImpl( + lastPage: + null == lastPage + ? _value.lastPage + : lastPage // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } /// @nodoc @JsonSerializable() class _$ChatMetaModelImpl implements _ChatMetaModel { - const _$ChatMetaModelImpl( - {@JsonKey(name: "last_page") required this.lastPage}); + const _$ChatMetaModelImpl({ + @JsonKey(name: "last_page") required this.lastPage, + }); factory _$ChatMetaModelImpl.fromJson(Map json) => _$$ChatMetaModelImplFromJson(json); @@ -144,16 +152,14 @@ class _$ChatMetaModelImpl implements _ChatMetaModel { @override Map toJson() { - return _$$ChatMetaModelImplToJson( - this, - ); + return _$$ChatMetaModelImplToJson(this); } } abstract class _ChatMetaModel implements ChatMetaModel { - const factory _ChatMetaModel( - {@JsonKey(name: "last_page") required final int lastPage}) = - _$ChatMetaModelImpl; + const factory _ChatMetaModel({ + @JsonKey(name: "last_page") required final int lastPage, + }) = _$ChatMetaModelImpl; factory _ChatMetaModel.fromJson(Map json) = _$ChatMetaModelImpl.fromJson; diff --git a/lib/features/chat/models/chat_meta_model.g.dart b/lib/features/chat/models/chat_meta_model.g.dart index 7126e2dd..fd0e0ea7 100644 --- a/lib/features/chat/models/chat_meta_model.g.dart +++ b/lib/features/chat/models/chat_meta_model.g.dart @@ -7,11 +7,7 @@ part of 'chat_meta_model.dart'; // ************************************************************************** _$ChatMetaModelImpl _$$ChatMetaModelImplFromJson(Map json) => - _$ChatMetaModelImpl( - lastPage: (json['last_page'] as num).toInt(), - ); + _$ChatMetaModelImpl(lastPage: (json['last_page'] as num).toInt()); Map _$$ChatMetaModelImplToJson(_$ChatMetaModelImpl instance) => - { - 'last_page': instance.lastPage, - }; + {'last_page': instance.lastPage}; diff --git a/lib/features/chat/models/chat_room_model.freezed.dart b/lib/features/chat/models/chat_room_model.freezed.dart index 829dd69f..d624c9fe 100644 --- a/lib/features/chat/models/chat_room_model.freezed.dart +++ b/lib/features/chat/models/chat_room_model.freezed.dart @@ -12,7 +12,8 @@ part of 'chat_room_model.dart'; 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'); + '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', +); ChatRoomModel _$ChatRoomModelFromJson(Map json) { return _ChatRoomModel.fromJson(json); @@ -41,16 +42,17 @@ mixin _$ChatRoomModel { /// @nodoc abstract class $ChatRoomModelCopyWith<$Res> { factory $ChatRoomModelCopyWith( - ChatRoomModel value, $Res Function(ChatRoomModel) then) = - _$ChatRoomModelCopyWithImpl<$Res, ChatRoomModel>; + ChatRoomModel value, + $Res Function(ChatRoomModel) then, + ) = _$ChatRoomModelCopyWithImpl<$Res, ChatRoomModel>; @useResult - $Res call( - {String id, - @JsonKey(name: 'chat_room_setting') - ChatRoomSettingsModel chatRoomSettings, - Users users, - @JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) - ChosenPlanModel? chosenPlan}); + $Res call({ + String id, + @JsonKey(name: 'chat_room_setting') ChatRoomSettingsModel chatRoomSettings, + Users users, + @JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) + ChosenPlanModel? chosenPlan, + }); $ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings; $UsersCopyWith<$Res> get users; @@ -77,24 +79,31 @@ class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel> Object? users = null, Object? chosenPlan = freezed, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - chatRoomSettings: null == chatRoomSettings - ? _value.chatRoomSettings - : chatRoomSettings // ignore: cast_nullable_to_non_nullable - as ChatRoomSettingsModel, - users: null == users - ? _value.users - : users // ignore: cast_nullable_to_non_nullable - as Users, - chosenPlan: freezed == chosenPlan - ? _value.chosenPlan - : chosenPlan // ignore: cast_nullable_to_non_nullable - as ChosenPlanModel?, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as String, + chatRoomSettings: + null == chatRoomSettings + ? _value.chatRoomSettings + : chatRoomSettings // ignore: cast_nullable_to_non_nullable + as ChatRoomSettingsModel, + users: + null == users + ? _value.users + : users // ignore: cast_nullable_to_non_nullable + as Users, + chosenPlan: + freezed == chosenPlan + ? _value.chosenPlan + : chosenPlan // ignore: cast_nullable_to_non_nullable + as ChosenPlanModel?, + ) + as $Val, + ); } /// Create a copy of ChatRoomModel @@ -102,8 +111,9 @@ class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel> @override @pragma('vm:prefer-inline') $ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings { - return $ChatRoomSettingsModelCopyWith<$Res>(_value.chatRoomSettings, - (value) { + return $ChatRoomSettingsModelCopyWith<$Res>(_value.chatRoomSettings, ( + value, + ) { return _then(_value.copyWith(chatRoomSettings: value) as $Val); }); } @@ -137,17 +147,18 @@ class _$ChatRoomModelCopyWithImpl<$Res, $Val extends ChatRoomModel> abstract class _$$ChatRoomModelImplCopyWith<$Res> implements $ChatRoomModelCopyWith<$Res> { factory _$$ChatRoomModelImplCopyWith( - _$ChatRoomModelImpl value, $Res Function(_$ChatRoomModelImpl) then) = - __$$ChatRoomModelImplCopyWithImpl<$Res>; + _$ChatRoomModelImpl value, + $Res Function(_$ChatRoomModelImpl) then, + ) = __$$ChatRoomModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String id, - @JsonKey(name: 'chat_room_setting') - ChatRoomSettingsModel chatRoomSettings, - Users users, - @JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) - ChosenPlanModel? chosenPlan}); + $Res call({ + String id, + @JsonKey(name: 'chat_room_setting') ChatRoomSettingsModel chatRoomSettings, + Users users, + @JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) + ChosenPlanModel? chosenPlan, + }); @override $ChatRoomSettingsModelCopyWith<$Res> get chatRoomSettings; @@ -162,8 +173,9 @@ class __$$ChatRoomModelImplCopyWithImpl<$Res> extends _$ChatRoomModelCopyWithImpl<$Res, _$ChatRoomModelImpl> implements _$$ChatRoomModelImplCopyWith<$Res> { __$$ChatRoomModelImplCopyWithImpl( - _$ChatRoomModelImpl _value, $Res Function(_$ChatRoomModelImpl) _then) - : super(_value, _then); + _$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. @@ -175,36 +187,43 @@ class __$$ChatRoomModelImplCopyWithImpl<$Res> Object? users = null, Object? chosenPlan = freezed, }) { - return _then(_$ChatRoomModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - chatRoomSettings: null == chatRoomSettings - ? _value.chatRoomSettings - : chatRoomSettings // ignore: cast_nullable_to_non_nullable - as ChatRoomSettingsModel, - users: null == users - ? _value.users - : users // ignore: cast_nullable_to_non_nullable - as Users, - chosenPlan: freezed == chosenPlan - ? _value.chosenPlan - : chosenPlan // ignore: cast_nullable_to_non_nullable - as ChosenPlanModel?, - )); + return _then( + _$ChatRoomModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as String, + chatRoomSettings: + null == chatRoomSettings + ? _value.chatRoomSettings + : chatRoomSettings // ignore: cast_nullable_to_non_nullable + as ChatRoomSettingsModel, + users: + null == users + ? _value.users + : users // ignore: cast_nullable_to_non_nullable + as Users, + chosenPlan: + freezed == chosenPlan + ? _value.chosenPlan + : chosenPlan // ignore: cast_nullable_to_non_nullable + as ChosenPlanModel?, + ), + ); } } /// @nodoc @JsonSerializable() class _$ChatRoomModelImpl implements _ChatRoomModel { - const _$ChatRoomModelImpl( - {required this.id, - @JsonKey(name: 'chat_room_setting') required this.chatRoomSettings, - required this.users, - @JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) - required this.chosenPlan}); + const _$ChatRoomModelImpl({ + required this.id, + @JsonKey(name: 'chat_room_setting') required this.chatRoomSettings, + required this.users, + @JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) + required this.chosenPlan, + }); factory _$ChatRoomModelImpl.fromJson(Map json) => _$$ChatRoomModelImplFromJson(json); @@ -253,20 +272,19 @@ class _$ChatRoomModelImpl implements _ChatRoomModel { @override Map toJson() { - return _$$ChatRoomModelImplToJson( - this, - ); + return _$$ChatRoomModelImplToJson(this); } } abstract class _ChatRoomModel implements ChatRoomModel { - const factory _ChatRoomModel( - {required final String id, - @JsonKey(name: 'chat_room_setting') - required final ChatRoomSettingsModel chatRoomSettings, - required final Users users, - @JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) - required final ChosenPlanModel? chosenPlan}) = _$ChatRoomModelImpl; + const factory _ChatRoomModel({ + required final String id, + @JsonKey(name: 'chat_room_setting') + required final ChatRoomSettingsModel chatRoomSettings, + required final Users users, + @JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) + required final ChosenPlanModel? chosenPlan, + }) = _$ChatRoomModelImpl; factory _ChatRoomModel.fromJson(Map json) = _$ChatRoomModelImpl.fromJson; @@ -315,9 +333,10 @@ abstract class $UsersCopyWith<$Res> { factory $UsersCopyWith(Users value, $Res Function(Users) then) = _$UsersCopyWithImpl<$Res, Users>; @useResult - $Res call( - {@JsonKey(name: 'from_chat_user') ChatUserModel sender, - @JsonKey(name: 'to_chat_user') ChatUserModel receiver}); + $Res call({ + @JsonKey(name: 'from_chat_user') ChatUserModel sender, + @JsonKey(name: 'to_chat_user') ChatUserModel receiver, + }); $ChatUserModelCopyWith<$Res> get sender; $ChatUserModelCopyWith<$Res> get receiver; @@ -337,20 +356,22 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? sender = null, - Object? receiver = null, - }) { - return _then(_value.copyWith( - sender: null == sender - ? _value.sender - : sender // ignore: cast_nullable_to_non_nullable - as ChatUserModel, - receiver: null == receiver - ? _value.receiver - : receiver // ignore: cast_nullable_to_non_nullable - as ChatUserModel, - ) as $Val); + $Res call({Object? sender = null, Object? receiver = null}) { + return _then( + _value.copyWith( + sender: + null == sender + ? _value.sender + : sender // ignore: cast_nullable_to_non_nullable + as ChatUserModel, + receiver: + null == receiver + ? _value.receiver + : receiver // ignore: cast_nullable_to_non_nullable + as ChatUserModel, + ) + as $Val, + ); } /// Create a copy of Users @@ -377,13 +398,15 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users> /// @nodoc abstract class _$$UsersImplCopyWith<$Res> implements $UsersCopyWith<$Res> { factory _$$UsersImplCopyWith( - _$UsersImpl value, $Res Function(_$UsersImpl) then) = - __$$UsersImplCopyWithImpl<$Res>; + _$UsersImpl value, + $Res Function(_$UsersImpl) then, + ) = __$$UsersImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: 'from_chat_user') ChatUserModel sender, - @JsonKey(name: 'to_chat_user') ChatUserModel receiver}); + $Res call({ + @JsonKey(name: 'from_chat_user') ChatUserModel sender, + @JsonKey(name: 'to_chat_user') ChatUserModel receiver, + }); @override $ChatUserModelCopyWith<$Res> get sender; @@ -396,36 +419,39 @@ class __$$UsersImplCopyWithImpl<$Res> extends _$UsersCopyWithImpl<$Res, _$UsersImpl> implements _$$UsersImplCopyWith<$Res> { __$$UsersImplCopyWithImpl( - _$UsersImpl _value, $Res Function(_$UsersImpl) _then) - : super(_value, _then); + _$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({ - Object? sender = null, - Object? receiver = null, - }) { - return _then(_$UsersImpl( - sender: null == sender - ? _value.sender - : sender // ignore: cast_nullable_to_non_nullable - as ChatUserModel, - receiver: null == receiver - ? _value.receiver - : receiver // ignore: cast_nullable_to_non_nullable - as ChatUserModel, - )); + $Res call({Object? sender = null, Object? receiver = null}) { + return _then( + _$UsersImpl( + sender: + null == sender + ? _value.sender + : sender // ignore: cast_nullable_to_non_nullable + as ChatUserModel, + receiver: + null == receiver + ? _value.receiver + : receiver // ignore: cast_nullable_to_non_nullable + as ChatUserModel, + ), + ); } } /// @nodoc @JsonSerializable() class _$UsersImpl implements _Users { - const _$UsersImpl( - {@JsonKey(name: 'from_chat_user') required this.sender, - @JsonKey(name: 'to_chat_user') required this.receiver}); + const _$UsersImpl({ + @JsonKey(name: 'from_chat_user') required this.sender, + @JsonKey(name: 'to_chat_user') required this.receiver, + }); factory _$UsersImpl.fromJson(Map json) => _$$UsersImplFromJson(json); @@ -466,17 +492,15 @@ class _$UsersImpl implements _Users { @override Map toJson() { - return _$$UsersImplToJson( - this, - ); + return _$$UsersImplToJson(this); } } abstract class _Users implements Users { - const factory _Users( - {@JsonKey(name: 'from_chat_user') required final ChatUserModel sender, - @JsonKey(name: 'to_chat_user') - required final ChatUserModel receiver}) = _$UsersImpl; + const factory _Users({ + @JsonKey(name: 'from_chat_user') required final ChatUserModel sender, + @JsonKey(name: 'to_chat_user') required final ChatUserModel receiver, + }) = _$UsersImpl; factory _Users.fromJson(Map json) = _$UsersImpl.fromJson; diff --git a/lib/features/chat/models/chat_room_model.g.dart b/lib/features/chat/models/chat_room_model.g.dart index fb9e6257..dd5279f0 100644 --- a/lib/features/chat/models/chat_room_model.g.dart +++ b/lib/features/chat/models/chat_room_model.g.dart @@ -10,7 +10,8 @@ _$ChatRoomModelImpl _$$ChatRoomModelImplFromJson(Map json) => _$ChatRoomModelImpl( id: json['id'] as String, chatRoomSettings: ChatRoomSettingsModel.fromJson( - json['chat_room_setting'] as Map), + json['chat_room_setting'] as Map, + ), users: Users.fromJson(json['users'] as Map), chosenPlan: parseChosenPlan(json['chosen_plan']), ); @@ -24,11 +25,13 @@ Map _$$ChatRoomModelImplToJson(_$ChatRoomModelImpl instance) => }; _$UsersImpl _$$UsersImplFromJson(Map json) => _$UsersImpl( - sender: ChatUserModel.fromJson( - json['from_chat_user'] as Map), - receiver: - ChatUserModel.fromJson(json['to_chat_user'] as Map), - ); + sender: ChatUserModel.fromJson( + json['from_chat_user'] as Map, + ), + receiver: ChatUserModel.fromJson( + json['to_chat_user'] as Map, + ), +); Map _$$UsersImplToJson(_$UsersImpl instance) => { diff --git a/lib/features/chat/models/chat_room_pagination_model.freezed.dart b/lib/features/chat/models/chat_room_pagination_model.freezed.dart index 54e56ee3..0bab8fb2 100644 --- a/lib/features/chat/models/chat_room_pagination_model.freezed.dart +++ b/lib/features/chat/models/chat_room_pagination_model.freezed.dart @@ -12,10 +12,12 @@ part of 'chat_room_pagination_model.dart'; 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'); + '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', +); ChatRoomPaginationModel _$ChatRoomPaginationModelFromJson( - Map json) { + Map json, +) { return _ChatRoomPreviewModel.fromJson(json); } @@ -38,20 +40,24 @@ mixin _$ChatRoomPaginationModel { /// @nodoc abstract class $ChatRoomPaginationModelCopyWith<$Res> { - factory $ChatRoomPaginationModelCopyWith(ChatRoomPaginationModel value, - $Res Function(ChatRoomPaginationModel) then) = - _$ChatRoomPaginationModelCopyWithImpl<$Res, ChatRoomPaginationModel>; + factory $ChatRoomPaginationModelCopyWith( + ChatRoomPaginationModel value, + $Res Function(ChatRoomPaginationModel) then, + ) = _$ChatRoomPaginationModelCopyWithImpl<$Res, ChatRoomPaginationModel>; @useResult - $Res call( - {@JsonKey(name: "chatRooms") ChatRooms chatRooms, - @JsonKey(name: "number_of_unread_chat_rooms") int unreadChatsCount}); + $Res call({ + @JsonKey(name: "chatRooms") ChatRooms chatRooms, + @JsonKey(name: "number_of_unread_chat_rooms") int unreadChatsCount, + }); $ChatRoomsCopyWith<$Res> get chatRooms; } /// @nodoc -class _$ChatRoomPaginationModelCopyWithImpl<$Res, - $Val extends ChatRoomPaginationModel> +class _$ChatRoomPaginationModelCopyWithImpl< + $Res, + $Val extends ChatRoomPaginationModel +> implements $ChatRoomPaginationModelCopyWith<$Res> { _$ChatRoomPaginationModelCopyWithImpl(this._value, this._then); @@ -64,20 +70,22 @@ class _$ChatRoomPaginationModelCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? chatRooms = null, - Object? unreadChatsCount = null, - }) { - return _then(_value.copyWith( - chatRooms: null == chatRooms - ? _value.chatRooms - : chatRooms // ignore: cast_nullable_to_non_nullable - as ChatRooms, - unreadChatsCount: null == unreadChatsCount - ? _value.unreadChatsCount - : unreadChatsCount // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + $Res call({Object? chatRooms = null, Object? unreadChatsCount = null}) { + return _then( + _value.copyWith( + chatRooms: + null == chatRooms + ? _value.chatRooms + : chatRooms // ignore: cast_nullable_to_non_nullable + as ChatRooms, + unreadChatsCount: + null == unreadChatsCount + ? _value.unreadChatsCount + : unreadChatsCount // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } /// Create a copy of ChatRoomPaginationModel @@ -94,14 +102,16 @@ class _$ChatRoomPaginationModelCopyWithImpl<$Res, /// @nodoc abstract class _$$ChatRoomPreviewModelImplCopyWith<$Res> implements $ChatRoomPaginationModelCopyWith<$Res> { - factory _$$ChatRoomPreviewModelImplCopyWith(_$ChatRoomPreviewModelImpl value, - $Res Function(_$ChatRoomPreviewModelImpl) then) = - __$$ChatRoomPreviewModelImplCopyWithImpl<$Res>; + factory _$$ChatRoomPreviewModelImplCopyWith( + _$ChatRoomPreviewModelImpl value, + $Res Function(_$ChatRoomPreviewModelImpl) then, + ) = __$$ChatRoomPreviewModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "chatRooms") ChatRooms chatRooms, - @JsonKey(name: "number_of_unread_chat_rooms") int unreadChatsCount}); + $Res call({ + @JsonKey(name: "chatRooms") ChatRooms chatRooms, + @JsonKey(name: "number_of_unread_chat_rooms") int unreadChatsCount, + }); @override $ChatRoomsCopyWith<$Res> get chatRooms; @@ -109,41 +119,44 @@ abstract class _$$ChatRoomPreviewModelImplCopyWith<$Res> /// @nodoc class __$$ChatRoomPreviewModelImplCopyWithImpl<$Res> - extends _$ChatRoomPaginationModelCopyWithImpl<$Res, - _$ChatRoomPreviewModelImpl> + extends + _$ChatRoomPaginationModelCopyWithImpl<$Res, _$ChatRoomPreviewModelImpl> implements _$$ChatRoomPreviewModelImplCopyWith<$Res> { - __$$ChatRoomPreviewModelImplCopyWithImpl(_$ChatRoomPreviewModelImpl _value, - $Res Function(_$ChatRoomPreviewModelImpl) _then) - : super(_value, _then); + __$$ChatRoomPreviewModelImplCopyWithImpl( + _$ChatRoomPreviewModelImpl _value, + $Res Function(_$ChatRoomPreviewModelImpl) _then, + ) : super(_value, _then); /// Create a copy of ChatRoomPaginationModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? chatRooms = null, - Object? unreadChatsCount = null, - }) { - return _then(_$ChatRoomPreviewModelImpl( - chatRooms: null == chatRooms - ? _value.chatRooms - : chatRooms // ignore: cast_nullable_to_non_nullable - as ChatRooms, - unreadChatsCount: null == unreadChatsCount - ? _value.unreadChatsCount - : unreadChatsCount // ignore: cast_nullable_to_non_nullable - as int, - )); + $Res call({Object? chatRooms = null, Object? unreadChatsCount = null}) { + return _then( + _$ChatRoomPreviewModelImpl( + chatRooms: + null == chatRooms + ? _value.chatRooms + : chatRooms // ignore: cast_nullable_to_non_nullable + as ChatRooms, + unreadChatsCount: + null == unreadChatsCount + ? _value.unreadChatsCount + : unreadChatsCount // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } /// @nodoc @JsonSerializable() class _$ChatRoomPreviewModelImpl implements _ChatRoomPreviewModel { - const _$ChatRoomPreviewModelImpl( - {@JsonKey(name: "chatRooms") required this.chatRooms, - @JsonKey(name: "number_of_unread_chat_rooms") - required this.unreadChatsCount}); + const _$ChatRoomPreviewModelImpl({ + @JsonKey(name: "chatRooms") required this.chatRooms, + @JsonKey(name: "number_of_unread_chat_rooms") + required this.unreadChatsCount, + }); factory _$ChatRoomPreviewModelImpl.fromJson(Map json) => _$$ChatRoomPreviewModelImplFromJson(json); @@ -181,23 +194,24 @@ class _$ChatRoomPreviewModelImpl implements _ChatRoomPreviewModel { @override @pragma('vm:prefer-inline') _$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl> - get copyWith => - __$$ChatRoomPreviewModelImplCopyWithImpl<_$ChatRoomPreviewModelImpl>( - this, _$identity); + get copyWith => + __$$ChatRoomPreviewModelImplCopyWithImpl<_$ChatRoomPreviewModelImpl>( + this, + _$identity, + ); @override Map toJson() { - return _$$ChatRoomPreviewModelImplToJson( - this, - ); + return _$$ChatRoomPreviewModelImplToJson(this); } } abstract class _ChatRoomPreviewModel implements ChatRoomPaginationModel { - const factory _ChatRoomPreviewModel( - {@JsonKey(name: "chatRooms") required final ChatRooms chatRooms, - @JsonKey(name: "number_of_unread_chat_rooms") - required final int unreadChatsCount}) = _$ChatRoomPreviewModelImpl; + const factory _ChatRoomPreviewModel({ + @JsonKey(name: "chatRooms") required final ChatRooms chatRooms, + @JsonKey(name: "number_of_unread_chat_rooms") + required final int unreadChatsCount, + }) = _$ChatRoomPreviewModelImpl; factory _ChatRoomPreviewModel.fromJson(Map json) = _$ChatRoomPreviewModelImpl.fromJson; @@ -214,7 +228,7 @@ abstract class _ChatRoomPreviewModel implements ChatRoomPaginationModel { @override @JsonKey(includeFromJson: false, includeToJson: false) _$$ChatRoomPreviewModelImplCopyWith<_$ChatRoomPreviewModelImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } ChatRooms _$ChatRoomsFromJson(Map json) { @@ -245,10 +259,11 @@ abstract class $ChatRoomsCopyWith<$Res> { factory $ChatRoomsCopyWith(ChatRooms value, $Res Function(ChatRooms) then) = _$ChatRoomsCopyWithImpl<$Res, ChatRooms>; @useResult - $Res call( - {@JsonKey(name: "data") List data, - @JsonKey(name: "last_page") int lastPage, - @JsonKey(name: "current_page") int currentPage}); + $Res call({ + @JsonKey(name: "data") List data, + @JsonKey(name: "last_page") int lastPage, + @JsonKey(name: "current_page") int currentPage, + }); } /// @nodoc @@ -270,20 +285,26 @@ class _$ChatRoomsCopyWithImpl<$Res, $Val extends ChatRooms> Object? lastPage = null, Object? currentPage = null, }) { - return _then(_value.copyWith( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as List, - lastPage: null == lastPage - ? _value.lastPage - : lastPage // ignore: cast_nullable_to_non_nullable - as int, - currentPage: null == currentPage - ? _value.currentPage - : currentPage // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + return _then( + _value.copyWith( + data: + null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as List, + lastPage: + null == lastPage + ? _value.lastPage + : lastPage // ignore: cast_nullable_to_non_nullable + as int, + currentPage: + null == currentPage + ? _value.currentPage + : currentPage // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } } @@ -291,14 +312,16 @@ class _$ChatRoomsCopyWithImpl<$Res, $Val extends ChatRooms> abstract class _$$ChatRoomsImplCopyWith<$Res> implements $ChatRoomsCopyWith<$Res> { factory _$$ChatRoomsImplCopyWith( - _$ChatRoomsImpl value, $Res Function(_$ChatRoomsImpl) then) = - __$$ChatRoomsImplCopyWithImpl<$Res>; + _$ChatRoomsImpl value, + $Res Function(_$ChatRoomsImpl) then, + ) = __$$ChatRoomsImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "data") List data, - @JsonKey(name: "last_page") int lastPage, - @JsonKey(name: "current_page") int currentPage}); + $Res call({ + @JsonKey(name: "data") List data, + @JsonKey(name: "last_page") int lastPage, + @JsonKey(name: "current_page") int currentPage, + }); } /// @nodoc @@ -306,8 +329,9 @@ class __$$ChatRoomsImplCopyWithImpl<$Res> extends _$ChatRoomsCopyWithImpl<$Res, _$ChatRoomsImpl> implements _$$ChatRoomsImplCopyWith<$Res> { __$$ChatRoomsImplCopyWithImpl( - _$ChatRoomsImpl _value, $Res Function(_$ChatRoomsImpl) _then) - : super(_value, _then); + _$ChatRoomsImpl _value, + $Res Function(_$ChatRoomsImpl) _then, + ) : super(_value, _then); /// Create a copy of ChatRooms /// with the given fields replaced by the non-null parameter values. @@ -318,31 +342,36 @@ class __$$ChatRoomsImplCopyWithImpl<$Res> Object? lastPage = null, Object? currentPage = null, }) { - return _then(_$ChatRoomsImpl( - data: null == data - ? _value._data - : data // ignore: cast_nullable_to_non_nullable - as List, - lastPage: null == lastPage - ? _value.lastPage - : lastPage // ignore: cast_nullable_to_non_nullable - as int, - currentPage: null == currentPage - ? _value.currentPage - : currentPage // ignore: cast_nullable_to_non_nullable - as int, - )); + return _then( + _$ChatRoomsImpl( + data: + null == data + ? _value._data + : data // ignore: cast_nullable_to_non_nullable + as List, + lastPage: + null == lastPage + ? _value.lastPage + : lastPage // ignore: cast_nullable_to_non_nullable + as int, + currentPage: + null == currentPage + ? _value.currentPage + : currentPage // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } /// @nodoc @JsonSerializable() class _$ChatRoomsImpl implements _ChatRooms { - const _$ChatRoomsImpl( - {@JsonKey(name: "data") required final List data, - @JsonKey(name: "last_page") required this.lastPage, - @JsonKey(name: "current_page") required this.currentPage}) - : _data = data; + const _$ChatRoomsImpl({ + @JsonKey(name: "data") required final List data, + @JsonKey(name: "last_page") required this.lastPage, + @JsonKey(name: "current_page") required this.currentPage, + }) : _data = data; factory _$ChatRoomsImpl.fromJson(Map json) => _$$ChatRoomsImplFromJson(json); @@ -382,8 +411,12 @@ class _$ChatRoomsImpl implements _ChatRooms { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(_data), lastPage, currentPage); + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(_data), + lastPage, + currentPage, + ); /// Create a copy of ChatRooms /// with the given fields replaced by the non-null parameter values. @@ -395,18 +428,16 @@ class _$ChatRoomsImpl implements _ChatRooms { @override Map toJson() { - return _$$ChatRoomsImplToJson( - this, - ); + return _$$ChatRoomsImplToJson(this); } } abstract class _ChatRooms implements ChatRooms { - const factory _ChatRooms( - {@JsonKey(name: "data") required final List data, - @JsonKey(name: "last_page") required final int lastPage, - @JsonKey(name: "current_page") required final int currentPage}) = - _$ChatRoomsImpl; + const factory _ChatRooms({ + @JsonKey(name: "data") required final List data, + @JsonKey(name: "last_page") required final int lastPage, + @JsonKey(name: "current_page") required final int currentPage, + }) = _$ChatRoomsImpl; factory _ChatRooms.fromJson(Map json) = _$ChatRoomsImpl.fromJson; @@ -463,15 +494,16 @@ abstract class $ChatRoomCopyWith<$Res> { factory $ChatRoomCopyWith(ChatRoom value, $Res Function(ChatRoom) then) = _$ChatRoomCopyWithImpl<$Res, ChatRoom>; @useResult - $Res call( - {@JsonKey(name: "id") String id, - @JsonKey(name: "room_name") String roomName, - @JsonKey(name: "last_message", fromJson: parseLastMessage) - ChatMessageModel? lastMessage, - @JsonKey(name: "users") Users users, - @JsonKey(name: "unread_messages_count") int unreadMessagesCount, - @JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) - ChosenPlanModel? chosenPlan}); + $Res call({ + @JsonKey(name: "id") String id, + @JsonKey(name: "room_name") String roomName, + @JsonKey(name: "last_message", fromJson: parseLastMessage) + ChatMessageModel? lastMessage, + @JsonKey(name: "users") Users users, + @JsonKey(name: "unread_messages_count") int unreadMessagesCount, + @JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) + ChosenPlanModel? chosenPlan, + }); $ChatMessageModelCopyWith<$Res>? get lastMessage; $UsersCopyWith<$Res> get users; @@ -500,32 +532,41 @@ class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom> Object? unreadMessagesCount = null, Object? chosenPlan = freezed, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - roomName: null == roomName - ? _value.roomName - : roomName // ignore: cast_nullable_to_non_nullable - as String, - lastMessage: freezed == lastMessage - ? _value.lastMessage - : lastMessage // ignore: cast_nullable_to_non_nullable - as ChatMessageModel?, - users: null == users - ? _value.users - : users // ignore: cast_nullable_to_non_nullable - as Users, - unreadMessagesCount: null == unreadMessagesCount - ? _value.unreadMessagesCount - : unreadMessagesCount // ignore: cast_nullable_to_non_nullable - as int, - chosenPlan: freezed == chosenPlan - ? _value.chosenPlan - : chosenPlan // ignore: cast_nullable_to_non_nullable - as ChosenPlanModel?, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as String, + roomName: + null == roomName + ? _value.roomName + : roomName // ignore: cast_nullable_to_non_nullable + as String, + lastMessage: + freezed == lastMessage + ? _value.lastMessage + : lastMessage // ignore: cast_nullable_to_non_nullable + as ChatMessageModel?, + users: + null == users + ? _value.users + : users // ignore: cast_nullable_to_non_nullable + as Users, + unreadMessagesCount: + null == unreadMessagesCount + ? _value.unreadMessagesCount + : unreadMessagesCount // ignore: cast_nullable_to_non_nullable + as int, + chosenPlan: + freezed == chosenPlan + ? _value.chosenPlan + : chosenPlan // ignore: cast_nullable_to_non_nullable + as ChosenPlanModel?, + ) + as $Val, + ); } /// Create a copy of ChatRoom @@ -571,19 +612,21 @@ class _$ChatRoomCopyWithImpl<$Res, $Val extends ChatRoom> abstract class _$$ChatRoomImplCopyWith<$Res> implements $ChatRoomCopyWith<$Res> { factory _$$ChatRoomImplCopyWith( - _$ChatRoomImpl value, $Res Function(_$ChatRoomImpl) then) = - __$$ChatRoomImplCopyWithImpl<$Res>; + _$ChatRoomImpl value, + $Res Function(_$ChatRoomImpl) then, + ) = __$$ChatRoomImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "id") String id, - @JsonKey(name: "room_name") String roomName, - @JsonKey(name: "last_message", fromJson: parseLastMessage) - ChatMessageModel? lastMessage, - @JsonKey(name: "users") Users users, - @JsonKey(name: "unread_messages_count") int unreadMessagesCount, - @JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) - ChosenPlanModel? chosenPlan}); + $Res call({ + @JsonKey(name: "id") String id, + @JsonKey(name: "room_name") String roomName, + @JsonKey(name: "last_message", fromJson: parseLastMessage) + ChatMessageModel? lastMessage, + @JsonKey(name: "users") Users users, + @JsonKey(name: "unread_messages_count") int unreadMessagesCount, + @JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) + ChosenPlanModel? chosenPlan, + }); @override $ChatMessageModelCopyWith<$Res>? get lastMessage; @@ -598,8 +641,9 @@ class __$$ChatRoomImplCopyWithImpl<$Res> extends _$ChatRoomCopyWithImpl<$Res, _$ChatRoomImpl> implements _$$ChatRoomImplCopyWith<$Res> { __$$ChatRoomImplCopyWithImpl( - _$ChatRoomImpl _value, $Res Function(_$ChatRoomImpl) _then) - : super(_value, _then); + _$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. @@ -613,47 +657,56 @@ class __$$ChatRoomImplCopyWithImpl<$Res> Object? unreadMessagesCount = null, Object? chosenPlan = freezed, }) { - return _then(_$ChatRoomImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as String, - roomName: null == roomName - ? _value.roomName - : roomName // ignore: cast_nullable_to_non_nullable - as String, - lastMessage: freezed == lastMessage - ? _value.lastMessage - : lastMessage // ignore: cast_nullable_to_non_nullable - as ChatMessageModel?, - users: null == users - ? _value.users - : users // ignore: cast_nullable_to_non_nullable - as Users, - unreadMessagesCount: null == unreadMessagesCount - ? _value.unreadMessagesCount - : unreadMessagesCount // ignore: cast_nullable_to_non_nullable - as int, - chosenPlan: freezed == chosenPlan - ? _value.chosenPlan - : chosenPlan // ignore: cast_nullable_to_non_nullable - as ChosenPlanModel?, - )); + return _then( + _$ChatRoomImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as String, + roomName: + null == roomName + ? _value.roomName + : roomName // ignore: cast_nullable_to_non_nullable + as String, + lastMessage: + freezed == lastMessage + ? _value.lastMessage + : lastMessage // ignore: cast_nullable_to_non_nullable + as ChatMessageModel?, + users: + null == users + ? _value.users + : users // ignore: cast_nullable_to_non_nullable + as Users, + unreadMessagesCount: + null == unreadMessagesCount + ? _value.unreadMessagesCount + : unreadMessagesCount // ignore: cast_nullable_to_non_nullable + as int, + chosenPlan: + freezed == chosenPlan + ? _value.chosenPlan + : chosenPlan // ignore: cast_nullable_to_non_nullable + as ChosenPlanModel?, + ), + ); } } /// @nodoc @JsonSerializable() class _$ChatRoomImpl implements _ChatRoom { - const _$ChatRoomImpl( - {@JsonKey(name: "id") required this.id, - @JsonKey(name: "room_name") required this.roomName, - @JsonKey(name: "last_message", fromJson: parseLastMessage) - required this.lastMessage, - @JsonKey(name: "users") required this.users, - @JsonKey(name: "unread_messages_count") required this.unreadMessagesCount, - @JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) - required this.chosenPlan}); + const _$ChatRoomImpl({ + @JsonKey(name: "id") required this.id, + @JsonKey(name: "room_name") required this.roomName, + @JsonKey(name: "last_message", fromJson: parseLastMessage) + required this.lastMessage, + @JsonKey(name: "users") required this.users, + @JsonKey(name: "unread_messages_count") required this.unreadMessagesCount, + @JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) + required this.chosenPlan, + }); factory _$ChatRoomImpl.fromJson(Map json) => _$$ChatRoomImplFromJson(json); @@ -701,8 +754,15 @@ class _$ChatRoomImpl implements _ChatRoom { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, roomName, lastMessage, users, - unreadMessagesCount, chosenPlan); + int get hashCode => Object.hash( + runtimeType, + id, + roomName, + lastMessage, + users, + unreadMessagesCount, + chosenPlan, + ); /// Create a copy of ChatRoom /// with the given fields replaced by the non-null parameter values. @@ -714,23 +774,22 @@ class _$ChatRoomImpl implements _ChatRoom { @override Map toJson() { - return _$$ChatRoomImplToJson( - this, - ); + return _$$ChatRoomImplToJson(this); } } abstract class _ChatRoom implements ChatRoom { - const factory _ChatRoom( - {@JsonKey(name: "id") required final String id, - @JsonKey(name: "room_name") required final String roomName, - @JsonKey(name: "last_message", fromJson: parseLastMessage) - required final ChatMessageModel? lastMessage, - @JsonKey(name: "users") required final Users users, - @JsonKey(name: "unread_messages_count") - required final int unreadMessagesCount, - @JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) - required final ChosenPlanModel? chosenPlan}) = _$ChatRoomImpl; + const factory _ChatRoom({ + @JsonKey(name: "id") required final String id, + @JsonKey(name: "room_name") required final String roomName, + @JsonKey(name: "last_message", fromJson: parseLastMessage) + required final ChatMessageModel? lastMessage, + @JsonKey(name: "users") required final Users users, + @JsonKey(name: "unread_messages_count") + required final int unreadMessagesCount, + @JsonKey(name: 'chosen_plan', fromJson: parseChosenPlan) + required final ChosenPlanModel? chosenPlan, + }) = _$ChatRoomImpl; factory _ChatRoom.fromJson(Map json) = _$ChatRoomImpl.fromJson; @@ -787,9 +846,10 @@ abstract class $UsersCopyWith<$Res> { factory $UsersCopyWith(Users value, $Res Function(Users) then) = _$UsersCopyWithImpl<$Res, Users>; @useResult - $Res call( - {@JsonKey(name: "from_chat_user") ChatUser fromChatUser, - @JsonKey(name: "to_chat_user") ChatUser toChatUser}); + $Res call({ + @JsonKey(name: "from_chat_user") ChatUser fromChatUser, + @JsonKey(name: "to_chat_user") ChatUser toChatUser, + }); $ChatUserCopyWith<$Res> get fromChatUser; $ChatUserCopyWith<$Res> get toChatUser; @@ -809,20 +869,22 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? fromChatUser = null, - Object? toChatUser = null, - }) { - return _then(_value.copyWith( - fromChatUser: null == fromChatUser - ? _value.fromChatUser - : fromChatUser // ignore: cast_nullable_to_non_nullable - as ChatUser, - toChatUser: null == toChatUser - ? _value.toChatUser - : toChatUser // ignore: cast_nullable_to_non_nullable - as ChatUser, - ) as $Val); + $Res call({Object? fromChatUser = null, Object? toChatUser = null}) { + return _then( + _value.copyWith( + fromChatUser: + null == fromChatUser + ? _value.fromChatUser + : fromChatUser // ignore: cast_nullable_to_non_nullable + as ChatUser, + toChatUser: + null == toChatUser + ? _value.toChatUser + : toChatUser // ignore: cast_nullable_to_non_nullable + as ChatUser, + ) + as $Val, + ); } /// Create a copy of Users @@ -849,13 +911,15 @@ class _$UsersCopyWithImpl<$Res, $Val extends Users> /// @nodoc abstract class _$$UsersImplCopyWith<$Res> implements $UsersCopyWith<$Res> { factory _$$UsersImplCopyWith( - _$UsersImpl value, $Res Function(_$UsersImpl) then) = - __$$UsersImplCopyWithImpl<$Res>; + _$UsersImpl value, + $Res Function(_$UsersImpl) then, + ) = __$$UsersImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "from_chat_user") ChatUser fromChatUser, - @JsonKey(name: "to_chat_user") ChatUser toChatUser}); + $Res call({ + @JsonKey(name: "from_chat_user") ChatUser fromChatUser, + @JsonKey(name: "to_chat_user") ChatUser toChatUser, + }); @override $ChatUserCopyWith<$Res> get fromChatUser; @@ -868,36 +932,39 @@ class __$$UsersImplCopyWithImpl<$Res> extends _$UsersCopyWithImpl<$Res, _$UsersImpl> implements _$$UsersImplCopyWith<$Res> { __$$UsersImplCopyWithImpl( - _$UsersImpl _value, $Res Function(_$UsersImpl) _then) - : super(_value, _then); + _$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({ - Object? fromChatUser = null, - Object? toChatUser = null, - }) { - return _then(_$UsersImpl( - fromChatUser: null == fromChatUser - ? _value.fromChatUser - : fromChatUser // ignore: cast_nullable_to_non_nullable - as ChatUser, - toChatUser: null == toChatUser - ? _value.toChatUser - : toChatUser // ignore: cast_nullable_to_non_nullable - as ChatUser, - )); + $Res call({Object? fromChatUser = null, Object? toChatUser = null}) { + return _then( + _$UsersImpl( + fromChatUser: + null == fromChatUser + ? _value.fromChatUser + : fromChatUser // ignore: cast_nullable_to_non_nullable + as ChatUser, + toChatUser: + null == toChatUser + ? _value.toChatUser + : toChatUser // ignore: cast_nullable_to_non_nullable + as ChatUser, + ), + ); } } /// @nodoc @JsonSerializable() class _$UsersImpl implements _Users { - const _$UsersImpl( - {@JsonKey(name: "from_chat_user") required this.fromChatUser, - @JsonKey(name: "to_chat_user") required this.toChatUser}); + const _$UsersImpl({ + @JsonKey(name: "from_chat_user") required this.fromChatUser, + @JsonKey(name: "to_chat_user") required this.toChatUser, + }); factory _$UsersImpl.fromJson(Map json) => _$$UsersImplFromJson(json); @@ -939,17 +1006,15 @@ class _$UsersImpl implements _Users { @override Map toJson() { - return _$$UsersImplToJson( - this, - ); + return _$$UsersImplToJson(this); } } abstract class _Users implements Users { - const factory _Users( - {@JsonKey(name: "from_chat_user") required final ChatUser fromChatUser, - @JsonKey(name: "to_chat_user") - required final ChatUser toChatUser}) = _$UsersImpl; + const factory _Users({ + @JsonKey(name: "from_chat_user") required final ChatUser fromChatUser, + @JsonKey(name: "to_chat_user") required final ChatUser toChatUser, + }) = _$UsersImpl; factory _Users.fromJson(Map json) = _$UsersImpl.fromJson; @@ -998,11 +1063,12 @@ abstract class $ChatUserCopyWith<$Res> { factory $ChatUserCopyWith(ChatUser value, $Res Function(ChatUser) then) = _$ChatUserCopyWithImpl<$Res, ChatUser>; @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "name") String name, - @JsonKey(name: "profile_photo_path") String? profilePhotoPath, - @JsonKey(name: "profile_photo_url") String profilePhotoUrl}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "name") String name, + @JsonKey(name: "profile_photo_path") String? profilePhotoPath, + @JsonKey(name: "profile_photo_url") String profilePhotoUrl, + }); } /// @nodoc @@ -1025,24 +1091,31 @@ class _$ChatUserCopyWithImpl<$Res, $Val extends ChatUser> Object? profilePhotoPath = freezed, Object? profilePhotoUrl = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - profilePhotoPath: freezed == profilePhotoPath - ? _value.profilePhotoPath - : profilePhotoPath // ignore: cast_nullable_to_non_nullable - as String?, - profilePhotoUrl: null == profilePhotoUrl - ? _value.profilePhotoUrl - : profilePhotoUrl // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + profilePhotoPath: + freezed == profilePhotoPath + ? _value.profilePhotoPath + : profilePhotoPath // ignore: cast_nullable_to_non_nullable + as String?, + profilePhotoUrl: + null == profilePhotoUrl + ? _value.profilePhotoUrl + : profilePhotoUrl // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } @@ -1050,15 +1123,17 @@ class _$ChatUserCopyWithImpl<$Res, $Val extends ChatUser> abstract class _$$ChatUserImplCopyWith<$Res> implements $ChatUserCopyWith<$Res> { factory _$$ChatUserImplCopyWith( - _$ChatUserImpl value, $Res Function(_$ChatUserImpl) then) = - __$$ChatUserImplCopyWithImpl<$Res>; + _$ChatUserImpl value, + $Res Function(_$ChatUserImpl) then, + ) = __$$ChatUserImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "name") String name, - @JsonKey(name: "profile_photo_path") String? profilePhotoPath, - @JsonKey(name: "profile_photo_url") String profilePhotoUrl}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "name") String name, + @JsonKey(name: "profile_photo_path") String? profilePhotoPath, + @JsonKey(name: "profile_photo_url") String profilePhotoUrl, + }); } /// @nodoc @@ -1066,8 +1141,9 @@ class __$$ChatUserImplCopyWithImpl<$Res> extends _$ChatUserCopyWithImpl<$Res, _$ChatUserImpl> implements _$$ChatUserImplCopyWith<$Res> { __$$ChatUserImplCopyWithImpl( - _$ChatUserImpl _value, $Res Function(_$ChatUserImpl) _then) - : super(_value, _then); + _$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. @@ -1079,35 +1155,42 @@ class __$$ChatUserImplCopyWithImpl<$Res> Object? profilePhotoPath = freezed, Object? profilePhotoUrl = null, }) { - return _then(_$ChatUserImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - profilePhotoPath: freezed == profilePhotoPath - ? _value.profilePhotoPath - : profilePhotoPath // ignore: cast_nullable_to_non_nullable - as String?, - profilePhotoUrl: null == profilePhotoUrl - ? _value.profilePhotoUrl - : profilePhotoUrl // ignore: cast_nullable_to_non_nullable - as String, - )); + return _then( + _$ChatUserImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + profilePhotoPath: + freezed == profilePhotoPath + ? _value.profilePhotoPath + : profilePhotoPath // ignore: cast_nullable_to_non_nullable + as String?, + profilePhotoUrl: + null == profilePhotoUrl + ? _value.profilePhotoUrl + : profilePhotoUrl // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } /// @nodoc @JsonSerializable() class _$ChatUserImpl implements _ChatUser { - const _$ChatUserImpl( - {@JsonKey(name: "id") required this.id, - @JsonKey(name: "name") required this.name, - @JsonKey(name: "profile_photo_path") required this.profilePhotoPath, - @JsonKey(name: "profile_photo_url") required this.profilePhotoUrl}); + const _$ChatUserImpl({ + @JsonKey(name: "id") required this.id, + @JsonKey(name: "name") required this.name, + @JsonKey(name: "profile_photo_path") required this.profilePhotoPath, + @JsonKey(name: "profile_photo_url") required this.profilePhotoUrl, + }); factory _$ChatUserImpl.fromJson(Map json) => _$$ChatUserImplFromJson(json); @@ -1158,20 +1241,18 @@ class _$ChatUserImpl implements _ChatUser { @override Map toJson() { - return _$$ChatUserImplToJson( - this, - ); + return _$$ChatUserImplToJson(this); } } abstract class _ChatUser implements ChatUser { - const factory _ChatUser( - {@JsonKey(name: "id") required final int id, - @JsonKey(name: "name") required final String name, - @JsonKey(name: "profile_photo_path") - required final String? profilePhotoPath, - @JsonKey(name: "profile_photo_url") - required final String profilePhotoUrl}) = _$ChatUserImpl; + const factory _ChatUser({ + @JsonKey(name: "id") required final int id, + @JsonKey(name: "name") required final String name, + @JsonKey(name: "profile_photo_path") + required final String? profilePhotoPath, + @JsonKey(name: "profile_photo_url") required final String profilePhotoUrl, + }) = _$ChatUserImpl; factory _ChatUser.fromJson(Map json) = _$ChatUserImpl.fromJson; diff --git a/lib/features/chat/models/chat_room_pagination_model.g.dart b/lib/features/chat/models/chat_room_pagination_model.g.dart index d6f6e057..345b7e2d 100644 --- a/lib/features/chat/models/chat_room_pagination_model.g.dart +++ b/lib/features/chat/models/chat_room_pagination_model.g.dart @@ -7,24 +7,25 @@ part of 'chat_room_pagination_model.dart'; // ************************************************************************** _$ChatRoomPreviewModelImpl _$$ChatRoomPreviewModelImplFromJson( - Map json) => - _$ChatRoomPreviewModelImpl( - chatRooms: ChatRooms.fromJson(json['chatRooms'] as Map), - unreadChatsCount: (json['number_of_unread_chat_rooms'] as num).toInt(), - ); + Map json, +) => _$ChatRoomPreviewModelImpl( + chatRooms: ChatRooms.fromJson(json['chatRooms'] as Map), + unreadChatsCount: (json['number_of_unread_chat_rooms'] as num).toInt(), +); Map _$$ChatRoomPreviewModelImplToJson( - _$ChatRoomPreviewModelImpl instance) => - { - 'chatRooms': instance.chatRooms, - 'number_of_unread_chat_rooms': instance.unreadChatsCount, - }; + _$ChatRoomPreviewModelImpl instance, +) => { + 'chatRooms': instance.chatRooms, + 'number_of_unread_chat_rooms': instance.unreadChatsCount, +}; _$ChatRoomsImpl _$$ChatRoomsImplFromJson(Map json) => _$ChatRoomsImpl( - data: (json['data'] as List) - .map((e) => ChatRoom.fromJson(e as Map)) - .toList(), + data: + (json['data'] as List) + .map((e) => ChatRoom.fromJson(e as Map)) + .toList(), lastPage: (json['last_page'] as num).toInt(), currentPage: (json['current_page'] as num).toInt(), ); @@ -57,11 +58,11 @@ Map _$$ChatRoomImplToJson(_$ChatRoomImpl instance) => }; _$UsersImpl _$$UsersImplFromJson(Map json) => _$UsersImpl( - fromChatUser: - ChatUser.fromJson(json['from_chat_user'] as Map), - toChatUser: - ChatUser.fromJson(json['to_chat_user'] as Map), - ); + fromChatUser: ChatUser.fromJson( + json['from_chat_user'] as Map, + ), + toChatUser: ChatUser.fromJson(json['to_chat_user'] as Map), +); Map _$$UsersImplToJson(_$UsersImpl instance) => { 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..46cbf25e 100644 --- a/lib/features/chat/models/chat_room_settings_model.freezed.dart +++ b/lib/features/chat/models/chat_room_settings_model.freezed.dart @@ -12,10 +12,12 @@ part of 'chat_room_settings_model.dart'; 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'); + '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', +); ChatRoomSettingsModel _$ChatRoomSettingsModelFromJson( - Map json) { + Map json, +) { return _ChatRoomSettingsModel.fromJson(json); } @@ -42,21 +44,25 @@ mixin _$ChatRoomSettingsModel { /// @nodoc abstract class $ChatRoomSettingsModelCopyWith<$Res> { - factory $ChatRoomSettingsModelCopyWith(ChatRoomSettingsModel value, - $Res Function(ChatRoomSettingsModel) then) = - _$ChatRoomSettingsModelCopyWithImpl<$Res, ChatRoomSettingsModel>; + factory $ChatRoomSettingsModelCopyWith( + ChatRoomSettingsModel value, + $Res Function(ChatRoomSettingsModel) then, + ) = _$ChatRoomSettingsModelCopyWithImpl<$Res, ChatRoomSettingsModel>; @useResult - $Res call( - {int id, - @JsonKey(name: 'room_name') String roomName, - String state, - @JsonKey(name: 'access_level') String accessLevel, - @JsonKey(name: 'updated_at') String updatedAt}); + $Res call({ + int id, + @JsonKey(name: 'room_name') String roomName, + String state, + @JsonKey(name: 'access_level') String accessLevel, + @JsonKey(name: 'updated_at') String updatedAt, + }); } /// @nodoc -class _$ChatRoomSettingsModelCopyWithImpl<$Res, - $Val extends ChatRoomSettingsModel> +class _$ChatRoomSettingsModelCopyWithImpl< + $Res, + $Val extends ChatRoomSettingsModel +> implements $ChatRoomSettingsModelCopyWith<$Res> { _$ChatRoomSettingsModelCopyWithImpl(this._value, this._then); @@ -76,28 +82,36 @@ class _$ChatRoomSettingsModelCopyWithImpl<$Res, Object? accessLevel = null, Object? updatedAt = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - roomName: null == roomName - ? _value.roomName - : roomName // ignore: cast_nullable_to_non_nullable - as String, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String, - accessLevel: null == accessLevel - ? _value.accessLevel - : accessLevel // ignore: cast_nullable_to_non_nullable - as String, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + roomName: + null == roomName + ? _value.roomName + : roomName // ignore: cast_nullable_to_non_nullable + as String, + state: + null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String, + accessLevel: + null == accessLevel + ? _value.accessLevel + : accessLevel // ignore: cast_nullable_to_non_nullable + as String, + updatedAt: + null == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } @@ -105,27 +119,29 @@ class _$ChatRoomSettingsModelCopyWithImpl<$Res, abstract class _$$ChatRoomSettingsModelImplCopyWith<$Res> implements $ChatRoomSettingsModelCopyWith<$Res> { factory _$$ChatRoomSettingsModelImplCopyWith( - _$ChatRoomSettingsModelImpl value, - $Res Function(_$ChatRoomSettingsModelImpl) then) = - __$$ChatRoomSettingsModelImplCopyWithImpl<$Res>; + _$ChatRoomSettingsModelImpl value, + $Res Function(_$ChatRoomSettingsModelImpl) then, + ) = __$$ChatRoomSettingsModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - @JsonKey(name: 'room_name') String roomName, - String state, - @JsonKey(name: 'access_level') String accessLevel, - @JsonKey(name: 'updated_at') String updatedAt}); + $Res call({ + int id, + @JsonKey(name: 'room_name') String roomName, + String state, + @JsonKey(name: 'access_level') String accessLevel, + @JsonKey(name: 'updated_at') String updatedAt, + }); } /// @nodoc class __$$ChatRoomSettingsModelImplCopyWithImpl<$Res> - extends _$ChatRoomSettingsModelCopyWithImpl<$Res, - _$ChatRoomSettingsModelImpl> + extends + _$ChatRoomSettingsModelCopyWithImpl<$Res, _$ChatRoomSettingsModelImpl> implements _$$ChatRoomSettingsModelImplCopyWith<$Res> { - __$$ChatRoomSettingsModelImplCopyWithImpl(_$ChatRoomSettingsModelImpl _value, - $Res Function(_$ChatRoomSettingsModelImpl) _then) - : super(_value, _then); + __$$ChatRoomSettingsModelImplCopyWithImpl( + _$ChatRoomSettingsModelImpl _value, + $Res Function(_$ChatRoomSettingsModelImpl) _then, + ) : super(_value, _then); /// Create a copy of ChatRoomSettingsModel /// with the given fields replaced by the non-null parameter values. @@ -138,40 +154,48 @@ class __$$ChatRoomSettingsModelImplCopyWithImpl<$Res> Object? accessLevel = null, Object? updatedAt = null, }) { - return _then(_$ChatRoomSettingsModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - roomName: null == roomName - ? _value.roomName - : roomName // ignore: cast_nullable_to_non_nullable - as String, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String, - accessLevel: null == accessLevel - ? _value.accessLevel - : accessLevel // ignore: cast_nullable_to_non_nullable - as String, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as String, - )); + return _then( + _$ChatRoomSettingsModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + roomName: + null == roomName + ? _value.roomName + : roomName // ignore: cast_nullable_to_non_nullable + as String, + state: + null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String, + accessLevel: + null == accessLevel + ? _value.accessLevel + : accessLevel // ignore: cast_nullable_to_non_nullable + as String, + updatedAt: + null == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } /// @nodoc @JsonSerializable() class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel { - const _$ChatRoomSettingsModelImpl( - {required this.id, - @JsonKey(name: 'room_name') required this.roomName, - required this.state, - @JsonKey(name: 'access_level') required this.accessLevel, - @JsonKey(name: 'updated_at') required this.updatedAt}); + const _$ChatRoomSettingsModelImpl({ + required this.id, + @JsonKey(name: 'room_name') required this.roomName, + required this.state, + @JsonKey(name: 'access_level') required this.accessLevel, + @JsonKey(name: 'updated_at') required this.updatedAt, + }); factory _$ChatRoomSettingsModelImpl.fromJson(Map json) => _$$ChatRoomSettingsModelImplFromJson(json); @@ -221,25 +245,26 @@ class _$ChatRoomSettingsModelImpl implements _ChatRoomSettingsModel { @override @pragma('vm:prefer-inline') _$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl> - get copyWith => __$$ChatRoomSettingsModelImplCopyWithImpl< - _$ChatRoomSettingsModelImpl>(this, _$identity); + get copyWith => + __$$ChatRoomSettingsModelImplCopyWithImpl<_$ChatRoomSettingsModelImpl>( + this, + _$identity, + ); @override Map toJson() { - return _$$ChatRoomSettingsModelImplToJson( - this, - ); + return _$$ChatRoomSettingsModelImplToJson(this); } } abstract class _ChatRoomSettingsModel implements ChatRoomSettingsModel { - const factory _ChatRoomSettingsModel( - {required final int id, - @JsonKey(name: 'room_name') required final String roomName, - required final String state, - @JsonKey(name: 'access_level') required final String accessLevel, - @JsonKey(name: 'updated_at') required final String updatedAt}) = - _$ChatRoomSettingsModelImpl; + const factory _ChatRoomSettingsModel({ + required final int id, + @JsonKey(name: 'room_name') required final String roomName, + required final String state, + @JsonKey(name: 'access_level') required final String accessLevel, + @JsonKey(name: 'updated_at') required final String updatedAt, + }) = _$ChatRoomSettingsModelImpl; factory _ChatRoomSettingsModel.fromJson(Map json) = _$ChatRoomSettingsModelImpl.fromJson; @@ -263,5 +288,5 @@ abstract class _ChatRoomSettingsModel implements ChatRoomSettingsModel { @override @JsonKey(includeFromJson: false, includeToJson: false) _$$ChatRoomSettingsModelImplCopyWith<_$ChatRoomSettingsModelImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/features/chat/models/chat_room_settings_model.g.dart b/lib/features/chat/models/chat_room_settings_model.g.dart index 7b824334..3a686cbd 100644 --- a/lib/features/chat/models/chat_room_settings_model.g.dart +++ b/lib/features/chat/models/chat_room_settings_model.g.dart @@ -7,21 +7,21 @@ part of 'chat_room_settings_model.dart'; // ************************************************************************** _$ChatRoomSettingsModelImpl _$$ChatRoomSettingsModelImplFromJson( - Map json) => - _$ChatRoomSettingsModelImpl( - id: (json['id'] as num).toInt(), - roomName: json['room_name'] as String, - state: json['state'] as String, - accessLevel: json['access_level'] as String, - updatedAt: json['updated_at'] as String, - ); + Map json, +) => _$ChatRoomSettingsModelImpl( + id: (json['id'] as num).toInt(), + roomName: json['room_name'] as String, + state: json['state'] as String, + accessLevel: json['access_level'] as String, + updatedAt: json['updated_at'] as String, +); Map _$$ChatRoomSettingsModelImplToJson( - _$ChatRoomSettingsModelImpl instance) => - { - 'id': instance.id, - 'room_name': instance.roomName, - 'state': instance.state, - 'access_level': instance.accessLevel, - 'updated_at': instance.updatedAt, - }; + _$ChatRoomSettingsModelImpl instance, +) => { + 'id': instance.id, + 'room_name': instance.roomName, + 'state': instance.state, + 'access_level': instance.accessLevel, + 'updated_at': instance.updatedAt, +}; diff --git a/lib/features/chat/models/chat_user_model.dart b/lib/features/chat/models/chat_user_model.dart index 4ead086f..b68c11ad 100644 --- a/lib/features/chat/models/chat_user_model.dart +++ b/lib/features/chat/models/chat_user_model.dart @@ -8,6 +8,7 @@ class ChatUserModel with _$ChatUserModel { const factory ChatUserModel({ required int id, required String name, + required String slug, @JsonKey(name: 'profile_photo_path') String? profilePhotoPath, @JsonKey(name: 'profile_photo_url') String? profilePhotoUrl, }) = _ChatUserModel; diff --git a/lib/features/chat/models/chat_user_model.freezed.dart b/lib/features/chat/models/chat_user_model.freezed.dart index 94718168..83bffe80 100644 --- a/lib/features/chat/models/chat_user_model.freezed.dart +++ b/lib/features/chat/models/chat_user_model.freezed.dart @@ -12,7 +12,8 @@ part of 'chat_user_model.dart'; 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'); + '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', +); ChatUserModel _$ChatUserModelFromJson(Map json) { return _ChatUserModel.fromJson(json); @@ -22,6 +23,7 @@ ChatUserModel _$ChatUserModelFromJson(Map json) { mixin _$ChatUserModel { int get id => throw _privateConstructorUsedError; String get name => throw _privateConstructorUsedError; + String get slug => throw _privateConstructorUsedError; @JsonKey(name: 'profile_photo_path') String? get profilePhotoPath => throw _privateConstructorUsedError; @JsonKey(name: 'profile_photo_url') @@ -40,14 +42,17 @@ mixin _$ChatUserModel { /// @nodoc abstract class $ChatUserModelCopyWith<$Res> { factory $ChatUserModelCopyWith( - ChatUserModel value, $Res Function(ChatUserModel) then) = - _$ChatUserModelCopyWithImpl<$Res, ChatUserModel>; + ChatUserModel value, + $Res Function(ChatUserModel) then, + ) = _$ChatUserModelCopyWithImpl<$Res, ChatUserModel>; @useResult - $Res call( - {int id, - String name, - @JsonKey(name: 'profile_photo_path') String? profilePhotoPath, - @JsonKey(name: 'profile_photo_url') String? profilePhotoUrl}); + $Res call({ + int id, + String name, + String slug, + @JsonKey(name: 'profile_photo_path') String? profilePhotoPath, + @JsonKey(name: 'profile_photo_url') String? profilePhotoUrl, + }); } /// @nodoc @@ -67,27 +72,40 @@ class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel> $Res call({ Object? id = null, Object? name = null, + Object? slug = null, Object? profilePhotoPath = freezed, Object? profilePhotoUrl = freezed, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - profilePhotoPath: freezed == profilePhotoPath - ? _value.profilePhotoPath - : profilePhotoPath // ignore: cast_nullable_to_non_nullable - as String?, - profilePhotoUrl: freezed == profilePhotoUrl - ? _value.profilePhotoUrl - : profilePhotoUrl // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + slug: + null == slug + ? _value.slug + : slug // ignore: cast_nullable_to_non_nullable + as String, + profilePhotoPath: + freezed == profilePhotoPath + ? _value.profilePhotoPath + : profilePhotoPath // ignore: cast_nullable_to_non_nullable + as String?, + profilePhotoUrl: + freezed == profilePhotoUrl + ? _value.profilePhotoUrl + : profilePhotoUrl // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } @@ -95,15 +113,18 @@ class _$ChatUserModelCopyWithImpl<$Res, $Val extends ChatUserModel> abstract class _$$ChatUserModelImplCopyWith<$Res> implements $ChatUserModelCopyWith<$Res> { factory _$$ChatUserModelImplCopyWith( - _$ChatUserModelImpl value, $Res Function(_$ChatUserModelImpl) then) = - __$$ChatUserModelImplCopyWithImpl<$Res>; + _$ChatUserModelImpl value, + $Res Function(_$ChatUserModelImpl) then, + ) = __$$ChatUserModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - String name, - @JsonKey(name: 'profile_photo_path') String? profilePhotoPath, - @JsonKey(name: 'profile_photo_url') String? profilePhotoUrl}); + $Res call({ + int id, + String name, + String slug, + @JsonKey(name: 'profile_photo_path') String? profilePhotoPath, + @JsonKey(name: 'profile_photo_url') String? profilePhotoUrl, + }); } /// @nodoc @@ -111,8 +132,9 @@ class __$$ChatUserModelImplCopyWithImpl<$Res> extends _$ChatUserModelCopyWithImpl<$Res, _$ChatUserModelImpl> implements _$$ChatUserModelImplCopyWith<$Res> { __$$ChatUserModelImplCopyWithImpl( - _$ChatUserModelImpl _value, $Res Function(_$ChatUserModelImpl) _then) - : super(_value, _then); + _$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. @@ -121,38 +143,52 @@ class __$$ChatUserModelImplCopyWithImpl<$Res> $Res call({ Object? id = null, Object? name = null, + Object? slug = null, Object? profilePhotoPath = freezed, Object? profilePhotoUrl = freezed, }) { - return _then(_$ChatUserModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - profilePhotoPath: freezed == profilePhotoPath - ? _value.profilePhotoPath - : profilePhotoPath // ignore: cast_nullable_to_non_nullable - as String?, - profilePhotoUrl: freezed == profilePhotoUrl - ? _value.profilePhotoUrl - : profilePhotoUrl // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$ChatUserModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + slug: + null == slug + ? _value.slug + : slug // ignore: cast_nullable_to_non_nullable + as String, + profilePhotoPath: + freezed == profilePhotoPath + ? _value.profilePhotoPath + : profilePhotoPath // ignore: cast_nullable_to_non_nullable + as String?, + profilePhotoUrl: + freezed == profilePhotoUrl + ? _value.profilePhotoUrl + : profilePhotoUrl // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } /// @nodoc @JsonSerializable() class _$ChatUserModelImpl implements _ChatUserModel { - const _$ChatUserModelImpl( - {required this.id, - required this.name, - @JsonKey(name: 'profile_photo_path') this.profilePhotoPath, - @JsonKey(name: 'profile_photo_url') this.profilePhotoUrl}); + const _$ChatUserModelImpl({ + required this.id, + required this.name, + required this.slug, + @JsonKey(name: 'profile_photo_path') this.profilePhotoPath, + @JsonKey(name: 'profile_photo_url') this.profilePhotoUrl, + }); factory _$ChatUserModelImpl.fromJson(Map json) => _$$ChatUserModelImplFromJson(json); @@ -162,6 +198,8 @@ class _$ChatUserModelImpl implements _ChatUserModel { @override final String name; @override + final String slug; + @override @JsonKey(name: 'profile_photo_path') final String? profilePhotoPath; @override @@ -170,7 +208,7 @@ class _$ChatUserModelImpl implements _ChatUserModel { @override String toString() { - return 'ChatUserModel(id: $id, name: $name, profilePhotoPath: $profilePhotoPath, profilePhotoUrl: $profilePhotoUrl)'; + return 'ChatUserModel(id: $id, name: $name, slug: $slug, profilePhotoPath: $profilePhotoPath, profilePhotoUrl: $profilePhotoUrl)'; } @override @@ -180,6 +218,7 @@ class _$ChatUserModelImpl implements _ChatUserModel { other is _$ChatUserModelImpl && (identical(other.id, id) || other.id == id) && (identical(other.name, name) || other.name == name) && + (identical(other.slug, slug) || other.slug == slug) && (identical(other.profilePhotoPath, profilePhotoPath) || other.profilePhotoPath == profilePhotoPath) && (identical(other.profilePhotoUrl, profilePhotoUrl) || @@ -188,8 +227,14 @@ class _$ChatUserModelImpl implements _ChatUserModel { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => - Object.hash(runtimeType, id, name, profilePhotoPath, profilePhotoUrl); + int get hashCode => Object.hash( + runtimeType, + id, + name, + slug, + profilePhotoPath, + profilePhotoUrl, + ); /// Create a copy of ChatUserModel /// with the given fields replaced by the non-null parameter values. @@ -201,19 +246,18 @@ class _$ChatUserModelImpl implements _ChatUserModel { @override Map toJson() { - return _$$ChatUserModelImplToJson( - this, - ); + return _$$ChatUserModelImplToJson(this); } } abstract class _ChatUserModel implements ChatUserModel { - const factory _ChatUserModel( - {required final int id, - required final String name, - @JsonKey(name: 'profile_photo_path') final String? profilePhotoPath, - @JsonKey(name: 'profile_photo_url') final String? profilePhotoUrl}) = - _$ChatUserModelImpl; + const factory _ChatUserModel({ + required final int id, + required final String name, + required final String slug, + @JsonKey(name: 'profile_photo_path') final String? profilePhotoPath, + @JsonKey(name: 'profile_photo_url') final String? profilePhotoUrl, + }) = _$ChatUserModelImpl; factory _ChatUserModel.fromJson(Map json) = _$ChatUserModelImpl.fromJson; @@ -223,6 +267,8 @@ abstract class _ChatUserModel implements ChatUserModel { @override String get name; @override + String get slug; + @override @JsonKey(name: 'profile_photo_path') String? get profilePhotoPath; @override diff --git a/lib/features/chat/models/chat_user_model.g.dart b/lib/features/chat/models/chat_user_model.g.dart index 78e0f981..983d95be 100644 --- a/lib/features/chat/models/chat_user_model.g.dart +++ b/lib/features/chat/models/chat_user_model.g.dart @@ -10,6 +10,7 @@ _$ChatUserModelImpl _$$ChatUserModelImplFromJson(Map json) => _$ChatUserModelImpl( id: (json['id'] as num).toInt(), name: json['name'] as String, + slug: json['slug'] as String, profilePhotoPath: json['profile_photo_path'] as String?, profilePhotoUrl: json['profile_photo_url'] as String?, ); @@ -18,6 +19,7 @@ Map _$$ChatUserModelImplToJson(_$ChatUserModelImpl instance) => { 'id': instance.id, 'name': instance.name, + 'slug': instance.slug, 'profile_photo_path': instance.profilePhotoPath, 'profile_photo_url': instance.profilePhotoUrl, }; diff --git a/lib/features/chat/models/websocket_info_model.freezed.dart b/lib/features/chat/models/websocket_info_model.freezed.dart index 9cddabee..81030066 100644 --- a/lib/features/chat/models/websocket_info_model.freezed.dart +++ b/lib/features/chat/models/websocket_info_model.freezed.dart @@ -12,7 +12,8 @@ part of 'websocket_info_model.dart'; 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'); + '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', +); WebsocketInfoModel _$WebsocketInfoModelFromJson(Map json) { return _WebsocketInfoModel.fromJson(json); @@ -40,15 +41,17 @@ mixin _$WebsocketInfoModel { /// @nodoc abstract class $WebsocketInfoModelCopyWith<$Res> { factory $WebsocketInfoModelCopyWith( - WebsocketInfoModel value, $Res Function(WebsocketInfoModel) then) = - _$WebsocketInfoModelCopyWithImpl<$Res, WebsocketInfoModel>; + WebsocketInfoModel value, + $Res Function(WebsocketInfoModel) then, + ) = _$WebsocketInfoModelCopyWithImpl<$Res, WebsocketInfoModel>; @useResult - $Res call( - {String key, - String host, - String port, - String cluster, - @JsonKey(name: 'user_id') int userId}); + $Res call({ + String key, + String host, + String port, + String cluster, + @JsonKey(name: 'user_id') int userId, + }); } /// @nodoc @@ -72,54 +75,65 @@ class _$WebsocketInfoModelCopyWithImpl<$Res, $Val extends WebsocketInfoModel> Object? cluster = null, Object? userId = null, }) { - return _then(_value.copyWith( - key: null == key - ? _value.key - : key // ignore: cast_nullable_to_non_nullable - as String, - host: null == host - ? _value.host - : host // ignore: cast_nullable_to_non_nullable - as String, - port: null == port - ? _value.port - : port // ignore: cast_nullable_to_non_nullable - as String, - cluster: null == cluster - ? _value.cluster - : cluster // ignore: cast_nullable_to_non_nullable - as String, - userId: null == userId - ? _value.userId - : userId // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + return _then( + _value.copyWith( + key: + null == key + ? _value.key + : key // ignore: cast_nullable_to_non_nullable + as String, + host: + null == host + ? _value.host + : host // ignore: cast_nullable_to_non_nullable + as String, + port: + null == port + ? _value.port + : port // ignore: cast_nullable_to_non_nullable + as String, + cluster: + null == cluster + ? _value.cluster + : cluster // ignore: cast_nullable_to_non_nullable + as String, + userId: + null == userId + ? _value.userId + : userId // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } } /// @nodoc abstract class _$$WebsocketInfoModelImplCopyWith<$Res> implements $WebsocketInfoModelCopyWith<$Res> { - factory _$$WebsocketInfoModelImplCopyWith(_$WebsocketInfoModelImpl value, - $Res Function(_$WebsocketInfoModelImpl) then) = - __$$WebsocketInfoModelImplCopyWithImpl<$Res>; + factory _$$WebsocketInfoModelImplCopyWith( + _$WebsocketInfoModelImpl value, + $Res Function(_$WebsocketInfoModelImpl) then, + ) = __$$WebsocketInfoModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String key, - String host, - String port, - String cluster, - @JsonKey(name: 'user_id') int userId}); + $Res call({ + String key, + String host, + String port, + String cluster, + @JsonKey(name: 'user_id') int userId, + }); } /// @nodoc class __$$WebsocketInfoModelImplCopyWithImpl<$Res> extends _$WebsocketInfoModelCopyWithImpl<$Res, _$WebsocketInfoModelImpl> implements _$$WebsocketInfoModelImplCopyWith<$Res> { - __$$WebsocketInfoModelImplCopyWithImpl(_$WebsocketInfoModelImpl _value, - $Res Function(_$WebsocketInfoModelImpl) _then) - : super(_value, _then); + __$$WebsocketInfoModelImplCopyWithImpl( + _$WebsocketInfoModelImpl _value, + $Res Function(_$WebsocketInfoModelImpl) _then, + ) : super(_value, _then); /// Create a copy of WebsocketInfoModel /// with the given fields replaced by the non-null parameter values. @@ -132,40 +146,48 @@ class __$$WebsocketInfoModelImplCopyWithImpl<$Res> Object? cluster = null, Object? userId = null, }) { - return _then(_$WebsocketInfoModelImpl( - key: null == key - ? _value.key - : key // ignore: cast_nullable_to_non_nullable - as String, - host: null == host - ? _value.host - : host // ignore: cast_nullable_to_non_nullable - as String, - port: null == port - ? _value.port - : port // ignore: cast_nullable_to_non_nullable - as String, - cluster: null == cluster - ? _value.cluster - : cluster // ignore: cast_nullable_to_non_nullable - as String, - userId: null == userId - ? _value.userId - : userId // ignore: cast_nullable_to_non_nullable - as int, - )); + return _then( + _$WebsocketInfoModelImpl( + key: + null == key + ? _value.key + : key // ignore: cast_nullable_to_non_nullable + as String, + host: + null == host + ? _value.host + : host // ignore: cast_nullable_to_non_nullable + as String, + port: + null == port + ? _value.port + : port // ignore: cast_nullable_to_non_nullable + as String, + cluster: + null == cluster + ? _value.cluster + : cluster // ignore: cast_nullable_to_non_nullable + as String, + userId: + null == userId + ? _value.userId + : userId // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } /// @nodoc @JsonSerializable() class _$WebsocketInfoModelImpl implements _WebsocketInfoModel { - const _$WebsocketInfoModelImpl( - {required this.key, - required this.host, - required this.port, - required this.cluster, - @JsonKey(name: 'user_id') required this.userId}); + const _$WebsocketInfoModelImpl({ + required this.key, + required this.host, + required this.port, + required this.cluster, + @JsonKey(name: 'user_id') required this.userId, + }); factory _$WebsocketInfoModelImpl.fromJson(Map json) => _$$WebsocketInfoModelImplFromJson(json); @@ -211,24 +233,24 @@ class _$WebsocketInfoModelImpl implements _WebsocketInfoModel { @pragma('vm:prefer-inline') _$$WebsocketInfoModelImplCopyWith<_$WebsocketInfoModelImpl> get copyWith => __$$WebsocketInfoModelImplCopyWithImpl<_$WebsocketInfoModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$WebsocketInfoModelImplToJson( - this, - ); + return _$$WebsocketInfoModelImplToJson(this); } } abstract class _WebsocketInfoModel implements WebsocketInfoModel { - const factory _WebsocketInfoModel( - {required final String key, - required final String host, - required final String port, - required final String cluster, - @JsonKey(name: 'user_id') required final int userId}) = - _$WebsocketInfoModelImpl; + const factory _WebsocketInfoModel({ + required final String key, + required final String host, + required final String port, + required final String cluster, + @JsonKey(name: 'user_id') required final int userId, + }) = _$WebsocketInfoModelImpl; factory _WebsocketInfoModel.fromJson(Map json) = _$WebsocketInfoModelImpl.fromJson; diff --git a/lib/features/chat/models/websocket_info_model.g.dart b/lib/features/chat/models/websocket_info_model.g.dart index b2bb1248..eeb99cdd 100644 --- a/lib/features/chat/models/websocket_info_model.g.dart +++ b/lib/features/chat/models/websocket_info_model.g.dart @@ -7,21 +7,21 @@ part of 'websocket_info_model.dart'; // ************************************************************************** _$WebsocketInfoModelImpl _$$WebsocketInfoModelImplFromJson( - Map json) => - _$WebsocketInfoModelImpl( - key: json['key'] as String, - host: json['host'] as String, - port: json['port'] as String, - cluster: json['cluster'] as String, - userId: (json['user_id'] as num).toInt(), - ); + Map json, +) => _$WebsocketInfoModelImpl( + key: json['key'] as String, + host: json['host'] as String, + port: json['port'] as String, + cluster: json['cluster'] as String, + userId: (json['user_id'] as num).toInt(), +); Map _$$WebsocketInfoModelImplToJson( - _$WebsocketInfoModelImpl instance) => - { - 'key': instance.key, - 'host': instance.host, - 'port': instance.port, - 'cluster': instance.cluster, - 'user_id': instance.userId, - }; + _$WebsocketInfoModelImpl instance, +) => { + 'key': instance.key, + 'host': instance.host, + 'port': instance.port, + 'cluster': instance.cluster, + 'user_id': instance.userId, +}; 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..52b11c34 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 @@ -12,7 +12,8 @@ part of 'chat_room_state.dart'; 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'); + '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 _$ChatRoomState { @@ -20,49 +21,56 @@ mixin _$ChatRoomState { TResult when( TResult Function() $default, { required TResult Function() loading, - required TResult Function(ChatRoomModel chatRoom, - List chatMessages, bool isTyping, bool isLoading) - loaded, + required TResult Function( + ChatRoomModel chatRoom, + List chatMessages, + bool isTyping, + bool isLoading, + ) + loaded, required TResult Function(String errorMessage) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, - TResult? Function(ChatRoomModel chatRoom, - List chatMessages, bool isTyping, bool isLoading)? - loaded, + TResult? Function( + ChatRoomModel chatRoom, + List chatMessages, + bool isTyping, + bool isLoading, + )? + loaded, TResult? Function(String errorMessage)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, - TResult Function(ChatRoomModel chatRoom, - List chatMessages, bool isTyping, bool isLoading)? - loaded, + TResult Function( + ChatRoomModel chatRoom, + List chatMessages, + bool isTyping, + bool isLoading, + )? + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult map( TResult Function(_ChatRoomState value) $default, { required TResult Function(ChatRoomStateLoading value) loading, required TResult Function(ChatRoomStateLoaded value) loaded, required TResult Function(ChatRoomStateError value) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull( TResult? Function(_ChatRoomState value)? $default, { TResult? Function(ChatRoomStateLoading value)? loading, TResult? Function(ChatRoomStateLoaded value)? loaded, TResult? Function(ChatRoomStateError value)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_ChatRoomState value)? $default, { @@ -70,15 +78,15 @@ mixin _$ChatRoomState { TResult Function(ChatRoomStateLoaded value)? loaded, TResult Function(ChatRoomStateError value)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc abstract class $ChatRoomStateCopyWith<$Res> { factory $ChatRoomStateCopyWith( - ChatRoomState value, $Res Function(ChatRoomState) then) = - _$ChatRoomStateCopyWithImpl<$Res, ChatRoomState>; + ChatRoomState value, + $Res Function(ChatRoomState) then, + ) = _$ChatRoomStateCopyWithImpl<$Res, ChatRoomState>; } /// @nodoc @@ -98,8 +106,9 @@ class _$ChatRoomStateCopyWithImpl<$Res, $Val extends ChatRoomState> /// @nodoc abstract class _$$ChatRoomStateImplCopyWith<$Res> { factory _$$ChatRoomStateImplCopyWith( - _$ChatRoomStateImpl value, $Res Function(_$ChatRoomStateImpl) then) = - __$$ChatRoomStateImplCopyWithImpl<$Res>; + _$ChatRoomStateImpl value, + $Res Function(_$ChatRoomStateImpl) then, + ) = __$$ChatRoomStateImplCopyWithImpl<$Res>; } /// @nodoc @@ -107,8 +116,9 @@ class __$$ChatRoomStateImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateImpl> implements _$$ChatRoomStateImplCopyWith<$Res> { __$$ChatRoomStateImplCopyWithImpl( - _$ChatRoomStateImpl _value, $Res Function(_$ChatRoomStateImpl) _then) - : super(_value, _then); + _$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. @@ -138,9 +148,13 @@ class _$ChatRoomStateImpl implements _ChatRoomState { TResult when( TResult Function() $default, { required TResult Function() loading, - required TResult Function(ChatRoomModel chatRoom, - List chatMessages, bool isTyping, bool isLoading) - loaded, + required TResult Function( + ChatRoomModel chatRoom, + List chatMessages, + bool isTyping, + bool isLoading, + ) + loaded, required TResult Function(String errorMessage) error, }) { return $default(); @@ -151,9 +165,13 @@ class _$ChatRoomStateImpl implements _ChatRoomState { TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, - TResult? Function(ChatRoomModel chatRoom, - List chatMessages, bool isTyping, bool isLoading)? - loaded, + TResult? Function( + ChatRoomModel chatRoom, + List chatMessages, + bool isTyping, + bool isLoading, + )? + loaded, TResult? Function(String errorMessage)? error, }) { return $default?.call(); @@ -164,9 +182,13 @@ class _$ChatRoomStateImpl implements _ChatRoomState { TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, - TResult Function(ChatRoomModel chatRoom, - List chatMessages, bool isTyping, bool isLoading)? - loaded, + TResult Function( + ChatRoomModel chatRoom, + List chatMessages, + bool isTyping, + bool isLoading, + )? + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -220,18 +242,20 @@ abstract class _ChatRoomState implements ChatRoomState { /// @nodoc abstract class _$$ChatRoomStateLoadingImplCopyWith<$Res> { - factory _$$ChatRoomStateLoadingImplCopyWith(_$ChatRoomStateLoadingImpl value, - $Res Function(_$ChatRoomStateLoadingImpl) then) = - __$$ChatRoomStateLoadingImplCopyWithImpl<$Res>; + factory _$$ChatRoomStateLoadingImplCopyWith( + _$ChatRoomStateLoadingImpl value, + $Res Function(_$ChatRoomStateLoadingImpl) then, + ) = __$$ChatRoomStateLoadingImplCopyWithImpl<$Res>; } /// @nodoc class __$$ChatRoomStateLoadingImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadingImpl> implements _$$ChatRoomStateLoadingImplCopyWith<$Res> { - __$$ChatRoomStateLoadingImplCopyWithImpl(_$ChatRoomStateLoadingImpl _value, - $Res Function(_$ChatRoomStateLoadingImpl) _then) - : super(_value, _then); + __$$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. @@ -262,9 +286,13 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading { TResult when( TResult Function() $default, { required TResult Function() loading, - required TResult Function(ChatRoomModel chatRoom, - List chatMessages, bool isTyping, bool isLoading) - loaded, + required TResult Function( + ChatRoomModel chatRoom, + List chatMessages, + bool isTyping, + bool isLoading, + ) + loaded, required TResult Function(String errorMessage) error, }) { return loading(); @@ -275,9 +303,13 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading { TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, - TResult? Function(ChatRoomModel chatRoom, - List chatMessages, bool isTyping, bool isLoading)? - loaded, + TResult? Function( + ChatRoomModel chatRoom, + List chatMessages, + bool isTyping, + bool isLoading, + )? + loaded, TResult? Function(String errorMessage)? error, }) { return loading?.call(); @@ -288,9 +320,13 @@ class _$ChatRoomStateLoadingImpl implements ChatRoomStateLoading { TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, - TResult Function(ChatRoomModel chatRoom, - List chatMessages, bool isTyping, bool isLoading)? - loaded, + TResult Function( + ChatRoomModel chatRoom, + List chatMessages, + bool isTyping, + bool isLoading, + )? + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -344,15 +380,17 @@ abstract class ChatRoomStateLoading implements ChatRoomState { /// @nodoc abstract class _$$ChatRoomStateLoadedImplCopyWith<$Res> { - factory _$$ChatRoomStateLoadedImplCopyWith(_$ChatRoomStateLoadedImpl value, - $Res Function(_$ChatRoomStateLoadedImpl) then) = - __$$ChatRoomStateLoadedImplCopyWithImpl<$Res>; + factory _$$ChatRoomStateLoadedImplCopyWith( + _$ChatRoomStateLoadedImpl value, + $Res Function(_$ChatRoomStateLoadedImpl) then, + ) = __$$ChatRoomStateLoadedImplCopyWithImpl<$Res>; @useResult - $Res call( - {ChatRoomModel chatRoom, - List chatMessages, - bool isTyping, - bool isLoading}); + $Res call({ + ChatRoomModel chatRoom, + List chatMessages, + bool isTyping, + bool isLoading, + }); $ChatRoomModelCopyWith<$Res> get chatRoom; } @@ -361,9 +399,10 @@ abstract class _$$ChatRoomStateLoadedImplCopyWith<$Res> { class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateLoadedImpl> implements _$$ChatRoomStateLoadedImplCopyWith<$Res> { - __$$ChatRoomStateLoadedImplCopyWithImpl(_$ChatRoomStateLoadedImpl _value, - $Res Function(_$ChatRoomStateLoadedImpl) _then) - : super(_value, _then); + __$$ChatRoomStateLoadedImplCopyWithImpl( + _$ChatRoomStateLoadedImpl _value, + $Res Function(_$ChatRoomStateLoadedImpl) _then, + ) : super(_value, _then); /// Create a copy of ChatRoomState /// with the given fields replaced by the non-null parameter values. @@ -375,24 +414,30 @@ class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res> Object? isTyping = null, Object? isLoading = null, }) { - return _then(_$ChatRoomStateLoadedImpl( - chatRoom: null == chatRoom - ? _value.chatRoom - : chatRoom // ignore: cast_nullable_to_non_nullable - as ChatRoomModel, - chatMessages: null == chatMessages - ? _value._chatMessages - : chatMessages // ignore: cast_nullable_to_non_nullable - as List, - isTyping: null == isTyping - ? _value.isTyping - : isTyping // ignore: cast_nullable_to_non_nullable - as bool, - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - )); + return _then( + _$ChatRoomStateLoadedImpl( + chatRoom: + null == chatRoom + ? _value.chatRoom + : chatRoom // ignore: cast_nullable_to_non_nullable + as ChatRoomModel, + chatMessages: + null == chatMessages + ? _value._chatMessages + : chatMessages // ignore: cast_nullable_to_non_nullable + as List, + isTyping: + null == isTyping + ? _value.isTyping + : isTyping // ignore: cast_nullable_to_non_nullable + as bool, + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } /// Create a copy of ChatRoomState @@ -409,12 +454,12 @@ class __$$ChatRoomStateLoadedImplCopyWithImpl<$Res> /// @nodoc class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded { - const _$ChatRoomStateLoadedImpl( - {required this.chatRoom, - required final List chatMessages, - required this.isTyping, - required this.isLoading}) - : _chatMessages = chatMessages; + const _$ChatRoomStateLoadedImpl({ + required this.chatRoom, + required final List chatMessages, + required this.isTyping, + required this.isLoading, + }) : _chatMessages = chatMessages; @override final ChatRoomModel chatRoom; @@ -443,8 +488,10 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded { other is _$ChatRoomStateLoadedImpl && (identical(other.chatRoom, chatRoom) || other.chatRoom == chatRoom) && - const DeepCollectionEquality() - .equals(other._chatMessages, _chatMessages) && + const DeepCollectionEquality().equals( + other._chatMessages, + _chatMessages, + ) && (identical(other.isTyping, isTyping) || other.isTyping == isTyping) && (identical(other.isLoading, isLoading) || @@ -452,8 +499,13 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded { } @override - int get hashCode => Object.hash(runtimeType, chatRoom, - const DeepCollectionEquality().hash(_chatMessages), isTyping, isLoading); + 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. @@ -462,16 +514,22 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded { @pragma('vm:prefer-inline') _$$ChatRoomStateLoadedImplCopyWith<_$ChatRoomStateLoadedImpl> get copyWith => __$$ChatRoomStateLoadedImplCopyWithImpl<_$ChatRoomStateLoadedImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs TResult when( TResult Function() $default, { required TResult Function() loading, - required TResult Function(ChatRoomModel chatRoom, - List chatMessages, bool isTyping, bool isLoading) - loaded, + required TResult Function( + ChatRoomModel chatRoom, + List chatMessages, + bool isTyping, + bool isLoading, + ) + loaded, required TResult Function(String errorMessage) error, }) { return loaded(chatRoom, chatMessages, isTyping, isLoading); @@ -482,9 +540,13 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded { TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, - TResult? Function(ChatRoomModel chatRoom, - List chatMessages, bool isTyping, bool isLoading)? - loaded, + TResult? Function( + ChatRoomModel chatRoom, + List chatMessages, + bool isTyping, + bool isLoading, + )? + loaded, TResult? Function(String errorMessage)? error, }) { return loaded?.call(chatRoom, chatMessages, isTyping, isLoading); @@ -495,9 +557,13 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded { TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, - TResult Function(ChatRoomModel chatRoom, - List chatMessages, bool isTyping, bool isLoading)? - loaded, + TResult Function( + ChatRoomModel chatRoom, + List chatMessages, + bool isTyping, + bool isLoading, + )? + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -546,11 +612,12 @@ class _$ChatRoomStateLoadedImpl implements ChatRoomStateLoaded { } abstract class ChatRoomStateLoaded implements ChatRoomState { - const factory ChatRoomStateLoaded( - {required final ChatRoomModel chatRoom, - required final List chatMessages, - required final bool isTyping, - required final bool isLoading}) = _$ChatRoomStateLoadedImpl; + const factory ChatRoomStateLoaded({ + required final ChatRoomModel chatRoom, + required final List chatMessages, + required final bool isTyping, + required final bool isLoading, + }) = _$ChatRoomStateLoadedImpl; ChatRoomModel get chatRoom; List get chatMessages; @@ -566,9 +633,10 @@ abstract class ChatRoomStateLoaded implements ChatRoomState { /// @nodoc abstract class _$$ChatRoomStateErrorImplCopyWith<$Res> { - factory _$$ChatRoomStateErrorImplCopyWith(_$ChatRoomStateErrorImpl value, - $Res Function(_$ChatRoomStateErrorImpl) then) = - __$$ChatRoomStateErrorImplCopyWithImpl<$Res>; + factory _$$ChatRoomStateErrorImplCopyWith( + _$ChatRoomStateErrorImpl value, + $Res Function(_$ChatRoomStateErrorImpl) then, + ) = __$$ChatRoomStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String errorMessage}); } @@ -577,23 +645,25 @@ abstract class _$$ChatRoomStateErrorImplCopyWith<$Res> { class __$$ChatRoomStateErrorImplCopyWithImpl<$Res> extends _$ChatRoomStateCopyWithImpl<$Res, _$ChatRoomStateErrorImpl> implements _$$ChatRoomStateErrorImplCopyWith<$Res> { - __$$ChatRoomStateErrorImplCopyWithImpl(_$ChatRoomStateErrorImpl _value, - $Res Function(_$ChatRoomStateErrorImpl) _then) - : super(_value, _then); + __$$ChatRoomStateErrorImplCopyWithImpl( + _$ChatRoomStateErrorImpl _value, + $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({ - Object? errorMessage = null, - }) { - return _then(_$ChatRoomStateErrorImpl( - errorMessage: null == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? errorMessage = null}) { + return _then( + _$ChatRoomStateErrorImpl( + errorMessage: + null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -629,16 +699,22 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError { @pragma('vm:prefer-inline') _$$ChatRoomStateErrorImplCopyWith<_$ChatRoomStateErrorImpl> get copyWith => __$$ChatRoomStateErrorImplCopyWithImpl<_$ChatRoomStateErrorImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs TResult when( TResult Function() $default, { required TResult Function() loading, - required TResult Function(ChatRoomModel chatRoom, - List chatMessages, bool isTyping, bool isLoading) - loaded, + required TResult Function( + ChatRoomModel chatRoom, + List chatMessages, + bool isTyping, + bool isLoading, + ) + loaded, required TResult Function(String errorMessage) error, }) { return error(errorMessage); @@ -649,9 +725,13 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError { TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, - TResult? Function(ChatRoomModel chatRoom, - List chatMessages, bool isTyping, bool isLoading)? - loaded, + TResult? Function( + ChatRoomModel chatRoom, + List chatMessages, + bool isTyping, + bool isLoading, + )? + loaded, TResult? Function(String errorMessage)? error, }) { return error?.call(errorMessage); @@ -662,9 +742,13 @@ class _$ChatRoomStateErrorImpl implements ChatRoomStateError { TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, - TResult Function(ChatRoomModel chatRoom, - List chatMessages, bool isTyping, bool isLoading)? - loaded, + TResult Function( + ChatRoomModel chatRoom, + List chatMessages, + bool isTyping, + bool isLoading, + )? + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { diff --git a/lib/features/chat/presentation/bloc/chats_cubit/chats_state.freezed.dart b/lib/features/chat/presentation/bloc/chats_cubit/chats_state.freezed.dart index a2271568..ebdaf5d8 100644 --- a/lib/features/chat/presentation/bloc/chats_cubit/chats_state.freezed.dart +++ b/lib/features/chat/presentation/bloc/chats_cubit/chats_state.freezed.dart @@ -12,7 +12,8 @@ part of 'chats_state.dart'; 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'); + '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 _$ChatsState { @@ -32,15 +33,17 @@ mixin _$ChatsState { /// @nodoc abstract class $ChatsStateCopyWith<$Res> { factory $ChatsStateCopyWith( - ChatsState value, $Res Function(ChatsState) then) = - _$ChatsStateCopyWithImpl<$Res, ChatsState>; + ChatsState value, + $Res Function(ChatsState) then, + ) = _$ChatsStateCopyWithImpl<$Res, ChatsState>; @useResult - $Res call( - {BaseState state, - int chatsWithUnreadMessagesCount, - List chatRooms, - bool isLoadingMoreChats, - String? errorMessage}); + $Res call({ + BaseState state, + int chatsWithUnreadMessagesCount, + List chatRooms, + bool isLoadingMoreChats, + String? errorMessage, + }); } /// @nodoc @@ -64,28 +67,36 @@ class _$ChatsStateCopyWithImpl<$Res, $Val extends ChatsState> Object? isLoadingMoreChats = null, Object? errorMessage = freezed, }) { - return _then(_value.copyWith( - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as BaseState, - chatsWithUnreadMessagesCount: null == chatsWithUnreadMessagesCount - ? _value.chatsWithUnreadMessagesCount - : chatsWithUnreadMessagesCount // ignore: cast_nullable_to_non_nullable - as int, - chatRooms: null == chatRooms - ? _value.chatRooms - : chatRooms // ignore: cast_nullable_to_non_nullable - as List, - isLoadingMoreChats: null == isLoadingMoreChats - ? _value.isLoadingMoreChats - : isLoadingMoreChats // ignore: cast_nullable_to_non_nullable - as bool, - errorMessage: freezed == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + state: + null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as BaseState, + chatsWithUnreadMessagesCount: + null == chatsWithUnreadMessagesCount + ? _value.chatsWithUnreadMessagesCount + : chatsWithUnreadMessagesCount // ignore: cast_nullable_to_non_nullable + as int, + chatRooms: + null == chatRooms + ? _value.chatRooms + : chatRooms // ignore: cast_nullable_to_non_nullable + as List, + isLoadingMoreChats: + null == isLoadingMoreChats + ? _value.isLoadingMoreChats + : isLoadingMoreChats // ignore: cast_nullable_to_non_nullable + as bool, + errorMessage: + freezed == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } @@ -93,16 +104,18 @@ class _$ChatsStateCopyWithImpl<$Res, $Val extends ChatsState> abstract class _$$ChatsStateImplCopyWith<$Res> implements $ChatsStateCopyWith<$Res> { factory _$$ChatsStateImplCopyWith( - _$ChatsStateImpl value, $Res Function(_$ChatsStateImpl) then) = - __$$ChatsStateImplCopyWithImpl<$Res>; + _$ChatsStateImpl value, + $Res Function(_$ChatsStateImpl) then, + ) = __$$ChatsStateImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {BaseState state, - int chatsWithUnreadMessagesCount, - List chatRooms, - bool isLoadingMoreChats, - String? errorMessage}); + $Res call({ + BaseState state, + int chatsWithUnreadMessagesCount, + List chatRooms, + bool isLoadingMoreChats, + String? errorMessage, + }); } /// @nodoc @@ -110,8 +123,9 @@ class __$$ChatsStateImplCopyWithImpl<$Res> extends _$ChatsStateCopyWithImpl<$Res, _$ChatsStateImpl> implements _$$ChatsStateImplCopyWith<$Res> { __$$ChatsStateImplCopyWithImpl( - _$ChatsStateImpl _value, $Res Function(_$ChatsStateImpl) _then) - : super(_value, _then); + _$ChatsStateImpl _value, + $Res Function(_$ChatsStateImpl) _then, + ) : super(_value, _then); /// Create a copy of ChatsState /// with the given fields replaced by the non-null parameter values. @@ -124,41 +138,48 @@ class __$$ChatsStateImplCopyWithImpl<$Res> Object? isLoadingMoreChats = null, Object? errorMessage = freezed, }) { - return _then(_$ChatsStateImpl( - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as BaseState, - chatsWithUnreadMessagesCount: null == chatsWithUnreadMessagesCount - ? _value.chatsWithUnreadMessagesCount - : chatsWithUnreadMessagesCount // ignore: cast_nullable_to_non_nullable - as int, - chatRooms: null == chatRooms - ? _value._chatRooms - : chatRooms // ignore: cast_nullable_to_non_nullable - as List, - isLoadingMoreChats: null == isLoadingMoreChats - ? _value.isLoadingMoreChats - : isLoadingMoreChats // ignore: cast_nullable_to_non_nullable - as bool, - errorMessage: freezed == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$ChatsStateImpl( + state: + null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as BaseState, + chatsWithUnreadMessagesCount: + null == chatsWithUnreadMessagesCount + ? _value.chatsWithUnreadMessagesCount + : chatsWithUnreadMessagesCount // ignore: cast_nullable_to_non_nullable + as int, + chatRooms: + null == chatRooms + ? _value._chatRooms + : chatRooms // ignore: cast_nullable_to_non_nullable + as List, + isLoadingMoreChats: + null == isLoadingMoreChats + ? _value.isLoadingMoreChats + : isLoadingMoreChats // ignore: cast_nullable_to_non_nullable + as bool, + errorMessage: + freezed == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } /// @nodoc class _$ChatsStateImpl implements _ChatsState { - _$ChatsStateImpl( - {this.state = BaseState.initial, - this.chatsWithUnreadMessagesCount = 0, - final List chatRooms = const [], - this.isLoadingMoreChats = false, - this.errorMessage = null}) - : _chatRooms = chatRooms; + _$ChatsStateImpl({ + this.state = BaseState.initial, + this.chatsWithUnreadMessagesCount = 0, + final List chatRooms = const [], + this.isLoadingMoreChats = false, + this.errorMessage = null, + }) : _chatRooms = chatRooms; @override @JsonKey() @@ -193,12 +214,16 @@ class _$ChatsStateImpl implements _ChatsState { (other.runtimeType == runtimeType && other is _$ChatsStateImpl && (identical(other.state, state) || other.state == state) && - (identical(other.chatsWithUnreadMessagesCount, - chatsWithUnreadMessagesCount) || + (identical( + other.chatsWithUnreadMessagesCount, + chatsWithUnreadMessagesCount, + ) || other.chatsWithUnreadMessagesCount == chatsWithUnreadMessagesCount) && - const DeepCollectionEquality() - .equals(other._chatRooms, _chatRooms) && + const DeepCollectionEquality().equals( + other._chatRooms, + _chatRooms, + ) && (identical(other.isLoadingMoreChats, isLoadingMoreChats) || other.isLoadingMoreChats == isLoadingMoreChats) && (identical(other.errorMessage, errorMessage) || @@ -207,12 +232,13 @@ class _$ChatsStateImpl implements _ChatsState { @override int get hashCode => Object.hash( - runtimeType, - state, - chatsWithUnreadMessagesCount, - const DeepCollectionEquality().hash(_chatRooms), - isLoadingMoreChats, - errorMessage); + runtimeType, + state, + chatsWithUnreadMessagesCount, + const DeepCollectionEquality().hash(_chatRooms), + isLoadingMoreChats, + errorMessage, + ); /// Create a copy of ChatsState /// with the given fields replaced by the non-null parameter values. @@ -224,12 +250,13 @@ class _$ChatsStateImpl implements _ChatsState { } abstract class _ChatsState implements ChatsState { - factory _ChatsState( - {final BaseState state, - final int chatsWithUnreadMessagesCount, - final List chatRooms, - final bool isLoadingMoreChats, - final String? errorMessage}) = _$ChatsStateImpl; + factory _ChatsState({ + final BaseState state, + final int chatsWithUnreadMessagesCount, + final List chatRooms, + final bool isLoadingMoreChats, + final String? errorMessage, + }) = _$ChatsStateImpl; @override BaseState get state; diff --git a/lib/features/chat/presentation/pages/chat_screen.dart b/lib/features/chat/presentation/pages/chat_screen.dart index c9a28d32..5d76bce4 100644 --- a/lib/features/chat/presentation/pages/chat_screen.dart +++ b/lib/features/chat/presentation/pages/chat_screen.dart @@ -2,22 +2,25 @@ import 'dart:io'; import 'dart:math'; import 'package:easy_debounce/easy_debounce.dart'; +import 'package:eatvio_app/core/widgets/custom_outlined_button.dart'; import 'package:eatvio_app/core/widgets/data_error_widget.dart'; import 'package:eatvio_app/core/widgets/loader.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'; import 'package:eatvio_app/features/chat/presentation/bloc/chats_cubit/chats_cubit.dart'; +import 'package:eatvio_app/features/chat/presentation/widgets/about_order_button.dart'; import 'package:eatvio_app/features/chat/presentation/widgets/chat_bubble_widget.dart'; import 'package:eatvio_app/core/locator_service.dart'; import 'package:eatvio_app/core/theme/custom_text_style.dart'; import 'package:eatvio_app/core/theme/theme_helper.dart'; import 'package:eatvio_app/features/chat/presentation/widgets/order_card.dart'; import 'package:eatvio_app/features/plans/enums/chosen_plan_state_enum.dart'; +import 'package:eatvio_app/features/user_details/presentation/user_details_screen.dart'; import 'package:eatvio_app/generated/l10n.dart'; import 'package:file_picker/file_picker.dart'; import 'package:flutter/material.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; -import 'package:flutter_svg/svg.dart'; +import 'package:go_router/go_router.dart'; import 'package:intl/intl.dart'; import 'package:visibility_detector/visibility_detector.dart'; @@ -240,15 +243,33 @@ class _ChatScreenState extends State { itemCount: state.chatMessages.length + (state.isLoading ? 1 : 0), ), SizedBox(height: 16), - if (chosenPlan != null) + if (chosenPlan != null) ...[ OrderCard( plan: chosenPlan.plan, - isUserView: !amIConsultant, + isCustomerView: !amIConsultant, optionType: chosenPlan.optionType, onCancel: () async { await context.read().cancelChosenPlan(chatId: state.chatRoom.id, planId: chosenPlan.id); }, - ), + ), + if (amIConsultant) ...[ + Padding( + padding: EdgeInsets.symmetric(vertical: 12, horizontal: 16), + child: CustomOutlinedButton( + text: S.current.user_info, + height: 52, + buttonTextStyle: TextStyles.textMSemibold.copyWith(color: appTheme.whiteA700), + buttonStyle: ButtonStyle( + side: WidgetStatePropertyAll(BorderSide.none), + backgroundColor: WidgetStatePropertyAll(appTheme.blueA400), + ), + onPressed: () async { + GoRouter.of(context).push(UserDetailsScreen.path, extra: state.chatRoom.users.receiver.slug); + }, + ), + ), + ], + ], ], ), ), @@ -293,8 +314,6 @@ class _ChatScreenState extends State { chatId: widget.chatId, files: files, ); - } else { - // User canceled the picker } }, customBorder: CircleBorder(), @@ -397,46 +416,7 @@ class _ChatScreenState extends State { top: 8, right: 15, left: 16, - child: GestureDetector( - onTap: () {}, - child: Container( - height: 44, - decoration: BoxDecoration( - color: appTheme.gray50, - borderRadius: BorderRadius.circular(20), - ), - child: Row( - mainAxisAlignment: MainAxisAlignment.spaceBetween, - children: [ - SizedBox.shrink(), - Text( - S.current.more_about_order, - style: TextStyles.textSMedium.copyWith(color: appTheme.black), - ), - Container( - margin: EdgeInsets.only(right: 4), - width: 36, - height: 36, - decoration: BoxDecoration( - color: appTheme.whiteA700, - shape: BoxShape.circle, - ), - child: Center( - child: SvgPicture.asset( - 'assets/icons/right_arrow.svg', - height: 14, - width: 8, - colorFilter: ColorFilter.mode( - appTheme.blueA400, - BlendMode.srcIn, - ), - ), - ), - ), - ], - ), - ), - ), + child: AboutOrderButton(), ), ], ), diff --git a/lib/features/chat/presentation/widgets/about_order_button.dart b/lib/features/chat/presentation/widgets/about_order_button.dart new file mode 100644 index 00000000..7496d431 --- /dev/null +++ b/lib/features/chat/presentation/widgets/about_order_button.dart @@ -0,0 +1,53 @@ +import 'package:eatvio_app/core/theme/custom_text_style.dart'; +import 'package:eatvio_app/core/theme/theme_helper.dart'; +import 'package:eatvio_app/generated/l10n.dart'; +import 'package:flutter/material.dart'; +import 'package:flutter_svg/svg.dart'; + +class AboutOrderButton extends StatelessWidget { + const AboutOrderButton({super.key}); + + @override + Widget build(BuildContext context) { + return GestureDetector( + onTap: () {}, + child: Container( + height: 44, + decoration: BoxDecoration( + color: appTheme.gray50, + borderRadius: BorderRadius.circular(20), + ), + child: Row( + mainAxisAlignment: MainAxisAlignment.spaceBetween, + children: [ + SizedBox.shrink(), + Text( + S.current.more_about_order, + style: TextStyles.textSMedium.copyWith(color: appTheme.black), + ), + Container( + margin: EdgeInsets.only(right: 4), + width: 36, + height: 36, + decoration: BoxDecoration( + color: appTheme.whiteA700, + shape: BoxShape.circle, + ), + child: Center( + child: SvgPicture.asset( + 'assets/icons/right_arrow.svg', + height: 14, + width: 8, + colorFilter: ColorFilter.mode( + appTheme.blueA400, + BlendMode.srcIn, + ), + ), + ), + ), + ], + ), + ), + ); + } +} diff --git a/lib/features/chat/presentation/widgets/order_card.dart b/lib/features/chat/presentation/widgets/order_card.dart index fdb8180d..c3041757 100644 --- a/lib/features/chat/presentation/widgets/order_card.dart +++ b/lib/features/chat/presentation/widgets/order_card.dart @@ -12,9 +12,9 @@ import 'package:flutter/material.dart'; class OrderCard extends StatefulWidget { final PlanModel plan; final String optionType; - final bool isUserView; + final bool isCustomerView; final Future Function() onCancel; - const OrderCard({super.key, required this.plan, required this.isUserView, required this.optionType, required this.onCancel}); + const OrderCard({super.key, required this.plan, required this.isCustomerView, required this.optionType, required this.onCancel}); @override State createState() => _OrderCardState(); @@ -115,7 +115,7 @@ class _OrderCardState extends State { ), ) .toList(), - if (widget.isUserView) ...[ + if (widget.isCustomerView) ...[ SizedBox(height: 8), isLoading ? Loader() diff --git a/lib/features/chat/services/chat_service.g.dart b/lib/features/chat/services/chat_service.g.dart index 849f0ac3..dd3188c1 100644 --- a/lib/features/chat/services/chat_service.g.dart +++ b/lib/features/chat/services/chat_service.g.dart @@ -97,11 +97,11 @@ class _ChatService implements ChatService { } final _options = _setStreamType( Options( - method: 'POST', - headers: _headers, - extra: _extra, - contentType: 'multipart/form-data', - ) + method: 'POST', + headers: _headers, + extra: _extra, + contentType: 'multipart/form-data', + ) .compose( _dio.options, '/api/chat/${id}/message/send', diff --git a/lib/features/complaining/models/complain_model.freezed.dart b/lib/features/complaining/models/complain_model.freezed.dart index 464a38e4..aa196f5f 100644 --- a/lib/features/complaining/models/complain_model.freezed.dart +++ b/lib/features/complaining/models/complain_model.freezed.dart @@ -12,7 +12,8 @@ part of 'complain_model.dart'; 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'); + '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', +); ComplainModel _$ComplainModelFromJson(Map json) { return _ComplainModel.fromJson(json); @@ -36,8 +37,9 @@ mixin _$ComplainModel { /// @nodoc abstract class $ComplainModelCopyWith<$Res> { factory $ComplainModelCopyWith( - ComplainModel value, $Res Function(ComplainModel) then) = - _$ComplainModelCopyWithImpl<$Res, ComplainModel>; + ComplainModel value, + $Res Function(ComplainModel) then, + ) = _$ComplainModelCopyWithImpl<$Res, ComplainModel>; @useResult $Res call({String? description, List tags}); } @@ -56,20 +58,22 @@ class _$ComplainModelCopyWithImpl<$Res, $Val extends ComplainModel> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? description = freezed, - Object? tags = null, - }) { - return _then(_value.copyWith( - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - tags: null == tags - ? _value.tags - : tags // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? description = freezed, Object? tags = null}) { + return _then( + _value.copyWith( + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + tags: + null == tags + ? _value.tags + : tags // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } @@ -77,8 +81,9 @@ class _$ComplainModelCopyWithImpl<$Res, $Val extends ComplainModel> abstract class _$$ComplainModelImplCopyWith<$Res> implements $ComplainModelCopyWith<$Res> { factory _$$ComplainModelImplCopyWith( - _$ComplainModelImpl value, $Res Function(_$ComplainModelImpl) then) = - __$$ComplainModelImplCopyWithImpl<$Res>; + _$ComplainModelImpl value, + $Res Function(_$ComplainModelImpl) then, + ) = __$$ComplainModelImplCopyWithImpl<$Res>; @override @useResult $Res call({String? description, List tags}); @@ -89,36 +94,39 @@ class __$$ComplainModelImplCopyWithImpl<$Res> extends _$ComplainModelCopyWithImpl<$Res, _$ComplainModelImpl> implements _$$ComplainModelImplCopyWith<$Res> { __$$ComplainModelImplCopyWithImpl( - _$ComplainModelImpl _value, $Res Function(_$ComplainModelImpl) _then) - : super(_value, _then); + _$ComplainModelImpl _value, + $Res Function(_$ComplainModelImpl) _then, + ) : super(_value, _then); /// Create a copy of ComplainModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? description = freezed, - Object? tags = null, - }) { - return _then(_$ComplainModelImpl( - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - tags: null == tags - ? _value._tags - : tags // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? description = freezed, Object? tags = null}) { + return _then( + _$ComplainModelImpl( + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + tags: + null == tags + ? _value._tags + : tags // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } /// @nodoc @JsonSerializable() class _$ComplainModelImpl implements _ComplainModel { - const _$ComplainModelImpl( - {this.description = null, final List tags = const []}) - : _tags = tags; + const _$ComplainModelImpl({ + this.description = null, + final List tags = const [], + }) : _tags = tags; factory _$ComplainModelImpl.fromJson(Map json) => _$$ComplainModelImplFromJson(json); @@ -153,7 +161,10 @@ class _$ComplainModelImpl implements _ComplainModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, description, const DeepCollectionEquality().hash(_tags)); + runtimeType, + description, + const DeepCollectionEquality().hash(_tags), + ); /// Create a copy of ComplainModel /// with the given fields replaced by the non-null parameter values. @@ -165,16 +176,15 @@ class _$ComplainModelImpl implements _ComplainModel { @override Map toJson() { - return _$$ComplainModelImplToJson( - this, - ); + return _$$ComplainModelImplToJson(this); } } abstract class _ComplainModel implements ComplainModel { - const factory _ComplainModel( - {final String? description, - final List tags}) = _$ComplainModelImpl; + const factory _ComplainModel({ + final String? description, + final List tags, + }) = _$ComplainModelImpl; factory _ComplainModel.fromJson(Map json) = _$ComplainModelImpl.fromJson; diff --git a/lib/features/complaining/models/complain_model.g.dart b/lib/features/complaining/models/complain_model.g.dart index d9d3226f..86bdd2fb 100644 --- a/lib/features/complaining/models/complain_model.g.dart +++ b/lib/features/complaining/models/complain_model.g.dart @@ -11,7 +11,7 @@ _$ComplainModelImpl _$$ComplainModelImplFromJson(Map json) => description: json['description'] as String? ?? null, tags: (json['tags'] as List?)?.map((e) => e as String).toList() ?? - const [], + const [], ); Map _$$ComplainModelImplToJson(_$ComplainModelImpl instance) => diff --git a/lib/features/complaining/presentation/cubit/complaining_state.freezed.dart b/lib/features/complaining/presentation/cubit/complaining_state.freezed.dart index d2719d8e..41902047 100644 --- a/lib/features/complaining/presentation/cubit/complaining_state.freezed.dart +++ b/lib/features/complaining/presentation/cubit/complaining_state.freezed.dart @@ -12,7 +12,8 @@ part of 'complaining_state.dart'; 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'); + '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 _$ComplainingState { @@ -34,17 +35,19 @@ mixin _$ComplainingState { /// @nodoc abstract class $ComplainingStateCopyWith<$Res> { factory $ComplainingStateCopyWith( - ComplainingState value, $Res Function(ComplainingState) then) = - _$ComplainingStateCopyWithImpl<$Res, ComplainingState>; + ComplainingState value, + $Res Function(ComplainingState) then, + ) = _$ComplainingStateCopyWithImpl<$Res, ComplainingState>; @useResult - $Res call( - {bool isLoading, - bool? wasSentSuccessfully, - ComplainType? category, - ComplainedContent? contentType, - int? contentId, - String? contentSlug, - ComplainModel complainInfo}); + $Res call({ + bool isLoading, + bool? wasSentSuccessfully, + ComplainType? category, + ComplainedContent? contentType, + int? contentId, + String? contentSlug, + ComplainModel complainInfo, + }); $ComplainModelCopyWith<$Res> get complainInfo; } @@ -72,36 +75,46 @@ class _$ComplainingStateCopyWithImpl<$Res, $Val extends ComplainingState> Object? contentSlug = freezed, Object? complainInfo = null, }) { - return _then(_value.copyWith( - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - wasSentSuccessfully: freezed == wasSentSuccessfully - ? _value.wasSentSuccessfully - : wasSentSuccessfully // ignore: cast_nullable_to_non_nullable - as bool?, - category: freezed == category - ? _value.category - : category // ignore: cast_nullable_to_non_nullable - as ComplainType?, - contentType: freezed == contentType - ? _value.contentType - : contentType // ignore: cast_nullable_to_non_nullable - as ComplainedContent?, - contentId: freezed == contentId - ? _value.contentId - : contentId // ignore: cast_nullable_to_non_nullable - as int?, - contentSlug: freezed == contentSlug - ? _value.contentSlug - : contentSlug // ignore: cast_nullable_to_non_nullable - as String?, - complainInfo: null == complainInfo - ? _value.complainInfo - : complainInfo // ignore: cast_nullable_to_non_nullable - as ComplainModel, - ) as $Val); + return _then( + _value.copyWith( + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + wasSentSuccessfully: + freezed == wasSentSuccessfully + ? _value.wasSentSuccessfully + : wasSentSuccessfully // ignore: cast_nullable_to_non_nullable + as bool?, + category: + freezed == category + ? _value.category + : category // ignore: cast_nullable_to_non_nullable + as ComplainType?, + contentType: + freezed == contentType + ? _value.contentType + : contentType // ignore: cast_nullable_to_non_nullable + as ComplainedContent?, + contentId: + freezed == contentId + ? _value.contentId + : contentId // ignore: cast_nullable_to_non_nullable + as int?, + contentSlug: + freezed == contentSlug + ? _value.contentSlug + : contentSlug // ignore: cast_nullable_to_non_nullable + as String?, + complainInfo: + null == complainInfo + ? _value.complainInfo + : complainInfo // ignore: cast_nullable_to_non_nullable + as ComplainModel, + ) + as $Val, + ); } /// Create a copy of ComplainingState @@ -118,19 +131,21 @@ class _$ComplainingStateCopyWithImpl<$Res, $Val extends ComplainingState> /// @nodoc abstract class _$$ComplainingStateImplCopyWith<$Res> implements $ComplainingStateCopyWith<$Res> { - factory _$$ComplainingStateImplCopyWith(_$ComplainingStateImpl value, - $Res Function(_$ComplainingStateImpl) then) = - __$$ComplainingStateImplCopyWithImpl<$Res>; + factory _$$ComplainingStateImplCopyWith( + _$ComplainingStateImpl value, + $Res Function(_$ComplainingStateImpl) then, + ) = __$$ComplainingStateImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {bool isLoading, - bool? wasSentSuccessfully, - ComplainType? category, - ComplainedContent? contentType, - int? contentId, - String? contentSlug, - ComplainModel complainInfo}); + $Res call({ + bool isLoading, + bool? wasSentSuccessfully, + ComplainType? category, + ComplainedContent? contentType, + int? contentId, + String? contentSlug, + ComplainModel complainInfo, + }); @override $ComplainModelCopyWith<$Res> get complainInfo; @@ -140,9 +155,10 @@ abstract class _$$ComplainingStateImplCopyWith<$Res> class __$$ComplainingStateImplCopyWithImpl<$Res> extends _$ComplainingStateCopyWithImpl<$Res, _$ComplainingStateImpl> implements _$$ComplainingStateImplCopyWith<$Res> { - __$$ComplainingStateImplCopyWithImpl(_$ComplainingStateImpl _value, - $Res Function(_$ComplainingStateImpl) _then) - : super(_value, _then); + __$$ComplainingStateImplCopyWithImpl( + _$ComplainingStateImpl _value, + $Res Function(_$ComplainingStateImpl) _then, + ) : super(_value, _then); /// Create a copy of ComplainingState /// with the given fields replaced by the non-null parameter values. @@ -157,50 +173,60 @@ class __$$ComplainingStateImplCopyWithImpl<$Res> Object? contentSlug = freezed, Object? complainInfo = null, }) { - return _then(_$ComplainingStateImpl( - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - wasSentSuccessfully: freezed == wasSentSuccessfully - ? _value.wasSentSuccessfully - : wasSentSuccessfully // ignore: cast_nullable_to_non_nullable - as bool?, - category: freezed == category - ? _value.category - : category // ignore: cast_nullable_to_non_nullable - as ComplainType?, - contentType: freezed == contentType - ? _value.contentType - : contentType // ignore: cast_nullable_to_non_nullable - as ComplainedContent?, - contentId: freezed == contentId - ? _value.contentId - : contentId // ignore: cast_nullable_to_non_nullable - as int?, - contentSlug: freezed == contentSlug - ? _value.contentSlug - : contentSlug // ignore: cast_nullable_to_non_nullable - as String?, - complainInfo: null == complainInfo - ? _value.complainInfo - : complainInfo // ignore: cast_nullable_to_non_nullable - as ComplainModel, - )); + return _then( + _$ComplainingStateImpl( + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + wasSentSuccessfully: + freezed == wasSentSuccessfully + ? _value.wasSentSuccessfully + : wasSentSuccessfully // ignore: cast_nullable_to_non_nullable + as bool?, + category: + freezed == category + ? _value.category + : category // ignore: cast_nullable_to_non_nullable + as ComplainType?, + contentType: + freezed == contentType + ? _value.contentType + : contentType // ignore: cast_nullable_to_non_nullable + as ComplainedContent?, + contentId: + freezed == contentId + ? _value.contentId + : contentId // ignore: cast_nullable_to_non_nullable + as int?, + contentSlug: + freezed == contentSlug + ? _value.contentSlug + : contentSlug // ignore: cast_nullable_to_non_nullable + as String?, + complainInfo: + null == complainInfo + ? _value.complainInfo + : complainInfo // ignore: cast_nullable_to_non_nullable + as ComplainModel, + ), + ); } } /// @nodoc class _$ComplainingStateImpl implements _ComplainingState { - _$ComplainingStateImpl( - {this.isLoading = false, - this.wasSentSuccessfully = null, - this.category = null, - this.contentType = null, - this.contentId = null, - this.contentSlug = null, - this.complainInfo = const ComplainModel()}); + _$ComplainingStateImpl({ + this.isLoading = false, + this.wasSentSuccessfully = null, + this.category = null, + this.contentType = null, + this.contentId = null, + this.contentSlug = null, + this.complainInfo = const ComplainModel(), + }); @override @JsonKey() @@ -251,8 +277,16 @@ class _$ComplainingStateImpl implements _ComplainingState { } @override - int get hashCode => Object.hash(runtimeType, isLoading, wasSentSuccessfully, - category, contentType, contentId, contentSlug, complainInfo); + int get hashCode => Object.hash( + runtimeType, + isLoading, + wasSentSuccessfully, + category, + contentType, + contentId, + contentSlug, + complainInfo, + ); /// Create a copy of ComplainingState /// with the given fields replaced by the non-null parameter values. @@ -261,18 +295,21 @@ class _$ComplainingStateImpl implements _ComplainingState { @pragma('vm:prefer-inline') _$$ComplainingStateImplCopyWith<_$ComplainingStateImpl> get copyWith => __$$ComplainingStateImplCopyWithImpl<_$ComplainingStateImpl>( - this, _$identity); + this, + _$identity, + ); } abstract class _ComplainingState implements ComplainingState { - factory _ComplainingState( - {final bool isLoading, - final bool? wasSentSuccessfully, - final ComplainType? category, - final ComplainedContent? contentType, - final int? contentId, - final String? contentSlug, - final ComplainModel complainInfo}) = _$ComplainingStateImpl; + factory _ComplainingState({ + final bool isLoading, + final bool? wasSentSuccessfully, + final ComplainType? category, + final ComplainedContent? contentType, + final int? contentId, + final String? contentSlug, + final ComplainModel complainInfo, + }) = _$ComplainingStateImpl; @override bool get isLoading; diff --git a/lib/features/consultant/become_consultant/models/consultant_profile_model.freezed.dart b/lib/features/consultant/become_consultant/models/consultant_profile_model.freezed.dart index d320c937..381e21ee 100644 --- a/lib/features/consultant/become_consultant/models/consultant_profile_model.freezed.dart +++ b/lib/features/consultant/become_consultant/models/consultant_profile_model.freezed.dart @@ -12,10 +12,12 @@ part of 'consultant_profile_model.dart'; 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'); + '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', +); ConsultantProfileModel _$ConsultantProfileModelFromJson( - Map json) { + Map json, +) { return _ConsultantProfileModel.fromJson(json); } @@ -43,25 +45,29 @@ mixin _$ConsultantProfileModel { /// @nodoc abstract class $ConsultantProfileModelCopyWith<$Res> { - factory $ConsultantProfileModelCopyWith(ConsultantProfileModel value, - $Res Function(ConsultantProfileModel) then) = - _$ConsultantProfileModelCopyWithImpl<$Res, ConsultantProfileModel>; + factory $ConsultantProfileModelCopyWith( + ConsultantProfileModel value, + $Res Function(ConsultantProfileModel) then, + ) = _$ConsultantProfileModelCopyWithImpl<$Res, ConsultantProfileModel>; @useResult - $Res call( - {@JsonKey(name: 'has_medical_education', includeIfNull: false) - bool? hasMedicalEducation, - @JsonKey(name: 'social_links', includeIfNull: false) - SocialLinksModel? socialLinks, - @JsonKey(name: 'cert_photos', includeIfNull: false) List? photos, - @JsonKey(name: 'completed_courses', includeIfNull: false) - List? certificates}); + $Res call({ + @JsonKey(name: 'has_medical_education', includeIfNull: false) + bool? hasMedicalEducation, + @JsonKey(name: 'social_links', includeIfNull: false) + SocialLinksModel? socialLinks, + @JsonKey(name: 'cert_photos', includeIfNull: false) List? photos, + @JsonKey(name: 'completed_courses', includeIfNull: false) + List? certificates, + }); $SocialLinksModelCopyWith<$Res>? get socialLinks; } /// @nodoc -class _$ConsultantProfileModelCopyWithImpl<$Res, - $Val extends ConsultantProfileModel> +class _$ConsultantProfileModelCopyWithImpl< + $Res, + $Val extends ConsultantProfileModel +> implements $ConsultantProfileModelCopyWith<$Res> { _$ConsultantProfileModelCopyWithImpl(this._value, this._then); @@ -80,24 +86,31 @@ class _$ConsultantProfileModelCopyWithImpl<$Res, Object? photos = freezed, Object? certificates = freezed, }) { - return _then(_value.copyWith( - hasMedicalEducation: freezed == hasMedicalEducation - ? _value.hasMedicalEducation - : hasMedicalEducation // ignore: cast_nullable_to_non_nullable - as bool?, - socialLinks: freezed == socialLinks - ? _value.socialLinks - : socialLinks // ignore: cast_nullable_to_non_nullable - as SocialLinksModel?, - photos: freezed == photos - ? _value.photos - : photos // ignore: cast_nullable_to_non_nullable - as List?, - certificates: freezed == certificates - ? _value.certificates - : certificates // ignore: cast_nullable_to_non_nullable - as List?, - ) as $Val); + return _then( + _value.copyWith( + hasMedicalEducation: + freezed == hasMedicalEducation + ? _value.hasMedicalEducation + : hasMedicalEducation // ignore: cast_nullable_to_non_nullable + as bool?, + socialLinks: + freezed == socialLinks + ? _value.socialLinks + : socialLinks // ignore: cast_nullable_to_non_nullable + as SocialLinksModel?, + photos: + freezed == photos + ? _value.photos + : photos // ignore: cast_nullable_to_non_nullable + as List?, + certificates: + freezed == certificates + ? _value.certificates + : certificates // ignore: cast_nullable_to_non_nullable + as List?, + ) + as $Val, + ); } /// Create a copy of ConsultantProfileModel @@ -119,19 +132,20 @@ class _$ConsultantProfileModelCopyWithImpl<$Res, abstract class _$$ConsultantProfileModelImplCopyWith<$Res> implements $ConsultantProfileModelCopyWith<$Res> { factory _$$ConsultantProfileModelImplCopyWith( - _$ConsultantProfileModelImpl value, - $Res Function(_$ConsultantProfileModelImpl) then) = - __$$ConsultantProfileModelImplCopyWithImpl<$Res>; + _$ConsultantProfileModelImpl value, + $Res Function(_$ConsultantProfileModelImpl) then, + ) = __$$ConsultantProfileModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: 'has_medical_education', includeIfNull: false) - bool? hasMedicalEducation, - @JsonKey(name: 'social_links', includeIfNull: false) - SocialLinksModel? socialLinks, - @JsonKey(name: 'cert_photos', includeIfNull: false) List? photos, - @JsonKey(name: 'completed_courses', includeIfNull: false) - List? certificates}); + $Res call({ + @JsonKey(name: 'has_medical_education', includeIfNull: false) + bool? hasMedicalEducation, + @JsonKey(name: 'social_links', includeIfNull: false) + SocialLinksModel? socialLinks, + @JsonKey(name: 'cert_photos', includeIfNull: false) List? photos, + @JsonKey(name: 'completed_courses', includeIfNull: false) + List? certificates, + }); @override $SocialLinksModelCopyWith<$Res>? get socialLinks; @@ -139,13 +153,13 @@ abstract class _$$ConsultantProfileModelImplCopyWith<$Res> /// @nodoc class __$$ConsultantProfileModelImplCopyWithImpl<$Res> - extends _$ConsultantProfileModelCopyWithImpl<$Res, - _$ConsultantProfileModelImpl> + extends + _$ConsultantProfileModelCopyWithImpl<$Res, _$ConsultantProfileModelImpl> implements _$$ConsultantProfileModelImplCopyWith<$Res> { __$$ConsultantProfileModelImplCopyWithImpl( - _$ConsultantProfileModelImpl _value, - $Res Function(_$ConsultantProfileModelImpl) _then) - : super(_value, _then); + _$ConsultantProfileModelImpl _value, + $Res Function(_$ConsultantProfileModelImpl) _then, + ) : super(_value, _then); /// Create a copy of ConsultantProfileModel /// with the given fields replaced by the non-null parameter values. @@ -157,40 +171,46 @@ class __$$ConsultantProfileModelImplCopyWithImpl<$Res> Object? photos = freezed, Object? certificates = freezed, }) { - return _then(_$ConsultantProfileModelImpl( - hasMedicalEducation: freezed == hasMedicalEducation - ? _value.hasMedicalEducation - : hasMedicalEducation // ignore: cast_nullable_to_non_nullable - as bool?, - socialLinks: freezed == socialLinks - ? _value.socialLinks - : socialLinks // ignore: cast_nullable_to_non_nullable - as SocialLinksModel?, - photos: freezed == photos - ? _value._photos - : photos // ignore: cast_nullable_to_non_nullable - as List?, - certificates: freezed == certificates - ? _value._certificates - : certificates // ignore: cast_nullable_to_non_nullable - as List?, - )); + return _then( + _$ConsultantProfileModelImpl( + hasMedicalEducation: + freezed == hasMedicalEducation + ? _value.hasMedicalEducation + : hasMedicalEducation // ignore: cast_nullable_to_non_nullable + as bool?, + socialLinks: + freezed == socialLinks + ? _value.socialLinks + : socialLinks // ignore: cast_nullable_to_non_nullable + as SocialLinksModel?, + photos: + freezed == photos + ? _value._photos + : photos // ignore: cast_nullable_to_non_nullable + as List?, + certificates: + freezed == certificates + ? _value._certificates + : certificates // ignore: cast_nullable_to_non_nullable + as List?, + ), + ); } } /// @nodoc @JsonSerializable() class _$ConsultantProfileModelImpl implements _ConsultantProfileModel { - const _$ConsultantProfileModelImpl( - {@JsonKey(name: 'has_medical_education', includeIfNull: false) - this.hasMedicalEducation, - @JsonKey(name: 'social_links', includeIfNull: false) this.socialLinks, - @JsonKey(name: 'cert_photos', includeIfNull: false) - final List? photos, - @JsonKey(name: 'completed_courses', includeIfNull: false) - final List? certificates}) - : _photos = photos, - _certificates = certificates; + const _$ConsultantProfileModelImpl({ + @JsonKey(name: 'has_medical_education', includeIfNull: false) + this.hasMedicalEducation, + @JsonKey(name: 'social_links', includeIfNull: false) this.socialLinks, + @JsonKey(name: 'cert_photos', includeIfNull: false) + final List? photos, + @JsonKey(name: 'completed_courses', includeIfNull: false) + final List? certificates, + }) : _photos = photos, + _certificates = certificates; factory _$ConsultantProfileModelImpl.fromJson(Map json) => _$$ConsultantProfileModelImplFromJson(json); @@ -238,18 +258,21 @@ class _$ConsultantProfileModelImpl implements _ConsultantProfileModel { (identical(other.socialLinks, socialLinks) || other.socialLinks == socialLinks) && const DeepCollectionEquality().equals(other._photos, _photos) && - const DeepCollectionEquality() - .equals(other._certificates, _certificates)); + const DeepCollectionEquality().equals( + other._certificates, + _certificates, + )); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - hasMedicalEducation, - socialLinks, - const DeepCollectionEquality().hash(_photos), - const DeepCollectionEquality().hash(_certificates)); + runtimeType, + hasMedicalEducation, + socialLinks, + const DeepCollectionEquality().hash(_photos), + const DeepCollectionEquality().hash(_certificates), + ); /// Create a copy of ConsultantProfileModel /// with the given fields replaced by the non-null parameter values. @@ -257,28 +280,29 @@ class _$ConsultantProfileModelImpl implements _ConsultantProfileModel { @override @pragma('vm:prefer-inline') _$$ConsultantProfileModelImplCopyWith<_$ConsultantProfileModelImpl> - get copyWith => __$$ConsultantProfileModelImplCopyWithImpl< - _$ConsultantProfileModelImpl>(this, _$identity); + get copyWith => + __$$ConsultantProfileModelImplCopyWithImpl<_$ConsultantProfileModelImpl>( + this, + _$identity, + ); @override Map toJson() { - return _$$ConsultantProfileModelImplToJson( - this, - ); + return _$$ConsultantProfileModelImplToJson(this); } } abstract class _ConsultantProfileModel implements ConsultantProfileModel { - const factory _ConsultantProfileModel( - {@JsonKey(name: 'has_medical_education', includeIfNull: false) - final bool? hasMedicalEducation, - @JsonKey(name: 'social_links', includeIfNull: false) - final SocialLinksModel? socialLinks, - @JsonKey(name: 'cert_photos', includeIfNull: false) - final List? photos, - @JsonKey(name: 'completed_courses', includeIfNull: false) - final List? certificates}) = - _$ConsultantProfileModelImpl; + const factory _ConsultantProfileModel({ + @JsonKey(name: 'has_medical_education', includeIfNull: false) + final bool? hasMedicalEducation, + @JsonKey(name: 'social_links', includeIfNull: false) + final SocialLinksModel? socialLinks, + @JsonKey(name: 'cert_photos', includeIfNull: false) + final List? photos, + @JsonKey(name: 'completed_courses', includeIfNull: false) + final List? certificates, + }) = _$ConsultantProfileModelImpl; factory _ConsultantProfileModel.fromJson(Map json) = _$ConsultantProfileModelImpl.fromJson; @@ -301,7 +325,7 @@ abstract class _ConsultantProfileModel implements ConsultantProfileModel { @override @JsonKey(includeFromJson: false, includeToJson: false) _$$ConsultantProfileModelImplCopyWith<_$ConsultantProfileModelImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } SocialLinksModel _$SocialLinksModelFromJson(Map json) { @@ -334,16 +358,18 @@ mixin _$SocialLinksModel { /// @nodoc abstract class $SocialLinksModelCopyWith<$Res> { factory $SocialLinksModelCopyWith( - SocialLinksModel value, $Res Function(SocialLinksModel) then) = - _$SocialLinksModelCopyWithImpl<$Res, SocialLinksModel>; + SocialLinksModel value, + $Res Function(SocialLinksModel) then, + ) = _$SocialLinksModelCopyWithImpl<$Res, SocialLinksModel>; @useResult - $Res call( - {@JsonKey(name: 'vk_link', includeIfNull: false) String? vkLink, - @JsonKey(name: 'tg_link', includeIfNull: false) String? tgLink, - @JsonKey(name: 'fb_link', includeIfNull: false) String? fbLink, - @JsonKey(name: 'insta_link', includeIfNull: false) String? instaLink, - @JsonKey(name: 'personal_site_link', includeIfNull: false) - String? personalSiteLink}); + $Res call({ + @JsonKey(name: 'vk_link', includeIfNull: false) String? vkLink, + @JsonKey(name: 'tg_link', includeIfNull: false) String? tgLink, + @JsonKey(name: 'fb_link', includeIfNull: false) String? fbLink, + @JsonKey(name: 'insta_link', includeIfNull: false) String? instaLink, + @JsonKey(name: 'personal_site_link', includeIfNull: false) + String? personalSiteLink, + }); } /// @nodoc @@ -367,55 +393,66 @@ class _$SocialLinksModelCopyWithImpl<$Res, $Val extends SocialLinksModel> Object? instaLink = freezed, Object? personalSiteLink = freezed, }) { - return _then(_value.copyWith( - vkLink: freezed == vkLink - ? _value.vkLink - : vkLink // ignore: cast_nullable_to_non_nullable - as String?, - tgLink: freezed == tgLink - ? _value.tgLink - : tgLink // ignore: cast_nullable_to_non_nullable - as String?, - fbLink: freezed == fbLink - ? _value.fbLink - : fbLink // ignore: cast_nullable_to_non_nullable - as String?, - instaLink: freezed == instaLink - ? _value.instaLink - : instaLink // ignore: cast_nullable_to_non_nullable - as String?, - personalSiteLink: freezed == personalSiteLink - ? _value.personalSiteLink - : personalSiteLink // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + vkLink: + freezed == vkLink + ? _value.vkLink + : vkLink // ignore: cast_nullable_to_non_nullable + as String?, + tgLink: + freezed == tgLink + ? _value.tgLink + : tgLink // ignore: cast_nullable_to_non_nullable + as String?, + fbLink: + freezed == fbLink + ? _value.fbLink + : fbLink // ignore: cast_nullable_to_non_nullable + as String?, + instaLink: + freezed == instaLink + ? _value.instaLink + : instaLink // ignore: cast_nullable_to_non_nullable + as String?, + personalSiteLink: + freezed == personalSiteLink + ? _value.personalSiteLink + : personalSiteLink // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc abstract class _$$SocialLinksModelImplCopyWith<$Res> implements $SocialLinksModelCopyWith<$Res> { - factory _$$SocialLinksModelImplCopyWith(_$SocialLinksModelImpl value, - $Res Function(_$SocialLinksModelImpl) then) = - __$$SocialLinksModelImplCopyWithImpl<$Res>; + factory _$$SocialLinksModelImplCopyWith( + _$SocialLinksModelImpl value, + $Res Function(_$SocialLinksModelImpl) then, + ) = __$$SocialLinksModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: 'vk_link', includeIfNull: false) String? vkLink, - @JsonKey(name: 'tg_link', includeIfNull: false) String? tgLink, - @JsonKey(name: 'fb_link', includeIfNull: false) String? fbLink, - @JsonKey(name: 'insta_link', includeIfNull: false) String? instaLink, - @JsonKey(name: 'personal_site_link', includeIfNull: false) - String? personalSiteLink}); + $Res call({ + @JsonKey(name: 'vk_link', includeIfNull: false) String? vkLink, + @JsonKey(name: 'tg_link', includeIfNull: false) String? tgLink, + @JsonKey(name: 'fb_link', includeIfNull: false) String? fbLink, + @JsonKey(name: 'insta_link', includeIfNull: false) String? instaLink, + @JsonKey(name: 'personal_site_link', includeIfNull: false) + String? personalSiteLink, + }); } /// @nodoc class __$$SocialLinksModelImplCopyWithImpl<$Res> extends _$SocialLinksModelCopyWithImpl<$Res, _$SocialLinksModelImpl> implements _$$SocialLinksModelImplCopyWith<$Res> { - __$$SocialLinksModelImplCopyWithImpl(_$SocialLinksModelImpl _value, - $Res Function(_$SocialLinksModelImpl) _then) - : super(_value, _then); + __$$SocialLinksModelImplCopyWithImpl( + _$SocialLinksModelImpl _value, + $Res Function(_$SocialLinksModelImpl) _then, + ) : super(_value, _then); /// Create a copy of SocialLinksModel /// with the given fields replaced by the non-null parameter values. @@ -428,41 +465,49 @@ class __$$SocialLinksModelImplCopyWithImpl<$Res> Object? instaLink = freezed, Object? personalSiteLink = freezed, }) { - return _then(_$SocialLinksModelImpl( - vkLink: freezed == vkLink - ? _value.vkLink - : vkLink // ignore: cast_nullable_to_non_nullable - as String?, - tgLink: freezed == tgLink - ? _value.tgLink - : tgLink // ignore: cast_nullable_to_non_nullable - as String?, - fbLink: freezed == fbLink - ? _value.fbLink - : fbLink // ignore: cast_nullable_to_non_nullable - as String?, - instaLink: freezed == instaLink - ? _value.instaLink - : instaLink // ignore: cast_nullable_to_non_nullable - as String?, - personalSiteLink: freezed == personalSiteLink - ? _value.personalSiteLink - : personalSiteLink // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$SocialLinksModelImpl( + vkLink: + freezed == vkLink + ? _value.vkLink + : vkLink // ignore: cast_nullable_to_non_nullable + as String?, + tgLink: + freezed == tgLink + ? _value.tgLink + : tgLink // ignore: cast_nullable_to_non_nullable + as String?, + fbLink: + freezed == fbLink + ? _value.fbLink + : fbLink // ignore: cast_nullable_to_non_nullable + as String?, + instaLink: + freezed == instaLink + ? _value.instaLink + : instaLink // ignore: cast_nullable_to_non_nullable + as String?, + personalSiteLink: + freezed == personalSiteLink + ? _value.personalSiteLink + : personalSiteLink // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } /// @nodoc @JsonSerializable() class _$SocialLinksModelImpl implements _SocialLinksModel { - const _$SocialLinksModelImpl( - {@JsonKey(name: 'vk_link', includeIfNull: false) this.vkLink, - @JsonKey(name: 'tg_link', includeIfNull: false) this.tgLink, - @JsonKey(name: 'fb_link', includeIfNull: false) this.fbLink, - @JsonKey(name: 'insta_link', includeIfNull: false) this.instaLink, - @JsonKey(name: 'personal_site_link', includeIfNull: false) - this.personalSiteLink}); + const _$SocialLinksModelImpl({ + @JsonKey(name: 'vk_link', includeIfNull: false) this.vkLink, + @JsonKey(name: 'tg_link', includeIfNull: false) this.tgLink, + @JsonKey(name: 'fb_link', includeIfNull: false) this.fbLink, + @JsonKey(name: 'insta_link', includeIfNull: false) this.instaLink, + @JsonKey(name: 'personal_site_link', includeIfNull: false) + this.personalSiteLink, + }); factory _$SocialLinksModelImpl.fromJson(Map json) => _$$SocialLinksModelImplFromJson(json); @@ -505,7 +550,13 @@ class _$SocialLinksModelImpl implements _SocialLinksModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, vkLink, tgLink, fbLink, instaLink, personalSiteLink); + runtimeType, + vkLink, + tgLink, + fbLink, + instaLink, + personalSiteLink, + ); /// Create a copy of SocialLinksModel /// with the given fields replaced by the non-null parameter values. @@ -514,25 +565,25 @@ class _$SocialLinksModelImpl implements _SocialLinksModel { @pragma('vm:prefer-inline') _$$SocialLinksModelImplCopyWith<_$SocialLinksModelImpl> get copyWith => __$$SocialLinksModelImplCopyWithImpl<_$SocialLinksModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$SocialLinksModelImplToJson( - this, - ); + return _$$SocialLinksModelImplToJson(this); } } abstract class _SocialLinksModel implements SocialLinksModel { - const factory _SocialLinksModel( - {@JsonKey(name: 'vk_link', includeIfNull: false) final String? vkLink, - @JsonKey(name: 'tg_link', includeIfNull: false) final String? tgLink, - @JsonKey(name: 'fb_link', includeIfNull: false) final String? fbLink, - @JsonKey(name: 'insta_link', includeIfNull: false) - final String? instaLink, - @JsonKey(name: 'personal_site_link', includeIfNull: false) - final String? personalSiteLink}) = _$SocialLinksModelImpl; + const factory _SocialLinksModel({ + @JsonKey(name: 'vk_link', includeIfNull: false) final String? vkLink, + @JsonKey(name: 'tg_link', includeIfNull: false) final String? tgLink, + @JsonKey(name: 'fb_link', includeIfNull: false) final String? fbLink, + @JsonKey(name: 'insta_link', includeIfNull: false) final String? instaLink, + @JsonKey(name: 'personal_site_link', includeIfNull: false) + final String? personalSiteLink, + }) = _$SocialLinksModelImpl; factory _SocialLinksModel.fromJson(Map json) = _$SocialLinksModelImpl.fromJson; @@ -583,8 +634,9 @@ mixin _$CertificatesModel { /// @nodoc abstract class $CertificatesModelCopyWith<$Res> { factory $CertificatesModelCopyWith( - CertificatesModel value, $Res Function(CertificatesModel) then) = - _$CertificatesModelCopyWithImpl<$Res, CertificatesModel>; + CertificatesModel value, + $Res Function(CertificatesModel) then, + ) = _$CertificatesModelCopyWithImpl<$Res, CertificatesModel>; @useResult $Res call({String title, String date}); } @@ -603,29 +655,32 @@ class _$CertificatesModelCopyWithImpl<$Res, $Val extends CertificatesModel> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? title = null, - Object? date = null, - }) { - return _then(_value.copyWith( - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - date: null == date - ? _value.date - : date // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? title = null, Object? date = null}) { + return _then( + _value.copyWith( + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + date: + null == date + ? _value.date + : date // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc abstract class _$$CertificatesModelImplCopyWith<$Res> implements $CertificatesModelCopyWith<$Res> { - factory _$$CertificatesModelImplCopyWith(_$CertificatesModelImpl value, - $Res Function(_$CertificatesModelImpl) then) = - __$$CertificatesModelImplCopyWithImpl<$Res>; + factory _$$CertificatesModelImplCopyWith( + _$CertificatesModelImpl value, + $Res Function(_$CertificatesModelImpl) then, + ) = __$$CertificatesModelImplCopyWithImpl<$Res>; @override @useResult $Res call({String title, String date}); @@ -635,28 +690,30 @@ abstract class _$$CertificatesModelImplCopyWith<$Res> class __$$CertificatesModelImplCopyWithImpl<$Res> extends _$CertificatesModelCopyWithImpl<$Res, _$CertificatesModelImpl> implements _$$CertificatesModelImplCopyWith<$Res> { - __$$CertificatesModelImplCopyWithImpl(_$CertificatesModelImpl _value, - $Res Function(_$CertificatesModelImpl) _then) - : super(_value, _then); + __$$CertificatesModelImplCopyWithImpl( + _$CertificatesModelImpl _value, + $Res Function(_$CertificatesModelImpl) _then, + ) : super(_value, _then); /// Create a copy of CertificatesModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? title = null, - Object? date = null, - }) { - return _then(_$CertificatesModelImpl( - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - date: null == date - ? _value.date - : date // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? title = null, Object? date = null}) { + return _then( + _$CertificatesModelImpl( + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + date: + null == date + ? _value.date + : date // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -698,20 +755,21 @@ class _$CertificatesModelImpl implements _CertificatesModel { @pragma('vm:prefer-inline') _$$CertificatesModelImplCopyWith<_$CertificatesModelImpl> get copyWith => __$$CertificatesModelImplCopyWithImpl<_$CertificatesModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$CertificatesModelImplToJson( - this, - ); + return _$$CertificatesModelImplToJson(this); } } abstract class _CertificatesModel implements CertificatesModel { - const factory _CertificatesModel( - {required final String title, - required final String date}) = _$CertificatesModelImpl; + const factory _CertificatesModel({ + required final String title, + required final String date, + }) = _$CertificatesModelImpl; factory _CertificatesModel.fromJson(Map json) = _$CertificatesModelImpl.fromJson; diff --git a/lib/features/consultant/become_consultant/models/consultant_profile_model.g.dart b/lib/features/consultant/become_consultant/models/consultant_profile_model.g.dart index e66c2cee..deaca4ff 100644 --- a/lib/features/consultant/become_consultant/models/consultant_profile_model.g.dart +++ b/lib/features/consultant/become_consultant/models/consultant_profile_model.g.dart @@ -7,62 +7,60 @@ part of 'consultant_profile_model.dart'; // ************************************************************************** _$ConsultantProfileModelImpl _$$ConsultantProfileModelImplFromJson( - Map json) => - _$ConsultantProfileModelImpl( - hasMedicalEducation: json['has_medical_education'] as bool?, - socialLinks: json['social_links'] == null + Map json, +) => _$ConsultantProfileModelImpl( + hasMedicalEducation: json['has_medical_education'] as bool?, + socialLinks: + json['social_links'] == null ? null : SocialLinksModel.fromJson( - json['social_links'] as Map), - photos: (json['cert_photos'] as List?) - ?.map((e) => e as String) - .toList(), - certificates: (json['completed_courses'] as List?) + json['social_links'] as Map, + ), + photos: + (json['cert_photos'] as List?)?.map((e) => e as String).toList(), + certificates: + (json['completed_courses'] as List?) ?.map((e) => CertificatesModel.fromJson(e as Map)) .toList(), - ); +); Map _$$ConsultantProfileModelImplToJson( - _$ConsultantProfileModelImpl instance) => - { - if (instance.hasMedicalEducation case final value?) - 'has_medical_education': value, - if (instance.socialLinks case final value?) 'social_links': value, - if (instance.photos case final value?) 'cert_photos': value, - if (instance.certificates case final value?) 'completed_courses': value, - }; + _$ConsultantProfileModelImpl instance, +) => { + if (instance.hasMedicalEducation case final value?) + 'has_medical_education': value, + if (instance.socialLinks case final value?) 'social_links': value, + if (instance.photos case final value?) 'cert_photos': value, + if (instance.certificates case final value?) 'completed_courses': value, +}; _$SocialLinksModelImpl _$$SocialLinksModelImplFromJson( - Map json) => - _$SocialLinksModelImpl( - vkLink: json['vk_link'] as String?, - tgLink: json['tg_link'] as String?, - fbLink: json['fb_link'] as String?, - instaLink: json['insta_link'] as String?, - personalSiteLink: json['personal_site_link'] as String?, - ); + Map json, +) => _$SocialLinksModelImpl( + vkLink: json['vk_link'] as String?, + tgLink: json['tg_link'] as String?, + fbLink: json['fb_link'] as String?, + instaLink: json['insta_link'] as String?, + personalSiteLink: json['personal_site_link'] as String?, +); Map _$$SocialLinksModelImplToJson( - _$SocialLinksModelImpl instance) => - { - if (instance.vkLink case final value?) 'vk_link': value, - if (instance.tgLink case final value?) 'tg_link': value, - if (instance.fbLink case final value?) 'fb_link': value, - if (instance.instaLink case final value?) 'insta_link': value, - if (instance.personalSiteLink case final value?) - 'personal_site_link': value, - }; + _$SocialLinksModelImpl instance, +) => { + if (instance.vkLink case final value?) 'vk_link': value, + if (instance.tgLink case final value?) 'tg_link': value, + if (instance.fbLink case final value?) 'fb_link': value, + if (instance.instaLink case final value?) 'insta_link': value, + if (instance.personalSiteLink case final value?) 'personal_site_link': value, +}; _$CertificatesModelImpl _$$CertificatesModelImplFromJson( - Map json) => - _$CertificatesModelImpl( - title: json['title'] as String, - date: json['date'] as String, - ); + Map json, +) => _$CertificatesModelImpl( + title: json['title'] as String, + date: json['date'] as String, +); Map _$$CertificatesModelImplToJson( - _$CertificatesModelImpl instance) => - { - 'title': instance.title, - 'date': instance.date, - }; + _$CertificatesModelImpl instance, +) => {'title': instance.title, 'date': instance.date}; diff --git a/lib/features/consultant/become_consultant/presentation/bloc/register_consultant_cubit/register_consultant_state.freezed.dart b/lib/features/consultant/become_consultant/presentation/bloc/register_consultant_cubit/register_consultant_state.freezed.dart index 1bd087fe..9fda3f44 100644 --- a/lib/features/consultant/become_consultant/presentation/bloc/register_consultant_cubit/register_consultant_state.freezed.dart +++ b/lib/features/consultant/become_consultant/presentation/bloc/register_consultant_cubit/register_consultant_state.freezed.dart @@ -12,7 +12,8 @@ part of 'register_consultant_state.dart'; 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'); + '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 _$RegisterConsultantState { @@ -28,9 +29,10 @@ mixin _$RegisterConsultantState { /// @nodoc abstract class $RegisterConsultantStateCopyWith<$Res> { - factory $RegisterConsultantStateCopyWith(RegisterConsultantState value, - $Res Function(RegisterConsultantState) then) = - _$RegisterConsultantStateCopyWithImpl<$Res, RegisterConsultantState>; + factory $RegisterConsultantStateCopyWith( + RegisterConsultantState value, + $Res Function(RegisterConsultantState) then, + ) = _$RegisterConsultantStateCopyWithImpl<$Res, RegisterConsultantState>; @useResult $Res call({ConsultantProfileModel consultant, bool acceptOffer}); @@ -38,8 +40,10 @@ abstract class $RegisterConsultantStateCopyWith<$Res> { } /// @nodoc -class _$RegisterConsultantStateCopyWithImpl<$Res, - $Val extends RegisterConsultantState> +class _$RegisterConsultantStateCopyWithImpl< + $Res, + $Val extends RegisterConsultantState +> implements $RegisterConsultantStateCopyWith<$Res> { _$RegisterConsultantStateCopyWithImpl(this._value, this._then); @@ -52,20 +56,22 @@ class _$RegisterConsultantStateCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? consultant = null, - Object? acceptOffer = null, - }) { - return _then(_value.copyWith( - consultant: null == consultant - ? _value.consultant - : consultant // ignore: cast_nullable_to_non_nullable - as ConsultantProfileModel, - acceptOffer: null == acceptOffer - ? _value.acceptOffer - : acceptOffer // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + $Res call({Object? consultant = null, Object? acceptOffer = null}) { + return _then( + _value.copyWith( + consultant: + null == consultant + ? _value.consultant + : consultant // ignore: cast_nullable_to_non_nullable + as ConsultantProfileModel, + acceptOffer: + null == acceptOffer + ? _value.acceptOffer + : acceptOffer // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } /// Create a copy of RegisterConsultantState @@ -83,9 +89,9 @@ class _$RegisterConsultantStateCopyWithImpl<$Res, abstract class _$$RegisterConsultantStateImplCopyWith<$Res> implements $RegisterConsultantStateCopyWith<$Res> { factory _$$RegisterConsultantStateImplCopyWith( - _$RegisterConsultantStateImpl value, - $Res Function(_$RegisterConsultantStateImpl) then) = - __$$RegisterConsultantStateImplCopyWithImpl<$Res>; + _$RegisterConsultantStateImpl value, + $Res Function(_$RegisterConsultantStateImpl) then, + ) = __$$RegisterConsultantStateImplCopyWithImpl<$Res>; @override @useResult $Res call({ConsultantProfileModel consultant, bool acceptOffer}); @@ -96,40 +102,46 @@ abstract class _$$RegisterConsultantStateImplCopyWith<$Res> /// @nodoc class __$$RegisterConsultantStateImplCopyWithImpl<$Res> - extends _$RegisterConsultantStateCopyWithImpl<$Res, - _$RegisterConsultantStateImpl> + extends + _$RegisterConsultantStateCopyWithImpl< + $Res, + _$RegisterConsultantStateImpl + > implements _$$RegisterConsultantStateImplCopyWith<$Res> { __$$RegisterConsultantStateImplCopyWithImpl( - _$RegisterConsultantStateImpl _value, - $Res Function(_$RegisterConsultantStateImpl) _then) - : super(_value, _then); + _$RegisterConsultantStateImpl _value, + $Res Function(_$RegisterConsultantStateImpl) _then, + ) : super(_value, _then); /// Create a copy of RegisterConsultantState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? consultant = null, - Object? acceptOffer = null, - }) { - return _then(_$RegisterConsultantStateImpl( - consultant: null == consultant - ? _value.consultant - : consultant // ignore: cast_nullable_to_non_nullable - as ConsultantProfileModel, - acceptOffer: null == acceptOffer - ? _value.acceptOffer - : acceptOffer // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? consultant = null, Object? acceptOffer = null}) { + return _then( + _$RegisterConsultantStateImpl( + consultant: + null == consultant + ? _value.consultant + : consultant // ignore: cast_nullable_to_non_nullable + as ConsultantProfileModel, + acceptOffer: + null == acceptOffer + ? _value.acceptOffer + : acceptOffer // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } /// @nodoc class _$RegisterConsultantStateImpl implements _RegisterConsultantState { - const _$RegisterConsultantStateImpl( - {required this.consultant, required this.acceptOffer}); + const _$RegisterConsultantStateImpl({ + required this.consultant, + required this.acceptOffer, + }); @override final ConsultantProfileModel consultant; @@ -161,14 +173,16 @@ class _$RegisterConsultantStateImpl implements _RegisterConsultantState { @override @pragma('vm:prefer-inline') _$$RegisterConsultantStateImplCopyWith<_$RegisterConsultantStateImpl> - get copyWith => __$$RegisterConsultantStateImplCopyWithImpl< - _$RegisterConsultantStateImpl>(this, _$identity); + get copyWith => __$$RegisterConsultantStateImplCopyWithImpl< + _$RegisterConsultantStateImpl + >(this, _$identity); } abstract class _RegisterConsultantState implements RegisterConsultantState { - const factory _RegisterConsultantState( - {required final ConsultantProfileModel consultant, - required final bool acceptOffer}) = _$RegisterConsultantStateImpl; + const factory _RegisterConsultantState({ + required final ConsultantProfileModel consultant, + required final bool acceptOffer, + }) = _$RegisterConsultantStateImpl; @override ConsultantProfileModel get consultant; @@ -180,5 +194,5 @@ abstract class _RegisterConsultantState implements RegisterConsultantState { @override @JsonKey(includeFromJson: false, includeToJson: false) _$$RegisterConsultantStateImplCopyWith<_$RegisterConsultantStateImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/features/consultant/become_consultant/services/consultant_service.g.dart b/lib/features/consultant/become_consultant/services/consultant_service.g.dart index 79dd924e..2eb8fc6e 100644 --- a/lib/features/consultant/become_consultant/services/consultant_service.g.dart +++ b/lib/features/consultant/become_consultant/services/consultant_service.g.dart @@ -50,11 +50,11 @@ class _ConsultantService implements ConsultantService { } final _options = _setStreamType>( Options( - method: 'POST', - headers: _headers, - extra: _extra, - contentType: 'multipart/form-data', - ) + method: 'POST', + headers: _headers, + extra: _extra, + contentType: 'multipart/form-data', + ) .compose( _dio.options, '/api/consultant_request/photos/upload', diff --git a/lib/features/consultant_rating/models/rating_model.freezed.dart b/lib/features/consultant_rating/models/rating_model.freezed.dart index 74e1f0c7..1b17936c 100644 --- a/lib/features/consultant_rating/models/rating_model.freezed.dart +++ b/lib/features/consultant_rating/models/rating_model.freezed.dart @@ -12,7 +12,8 @@ part of 'rating_model.dart'; 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'); + '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', +); RatingModel _$RatingModelFromJson(Map json) { return _RatingModel.fromJson(json); @@ -37,8 +38,9 @@ mixin _$RatingModel { /// @nodoc abstract class $RatingModelCopyWith<$Res> { factory $RatingModelCopyWith( - RatingModel value, $Res Function(RatingModel) then) = - _$RatingModelCopyWithImpl<$Res, RatingModel>; + RatingModel value, + $Res Function(RatingModel) then, + ) = _$RatingModelCopyWithImpl<$Res, RatingModel>; @useResult $Res call({DateTime date, String title, int amount}); } @@ -62,20 +64,26 @@ class _$RatingModelCopyWithImpl<$Res, $Val extends RatingModel> Object? title = null, Object? amount = null, }) { - return _then(_value.copyWith( - date: null == date - ? _value.date - : date // ignore: cast_nullable_to_non_nullable - as DateTime, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - amount: null == amount - ? _value.amount - : amount // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + return _then( + _value.copyWith( + date: + null == date + ? _value.date + : date // ignore: cast_nullable_to_non_nullable + as DateTime, + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + amount: + null == amount + ? _value.amount + : amount // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } } @@ -83,8 +91,9 @@ class _$RatingModelCopyWithImpl<$Res, $Val extends RatingModel> abstract class _$$RatingModelImplCopyWith<$Res> implements $RatingModelCopyWith<$Res> { factory _$$RatingModelImplCopyWith( - _$RatingModelImpl value, $Res Function(_$RatingModelImpl) then) = - __$$RatingModelImplCopyWithImpl<$Res>; + _$RatingModelImpl value, + $Res Function(_$RatingModelImpl) then, + ) = __$$RatingModelImplCopyWithImpl<$Res>; @override @useResult $Res call({DateTime date, String title, int amount}); @@ -95,8 +104,9 @@ class __$$RatingModelImplCopyWithImpl<$Res> extends _$RatingModelCopyWithImpl<$Res, _$RatingModelImpl> implements _$$RatingModelImplCopyWith<$Res> { __$$RatingModelImplCopyWithImpl( - _$RatingModelImpl _value, $Res Function(_$RatingModelImpl) _then) - : super(_value, _then); + _$RatingModelImpl _value, + $Res Function(_$RatingModelImpl) _then, + ) : super(_value, _then); /// Create a copy of RatingModel /// with the given fields replaced by the non-null parameter values. @@ -107,28 +117,36 @@ class __$$RatingModelImplCopyWithImpl<$Res> Object? title = null, Object? amount = null, }) { - return _then(_$RatingModelImpl( - date: null == date - ? _value.date - : date // ignore: cast_nullable_to_non_nullable - as DateTime, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - amount: null == amount - ? _value.amount - : amount // ignore: cast_nullable_to_non_nullable - as int, - )); + return _then( + _$RatingModelImpl( + date: + null == date + ? _value.date + : date // ignore: cast_nullable_to_non_nullable + as DateTime, + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + amount: + null == amount + ? _value.amount + : amount // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } /// @nodoc @JsonSerializable() class _$RatingModelImpl implements _RatingModel { - _$RatingModelImpl( - {required this.date, required this.title, required this.amount}); + _$RatingModelImpl({ + required this.date, + required this.title, + required this.amount, + }); factory _$RatingModelImpl.fromJson(Map json) => _$$RatingModelImplFromJson(json); @@ -169,17 +187,16 @@ class _$RatingModelImpl implements _RatingModel { @override Map toJson() { - return _$$RatingModelImplToJson( - this, - ); + return _$$RatingModelImplToJson(this); } } abstract class _RatingModel implements RatingModel { - factory _RatingModel( - {required final DateTime date, - required final String title, - required final int amount}) = _$RatingModelImpl; + factory _RatingModel({ + required final DateTime date, + required final String title, + required final int amount, + }) = _$RatingModelImpl; factory _RatingModel.fromJson(Map json) = _$RatingModelImpl.fromJson; diff --git a/lib/features/create_diet/models/create_diet_model.freezed.dart b/lib/features/create_diet/models/create_diet_model.freezed.dart index 1effb5c0..c9e626ae 100644 --- a/lib/features/create_diet/models/create_diet_model.freezed.dart +++ b/lib/features/create_diet/models/create_diet_model.freezed.dart @@ -12,7 +12,8 @@ part of 'create_diet_model.dart'; 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'); + '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 _$CreateDietModel { @@ -36,18 +37,20 @@ mixin _$CreateDietModel { /// @nodoc abstract class $CreateDietModelCopyWith<$Res> { factory $CreateDietModelCopyWith( - CreateDietModel value, $Res Function(CreateDietModel) then) = - _$CreateDietModelCopyWithImpl<$Res, CreateDietModel>; + CreateDietModel value, + $Res Function(CreateDietModel) then, + ) = _$CreateDietModelCopyWithImpl<$Res, CreateDietModel>; @useResult - $Res call( - {String? imageUrl, - String? name, - String? details, - DietState? state, - int? duration, - Map type, - XFile? image, - List>>? dailySchedule}); + $Res call({ + String? imageUrl, + String? name, + String? details, + DietState? state, + int? duration, + Map type, + XFile? image, + List>>? dailySchedule, + }); } /// @nodoc @@ -74,60 +77,73 @@ class _$CreateDietModelCopyWithImpl<$Res, $Val extends CreateDietModel> Object? image = freezed, Object? dailySchedule = freezed, }) { - return _then(_value.copyWith( - imageUrl: freezed == imageUrl - ? _value.imageUrl - : imageUrl // ignore: cast_nullable_to_non_nullable - as String?, - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - details: freezed == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as String?, - state: freezed == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as DietState?, - duration: freezed == duration - ? _value.duration - : duration // ignore: cast_nullable_to_non_nullable - as int?, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as Map, - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as XFile?, - dailySchedule: freezed == dailySchedule - ? _value.dailySchedule - : dailySchedule // ignore: cast_nullable_to_non_nullable - as List>>?, - ) as $Val); + return _then( + _value.copyWith( + imageUrl: + freezed == imageUrl + ? _value.imageUrl + : imageUrl // ignore: cast_nullable_to_non_nullable + as String?, + name: + freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + details: + freezed == details + ? _value.details + : details // ignore: cast_nullable_to_non_nullable + as String?, + state: + freezed == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as DietState?, + duration: + freezed == duration + ? _value.duration + : duration // ignore: cast_nullable_to_non_nullable + as int?, + type: + null == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as Map, + image: + freezed == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as XFile?, + dailySchedule: + freezed == dailySchedule + ? _value.dailySchedule + : dailySchedule // ignore: cast_nullable_to_non_nullable + as List>>?, + ) + as $Val, + ); } } /// @nodoc abstract class _$$CreateDietModelImplCopyWith<$Res> implements $CreateDietModelCopyWith<$Res> { - factory _$$CreateDietModelImplCopyWith(_$CreateDietModelImpl value, - $Res Function(_$CreateDietModelImpl) then) = - __$$CreateDietModelImplCopyWithImpl<$Res>; + factory _$$CreateDietModelImplCopyWith( + _$CreateDietModelImpl value, + $Res Function(_$CreateDietModelImpl) then, + ) = __$$CreateDietModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String? imageUrl, - String? name, - String? details, - DietState? state, - int? duration, - Map type, - XFile? image, - List>>? dailySchedule}); + $Res call({ + String? imageUrl, + String? name, + String? details, + DietState? state, + int? duration, + Map type, + XFile? image, + List>>? dailySchedule, + }); } /// @nodoc @@ -135,8 +151,9 @@ class __$$CreateDietModelImplCopyWithImpl<$Res> extends _$CreateDietModelCopyWithImpl<$Res, _$CreateDietModelImpl> implements _$$CreateDietModelImplCopyWith<$Res> { __$$CreateDietModelImplCopyWithImpl( - _$CreateDietModelImpl _value, $Res Function(_$CreateDietModelImpl) _then) - : super(_value, _then); + _$CreateDietModelImpl _value, + $Res Function(_$CreateDietModelImpl) _then, + ) : super(_value, _then); /// Create a copy of CreateDietModel /// with the given fields replaced by the non-null parameter values. @@ -152,58 +169,68 @@ class __$$CreateDietModelImplCopyWithImpl<$Res> Object? image = freezed, Object? dailySchedule = freezed, }) { - return _then(_$CreateDietModelImpl( - imageUrl: freezed == imageUrl - ? _value.imageUrl - : imageUrl // ignore: cast_nullable_to_non_nullable - as String?, - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - details: freezed == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as String?, - state: freezed == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as DietState?, - duration: freezed == duration - ? _value.duration - : duration // ignore: cast_nullable_to_non_nullable - as int?, - type: null == type - ? _value._type - : type // ignore: cast_nullable_to_non_nullable - as Map, - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as XFile?, - dailySchedule: freezed == dailySchedule - ? _value._dailySchedule - : dailySchedule // ignore: cast_nullable_to_non_nullable - as List>>?, - )); + return _then( + _$CreateDietModelImpl( + imageUrl: + freezed == imageUrl + ? _value.imageUrl + : imageUrl // ignore: cast_nullable_to_non_nullable + as String?, + name: + freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + details: + freezed == details + ? _value.details + : details // ignore: cast_nullable_to_non_nullable + as String?, + state: + freezed == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as DietState?, + duration: + freezed == duration + ? _value.duration + : duration // ignore: cast_nullable_to_non_nullable + as int?, + type: + null == type + ? _value._type + : type // ignore: cast_nullable_to_non_nullable + as Map, + image: + freezed == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as XFile?, + dailySchedule: + freezed == dailySchedule + ? _value._dailySchedule + : dailySchedule // ignore: cast_nullable_to_non_nullable + as List>>?, + ), + ); } } /// @nodoc class _$CreateDietModelImpl extends _CreateDietModel { - const _$CreateDietModelImpl( - {this.imageUrl, - this.name, - this.details, - this.state, - this.duration, - required final Map type, - this.image, - final List>>? dailySchedule}) - : _type = type, - _dailySchedule = dailySchedule, - super._(); + const _$CreateDietModelImpl({ + this.imageUrl, + this.name, + this.details, + this.state, + this.duration, + required final Map type, + this.image, + final List>>? dailySchedule, + }) : _type = type, + _dailySchedule = dailySchedule, + super._(); @override final String? imageUrl; @@ -254,21 +281,24 @@ class _$CreateDietModelImpl extends _CreateDietModel { other.duration == duration) && const DeepCollectionEquality().equals(other._type, _type) && (identical(other.image, image) || other.image == image) && - const DeepCollectionEquality() - .equals(other._dailySchedule, _dailySchedule)); + const DeepCollectionEquality().equals( + other._dailySchedule, + _dailySchedule, + )); } @override int get hashCode => Object.hash( - runtimeType, - imageUrl, - name, - details, - state, - duration, - const DeepCollectionEquality().hash(_type), - image, - const DeepCollectionEquality().hash(_dailySchedule)); + runtimeType, + imageUrl, + name, + details, + state, + duration, + const DeepCollectionEquality().hash(_type), + image, + const DeepCollectionEquality().hash(_dailySchedule), + ); /// Create a copy of CreateDietModel /// with the given fields replaced by the non-null parameter values. @@ -277,20 +307,22 @@ class _$CreateDietModelImpl extends _CreateDietModel { @pragma('vm:prefer-inline') _$$CreateDietModelImplCopyWith<_$CreateDietModelImpl> get copyWith => __$$CreateDietModelImplCopyWithImpl<_$CreateDietModelImpl>( - this, _$identity); + this, + _$identity, + ); } abstract class _CreateDietModel extends CreateDietModel { - const factory _CreateDietModel( - {final String? imageUrl, - final String? name, - final String? details, - final DietState? state, - final int? duration, - required final Map type, - final XFile? image, - final List>>? dailySchedule}) = - _$CreateDietModelImpl; + const factory _CreateDietModel({ + final String? imageUrl, + final String? name, + final String? details, + final DietState? state, + final int? duration, + required final Map type, + final XFile? image, + final List>>? dailySchedule, + }) = _$CreateDietModelImpl; const _CreateDietModel._() : super._(); @override diff --git a/lib/features/create_diet/presentation/cubit/create_diet_state.freezed.dart b/lib/features/create_diet/presentation/cubit/create_diet_state.freezed.dart index cc266342..63ed6466 100644 --- a/lib/features/create_diet/presentation/cubit/create_diet_state.freezed.dart +++ b/lib/features/create_diet/presentation/cubit/create_diet_state.freezed.dart @@ -12,7 +12,8 @@ part of 'create_diet_state.dart'; 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'); + '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 _$CreateDietState { @@ -44,26 +45,28 @@ mixin _$CreateDietState { /// @nodoc abstract class $CreateDietStateCopyWith<$Res> { factory $CreateDietStateCopyWith( - CreateDietState value, $Res Function(CreateDietState) then) = - _$CreateDietStateCopyWithImpl<$Res, CreateDietState>; + CreateDietState value, + $Res Function(CreateDietState) then, + ) = _$CreateDietStateCopyWithImpl<$Res, CreateDietState>; @useResult - $Res call( - {bool isLoading, - bool isDietPublishing, - String? errorMessage, - CreateDietModel dietData, - List>? copiedDay, - String? dietNameError, - String? dietDescriptionError, - String? dietDurationError, - String? dietStateError, - String? dietImageError, - List dailyScheduleErrors, - int? durationIndex, - int? dietStateIndex, - bool published, - bool drafted, - bool isDietBeingEdited}); + $Res call({ + bool isLoading, + bool isDietPublishing, + String? errorMessage, + CreateDietModel dietData, + List>? copiedDay, + String? dietNameError, + String? dietDescriptionError, + String? dietDurationError, + String? dietStateError, + String? dietImageError, + List dailyScheduleErrors, + int? durationIndex, + int? dietStateIndex, + bool published, + bool drafted, + bool isDietBeingEdited, + }); $CreateDietModelCopyWith<$Res> get dietData; } @@ -100,72 +103,91 @@ class _$CreateDietStateCopyWithImpl<$Res, $Val extends CreateDietState> Object? drafted = null, Object? isDietBeingEdited = null, }) { - return _then(_value.copyWith( - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - isDietPublishing: null == isDietPublishing - ? _value.isDietPublishing - : isDietPublishing // ignore: cast_nullable_to_non_nullable - as bool, - errorMessage: freezed == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String?, - dietData: null == dietData - ? _value.dietData - : dietData // ignore: cast_nullable_to_non_nullable - as CreateDietModel, - copiedDay: freezed == copiedDay - ? _value.copiedDay - : copiedDay // ignore: cast_nullable_to_non_nullable - as List>?, - dietNameError: freezed == dietNameError - ? _value.dietNameError - : dietNameError // ignore: cast_nullable_to_non_nullable - as String?, - dietDescriptionError: freezed == dietDescriptionError - ? _value.dietDescriptionError - : dietDescriptionError // ignore: cast_nullable_to_non_nullable - as String?, - dietDurationError: freezed == dietDurationError - ? _value.dietDurationError - : dietDurationError // ignore: cast_nullable_to_non_nullable - as String?, - dietStateError: freezed == dietStateError - ? _value.dietStateError - : dietStateError // ignore: cast_nullable_to_non_nullable - as String?, - dietImageError: freezed == dietImageError - ? _value.dietImageError - : dietImageError // ignore: cast_nullable_to_non_nullable - as String?, - dailyScheduleErrors: null == dailyScheduleErrors - ? _value.dailyScheduleErrors - : dailyScheduleErrors // ignore: cast_nullable_to_non_nullable - as List, - durationIndex: freezed == durationIndex - ? _value.durationIndex - : durationIndex // ignore: cast_nullable_to_non_nullable - as int?, - dietStateIndex: freezed == dietStateIndex - ? _value.dietStateIndex - : dietStateIndex // ignore: cast_nullable_to_non_nullable - as int?, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as bool, - drafted: null == drafted - ? _value.drafted - : drafted // ignore: cast_nullable_to_non_nullable - as bool, - isDietBeingEdited: null == isDietBeingEdited - ? _value.isDietBeingEdited - : isDietBeingEdited // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + return _then( + _value.copyWith( + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + isDietPublishing: + null == isDietPublishing + ? _value.isDietPublishing + : isDietPublishing // ignore: cast_nullable_to_non_nullable + as bool, + errorMessage: + freezed == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String?, + dietData: + null == dietData + ? _value.dietData + : dietData // ignore: cast_nullable_to_non_nullable + as CreateDietModel, + copiedDay: + freezed == copiedDay + ? _value.copiedDay + : copiedDay // ignore: cast_nullable_to_non_nullable + as List>?, + dietNameError: + freezed == dietNameError + ? _value.dietNameError + : dietNameError // ignore: cast_nullable_to_non_nullable + as String?, + dietDescriptionError: + freezed == dietDescriptionError + ? _value.dietDescriptionError + : dietDescriptionError // ignore: cast_nullable_to_non_nullable + as String?, + dietDurationError: + freezed == dietDurationError + ? _value.dietDurationError + : dietDurationError // ignore: cast_nullable_to_non_nullable + as String?, + dietStateError: + freezed == dietStateError + ? _value.dietStateError + : dietStateError // ignore: cast_nullable_to_non_nullable + as String?, + dietImageError: + freezed == dietImageError + ? _value.dietImageError + : dietImageError // ignore: cast_nullable_to_non_nullable + as String?, + dailyScheduleErrors: + null == dailyScheduleErrors + ? _value.dailyScheduleErrors + : dailyScheduleErrors // ignore: cast_nullable_to_non_nullable + as List, + durationIndex: + freezed == durationIndex + ? _value.durationIndex + : durationIndex // ignore: cast_nullable_to_non_nullable + as int?, + dietStateIndex: + freezed == dietStateIndex + ? _value.dietStateIndex + : dietStateIndex // ignore: cast_nullable_to_non_nullable + as int?, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as bool, + drafted: + null == drafted + ? _value.drafted + : drafted // ignore: cast_nullable_to_non_nullable + as bool, + isDietBeingEdited: + null == isDietBeingEdited + ? _value.isDietBeingEdited + : isDietBeingEdited // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } /// Create a copy of CreateDietState @@ -182,28 +204,30 @@ class _$CreateDietStateCopyWithImpl<$Res, $Val extends CreateDietState> /// @nodoc abstract class _$$CreateDietStateImplCopyWith<$Res> implements $CreateDietStateCopyWith<$Res> { - factory _$$CreateDietStateImplCopyWith(_$CreateDietStateImpl value, - $Res Function(_$CreateDietStateImpl) then) = - __$$CreateDietStateImplCopyWithImpl<$Res>; + factory _$$CreateDietStateImplCopyWith( + _$CreateDietStateImpl value, + $Res Function(_$CreateDietStateImpl) then, + ) = __$$CreateDietStateImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {bool isLoading, - bool isDietPublishing, - String? errorMessage, - CreateDietModel dietData, - List>? copiedDay, - String? dietNameError, - String? dietDescriptionError, - String? dietDurationError, - String? dietStateError, - String? dietImageError, - List dailyScheduleErrors, - int? durationIndex, - int? dietStateIndex, - bool published, - bool drafted, - bool isDietBeingEdited}); + $Res call({ + bool isLoading, + bool isDietPublishing, + String? errorMessage, + CreateDietModel dietData, + List>? copiedDay, + String? dietNameError, + String? dietDescriptionError, + String? dietDurationError, + String? dietStateError, + String? dietImageError, + List dailyScheduleErrors, + int? durationIndex, + int? dietStateIndex, + bool published, + bool drafted, + bool isDietBeingEdited, + }); @override $CreateDietModelCopyWith<$Res> get dietData; @@ -214,8 +238,9 @@ class __$$CreateDietStateImplCopyWithImpl<$Res> extends _$CreateDietStateCopyWithImpl<$Res, _$CreateDietStateImpl> implements _$$CreateDietStateImplCopyWith<$Res> { __$$CreateDietStateImplCopyWithImpl( - _$CreateDietStateImpl _value, $Res Function(_$CreateDietStateImpl) _then) - : super(_value, _then); + _$CreateDietStateImpl _value, + $Res Function(_$CreateDietStateImpl) _then, + ) : super(_value, _then); /// Create a copy of CreateDietState /// with the given fields replaced by the non-null parameter values. @@ -239,97 +264,115 @@ class __$$CreateDietStateImplCopyWithImpl<$Res> Object? drafted = null, Object? isDietBeingEdited = null, }) { - return _then(_$CreateDietStateImpl( - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - isDietPublishing: null == isDietPublishing - ? _value.isDietPublishing - : isDietPublishing // ignore: cast_nullable_to_non_nullable - as bool, - errorMessage: freezed == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String?, - dietData: null == dietData - ? _value.dietData - : dietData // ignore: cast_nullable_to_non_nullable - as CreateDietModel, - copiedDay: freezed == copiedDay - ? _value._copiedDay - : copiedDay // ignore: cast_nullable_to_non_nullable - as List>?, - dietNameError: freezed == dietNameError - ? _value.dietNameError - : dietNameError // ignore: cast_nullable_to_non_nullable - as String?, - dietDescriptionError: freezed == dietDescriptionError - ? _value.dietDescriptionError - : dietDescriptionError // ignore: cast_nullable_to_non_nullable - as String?, - dietDurationError: freezed == dietDurationError - ? _value.dietDurationError - : dietDurationError // ignore: cast_nullable_to_non_nullable - as String?, - dietStateError: freezed == dietStateError - ? _value.dietStateError - : dietStateError // ignore: cast_nullable_to_non_nullable - as String?, - dietImageError: freezed == dietImageError - ? _value.dietImageError - : dietImageError // ignore: cast_nullable_to_non_nullable - as String?, - dailyScheduleErrors: null == dailyScheduleErrors - ? _value._dailyScheduleErrors - : dailyScheduleErrors // ignore: cast_nullable_to_non_nullable - as List, - durationIndex: freezed == durationIndex - ? _value.durationIndex - : durationIndex // ignore: cast_nullable_to_non_nullable - as int?, - dietStateIndex: freezed == dietStateIndex - ? _value.dietStateIndex - : dietStateIndex // ignore: cast_nullable_to_non_nullable - as int?, - published: null == published - ? _value.published - : published // ignore: cast_nullable_to_non_nullable - as bool, - drafted: null == drafted - ? _value.drafted - : drafted // ignore: cast_nullable_to_non_nullable - as bool, - isDietBeingEdited: null == isDietBeingEdited - ? _value.isDietBeingEdited - : isDietBeingEdited // ignore: cast_nullable_to_non_nullable - as bool, - )); + return _then( + _$CreateDietStateImpl( + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + isDietPublishing: + null == isDietPublishing + ? _value.isDietPublishing + : isDietPublishing // ignore: cast_nullable_to_non_nullable + as bool, + errorMessage: + freezed == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String?, + dietData: + null == dietData + ? _value.dietData + : dietData // ignore: cast_nullable_to_non_nullable + as CreateDietModel, + copiedDay: + freezed == copiedDay + ? _value._copiedDay + : copiedDay // ignore: cast_nullable_to_non_nullable + as List>?, + dietNameError: + freezed == dietNameError + ? _value.dietNameError + : dietNameError // ignore: cast_nullable_to_non_nullable + as String?, + dietDescriptionError: + freezed == dietDescriptionError + ? _value.dietDescriptionError + : dietDescriptionError // ignore: cast_nullable_to_non_nullable + as String?, + dietDurationError: + freezed == dietDurationError + ? _value.dietDurationError + : dietDurationError // ignore: cast_nullable_to_non_nullable + as String?, + dietStateError: + freezed == dietStateError + ? _value.dietStateError + : dietStateError // ignore: cast_nullable_to_non_nullable + as String?, + dietImageError: + freezed == dietImageError + ? _value.dietImageError + : dietImageError // ignore: cast_nullable_to_non_nullable + as String?, + dailyScheduleErrors: + null == dailyScheduleErrors + ? _value._dailyScheduleErrors + : dailyScheduleErrors // ignore: cast_nullable_to_non_nullable + as List, + durationIndex: + freezed == durationIndex + ? _value.durationIndex + : durationIndex // ignore: cast_nullable_to_non_nullable + as int?, + dietStateIndex: + freezed == dietStateIndex + ? _value.dietStateIndex + : dietStateIndex // ignore: cast_nullable_to_non_nullable + as int?, + published: + null == published + ? _value.published + : published // ignore: cast_nullable_to_non_nullable + as bool, + drafted: + null == drafted + ? _value.drafted + : drafted // ignore: cast_nullable_to_non_nullable + as bool, + isDietBeingEdited: + null == isDietBeingEdited + ? _value.isDietBeingEdited + : isDietBeingEdited // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } /// @nodoc class _$CreateDietStateImpl implements _CreateDietState { - const _$CreateDietStateImpl( - {required this.isLoading, - required this.isDietPublishing, - required this.errorMessage, - required this.dietData, - final List>? copiedDay, - this.dietNameError, - this.dietDescriptionError, - this.dietDurationError, - this.dietStateError, - this.dietImageError, - required final List dailyScheduleErrors, - this.durationIndex, - this.dietStateIndex, - this.published = false, - this.drafted = false, - this.isDietBeingEdited = false}) - : _copiedDay = copiedDay, - _dailyScheduleErrors = dailyScheduleErrors; + const _$CreateDietStateImpl({ + required this.isLoading, + required this.isDietPublishing, + required this.errorMessage, + required this.dietData, + final List>? copiedDay, + this.dietNameError, + this.dietDescriptionError, + this.dietDurationError, + this.dietStateError, + this.dietImageError, + required final List dailyScheduleErrors, + this.durationIndex, + this.dietStateIndex, + this.published = false, + this.drafted = false, + this.isDietBeingEdited = false, + }) : _copiedDay = copiedDay, + _dailyScheduleErrors = dailyScheduleErrors; @override final bool isLoading; @@ -400,8 +443,10 @@ class _$CreateDietStateImpl implements _CreateDietState { other.errorMessage == errorMessage) && (identical(other.dietData, dietData) || other.dietData == dietData) && - const DeepCollectionEquality() - .equals(other._copiedDay, _copiedDay) && + const DeepCollectionEquality().equals( + other._copiedDay, + _copiedDay, + ) && (identical(other.dietNameError, dietNameError) || other.dietNameError == dietNameError) && (identical(other.dietDescriptionError, dietDescriptionError) || @@ -412,8 +457,10 @@ class _$CreateDietStateImpl implements _CreateDietState { other.dietStateError == dietStateError) && (identical(other.dietImageError, dietImageError) || other.dietImageError == dietImageError) && - const DeepCollectionEquality() - .equals(other._dailyScheduleErrors, _dailyScheduleErrors) && + const DeepCollectionEquality().equals( + other._dailyScheduleErrors, + _dailyScheduleErrors, + ) && (identical(other.durationIndex, durationIndex) || other.durationIndex == durationIndex) && (identical(other.dietStateIndex, dietStateIndex) || @@ -427,23 +474,24 @@ class _$CreateDietStateImpl implements _CreateDietState { @override int get hashCode => Object.hash( - runtimeType, - isLoading, - isDietPublishing, - errorMessage, - dietData, - const DeepCollectionEquality().hash(_copiedDay), - dietNameError, - dietDescriptionError, - dietDurationError, - dietStateError, - dietImageError, - const DeepCollectionEquality().hash(_dailyScheduleErrors), - durationIndex, - dietStateIndex, - published, - drafted, - isDietBeingEdited); + runtimeType, + isLoading, + isDietPublishing, + errorMessage, + dietData, + const DeepCollectionEquality().hash(_copiedDay), + dietNameError, + dietDescriptionError, + dietDurationError, + dietStateError, + dietImageError, + const DeepCollectionEquality().hash(_dailyScheduleErrors), + durationIndex, + dietStateIndex, + published, + drafted, + isDietBeingEdited, + ); /// Create a copy of CreateDietState /// with the given fields replaced by the non-null parameter values. @@ -452,27 +500,30 @@ class _$CreateDietStateImpl implements _CreateDietState { @pragma('vm:prefer-inline') _$$CreateDietStateImplCopyWith<_$CreateDietStateImpl> get copyWith => __$$CreateDietStateImplCopyWithImpl<_$CreateDietStateImpl>( - this, _$identity); + this, + _$identity, + ); } abstract class _CreateDietState implements CreateDietState { - const factory _CreateDietState( - {required final bool isLoading, - required final bool isDietPublishing, - required final String? errorMessage, - required final CreateDietModel dietData, - final List>? copiedDay, - final String? dietNameError, - final String? dietDescriptionError, - final String? dietDurationError, - final String? dietStateError, - final String? dietImageError, - required final List dailyScheduleErrors, - final int? durationIndex, - final int? dietStateIndex, - final bool published, - final bool drafted, - final bool isDietBeingEdited}) = _$CreateDietStateImpl; + const factory _CreateDietState({ + required final bool isLoading, + required final bool isDietPublishing, + required final String? errorMessage, + required final CreateDietModel dietData, + final List>? copiedDay, + final String? dietNameError, + final String? dietDescriptionError, + final String? dietDurationError, + final String? dietStateError, + final String? dietImageError, + required final List dailyScheduleErrors, + final int? durationIndex, + final int? dietStateIndex, + final bool published, + final bool drafted, + final bool isDietBeingEdited, + }) = _$CreateDietStateImpl; @override bool get isLoading; diff --git a/lib/features/create_diet/services/create_diet_service.g.dart b/lib/features/create_diet/services/create_diet_service.g.dart index 61af7e06..f913ebab 100644 --- a/lib/features/create_diet/services/create_diet_service.g.dart +++ b/lib/features/create_diet/services/create_diet_service.g.dart @@ -25,11 +25,11 @@ class _CreateDietService implements CreateDietService { final _data = formData; final _options = _setStreamType( Options( - method: 'POST', - headers: _headers, - extra: _extra, - contentType: 'multipart/form-data', - ) + method: 'POST', + headers: _headers, + extra: _extra, + contentType: 'multipart/form-data', + ) .compose( _dio.options, '/api/diets/create/published', @@ -57,11 +57,11 @@ class _CreateDietService implements CreateDietService { final _data = formData; final _options = _setStreamType( Options( - method: 'POST', - headers: _headers, - extra: _extra, - contentType: 'multipart/form-data', - ) + method: 'POST', + headers: _headers, + extra: _extra, + contentType: 'multipart/form-data', + ) .compose( _dio.options, '/api/diets/create/drafted', @@ -89,11 +89,11 @@ class _CreateDietService implements CreateDietService { final _data = formData; final _options = _setStreamType( Options( - method: 'POST', - headers: _headers, - extra: _extra, - contentType: 'multipart/form-data', - ) + method: 'POST', + headers: _headers, + extra: _extra, + contentType: 'multipart/form-data', + ) .compose( _dio.options, '/api/diets/create/personalized', @@ -124,11 +124,11 @@ class _CreateDietService implements CreateDietService { final _data = formData; final _options = _setStreamType( Options( - method: 'POST', - headers: _headers, - extra: _extra, - contentType: 'multipart/form-data', - ) + method: 'POST', + headers: _headers, + extra: _extra, + contentType: 'multipart/form-data', + ) .compose( _dio.options, '/api/diets/update/published/${diet}', @@ -151,11 +151,11 @@ class _CreateDietService implements CreateDietService { final _data = formData; final _options = _setStreamType( Options( - method: 'POST', - headers: _headers, - extra: _extra, - contentType: 'multipart/form-data', - ) + method: 'POST', + headers: _headers, + extra: _extra, + contentType: 'multipart/form-data', + ) .compose( _dio.options, '/api/diets/update/drafted/${diet}', @@ -178,11 +178,11 @@ class _CreateDietService implements CreateDietService { final _data = formData; final _options = _setStreamType( Options( - method: 'POST', - headers: _headers, - extra: _extra, - contentType: 'multipart/form-data', - ) + method: 'POST', + headers: _headers, + extra: _extra, + contentType: 'multipart/form-data', + ) .compose( _dio.options, '/api/diets/update/personalized/${diet}', diff --git a/lib/features/create_plan/models/create_plan_model.freezed.dart b/lib/features/create_plan/models/create_plan_model.freezed.dart index 226b3072..27f8f60e 100644 --- a/lib/features/create_plan/models/create_plan_model.freezed.dart +++ b/lib/features/create_plan/models/create_plan_model.freezed.dart @@ -12,7 +12,8 @@ part of 'create_plan_model.dart'; 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'); + '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 _$CreatePlanModel { @@ -34,17 +35,19 @@ mixin _$CreatePlanModel { /// @nodoc abstract class $CreatePlanModelCopyWith<$Res> { factory $CreatePlanModelCopyWith( - CreatePlanModel value, $Res Function(CreatePlanModel) then) = - _$CreatePlanModelCopyWithImpl<$Res, CreatePlanModel>; + CreatePlanModel value, + $Res Function(CreatePlanModel) then, + ) = _$CreatePlanModelCopyWithImpl<$Res, CreatePlanModel>; @useResult - $Res call( - {String? name, - String? details, - String? state, - int? duration, - List type, - XFile? image, - List options}); + $Res call({ + String? name, + String? details, + String? state, + int? duration, + List type, + XFile? image, + List options, + }); } /// @nodoc @@ -70,55 +73,67 @@ class _$CreatePlanModelCopyWithImpl<$Res, $Val extends CreatePlanModel> Object? image = freezed, Object? options = null, }) { - return _then(_value.copyWith( - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - details: freezed == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as String?, - state: freezed == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String?, - duration: freezed == duration - ? _value.duration - : duration // ignore: cast_nullable_to_non_nullable - as int?, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as List, - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as XFile?, - options: null == options - ? _value.options - : options // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + return _then( + _value.copyWith( + name: + freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + details: + freezed == details + ? _value.details + : details // ignore: cast_nullable_to_non_nullable + as String?, + state: + freezed == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String?, + duration: + freezed == duration + ? _value.duration + : duration // ignore: cast_nullable_to_non_nullable + as int?, + type: + null == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as List, + image: + freezed == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as XFile?, + options: + null == options + ? _value.options + : options // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc abstract class _$$CreatePlanModelImplCopyWith<$Res> implements $CreatePlanModelCopyWith<$Res> { - factory _$$CreatePlanModelImplCopyWith(_$CreatePlanModelImpl value, - $Res Function(_$CreatePlanModelImpl) then) = - __$$CreatePlanModelImplCopyWithImpl<$Res>; + factory _$$CreatePlanModelImplCopyWith( + _$CreatePlanModelImpl value, + $Res Function(_$CreatePlanModelImpl) then, + ) = __$$CreatePlanModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String? name, - String? details, - String? state, - int? duration, - List type, - XFile? image, - List options}); + $Res call({ + String? name, + String? details, + String? state, + int? duration, + List type, + XFile? image, + List options, + }); } /// @nodoc @@ -126,8 +141,9 @@ class __$$CreatePlanModelImplCopyWithImpl<$Res> extends _$CreatePlanModelCopyWithImpl<$Res, _$CreatePlanModelImpl> implements _$$CreatePlanModelImplCopyWith<$Res> { __$$CreatePlanModelImplCopyWithImpl( - _$CreatePlanModelImpl _value, $Res Function(_$CreatePlanModelImpl) _then) - : super(_value, _then); + _$CreatePlanModelImpl _value, + $Res Function(_$CreatePlanModelImpl) _then, + ) : super(_value, _then); /// Create a copy of CreatePlanModel /// with the given fields replaced by the non-null parameter values. @@ -142,53 +158,62 @@ class __$$CreatePlanModelImplCopyWithImpl<$Res> Object? image = freezed, Object? options = null, }) { - return _then(_$CreatePlanModelImpl( - name: freezed == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String?, - details: freezed == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as String?, - state: freezed == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String?, - duration: freezed == duration - ? _value.duration - : duration // ignore: cast_nullable_to_non_nullable - as int?, - type: null == type - ? _value._type - : type // ignore: cast_nullable_to_non_nullable - as List, - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as XFile?, - options: null == options - ? _value._options - : options // ignore: cast_nullable_to_non_nullable - as List, - )); + return _then( + _$CreatePlanModelImpl( + name: + freezed == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String?, + details: + freezed == details + ? _value.details + : details // ignore: cast_nullable_to_non_nullable + as String?, + state: + freezed == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String?, + duration: + freezed == duration + ? _value.duration + : duration // ignore: cast_nullable_to_non_nullable + as int?, + type: + null == type + ? _value._type + : type // ignore: cast_nullable_to_non_nullable + as List, + image: + freezed == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as XFile?, + options: + null == options + ? _value._options + : options // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } /// @nodoc class _$CreatePlanModelImpl extends _CreatePlanModel { - const _$CreatePlanModelImpl( - {this.name, - this.details, - this.state, - this.duration, - required final List type, - this.image, - required final List options}) - : _type = type, - _options = options, - super._(); + const _$CreatePlanModelImpl({ + this.name, + this.details, + this.state, + this.duration, + required final List type, + this.image, + required final List options, + }) : _type = type, + _options = options, + super._(); @override final String? name; @@ -238,14 +263,15 @@ class _$CreatePlanModelImpl extends _CreatePlanModel { @override int get hashCode => Object.hash( - runtimeType, - name, - details, - state, - duration, - const DeepCollectionEquality().hash(_type), - image, - const DeepCollectionEquality().hash(_options)); + runtimeType, + name, + details, + state, + duration, + const DeepCollectionEquality().hash(_type), + image, + const DeepCollectionEquality().hash(_options), + ); /// Create a copy of CreatePlanModel /// with the given fields replaced by the non-null parameter values. @@ -254,18 +280,21 @@ class _$CreatePlanModelImpl extends _CreatePlanModel { @pragma('vm:prefer-inline') _$$CreatePlanModelImplCopyWith<_$CreatePlanModelImpl> get copyWith => __$$CreatePlanModelImplCopyWithImpl<_$CreatePlanModelImpl>( - this, _$identity); + this, + _$identity, + ); } abstract class _CreatePlanModel extends CreatePlanModel { - const factory _CreatePlanModel( - {final String? name, - final String? details, - final String? state, - final int? duration, - required final List type, - final XFile? image, - required final List options}) = _$CreatePlanModelImpl; + const factory _CreatePlanModel({ + final String? name, + final String? details, + final String? state, + final int? duration, + required final List type, + final XFile? image, + required final List options, + }) = _$CreatePlanModelImpl; const _CreatePlanModel._() : super._(); @override diff --git a/lib/features/create_plan/presentation/cubit/create_plan_state.freezed.dart b/lib/features/create_plan/presentation/cubit/create_plan_state.freezed.dart index bb7eba17..c27467b7 100644 --- a/lib/features/create_plan/presentation/cubit/create_plan_state.freezed.dart +++ b/lib/features/create_plan/presentation/cubit/create_plan_state.freezed.dart @@ -12,7 +12,8 @@ part of 'create_plan_state.dart'; 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'); + '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 _$CreatePlanState { @@ -32,15 +33,17 @@ mixin _$CreatePlanState { /// @nodoc abstract class $CreatePlanStateCopyWith<$Res> { factory $CreatePlanStateCopyWith( - CreatePlanState value, $Res Function(CreatePlanState) then) = - _$CreatePlanStateCopyWithImpl<$Res, CreatePlanState>; + CreatePlanState value, + $Res Function(CreatePlanState) then, + ) = _$CreatePlanStateCopyWithImpl<$Res, CreatePlanState>; @useResult - $Res call( - {bool isLoading, - String? errorMessage, - CreatePlanModel planData, - int? durationIndex, - int? selectedOptionIndex}); + $Res call({ + bool isLoading, + String? errorMessage, + CreatePlanModel planData, + int? durationIndex, + int? selectedOptionIndex, + }); $CreatePlanModelCopyWith<$Res> get planData; } @@ -66,28 +69,36 @@ class _$CreatePlanStateCopyWithImpl<$Res, $Val extends CreatePlanState> Object? durationIndex = freezed, Object? selectedOptionIndex = freezed, }) { - return _then(_value.copyWith( - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - errorMessage: freezed == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String?, - planData: null == planData - ? _value.planData - : planData // ignore: cast_nullable_to_non_nullable - as CreatePlanModel, - durationIndex: freezed == durationIndex - ? _value.durationIndex - : durationIndex // ignore: cast_nullable_to_non_nullable - as int?, - selectedOptionIndex: freezed == selectedOptionIndex - ? _value.selectedOptionIndex - : selectedOptionIndex // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); + return _then( + _value.copyWith( + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + errorMessage: + freezed == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String?, + planData: + null == planData + ? _value.planData + : planData // ignore: cast_nullable_to_non_nullable + as CreatePlanModel, + durationIndex: + freezed == durationIndex + ? _value.durationIndex + : durationIndex // ignore: cast_nullable_to_non_nullable + as int?, + selectedOptionIndex: + freezed == selectedOptionIndex + ? _value.selectedOptionIndex + : selectedOptionIndex // ignore: cast_nullable_to_non_nullable + as int?, + ) + as $Val, + ); } /// Create a copy of CreatePlanState @@ -104,17 +115,19 @@ class _$CreatePlanStateCopyWithImpl<$Res, $Val extends CreatePlanState> /// @nodoc abstract class _$$CreatePlanStateImplCopyWith<$Res> implements $CreatePlanStateCopyWith<$Res> { - factory _$$CreatePlanStateImplCopyWith(_$CreatePlanStateImpl value, - $Res Function(_$CreatePlanStateImpl) then) = - __$$CreatePlanStateImplCopyWithImpl<$Res>; + factory _$$CreatePlanStateImplCopyWith( + _$CreatePlanStateImpl value, + $Res Function(_$CreatePlanStateImpl) then, + ) = __$$CreatePlanStateImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {bool isLoading, - String? errorMessage, - CreatePlanModel planData, - int? durationIndex, - int? selectedOptionIndex}); + $Res call({ + bool isLoading, + String? errorMessage, + CreatePlanModel planData, + int? durationIndex, + int? selectedOptionIndex, + }); @override $CreatePlanModelCopyWith<$Res> get planData; @@ -125,8 +138,9 @@ class __$$CreatePlanStateImplCopyWithImpl<$Res> extends _$CreatePlanStateCopyWithImpl<$Res, _$CreatePlanStateImpl> implements _$$CreatePlanStateImplCopyWith<$Res> { __$$CreatePlanStateImplCopyWithImpl( - _$CreatePlanStateImpl _value, $Res Function(_$CreatePlanStateImpl) _then) - : super(_value, _then); + _$CreatePlanStateImpl _value, + $Res Function(_$CreatePlanStateImpl) _then, + ) : super(_value, _then); /// Create a copy of CreatePlanState /// with the given fields replaced by the non-null parameter values. @@ -139,40 +153,48 @@ class __$$CreatePlanStateImplCopyWithImpl<$Res> Object? durationIndex = freezed, Object? selectedOptionIndex = freezed, }) { - return _then(_$CreatePlanStateImpl( - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - errorMessage: freezed == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String?, - planData: null == planData - ? _value.planData - : planData // ignore: cast_nullable_to_non_nullable - as CreatePlanModel, - durationIndex: freezed == durationIndex - ? _value.durationIndex - : durationIndex // ignore: cast_nullable_to_non_nullable - as int?, - selectedOptionIndex: freezed == selectedOptionIndex - ? _value.selectedOptionIndex - : selectedOptionIndex // ignore: cast_nullable_to_non_nullable - as int?, - )); + return _then( + _$CreatePlanStateImpl( + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + errorMessage: + freezed == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String?, + planData: + null == planData + ? _value.planData + : planData // ignore: cast_nullable_to_non_nullable + as CreatePlanModel, + durationIndex: + freezed == durationIndex + ? _value.durationIndex + : durationIndex // ignore: cast_nullable_to_non_nullable + as int?, + selectedOptionIndex: + freezed == selectedOptionIndex + ? _value.selectedOptionIndex + : selectedOptionIndex // ignore: cast_nullable_to_non_nullable + as int?, + ), + ); } } /// @nodoc class _$CreatePlanStateImpl implements _CreatePlanState { - const _$CreatePlanStateImpl( - {required this.isLoading, - required this.errorMessage, - required this.planData, - this.durationIndex, - this.selectedOptionIndex}); + const _$CreatePlanStateImpl({ + required this.isLoading, + required this.errorMessage, + required this.planData, + this.durationIndex, + this.selectedOptionIndex, + }); @override final bool isLoading; @@ -208,8 +230,14 @@ class _$CreatePlanStateImpl implements _CreatePlanState { } @override - int get hashCode => Object.hash(runtimeType, isLoading, errorMessage, - planData, durationIndex, selectedOptionIndex); + int get hashCode => Object.hash( + runtimeType, + isLoading, + errorMessage, + planData, + durationIndex, + selectedOptionIndex, + ); /// Create a copy of CreatePlanState /// with the given fields replaced by the non-null parameter values. @@ -218,16 +246,19 @@ class _$CreatePlanStateImpl implements _CreatePlanState { @pragma('vm:prefer-inline') _$$CreatePlanStateImplCopyWith<_$CreatePlanStateImpl> get copyWith => __$$CreatePlanStateImplCopyWithImpl<_$CreatePlanStateImpl>( - this, _$identity); + this, + _$identity, + ); } abstract class _CreatePlanState implements CreatePlanState { - const factory _CreatePlanState( - {required final bool isLoading, - required final String? errorMessage, - required final CreatePlanModel planData, - final int? durationIndex, - final int? selectedOptionIndex}) = _$CreatePlanStateImpl; + const factory _CreatePlanState({ + required final bool isLoading, + required final String? errorMessage, + required final CreatePlanModel planData, + final int? durationIndex, + final int? selectedOptionIndex, + }) = _$CreatePlanStateImpl; @override bool get isLoading; diff --git a/lib/features/create_plan/services/create_plan_service.g.dart b/lib/features/create_plan/services/create_plan_service.g.dart index c93251e7..054aabe1 100644 --- a/lib/features/create_plan/services/create_plan_service.g.dart +++ b/lib/features/create_plan/services/create_plan_service.g.dart @@ -26,11 +26,11 @@ class _CreatePlanService implements CreatePlanService { _data.addAll(model); final _options = _setStreamType( Options( - method: 'POST', - headers: _headers, - extra: _extra, - contentType: 'multipart/form-data', - ) + method: 'POST', + headers: _headers, + extra: _extra, + contentType: 'multipart/form-data', + ) .compose( _dio.options, '/api/plans/create', diff --git a/lib/features/create_recipe/entities/recipe_create_entity.freezed.dart b/lib/features/create_recipe/entities/recipe_create_entity.freezed.dart index c5f4178d..f8cc176b 100644 --- a/lib/features/create_recipe/entities/recipe_create_entity.freezed.dart +++ b/lib/features/create_recipe/entities/recipe_create_entity.freezed.dart @@ -12,7 +12,8 @@ part of 'recipe_create_entity.dart'; 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'); + '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 _$RecipeCreateEntity { @@ -41,24 +42,26 @@ mixin _$RecipeCreateEntity { /// @nodoc abstract class $RecipeCreateEntityCopyWith<$Res> { factory $RecipeCreateEntityCopyWith( - RecipeCreateEntity value, $Res Function(RecipeCreateEntity) then) = - _$RecipeCreateEntityCopyWithImpl<$Res, RecipeCreateEntity>; + RecipeCreateEntity value, + $Res Function(RecipeCreateEntity) then, + ) = _$RecipeCreateEntityCopyWithImpl<$Res, RecipeCreateEntity>; @useResult - $Res call( - {String? title, - TypeOfRecipe? typeOfRecipe, - int? countOfPortions, - double? energyInOnePortion, - int? totalCookHours, - int? totalCookMinutes, - int? activeCookHours, - int? activeCookMinutes, - String? description, - File? image, - String? videoUrl, - List ingredients, - List steps, - List tags}); + $Res call({ + String? title, + TypeOfRecipe? typeOfRecipe, + int? countOfPortions, + double? energyInOnePortion, + int? totalCookHours, + int? totalCookMinutes, + int? activeCookHours, + int? activeCookMinutes, + String? description, + File? image, + String? videoUrl, + List ingredients, + List steps, + List tags, + }); } /// @nodoc @@ -91,99 +94,119 @@ class _$RecipeCreateEntityCopyWithImpl<$Res, $Val extends RecipeCreateEntity> Object? steps = null, Object? tags = null, }) { - return _then(_value.copyWith( - title: freezed == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String?, - typeOfRecipe: freezed == typeOfRecipe - ? _value.typeOfRecipe - : typeOfRecipe // ignore: cast_nullable_to_non_nullable - as TypeOfRecipe?, - countOfPortions: freezed == countOfPortions - ? _value.countOfPortions - : countOfPortions // ignore: cast_nullable_to_non_nullable - as int?, - energyInOnePortion: freezed == energyInOnePortion - ? _value.energyInOnePortion - : energyInOnePortion // ignore: cast_nullable_to_non_nullable - as double?, - totalCookHours: freezed == totalCookHours - ? _value.totalCookHours - : totalCookHours // ignore: cast_nullable_to_non_nullable - as int?, - totalCookMinutes: freezed == totalCookMinutes - ? _value.totalCookMinutes - : totalCookMinutes // ignore: cast_nullable_to_non_nullable - as int?, - activeCookHours: freezed == activeCookHours - ? _value.activeCookHours - : activeCookHours // ignore: cast_nullable_to_non_nullable - as int?, - activeCookMinutes: freezed == activeCookMinutes - ? _value.activeCookMinutes - : activeCookMinutes // ignore: cast_nullable_to_non_nullable - as int?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as File?, - videoUrl: freezed == videoUrl - ? _value.videoUrl - : videoUrl // ignore: cast_nullable_to_non_nullable - as String?, - ingredients: null == ingredients - ? _value.ingredients - : ingredients // ignore: cast_nullable_to_non_nullable - as List, - steps: null == steps - ? _value.steps - : steps // ignore: cast_nullable_to_non_nullable - as List, - tags: null == tags - ? _value.tags - : tags // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + return _then( + _value.copyWith( + title: + freezed == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String?, + typeOfRecipe: + freezed == typeOfRecipe + ? _value.typeOfRecipe + : typeOfRecipe // ignore: cast_nullable_to_non_nullable + as TypeOfRecipe?, + countOfPortions: + freezed == countOfPortions + ? _value.countOfPortions + : countOfPortions // ignore: cast_nullable_to_non_nullable + as int?, + energyInOnePortion: + freezed == energyInOnePortion + ? _value.energyInOnePortion + : energyInOnePortion // ignore: cast_nullable_to_non_nullable + as double?, + totalCookHours: + freezed == totalCookHours + ? _value.totalCookHours + : totalCookHours // ignore: cast_nullable_to_non_nullable + as int?, + totalCookMinutes: + freezed == totalCookMinutes + ? _value.totalCookMinutes + : totalCookMinutes // ignore: cast_nullable_to_non_nullable + as int?, + activeCookHours: + freezed == activeCookHours + ? _value.activeCookHours + : activeCookHours // ignore: cast_nullable_to_non_nullable + as int?, + activeCookMinutes: + freezed == activeCookMinutes + ? _value.activeCookMinutes + : activeCookMinutes // ignore: cast_nullable_to_non_nullable + as int?, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + image: + freezed == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as File?, + videoUrl: + freezed == videoUrl + ? _value.videoUrl + : videoUrl // ignore: cast_nullable_to_non_nullable + as String?, + ingredients: + null == ingredients + ? _value.ingredients + : ingredients // ignore: cast_nullable_to_non_nullable + as List, + steps: + null == steps + ? _value.steps + : steps // ignore: cast_nullable_to_non_nullable + as List, + tags: + null == tags + ? _value.tags + : tags // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc abstract class _$$RecipeCreateEntityImplCopyWith<$Res> implements $RecipeCreateEntityCopyWith<$Res> { - factory _$$RecipeCreateEntityImplCopyWith(_$RecipeCreateEntityImpl value, - $Res Function(_$RecipeCreateEntityImpl) then) = - __$$RecipeCreateEntityImplCopyWithImpl<$Res>; + factory _$$RecipeCreateEntityImplCopyWith( + _$RecipeCreateEntityImpl value, + $Res Function(_$RecipeCreateEntityImpl) then, + ) = __$$RecipeCreateEntityImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String? title, - TypeOfRecipe? typeOfRecipe, - int? countOfPortions, - double? energyInOnePortion, - int? totalCookHours, - int? totalCookMinutes, - int? activeCookHours, - int? activeCookMinutes, - String? description, - File? image, - String? videoUrl, - List ingredients, - List steps, - List tags}); + $Res call({ + String? title, + TypeOfRecipe? typeOfRecipe, + int? countOfPortions, + double? energyInOnePortion, + int? totalCookHours, + int? totalCookMinutes, + int? activeCookHours, + int? activeCookMinutes, + String? description, + File? image, + String? videoUrl, + List ingredients, + List steps, + List tags, + }); } /// @nodoc class __$$RecipeCreateEntityImplCopyWithImpl<$Res> extends _$RecipeCreateEntityCopyWithImpl<$Res, _$RecipeCreateEntityImpl> implements _$$RecipeCreateEntityImplCopyWith<$Res> { - __$$RecipeCreateEntityImplCopyWithImpl(_$RecipeCreateEntityImpl _value, - $Res Function(_$RecipeCreateEntityImpl) _then) - : super(_value, _then); + __$$RecipeCreateEntityImplCopyWithImpl( + _$RecipeCreateEntityImpl _value, + $Res Function(_$RecipeCreateEntityImpl) _then, + ) : super(_value, _then); /// Create a copy of RecipeCreateEntity /// with the given fields replaced by the non-null parameter values. @@ -205,89 +228,105 @@ class __$$RecipeCreateEntityImplCopyWithImpl<$Res> Object? steps = null, Object? tags = null, }) { - return _then(_$RecipeCreateEntityImpl( - title: freezed == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String?, - typeOfRecipe: freezed == typeOfRecipe - ? _value.typeOfRecipe - : typeOfRecipe // ignore: cast_nullable_to_non_nullable - as TypeOfRecipe?, - countOfPortions: freezed == countOfPortions - ? _value.countOfPortions - : countOfPortions // ignore: cast_nullable_to_non_nullable - as int?, - energyInOnePortion: freezed == energyInOnePortion - ? _value.energyInOnePortion - : energyInOnePortion // ignore: cast_nullable_to_non_nullable - as double?, - totalCookHours: freezed == totalCookHours - ? _value.totalCookHours - : totalCookHours // ignore: cast_nullable_to_non_nullable - as int?, - totalCookMinutes: freezed == totalCookMinutes - ? _value.totalCookMinutes - : totalCookMinutes // ignore: cast_nullable_to_non_nullable - as int?, - activeCookHours: freezed == activeCookHours - ? _value.activeCookHours - : activeCookHours // ignore: cast_nullable_to_non_nullable - as int?, - activeCookMinutes: freezed == activeCookMinutes - ? _value.activeCookMinutes - : activeCookMinutes // ignore: cast_nullable_to_non_nullable - as int?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as File?, - videoUrl: freezed == videoUrl - ? _value.videoUrl - : videoUrl // ignore: cast_nullable_to_non_nullable - as String?, - ingredients: null == ingredients - ? _value._ingredients - : ingredients // ignore: cast_nullable_to_non_nullable - as List, - steps: null == steps - ? _value._steps - : steps // ignore: cast_nullable_to_non_nullable - as List, - tags: null == tags - ? _value._tags - : tags // ignore: cast_nullable_to_non_nullable - as List, - )); + return _then( + _$RecipeCreateEntityImpl( + title: + freezed == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String?, + typeOfRecipe: + freezed == typeOfRecipe + ? _value.typeOfRecipe + : typeOfRecipe // ignore: cast_nullable_to_non_nullable + as TypeOfRecipe?, + countOfPortions: + freezed == countOfPortions + ? _value.countOfPortions + : countOfPortions // ignore: cast_nullable_to_non_nullable + as int?, + energyInOnePortion: + freezed == energyInOnePortion + ? _value.energyInOnePortion + : energyInOnePortion // ignore: cast_nullable_to_non_nullable + as double?, + totalCookHours: + freezed == totalCookHours + ? _value.totalCookHours + : totalCookHours // ignore: cast_nullable_to_non_nullable + as int?, + totalCookMinutes: + freezed == totalCookMinutes + ? _value.totalCookMinutes + : totalCookMinutes // ignore: cast_nullable_to_non_nullable + as int?, + activeCookHours: + freezed == activeCookHours + ? _value.activeCookHours + : activeCookHours // ignore: cast_nullable_to_non_nullable + as int?, + activeCookMinutes: + freezed == activeCookMinutes + ? _value.activeCookMinutes + : activeCookMinutes // ignore: cast_nullable_to_non_nullable + as int?, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + image: + freezed == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as File?, + videoUrl: + freezed == videoUrl + ? _value.videoUrl + : videoUrl // ignore: cast_nullable_to_non_nullable + as String?, + ingredients: + null == ingredients + ? _value._ingredients + : ingredients // ignore: cast_nullable_to_non_nullable + as List, + steps: + null == steps + ? _value._steps + : steps // ignore: cast_nullable_to_non_nullable + as List, + tags: + null == tags + ? _value._tags + : tags // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } /// @nodoc class _$RecipeCreateEntityImpl extends _RecipeCreateEntity { - const _$RecipeCreateEntityImpl( - {this.title, - this.typeOfRecipe, - this.countOfPortions, - this.energyInOnePortion, - this.totalCookHours, - this.totalCookMinutes, - this.activeCookHours, - this.activeCookMinutes, - this.description, - this.image, - this.videoUrl, - required final List ingredients, - required final List steps, - required final List tags}) - : _ingredients = ingredients, - _steps = steps, - _tags = tags, - super._(); + const _$RecipeCreateEntityImpl({ + this.title, + this.typeOfRecipe, + this.countOfPortions, + this.energyInOnePortion, + this.totalCookHours, + this.totalCookMinutes, + this.activeCookHours, + this.activeCookMinutes, + this.description, + this.image, + this.videoUrl, + required final List ingredients, + required final List steps, + required final List tags, + }) : _ingredients = ingredients, + _steps = steps, + _tags = tags, + super._(); @override final String? title; @@ -365,29 +404,32 @@ class _$RecipeCreateEntityImpl extends _RecipeCreateEntity { (identical(other.image, image) || other.image == image) && (identical(other.videoUrl, videoUrl) || other.videoUrl == videoUrl) && - const DeepCollectionEquality() - .equals(other._ingredients, _ingredients) && + const DeepCollectionEquality().equals( + other._ingredients, + _ingredients, + ) && const DeepCollectionEquality().equals(other._steps, _steps) && const DeepCollectionEquality().equals(other._tags, _tags)); } @override int get hashCode => Object.hash( - runtimeType, - title, - typeOfRecipe, - countOfPortions, - energyInOnePortion, - totalCookHours, - totalCookMinutes, - activeCookHours, - activeCookMinutes, - description, - image, - videoUrl, - const DeepCollectionEquality().hash(_ingredients), - const DeepCollectionEquality().hash(_steps), - const DeepCollectionEquality().hash(_tags)); + runtimeType, + title, + typeOfRecipe, + countOfPortions, + energyInOnePortion, + totalCookHours, + totalCookMinutes, + activeCookHours, + activeCookMinutes, + description, + image, + videoUrl, + const DeepCollectionEquality().hash(_ingredients), + const DeepCollectionEquality().hash(_steps), + const DeepCollectionEquality().hash(_tags), + ); /// Create a copy of RecipeCreateEntity /// with the given fields replaced by the non-null parameter values. @@ -396,25 +438,28 @@ class _$RecipeCreateEntityImpl extends _RecipeCreateEntity { @pragma('vm:prefer-inline') _$$RecipeCreateEntityImplCopyWith<_$RecipeCreateEntityImpl> get copyWith => __$$RecipeCreateEntityImplCopyWithImpl<_$RecipeCreateEntityImpl>( - this, _$identity); + this, + _$identity, + ); } abstract class _RecipeCreateEntity extends RecipeCreateEntity { - const factory _RecipeCreateEntity( - {final String? title, - final TypeOfRecipe? typeOfRecipe, - final int? countOfPortions, - final double? energyInOnePortion, - final int? totalCookHours, - final int? totalCookMinutes, - final int? activeCookHours, - final int? activeCookMinutes, - final String? description, - final File? image, - final String? videoUrl, - required final List ingredients, - required final List steps, - required final List tags}) = _$RecipeCreateEntityImpl; + const factory _RecipeCreateEntity({ + final String? title, + final TypeOfRecipe? typeOfRecipe, + final int? countOfPortions, + final double? energyInOnePortion, + final int? totalCookHours, + final int? totalCookMinutes, + final int? activeCookHours, + final int? activeCookMinutes, + final String? description, + final File? image, + final String? videoUrl, + required final List ingredients, + required final List steps, + required final List tags, + }) = _$RecipeCreateEntityImpl; const _RecipeCreateEntity._() : super._(); @override @@ -469,8 +514,9 @@ mixin _$StepEntity { /// @nodoc abstract class $StepEntityCopyWith<$Res> { factory $StepEntityCopyWith( - StepEntity value, $Res Function(StepEntity) then) = - _$StepEntityCopyWithImpl<$Res, StepEntity>; + StepEntity value, + $Res Function(StepEntity) then, + ) = _$StepEntityCopyWithImpl<$Res, StepEntity>; @useResult $Res call({String? description, File? image}); } @@ -489,20 +535,22 @@ class _$StepEntityCopyWithImpl<$Res, $Val extends StepEntity> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? description = freezed, - Object? image = freezed, - }) { - return _then(_value.copyWith( - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as File?, - ) as $Val); + $Res call({Object? description = freezed, Object? image = freezed}) { + return _then( + _value.copyWith( + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + image: + freezed == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as File?, + ) + as $Val, + ); } } @@ -510,8 +558,9 @@ class _$StepEntityCopyWithImpl<$Res, $Val extends StepEntity> abstract class _$$StepEntityImplCopyWith<$Res> implements $StepEntityCopyWith<$Res> { factory _$$StepEntityImplCopyWith( - _$StepEntityImpl value, $Res Function(_$StepEntityImpl) then) = - __$$StepEntityImplCopyWithImpl<$Res>; + _$StepEntityImpl value, + $Res Function(_$StepEntityImpl) then, + ) = __$$StepEntityImplCopyWithImpl<$Res>; @override @useResult $Res call({String? description, File? image}); @@ -522,27 +571,29 @@ class __$$StepEntityImplCopyWithImpl<$Res> extends _$StepEntityCopyWithImpl<$Res, _$StepEntityImpl> implements _$$StepEntityImplCopyWith<$Res> { __$$StepEntityImplCopyWithImpl( - _$StepEntityImpl _value, $Res Function(_$StepEntityImpl) _then) - : super(_value, _then); + _$StepEntityImpl _value, + $Res Function(_$StepEntityImpl) _then, + ) : super(_value, _then); /// Create a copy of StepEntity /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? description = freezed, - Object? image = freezed, - }) { - return _then(_$StepEntityImpl( - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as File?, - )); + $Res call({Object? description = freezed, Object? image = freezed}) { + return _then( + _$StepEntityImpl( + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + image: + freezed == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as File?, + ), + ); } } diff --git a/lib/features/create_recipe/models/ingredient.freezed.dart b/lib/features/create_recipe/models/ingredient.freezed.dart index 2bf96fb3..238889d2 100644 --- a/lib/features/create_recipe/models/ingredient.freezed.dart +++ b/lib/features/create_recipe/models/ingredient.freezed.dart @@ -12,7 +12,8 @@ part of 'ingredient.dart'; 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'); + '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', +); Ingredient _$IngredientFromJson(Map json) { return _Ingredient.fromJson(json); @@ -37,8 +38,9 @@ mixin _$Ingredient { /// @nodoc abstract class $IngredientCopyWith<$Res> { factory $IngredientCopyWith( - Ingredient value, $Res Function(Ingredient) then) = - _$IngredientCopyWithImpl<$Res, Ingredient>; + Ingredient value, + $Res Function(Ingredient) then, + ) = _$IngredientCopyWithImpl<$Res, Ingredient>; @useResult $Res call({String name, String unit, String portion}); } @@ -62,20 +64,26 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient> Object? unit = null, Object? portion = null, }) { - return _then(_value.copyWith( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - unit: null == unit - ? _value.unit - : unit // ignore: cast_nullable_to_non_nullable - as String, - portion: null == portion - ? _value.portion - : portion // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + return _then( + _value.copyWith( + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + unit: + null == unit + ? _value.unit + : unit // ignore: cast_nullable_to_non_nullable + as String, + portion: + null == portion + ? _value.portion + : portion // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } @@ -83,8 +91,9 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient> abstract class _$$IngredientImplCopyWith<$Res> implements $IngredientCopyWith<$Res> { factory _$$IngredientImplCopyWith( - _$IngredientImpl value, $Res Function(_$IngredientImpl) then) = - __$$IngredientImplCopyWithImpl<$Res>; + _$IngredientImpl value, + $Res Function(_$IngredientImpl) then, + ) = __$$IngredientImplCopyWithImpl<$Res>; @override @useResult $Res call({String name, String unit, String portion}); @@ -95,8 +104,9 @@ class __$$IngredientImplCopyWithImpl<$Res> extends _$IngredientCopyWithImpl<$Res, _$IngredientImpl> implements _$$IngredientImplCopyWith<$Res> { __$$IngredientImplCopyWithImpl( - _$IngredientImpl _value, $Res Function(_$IngredientImpl) _then) - : super(_value, _then); + _$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. @@ -107,28 +117,36 @@ class __$$IngredientImplCopyWithImpl<$Res> Object? unit = null, Object? portion = null, }) { - return _then(_$IngredientImpl( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - unit: null == unit - ? _value.unit - : unit // ignore: cast_nullable_to_non_nullable - as String, - portion: null == portion - ? _value.portion - : portion // ignore: cast_nullable_to_non_nullable - as String, - )); + return _then( + _$IngredientImpl( + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + unit: + null == unit + ? _value.unit + : unit // ignore: cast_nullable_to_non_nullable + as String, + portion: + null == portion + ? _value.portion + : portion // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } /// @nodoc @JsonSerializable() class _$IngredientImpl implements _Ingredient { - const _$IngredientImpl( - {required this.name, required this.unit, required this.portion}); + const _$IngredientImpl({ + required this.name, + required this.unit, + required this.portion, + }); factory _$IngredientImpl.fromJson(Map json) => _$$IngredientImplFromJson(json); @@ -169,17 +187,16 @@ class _$IngredientImpl implements _Ingredient { @override Map toJson() { - return _$$IngredientImplToJson( - this, - ); + return _$$IngredientImplToJson(this); } } abstract class _Ingredient implements Ingredient { - const factory _Ingredient( - {required final String name, - required final String unit, - required final String portion}) = _$IngredientImpl; + const factory _Ingredient({ + required final String name, + required final String unit, + required final String portion, + }) = _$IngredientImpl; factory _Ingredient.fromJson(Map json) = _$IngredientImpl.fromJson; diff --git a/lib/features/create_recipe/models/product.freezed.dart b/lib/features/create_recipe/models/product.freezed.dart index 610656fb..f65d6cb7 100644 --- a/lib/features/create_recipe/models/product.freezed.dart +++ b/lib/features/create_recipe/models/product.freezed.dart @@ -12,7 +12,8 @@ part of 'product.dart'; 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'); + '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', +); Product _$ProductFromJson(Map json) { return _Product.fromJson(json); @@ -54,28 +55,31 @@ class _$ProductCopyWithImpl<$Res, $Val extends Product> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? name = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? id = null, Object? name = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc abstract class _$$ProductImplCopyWith<$Res> implements $ProductCopyWith<$Res> { factory _$$ProductImplCopyWith( - _$ProductImpl value, $Res Function(_$ProductImpl) then) = - __$$ProductImplCopyWithImpl<$Res>; + _$ProductImpl value, + $Res Function(_$ProductImpl) then, + ) = __$$ProductImplCopyWithImpl<$Res>; @override @useResult $Res call({int id, String name}); @@ -86,27 +90,29 @@ class __$$ProductImplCopyWithImpl<$Res> extends _$ProductCopyWithImpl<$Res, _$ProductImpl> implements _$$ProductImplCopyWith<$Res> { __$$ProductImplCopyWithImpl( - _$ProductImpl _value, $Res Function(_$ProductImpl) _then) - : super(_value, _then); + _$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({ - Object? id = null, - Object? name = null, - }) { - return _then(_$ProductImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? id = null, Object? name = null}) { + return _then( + _$ProductImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -151,9 +157,7 @@ class _$ProductImpl implements _Product { @override Map toJson() { - return _$$ProductImplToJson( - this, - ); + return _$$ProductImplToJson(this); } } diff --git a/lib/features/create_recipe/models/product.g.dart b/lib/features/create_recipe/models/product.g.dart index 74331101..fc7323b7 100644 --- a/lib/features/create_recipe/models/product.g.dart +++ b/lib/features/create_recipe/models/product.g.dart @@ -13,7 +13,4 @@ _$ProductImpl _$$ProductImplFromJson(Map json) => ); Map _$$ProductImplToJson(_$ProductImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - }; + {'id': instance.id, 'name': instance.name}; diff --git a/lib/features/create_recipe/models/recipe_create_model.freezed.dart b/lib/features/create_recipe/models/recipe_create_model.freezed.dart index 3f93559b..b64ed74e 100644 --- a/lib/features/create_recipe/models/recipe_create_model.freezed.dart +++ b/lib/features/create_recipe/models/recipe_create_model.freezed.dart @@ -12,7 +12,8 @@ part of 'recipe_create_model.dart'; 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'); + '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', +); RecipeCreateModel _$RecipeCreateModelFromJson(Map json) { return _RecipeCreateModel.fromJson(json); @@ -50,22 +51,24 @@ mixin _$RecipeCreateModel { /// @nodoc abstract class $RecipeCreateModelCopyWith<$Res> { factory $RecipeCreateModelCopyWith( - RecipeCreateModel value, $Res Function(RecipeCreateModel) then) = - _$RecipeCreateModelCopyWithImpl<$Res, RecipeCreateModel>; + RecipeCreateModel value, + $Res Function(RecipeCreateModel) then, + ) = _$RecipeCreateModelCopyWithImpl<$Res, RecipeCreateModel>; @useResult - $Res call( - {String title, - String state, - String description, - RecipeType type, - @JsonKey(name: 'video_url') String? videoUrl, - @JsonKey(name: 'cooking_time') String? cookingTime, - @JsonKey(name: 'active_time') String? activeTime, - String servings, - @JsonKey(name: 'energy_per_serving') String energyPerServing, - List tags, - List ingredients, - List steps}); + $Res call({ + String title, + String state, + String description, + RecipeType type, + @JsonKey(name: 'video_url') String? videoUrl, + @JsonKey(name: 'cooking_time') String? cookingTime, + @JsonKey(name: 'active_time') String? activeTime, + String servings, + @JsonKey(name: 'energy_per_serving') String energyPerServing, + List tags, + List ingredients, + List steps, + }); } /// @nodoc @@ -96,89 +99,107 @@ class _$RecipeCreateModelCopyWithImpl<$Res, $Val extends RecipeCreateModel> Object? ingredients = null, Object? steps = null, }) { - return _then(_value.copyWith( - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as RecipeType, - videoUrl: freezed == videoUrl - ? _value.videoUrl - : videoUrl // ignore: cast_nullable_to_non_nullable - as String?, - cookingTime: freezed == cookingTime - ? _value.cookingTime - : cookingTime // ignore: cast_nullable_to_non_nullable - as String?, - activeTime: freezed == activeTime - ? _value.activeTime - : activeTime // ignore: cast_nullable_to_non_nullable - as String?, - servings: null == servings - ? _value.servings - : servings // ignore: cast_nullable_to_non_nullable - as String, - energyPerServing: null == energyPerServing - ? _value.energyPerServing - : energyPerServing // ignore: cast_nullable_to_non_nullable - as String, - tags: null == tags - ? _value.tags - : tags // ignore: cast_nullable_to_non_nullable - as List, - ingredients: null == ingredients - ? _value.ingredients - : ingredients // ignore: cast_nullable_to_non_nullable - as List, - steps: null == steps - ? _value.steps - : steps // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + return _then( + _value.copyWith( + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + state: + null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String, + description: + null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + type: + null == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as RecipeType, + videoUrl: + freezed == videoUrl + ? _value.videoUrl + : videoUrl // ignore: cast_nullable_to_non_nullable + as String?, + cookingTime: + freezed == cookingTime + ? _value.cookingTime + : cookingTime // ignore: cast_nullable_to_non_nullable + as String?, + activeTime: + freezed == activeTime + ? _value.activeTime + : activeTime // ignore: cast_nullable_to_non_nullable + as String?, + servings: + null == servings + ? _value.servings + : servings // ignore: cast_nullable_to_non_nullable + as String, + energyPerServing: + null == energyPerServing + ? _value.energyPerServing + : energyPerServing // ignore: cast_nullable_to_non_nullable + as String, + tags: + null == tags + ? _value.tags + : tags // ignore: cast_nullable_to_non_nullable + as List, + ingredients: + null == ingredients + ? _value.ingredients + : ingredients // ignore: cast_nullable_to_non_nullable + as List, + steps: + null == steps + ? _value.steps + : steps // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc abstract class _$$RecipeCreateModelImplCopyWith<$Res> implements $RecipeCreateModelCopyWith<$Res> { - factory _$$RecipeCreateModelImplCopyWith(_$RecipeCreateModelImpl value, - $Res Function(_$RecipeCreateModelImpl) then) = - __$$RecipeCreateModelImplCopyWithImpl<$Res>; + factory _$$RecipeCreateModelImplCopyWith( + _$RecipeCreateModelImpl value, + $Res Function(_$RecipeCreateModelImpl) then, + ) = __$$RecipeCreateModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String title, - String state, - String description, - RecipeType type, - @JsonKey(name: 'video_url') String? videoUrl, - @JsonKey(name: 'cooking_time') String? cookingTime, - @JsonKey(name: 'active_time') String? activeTime, - String servings, - @JsonKey(name: 'energy_per_serving') String energyPerServing, - List tags, - List ingredients, - List steps}); + $Res call({ + String title, + String state, + String description, + RecipeType type, + @JsonKey(name: 'video_url') String? videoUrl, + @JsonKey(name: 'cooking_time') String? cookingTime, + @JsonKey(name: 'active_time') String? activeTime, + String servings, + @JsonKey(name: 'energy_per_serving') String energyPerServing, + List tags, + List ingredients, + List steps, + }); } /// @nodoc class __$$RecipeCreateModelImplCopyWithImpl<$Res> extends _$RecipeCreateModelCopyWithImpl<$Res, _$RecipeCreateModelImpl> implements _$$RecipeCreateModelImplCopyWith<$Res> { - __$$RecipeCreateModelImplCopyWithImpl(_$RecipeCreateModelImpl _value, - $Res Function(_$RecipeCreateModelImpl) _then) - : super(_value, _then); + __$$RecipeCreateModelImplCopyWithImpl( + _$RecipeCreateModelImpl _value, + $Res Function(_$RecipeCreateModelImpl) _then, + ) : super(_value, _then); /// Create a copy of RecipeCreateModel /// with the given fields replaced by the non-null parameter values. @@ -198,78 +219,92 @@ class __$$RecipeCreateModelImplCopyWithImpl<$Res> Object? ingredients = null, Object? steps = null, }) { - return _then(_$RecipeCreateModelImpl( - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as RecipeType, - videoUrl: freezed == videoUrl - ? _value.videoUrl - : videoUrl // ignore: cast_nullable_to_non_nullable - as String?, - cookingTime: freezed == cookingTime - ? _value.cookingTime - : cookingTime // ignore: cast_nullable_to_non_nullable - as String?, - activeTime: freezed == activeTime - ? _value.activeTime - : activeTime // ignore: cast_nullable_to_non_nullable - as String?, - servings: null == servings - ? _value.servings - : servings // ignore: cast_nullable_to_non_nullable - as String, - energyPerServing: null == energyPerServing - ? _value.energyPerServing - : energyPerServing // ignore: cast_nullable_to_non_nullable - as String, - tags: null == tags - ? _value._tags - : tags // ignore: cast_nullable_to_non_nullable - as List, - ingredients: null == ingredients - ? _value._ingredients - : ingredients // ignore: cast_nullable_to_non_nullable - as List, - steps: null == steps - ? _value._steps - : steps // ignore: cast_nullable_to_non_nullable - as List, - )); + return _then( + _$RecipeCreateModelImpl( + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + state: + null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String, + description: + null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + type: + null == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as RecipeType, + videoUrl: + freezed == videoUrl + ? _value.videoUrl + : videoUrl // ignore: cast_nullable_to_non_nullable + as String?, + cookingTime: + freezed == cookingTime + ? _value.cookingTime + : cookingTime // ignore: cast_nullable_to_non_nullable + as String?, + activeTime: + freezed == activeTime + ? _value.activeTime + : activeTime // ignore: cast_nullable_to_non_nullable + as String?, + servings: + null == servings + ? _value.servings + : servings // ignore: cast_nullable_to_non_nullable + as String, + energyPerServing: + null == energyPerServing + ? _value.energyPerServing + : energyPerServing // ignore: cast_nullable_to_non_nullable + as String, + tags: + null == tags + ? _value._tags + : tags // ignore: cast_nullable_to_non_nullable + as List, + ingredients: + null == ingredients + ? _value._ingredients + : ingredients // ignore: cast_nullable_to_non_nullable + as List, + steps: + null == steps + ? _value._steps + : steps // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } /// @nodoc @JsonSerializable() class _$RecipeCreateModelImpl implements _RecipeCreateModel { - const _$RecipeCreateModelImpl( - {required this.title, - required this.state, - required this.description, - required this.type, - @JsonKey(name: 'video_url') this.videoUrl, - @JsonKey(name: 'cooking_time') this.cookingTime, - @JsonKey(name: 'active_time') this.activeTime, - required this.servings, - @JsonKey(name: 'energy_per_serving') required this.energyPerServing, - required final List tags, - required final List ingredients, - required final List steps}) - : _tags = tags, - _ingredients = ingredients, - _steps = steps; + const _$RecipeCreateModelImpl({ + required this.title, + required this.state, + required this.description, + required this.type, + @JsonKey(name: 'video_url') this.videoUrl, + @JsonKey(name: 'cooking_time') this.cookingTime, + @JsonKey(name: 'active_time') this.activeTime, + required this.servings, + @JsonKey(name: 'energy_per_serving') required this.energyPerServing, + required final List tags, + required final List ingredients, + required final List steps, + }) : _tags = tags, + _ingredients = ingredients, + _steps = steps; factory _$RecipeCreateModelImpl.fromJson(Map json) => _$$RecipeCreateModelImplFromJson(json); @@ -346,27 +381,30 @@ class _$RecipeCreateModelImpl implements _RecipeCreateModel { (identical(other.energyPerServing, energyPerServing) || other.energyPerServing == energyPerServing) && const DeepCollectionEquality().equals(other._tags, _tags) && - const DeepCollectionEquality() - .equals(other._ingredients, _ingredients) && + const DeepCollectionEquality().equals( + other._ingredients, + _ingredients, + ) && const DeepCollectionEquality().equals(other._steps, _steps)); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - title, - state, - description, - type, - videoUrl, - cookingTime, - activeTime, - servings, - energyPerServing, - const DeepCollectionEquality().hash(_tags), - const DeepCollectionEquality().hash(_ingredients), - const DeepCollectionEquality().hash(_steps)); + runtimeType, + title, + state, + description, + type, + videoUrl, + cookingTime, + activeTime, + servings, + energyPerServing, + const DeepCollectionEquality().hash(_tags), + const DeepCollectionEquality().hash(_ingredients), + const DeepCollectionEquality().hash(_steps), + ); /// Create a copy of RecipeCreateModel /// with the given fields replaced by the non-null parameter values. @@ -375,31 +413,31 @@ class _$RecipeCreateModelImpl implements _RecipeCreateModel { @pragma('vm:prefer-inline') _$$RecipeCreateModelImplCopyWith<_$RecipeCreateModelImpl> get copyWith => __$$RecipeCreateModelImplCopyWithImpl<_$RecipeCreateModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$RecipeCreateModelImplToJson( - this, - ); + return _$$RecipeCreateModelImplToJson(this); } } abstract class _RecipeCreateModel implements RecipeCreateModel { - const factory _RecipeCreateModel( - {required final String title, - required final String state, - required final String description, - required final RecipeType type, - @JsonKey(name: 'video_url') final String? videoUrl, - @JsonKey(name: 'cooking_time') final String? cookingTime, - @JsonKey(name: 'active_time') final String? activeTime, - required final String servings, - @JsonKey(name: 'energy_per_serving') - required final String energyPerServing, - required final List tags, - required final List ingredients, - required final List steps}) = _$RecipeCreateModelImpl; + const factory _RecipeCreateModel({ + required final String title, + required final String state, + required final String description, + required final RecipeType type, + @JsonKey(name: 'video_url') final String? videoUrl, + @JsonKey(name: 'cooking_time') final String? cookingTime, + @JsonKey(name: 'active_time') final String? activeTime, + required final String servings, + @JsonKey(name: 'energy_per_serving') required final String energyPerServing, + required final List tags, + required final List ingredients, + required final List steps, + }) = _$RecipeCreateModelImpl; factory _RecipeCreateModel.fromJson(Map json) = _$RecipeCreateModelImpl.fromJson; diff --git a/lib/features/create_recipe/models/recipe_create_model.g.dart b/lib/features/create_recipe/models/recipe_create_model.g.dart index f64cb737..4926d92f 100644 --- a/lib/features/create_recipe/models/recipe_create_model.g.dart +++ b/lib/features/create_recipe/models/recipe_create_model.g.dart @@ -7,42 +7,44 @@ part of 'recipe_create_model.dart'; // ************************************************************************** _$RecipeCreateModelImpl _$$RecipeCreateModelImplFromJson( - Map json) => - _$RecipeCreateModelImpl( - title: json['title'] as String, - state: json['state'] as String, - description: json['description'] as String, - type: $enumDecode(_$RecipeTypeEnumMap, json['type']), - videoUrl: json['video_url'] as String?, - cookingTime: json['cooking_time'] as String?, - activeTime: json['active_time'] as String?, - servings: json['servings'] as String, - energyPerServing: json['energy_per_serving'] as String, - tags: (json['tags'] as List).map((e) => e as String).toList(), - ingredients: (json['ingredients'] as List) + Map json, +) => _$RecipeCreateModelImpl( + title: json['title'] as String, + state: json['state'] as String, + description: json['description'] as String, + type: $enumDecode(_$RecipeTypeEnumMap, json['type']), + videoUrl: json['video_url'] as String?, + cookingTime: json['cooking_time'] as String?, + activeTime: json['active_time'] as String?, + servings: json['servings'] as String, + energyPerServing: json['energy_per_serving'] as String, + tags: (json['tags'] as List).map((e) => e as String).toList(), + ingredients: + (json['ingredients'] as List) .map((e) => Ingredient.fromJson(e as Map)) .toList(), - steps: (json['steps'] as List) + steps: + (json['steps'] as List) .map((e) => Step.fromJson(e as Map)) .toList(), - ); +); Map _$$RecipeCreateModelImplToJson( - _$RecipeCreateModelImpl instance) => - { - 'title': instance.title, - 'state': instance.state, - 'description': instance.description, - 'type': _$RecipeTypeEnumMap[instance.type]!, - 'video_url': instance.videoUrl, - 'cooking_time': instance.cookingTime, - 'active_time': instance.activeTime, - 'servings': instance.servings, - 'energy_per_serving': instance.energyPerServing, - 'tags': instance.tags, - 'ingredients': instance.ingredients, - 'steps': instance.steps, - }; + _$RecipeCreateModelImpl instance, +) => { + 'title': instance.title, + 'state': instance.state, + 'description': instance.description, + 'type': _$RecipeTypeEnumMap[instance.type]!, + 'video_url': instance.videoUrl, + 'cooking_time': instance.cookingTime, + 'active_time': instance.activeTime, + 'servings': instance.servings, + 'energy_per_serving': instance.energyPerServing, + 'tags': instance.tags, + 'ingredients': instance.ingredients, + 'steps': instance.steps, +}; const _$RecipeTypeEnumMap = { RecipeType.first_meals: 'first_meals', diff --git a/lib/features/create_recipe/models/recipe_model.freezed.dart b/lib/features/create_recipe/models/recipe_model.freezed.dart index 7b549e53..c1cd9ff9 100644 --- a/lib/features/create_recipe/models/recipe_model.freezed.dart +++ b/lib/features/create_recipe/models/recipe_model.freezed.dart @@ -12,7 +12,8 @@ part of 'recipe_model.dart'; 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'); + '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', +); RecipeModel _$RecipeModelFromJson(Map json) { return _RecipeModel.fromJson(json); @@ -47,23 +48,25 @@ mixin _$RecipeModel { /// @nodoc abstract class $RecipeModelCopyWith<$Res> { factory $RecipeModelCopyWith( - RecipeModel value, $Res Function(RecipeModel) then) = - _$RecipeModelCopyWithImpl<$Res, RecipeModel>; + RecipeModel value, + $Res Function(RecipeModel) then, + ) = _$RecipeModelCopyWithImpl<$Res, RecipeModel>; @useResult - $Res call( - {List? ingredients, - List? steps, - List? tags, - String? type, - String? state, - String? title, - String? description, - String? video_url, - String? image, - int? totalCookingTime, - int? activeCookTime, - int? servings, - int? energyPerServing}); + $Res call({ + List? ingredients, + List? steps, + List? tags, + String? type, + String? state, + String? title, + String? description, + String? video_url, + String? image, + int? totalCookingTime, + int? activeCookTime, + int? servings, + int? energyPerServing, + }); } /// @nodoc @@ -95,60 +98,76 @@ class _$RecipeModelCopyWithImpl<$Res, $Val extends RecipeModel> Object? servings = freezed, Object? energyPerServing = freezed, }) { - return _then(_value.copyWith( - ingredients: freezed == ingredients - ? _value.ingredients - : ingredients // ignore: cast_nullable_to_non_nullable - as List?, - steps: freezed == steps - ? _value.steps - : steps // ignore: cast_nullable_to_non_nullable - as List?, - tags: freezed == tags - ? _value.tags - : tags // ignore: cast_nullable_to_non_nullable - as List?, - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String?, - state: freezed == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String?, - title: freezed == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - video_url: freezed == video_url - ? _value.video_url - : video_url // ignore: cast_nullable_to_non_nullable - as String?, - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String?, - totalCookingTime: freezed == totalCookingTime - ? _value.totalCookingTime - : totalCookingTime // ignore: cast_nullable_to_non_nullable - as int?, - activeCookTime: freezed == activeCookTime - ? _value.activeCookTime - : activeCookTime // ignore: cast_nullable_to_non_nullable - as int?, - servings: freezed == servings - ? _value.servings - : servings // ignore: cast_nullable_to_non_nullable - as int?, - energyPerServing: freezed == energyPerServing - ? _value.energyPerServing - : energyPerServing // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); + return _then( + _value.copyWith( + ingredients: + freezed == ingredients + ? _value.ingredients + : ingredients // ignore: cast_nullable_to_non_nullable + as List?, + steps: + freezed == steps + ? _value.steps + : steps // ignore: cast_nullable_to_non_nullable + as List?, + tags: + freezed == tags + ? _value.tags + : tags // ignore: cast_nullable_to_non_nullable + as List?, + type: + freezed == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as String?, + state: + freezed == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String?, + title: + freezed == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String?, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + video_url: + freezed == video_url + ? _value.video_url + : video_url // ignore: cast_nullable_to_non_nullable + as String?, + image: + freezed == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String?, + totalCookingTime: + freezed == totalCookingTime + ? _value.totalCookingTime + : totalCookingTime // ignore: cast_nullable_to_non_nullable + as int?, + activeCookTime: + freezed == activeCookTime + ? _value.activeCookTime + : activeCookTime // ignore: cast_nullable_to_non_nullable + as int?, + servings: + freezed == servings + ? _value.servings + : servings // ignore: cast_nullable_to_non_nullable + as int?, + energyPerServing: + freezed == energyPerServing + ? _value.energyPerServing + : energyPerServing // ignore: cast_nullable_to_non_nullable + as int?, + ) + as $Val, + ); } } @@ -156,24 +175,26 @@ class _$RecipeModelCopyWithImpl<$Res, $Val extends RecipeModel> abstract class _$$RecipeModelImplCopyWith<$Res> implements $RecipeModelCopyWith<$Res> { factory _$$RecipeModelImplCopyWith( - _$RecipeModelImpl value, $Res Function(_$RecipeModelImpl) then) = - __$$RecipeModelImplCopyWithImpl<$Res>; + _$RecipeModelImpl value, + $Res Function(_$RecipeModelImpl) then, + ) = __$$RecipeModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {List? ingredients, - List? steps, - List? tags, - String? type, - String? state, - String? title, - String? description, - String? video_url, - String? image, - int? totalCookingTime, - int? activeCookTime, - int? servings, - int? energyPerServing}); + $Res call({ + List? ingredients, + List? steps, + List? tags, + String? type, + String? state, + String? title, + String? description, + String? video_url, + String? image, + int? totalCookingTime, + int? activeCookTime, + int? servings, + int? energyPerServing, + }); } /// @nodoc @@ -181,8 +202,9 @@ class __$$RecipeModelImplCopyWithImpl<$Res> extends _$RecipeModelCopyWithImpl<$Res, _$RecipeModelImpl> implements _$$RecipeModelImplCopyWith<$Res> { __$$RecipeModelImplCopyWithImpl( - _$RecipeModelImpl _value, $Res Function(_$RecipeModelImpl) _then) - : super(_value, _then); + _$RecipeModelImpl _value, + $Res Function(_$RecipeModelImpl) _then, + ) : super(_value, _then); /// Create a copy of RecipeModel /// with the given fields replaced by the non-null parameter values. @@ -203,83 +225,98 @@ class __$$RecipeModelImplCopyWithImpl<$Res> Object? servings = freezed, Object? energyPerServing = freezed, }) { - return _then(_$RecipeModelImpl( - ingredients: freezed == ingredients - ? _value._ingredients - : ingredients // ignore: cast_nullable_to_non_nullable - as List?, - steps: freezed == steps - ? _value._steps - : steps // ignore: cast_nullable_to_non_nullable - as List?, - tags: freezed == tags - ? _value._tags - : tags // ignore: cast_nullable_to_non_nullable - as List?, - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String?, - state: freezed == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String?, - title: freezed == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - video_url: freezed == video_url - ? _value.video_url - : video_url // ignore: cast_nullable_to_non_nullable - as String?, - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String?, - totalCookingTime: freezed == totalCookingTime - ? _value.totalCookingTime - : totalCookingTime // ignore: cast_nullable_to_non_nullable - as int?, - activeCookTime: freezed == activeCookTime - ? _value.activeCookTime - : activeCookTime // ignore: cast_nullable_to_non_nullable - as int?, - servings: freezed == servings - ? _value.servings - : servings // ignore: cast_nullable_to_non_nullable - as int?, - energyPerServing: freezed == energyPerServing - ? _value.energyPerServing - : energyPerServing // ignore: cast_nullable_to_non_nullable - as int?, - )); + return _then( + _$RecipeModelImpl( + ingredients: + freezed == ingredients + ? _value._ingredients + : ingredients // ignore: cast_nullable_to_non_nullable + as List?, + steps: + freezed == steps + ? _value._steps + : steps // ignore: cast_nullable_to_non_nullable + as List?, + tags: + freezed == tags + ? _value._tags + : tags // ignore: cast_nullable_to_non_nullable + as List?, + type: + freezed == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as String?, + state: + freezed == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String?, + title: + freezed == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String?, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + video_url: + freezed == video_url + ? _value.video_url + : video_url // ignore: cast_nullable_to_non_nullable + as String?, + image: + freezed == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String?, + totalCookingTime: + freezed == totalCookingTime + ? _value.totalCookingTime + : totalCookingTime // ignore: cast_nullable_to_non_nullable + as int?, + activeCookTime: + freezed == activeCookTime + ? _value.activeCookTime + : activeCookTime // ignore: cast_nullable_to_non_nullable + as int?, + servings: + freezed == servings + ? _value.servings + : servings // ignore: cast_nullable_to_non_nullable + as int?, + energyPerServing: + freezed == energyPerServing + ? _value.energyPerServing + : energyPerServing // ignore: cast_nullable_to_non_nullable + as int?, + ), + ); } } /// @nodoc @JsonSerializable() class _$RecipeModelImpl implements _RecipeModel { - const _$RecipeModelImpl( - {final List? ingredients, - final List? steps, - final List? tags, - this.type, - this.state, - this.title, - this.description, - this.video_url, - this.image, - this.totalCookingTime, - this.activeCookTime, - this.servings, - this.energyPerServing}) - : _ingredients = ingredients, - _steps = steps, - _tags = tags; + const _$RecipeModelImpl({ + final List? ingredients, + final List? steps, + final List? tags, + this.type, + this.state, + this.title, + this.description, + this.video_url, + this.image, + this.totalCookingTime, + this.activeCookTime, + this.servings, + this.energyPerServing, + }) : _ingredients = ingredients, + _steps = steps, + _tags = tags; factory _$RecipeModelImpl.fromJson(Map json) => _$$RecipeModelImplFromJson(json); @@ -345,8 +382,10 @@ class _$RecipeModelImpl implements _RecipeModel { return identical(this, other) || (other.runtimeType == runtimeType && other is _$RecipeModelImpl && - const DeepCollectionEquality() - .equals(other._ingredients, _ingredients) && + const DeepCollectionEquality().equals( + other._ingredients, + _ingredients, + ) && const DeepCollectionEquality().equals(other._steps, _steps) && const DeepCollectionEquality().equals(other._tags, _tags) && (identical(other.type, type) || other.type == type) && @@ -370,20 +409,21 @@ class _$RecipeModelImpl implements _RecipeModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_ingredients), - const DeepCollectionEquality().hash(_steps), - const DeepCollectionEquality().hash(_tags), - type, - state, - title, - description, - video_url, - image, - totalCookingTime, - activeCookTime, - servings, - energyPerServing); + runtimeType, + const DeepCollectionEquality().hash(_ingredients), + const DeepCollectionEquality().hash(_steps), + const DeepCollectionEquality().hash(_tags), + type, + state, + title, + description, + video_url, + image, + totalCookingTime, + activeCookTime, + servings, + energyPerServing, + ); /// Create a copy of RecipeModel /// with the given fields replaced by the non-null parameter values. @@ -395,27 +435,26 @@ class _$RecipeModelImpl implements _RecipeModel { @override Map toJson() { - return _$$RecipeModelImplToJson( - this, - ); + return _$$RecipeModelImplToJson(this); } } abstract class _RecipeModel implements RecipeModel { - const factory _RecipeModel( - {final List? ingredients, - final List? steps, - final List? tags, - final String? type, - final String? state, - final String? title, - final String? description, - final String? video_url, - final String? image, - final int? totalCookingTime, - final int? activeCookTime, - final int? servings, - final int? energyPerServing}) = _$RecipeModelImpl; + const factory _RecipeModel({ + final List? ingredients, + final List? steps, + final List? tags, + final String? type, + final String? state, + final String? title, + final String? description, + final String? video_url, + final String? image, + final int? totalCookingTime, + final int? activeCookTime, + final int? servings, + final int? energyPerServing, + }) = _$RecipeModelImpl; factory _RecipeModel.fromJson(Map json) = _$RecipeModelImpl.fromJson; diff --git a/lib/features/create_recipe/models/recipe_model.g.dart b/lib/features/create_recipe/models/recipe_model.g.dart index 478765ae..8d2115b3 100644 --- a/lib/features/create_recipe/models/recipe_model.g.dart +++ b/lib/features/create_recipe/models/recipe_model.g.dart @@ -8,14 +8,22 @@ part of 'recipe_model.dart'; _$RecipeModelImpl _$$RecipeModelImplFromJson(Map json) => _$RecipeModelImpl( - ingredients: (json['ingredients'] as List?) - ?.map((e) => - e == null ? null : Ingredient.fromJson(e as Map)) - .toList(), - steps: (json['steps'] as List?) - ?.map((e) => - e == null ? null : Step.fromJson(e as Map)) - .toList(), + ingredients: + (json['ingredients'] as List?) + ?.map( + (e) => + e == null + ? null + : Ingredient.fromJson(e as Map), + ) + .toList(), + steps: + (json['steps'] as List?) + ?.map( + (e) => + e == null ? null : Step.fromJson(e as Map), + ) + .toList(), tags: (json['tags'] as List?)?.map((e) => e as String).toList(), type: json['type'] as String?, state: json['state'] as String?, diff --git a/lib/features/create_recipe/models/recipe_tag_model.freezed.dart b/lib/features/create_recipe/models/recipe_tag_model.freezed.dart index d9993da3..192f8ca8 100644 --- a/lib/features/create_recipe/models/recipe_tag_model.freezed.dart +++ b/lib/features/create_recipe/models/recipe_tag_model.freezed.dart @@ -12,7 +12,8 @@ part of 'recipe_tag_model.dart'; 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'); + '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', +); RecipeTagModel _$RecipeTagModelFromJson(Map json) { return _RecipeTagModel.fromJson(json); @@ -40,13 +41,15 @@ mixin _$RecipeTagModel { /// @nodoc abstract class $RecipeTagModelCopyWith<$Res> { factory $RecipeTagModelCopyWith( - RecipeTagModel value, $Res Function(RecipeTagModel) then) = - _$RecipeTagModelCopyWithImpl<$Res, RecipeTagModel>; + RecipeTagModel value, + $Res Function(RecipeTagModel) then, + ) = _$RecipeTagModelCopyWithImpl<$Res, RecipeTagModel>; @useResult - $Res call( - {@JsonKey(name: "data") List data, - @JsonKey(name: "links") Links links, - @JsonKey(name: "meta") Meta meta}); + $Res call({ + @JsonKey(name: "data") List data, + @JsonKey(name: "links") Links links, + @JsonKey(name: "meta") Meta meta, + }); $LinksCopyWith<$Res> get links; $MetaCopyWith<$Res> get meta; @@ -66,25 +69,27 @@ class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? data = null, - Object? links = null, - Object? meta = null, - }) { - return _then(_value.copyWith( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as List, - links: null == links - ? _value.links - : links // ignore: cast_nullable_to_non_nullable - as Links, - meta: null == meta - ? _value.meta - : meta // ignore: cast_nullable_to_non_nullable - as Meta, - ) as $Val); + $Res call({Object? data = null, Object? links = null, Object? meta = null}) { + return _then( + _value.copyWith( + data: + null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as List, + links: + null == links + ? _value.links + : links // ignore: cast_nullable_to_non_nullable + as Links, + meta: + null == meta + ? _value.meta + : meta // ignore: cast_nullable_to_non_nullable + as Meta, + ) + as $Val, + ); } /// Create a copy of RecipeTagModel @@ -111,15 +116,17 @@ class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel> /// @nodoc abstract class _$$RecipeTagModelImplCopyWith<$Res> implements $RecipeTagModelCopyWith<$Res> { - factory _$$RecipeTagModelImplCopyWith(_$RecipeTagModelImpl value, - $Res Function(_$RecipeTagModelImpl) then) = - __$$RecipeTagModelImplCopyWithImpl<$Res>; + factory _$$RecipeTagModelImplCopyWith( + _$RecipeTagModelImpl value, + $Res Function(_$RecipeTagModelImpl) then, + ) = __$$RecipeTagModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "data") List data, - @JsonKey(name: "links") Links links, - @JsonKey(name: "meta") Meta meta}); + $Res call({ + @JsonKey(name: "data") List data, + @JsonKey(name: "links") Links links, + @JsonKey(name: "meta") Meta meta, + }); @override $LinksCopyWith<$Res> get links; @@ -132,43 +139,45 @@ class __$$RecipeTagModelImplCopyWithImpl<$Res> extends _$RecipeTagModelCopyWithImpl<$Res, _$RecipeTagModelImpl> implements _$$RecipeTagModelImplCopyWith<$Res> { __$$RecipeTagModelImplCopyWithImpl( - _$RecipeTagModelImpl _value, $Res Function(_$RecipeTagModelImpl) _then) - : super(_value, _then); + _$RecipeTagModelImpl _value, + $Res Function(_$RecipeTagModelImpl) _then, + ) : super(_value, _then); /// Create a copy of RecipeTagModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? data = null, - Object? links = null, - Object? meta = null, - }) { - return _then(_$RecipeTagModelImpl( - data: null == data - ? _value._data - : data // ignore: cast_nullable_to_non_nullable - as List, - links: null == links - ? _value.links - : links // ignore: cast_nullable_to_non_nullable - as Links, - meta: null == meta - ? _value.meta - : meta // ignore: cast_nullable_to_non_nullable - as Meta, - )); + $Res call({Object? data = null, Object? links = null, Object? meta = null}) { + return _then( + _$RecipeTagModelImpl( + data: + null == data + ? _value._data + : data // ignore: cast_nullable_to_non_nullable + as List, + links: + null == links + ? _value.links + : links // ignore: cast_nullable_to_non_nullable + as Links, + meta: + null == meta + ? _value.meta + : meta // ignore: cast_nullable_to_non_nullable + as Meta, + ), + ); } } /// @nodoc @JsonSerializable() class _$RecipeTagModelImpl implements _RecipeTagModel { - const _$RecipeTagModelImpl( - {@JsonKey(name: "data") required final List data, - @JsonKey(name: "links") required this.links, - @JsonKey(name: "meta") required this.meta}) - : _data = data; + const _$RecipeTagModelImpl({ + @JsonKey(name: "data") required final List data, + @JsonKey(name: "links") required this.links, + @JsonKey(name: "meta") required this.meta, + }) : _data = data; factory _$RecipeTagModelImpl.fromJson(Map json) => _$$RecipeTagModelImplFromJson(json); @@ -207,7 +216,11 @@ class _$RecipeTagModelImpl implements _RecipeTagModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_data), links, meta); + runtimeType, + const DeepCollectionEquality().hash(_data), + links, + meta, + ); /// Create a copy of RecipeTagModel /// with the given fields replaced by the non-null parameter values. @@ -216,21 +229,22 @@ class _$RecipeTagModelImpl implements _RecipeTagModel { @pragma('vm:prefer-inline') _$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith => __$$RecipeTagModelImplCopyWithImpl<_$RecipeTagModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$RecipeTagModelImplToJson( - this, - ); + return _$$RecipeTagModelImplToJson(this); } } abstract class _RecipeTagModel implements RecipeTagModel { - const factory _RecipeTagModel( - {@JsonKey(name: "data") required final List data, - @JsonKey(name: "links") required final Links links, - @JsonKey(name: "meta") required final Meta meta}) = _$RecipeTagModelImpl; + const factory _RecipeTagModel({ + @JsonKey(name: "data") required final List data, + @JsonKey(name: "links") required final Links links, + @JsonKey(name: "meta") required final Meta meta, + }) = _$RecipeTagModelImpl; factory _RecipeTagModel.fromJson(Map json) = _$RecipeTagModelImpl.fromJson; @@ -285,12 +299,13 @@ abstract class $RecipeTagCopyWith<$Res> { factory $RecipeTagCopyWith(RecipeTag value, $Res Function(RecipeTag) then) = _$RecipeTagCopyWithImpl<$Res, RecipeTag>; @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "name") String name, - @JsonKey(name: "recipes_count") int recipesCount, - @JsonKey(name: "created_at") DateTime createdAt, - @JsonKey(name: "updated_at") DateTime updatedAt}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "name") String name, + @JsonKey(name: "recipes_count") int recipesCount, + @JsonKey(name: "created_at") DateTime createdAt, + @JsonKey(name: "updated_at") DateTime updatedAt, + }); } /// @nodoc @@ -314,28 +329,36 @@ class _$RecipeTagCopyWithImpl<$Res, $Val extends RecipeTag> Object? createdAt = null, Object? updatedAt = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - recipesCount: null == recipesCount - ? _value.recipesCount - : recipesCount // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + recipesCount: + null == recipesCount + ? _value.recipesCount + : recipesCount // ignore: cast_nullable_to_non_nullable + as int, + createdAt: + null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: + null == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + ) + as $Val, + ); } } @@ -343,16 +366,18 @@ class _$RecipeTagCopyWithImpl<$Res, $Val extends RecipeTag> abstract class _$$RecipeTagImplCopyWith<$Res> implements $RecipeTagCopyWith<$Res> { factory _$$RecipeTagImplCopyWith( - _$RecipeTagImpl value, $Res Function(_$RecipeTagImpl) then) = - __$$RecipeTagImplCopyWithImpl<$Res>; + _$RecipeTagImpl value, + $Res Function(_$RecipeTagImpl) then, + ) = __$$RecipeTagImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "name") String name, - @JsonKey(name: "recipes_count") int recipesCount, - @JsonKey(name: "created_at") DateTime createdAt, - @JsonKey(name: "updated_at") DateTime updatedAt}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "name") String name, + @JsonKey(name: "recipes_count") int recipesCount, + @JsonKey(name: "created_at") DateTime createdAt, + @JsonKey(name: "updated_at") DateTime updatedAt, + }); } /// @nodoc @@ -360,8 +385,9 @@ class __$$RecipeTagImplCopyWithImpl<$Res> extends _$RecipeTagCopyWithImpl<$Res, _$RecipeTagImpl> implements _$$RecipeTagImplCopyWith<$Res> { __$$RecipeTagImplCopyWithImpl( - _$RecipeTagImpl _value, $Res Function(_$RecipeTagImpl) _then) - : super(_value, _then); + _$RecipeTagImpl _value, + $Res Function(_$RecipeTagImpl) _then, + ) : super(_value, _then); /// Create a copy of RecipeTag /// with the given fields replaced by the non-null parameter values. @@ -374,40 +400,48 @@ class __$$RecipeTagImplCopyWithImpl<$Res> Object? createdAt = null, Object? updatedAt = null, }) { - return _then(_$RecipeTagImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - recipesCount: null == recipesCount - ? _value.recipesCount - : recipesCount // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - )); + return _then( + _$RecipeTagImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + recipesCount: + null == recipesCount + ? _value.recipesCount + : recipesCount // ignore: cast_nullable_to_non_nullable + as int, + createdAt: + null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: + null == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + ), + ); } } /// @nodoc @JsonSerializable() class _$RecipeTagImpl implements _RecipeTag { - const _$RecipeTagImpl( - {@JsonKey(name: "id") required this.id, - @JsonKey(name: "name") required this.name, - @JsonKey(name: "recipes_count") required this.recipesCount, - @JsonKey(name: "created_at") required this.createdAt, - @JsonKey(name: "updated_at") required this.updatedAt}); + const _$RecipeTagImpl({ + @JsonKey(name: "id") required this.id, + @JsonKey(name: "name") required this.name, + @JsonKey(name: "recipes_count") required this.recipesCount, + @JsonKey(name: "created_at") required this.createdAt, + @JsonKey(name: "updated_at") required this.updatedAt, + }); factory _$RecipeTagImpl.fromJson(Map json) => _$$RecipeTagImplFromJson(json); @@ -463,20 +497,18 @@ class _$RecipeTagImpl implements _RecipeTag { @override Map toJson() { - return _$$RecipeTagImplToJson( - this, - ); + return _$$RecipeTagImplToJson(this); } } abstract class _RecipeTag implements RecipeTag { - const factory _RecipeTag( - {@JsonKey(name: "id") required final int id, - @JsonKey(name: "name") required final String name, - @JsonKey(name: "recipes_count") required final int recipesCount, - @JsonKey(name: "created_at") required final DateTime createdAt, - @JsonKey(name: "updated_at") required final DateTime updatedAt}) = - _$RecipeTagImpl; + const factory _RecipeTag({ + @JsonKey(name: "id") required final int id, + @JsonKey(name: "name") required final String name, + @JsonKey(name: "recipes_count") required final int recipesCount, + @JsonKey(name: "created_at") required final DateTime createdAt, + @JsonKey(name: "updated_at") required final DateTime updatedAt, + }) = _$RecipeTagImpl; factory _RecipeTag.fromJson(Map json) = _$RecipeTagImpl.fromJson; diff --git a/lib/features/create_recipe/models/recipe_tag_model.g.dart b/lib/features/create_recipe/models/recipe_tag_model.g.dart index cd387547..423540f1 100644 --- a/lib/features/create_recipe/models/recipe_tag_model.g.dart +++ b/lib/features/create_recipe/models/recipe_tag_model.g.dart @@ -8,20 +8,21 @@ part of 'recipe_tag_model.dart'; _$RecipeTagModelImpl _$$RecipeTagModelImplFromJson(Map json) => _$RecipeTagModelImpl( - data: (json['data'] as List) - .map((e) => RecipeTag.fromJson(e as Map)) - .toList(), + data: + (json['data'] as List) + .map((e) => RecipeTag.fromJson(e as Map)) + .toList(), links: Links.fromJson(json['links'] as Map), meta: Meta.fromJson(json['meta'] as Map), ); Map _$$RecipeTagModelImplToJson( - _$RecipeTagModelImpl instance) => - { - 'data': instance.data, - 'links': instance.links, - 'meta': instance.meta, - }; + _$RecipeTagModelImpl instance, +) => { + 'data': instance.data, + 'links': instance.links, + 'meta': instance.meta, +}; _$RecipeTagImpl _$$RecipeTagImplFromJson(Map json) => _$RecipeTagImpl( diff --git a/lib/features/create_recipe/models/step.freezed.dart b/lib/features/create_recipe/models/step.freezed.dart index 040dd5aa..b365e053 100644 --- a/lib/features/create_recipe/models/step.freezed.dart +++ b/lib/features/create_recipe/models/step.freezed.dart @@ -12,7 +12,8 @@ part of 'step.dart'; 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'); + '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', +); Step _$StepFromJson(Map json) { return _Step.fromJson(json); @@ -54,28 +55,31 @@ class _$StepCopyWithImpl<$Res, $Val extends Step> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? image = freezed, - Object? description = freezed, - }) { - return _then(_value.copyWith( - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + $Res call({Object? image = freezed, Object? description = freezed}) { + return _then( + _value.copyWith( + image: + freezed == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String?, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc abstract class _$$StepImplCopyWith<$Res> implements $StepCopyWith<$Res> { factory _$$StepImplCopyWith( - _$StepImpl value, $Res Function(_$StepImpl) then) = - __$$StepImplCopyWithImpl<$Res>; + _$StepImpl value, + $Res Function(_$StepImpl) then, + ) = __$$StepImplCopyWithImpl<$Res>; @override @useResult $Res call({String? image, String? description}); @@ -86,26 +90,27 @@ class __$$StepImplCopyWithImpl<$Res> extends _$StepCopyWithImpl<$Res, _$StepImpl> implements _$$StepImplCopyWith<$Res> { __$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then) - : super(_value, _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({ - Object? image = freezed, - Object? description = freezed, - }) { - return _then(_$StepImpl( - image: freezed == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String?, - description: freezed == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String?, - )); + $Res call({Object? image = freezed, Object? description = freezed}) { + return _then( + _$StepImpl( + image: + freezed == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String?, + description: + freezed == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } @@ -151,9 +156,7 @@ class _$StepImpl implements _Step { @override Map toJson() { - return _$$StepImplToJson( - this, - ); + return _$$StepImplToJson(this); } } diff --git a/lib/features/create_recipe/models/step.g.dart b/lib/features/create_recipe/models/step.g.dart index 31d97f9f..f14df943 100644 --- a/lib/features/create_recipe/models/step.g.dart +++ b/lib/features/create_recipe/models/step.g.dart @@ -7,9 +7,9 @@ part of 'step.dart'; // ************************************************************************** _$StepImpl _$$StepImplFromJson(Map json) => _$StepImpl( - image: json['image'] as String?, - description: json['description'] as String?, - ); + image: json['image'] as String?, + description: json['description'] as String?, +); Map _$$StepImplToJson(_$StepImpl instance) => { diff --git a/lib/features/create_recipe/presentation/bloc/create_recipe_cubit/create_recipe_state.freezed.dart b/lib/features/create_recipe/presentation/bloc/create_recipe_cubit/create_recipe_state.freezed.dart index 302f048c..716edf47 100644 --- a/lib/features/create_recipe/presentation/bloc/create_recipe_cubit/create_recipe_state.freezed.dart +++ b/lib/features/create_recipe/presentation/bloc/create_recipe_cubit/create_recipe_state.freezed.dart @@ -12,7 +12,8 @@ part of 'create_recipe_state.dart'; 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'); + '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 _$CreateRecipeState { @@ -36,18 +37,20 @@ mixin _$CreateRecipeState { /// @nodoc abstract class $CreateRecipeStateCopyWith<$Res> { factory $CreateRecipeStateCopyWith( - CreateRecipeState value, $Res Function(CreateRecipeState) then) = - _$CreateRecipeStateCopyWithImpl<$Res, CreateRecipeState>; + CreateRecipeState value, + $Res Function(CreateRecipeState) then, + ) = _$CreateRecipeStateCopyWithImpl<$Res, CreateRecipeState>; @useResult - $Res call( - {RecipeCreateEntity entity, - String? titleValidationError, - String? descriptionValidationError, - String? cookingTimeValidationError, - String? activeTimeValidationError, - String? servingsValidationError, - String? energyPerServingValidationError, - String? imageValidationError}); + $Res call({ + RecipeCreateEntity entity, + String? titleValidationError, + String? descriptionValidationError, + String? cookingTimeValidationError, + String? activeTimeValidationError, + String? servingsValidationError, + String? energyPerServingValidationError, + String? imageValidationError, + }); $RecipeCreateEntityCopyWith<$Res> get entity; } @@ -76,41 +79,51 @@ class _$CreateRecipeStateCopyWithImpl<$Res, $Val extends CreateRecipeState> Object? energyPerServingValidationError = freezed, Object? imageValidationError = freezed, }) { - return _then(_value.copyWith( - entity: null == entity - ? _value.entity - : entity // ignore: cast_nullable_to_non_nullable - as RecipeCreateEntity, - titleValidationError: freezed == titleValidationError - ? _value.titleValidationError - : titleValidationError // ignore: cast_nullable_to_non_nullable - as String?, - descriptionValidationError: freezed == descriptionValidationError - ? _value.descriptionValidationError - : descriptionValidationError // ignore: cast_nullable_to_non_nullable - as String?, - cookingTimeValidationError: freezed == cookingTimeValidationError - ? _value.cookingTimeValidationError - : cookingTimeValidationError // ignore: cast_nullable_to_non_nullable - as String?, - activeTimeValidationError: freezed == activeTimeValidationError - ? _value.activeTimeValidationError - : activeTimeValidationError // ignore: cast_nullable_to_non_nullable - as String?, - servingsValidationError: freezed == servingsValidationError - ? _value.servingsValidationError - : servingsValidationError // ignore: cast_nullable_to_non_nullable - as String?, - energyPerServingValidationError: freezed == - energyPerServingValidationError - ? _value.energyPerServingValidationError - : energyPerServingValidationError // ignore: cast_nullable_to_non_nullable - as String?, - imageValidationError: freezed == imageValidationError - ? _value.imageValidationError - : imageValidationError // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + entity: + null == entity + ? _value.entity + : entity // ignore: cast_nullable_to_non_nullable + as RecipeCreateEntity, + titleValidationError: + freezed == titleValidationError + ? _value.titleValidationError + : titleValidationError // ignore: cast_nullable_to_non_nullable + as String?, + descriptionValidationError: + freezed == descriptionValidationError + ? _value.descriptionValidationError + : descriptionValidationError // ignore: cast_nullable_to_non_nullable + as String?, + cookingTimeValidationError: + freezed == cookingTimeValidationError + ? _value.cookingTimeValidationError + : cookingTimeValidationError // ignore: cast_nullable_to_non_nullable + as String?, + activeTimeValidationError: + freezed == activeTimeValidationError + ? _value.activeTimeValidationError + : activeTimeValidationError // ignore: cast_nullable_to_non_nullable + as String?, + servingsValidationError: + freezed == servingsValidationError + ? _value.servingsValidationError + : servingsValidationError // ignore: cast_nullable_to_non_nullable + as String?, + energyPerServingValidationError: + freezed == energyPerServingValidationError + ? _value.energyPerServingValidationError + : energyPerServingValidationError // ignore: cast_nullable_to_non_nullable + as String?, + imageValidationError: + freezed == imageValidationError + ? _value.imageValidationError + : imageValidationError // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } /// Create a copy of CreateRecipeState @@ -127,20 +140,22 @@ class _$CreateRecipeStateCopyWithImpl<$Res, $Val extends CreateRecipeState> /// @nodoc abstract class _$$CreateRecipeStateImplCopyWith<$Res> implements $CreateRecipeStateCopyWith<$Res> { - factory _$$CreateRecipeStateImplCopyWith(_$CreateRecipeStateImpl value, - $Res Function(_$CreateRecipeStateImpl) then) = - __$$CreateRecipeStateImplCopyWithImpl<$Res>; + factory _$$CreateRecipeStateImplCopyWith( + _$CreateRecipeStateImpl value, + $Res Function(_$CreateRecipeStateImpl) then, + ) = __$$CreateRecipeStateImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {RecipeCreateEntity entity, - String? titleValidationError, - String? descriptionValidationError, - String? cookingTimeValidationError, - String? activeTimeValidationError, - String? servingsValidationError, - String? energyPerServingValidationError, - String? imageValidationError}); + $Res call({ + RecipeCreateEntity entity, + String? titleValidationError, + String? descriptionValidationError, + String? cookingTimeValidationError, + String? activeTimeValidationError, + String? servingsValidationError, + String? energyPerServingValidationError, + String? imageValidationError, + }); @override $RecipeCreateEntityCopyWith<$Res> get entity; @@ -150,9 +165,10 @@ abstract class _$$CreateRecipeStateImplCopyWith<$Res> class __$$CreateRecipeStateImplCopyWithImpl<$Res> extends _$CreateRecipeStateCopyWithImpl<$Res, _$CreateRecipeStateImpl> implements _$$CreateRecipeStateImplCopyWith<$Res> { - __$$CreateRecipeStateImplCopyWithImpl(_$CreateRecipeStateImpl _value, - $Res Function(_$CreateRecipeStateImpl) _then) - : super(_value, _then); + __$$CreateRecipeStateImplCopyWithImpl( + _$CreateRecipeStateImpl _value, + $Res Function(_$CreateRecipeStateImpl) _then, + ) : super(_value, _then); /// Create a copy of CreateRecipeState /// with the given fields replaced by the non-null parameter values. @@ -168,56 +184,66 @@ class __$$CreateRecipeStateImplCopyWithImpl<$Res> Object? energyPerServingValidationError = freezed, Object? imageValidationError = freezed, }) { - return _then(_$CreateRecipeStateImpl( - entity: null == entity - ? _value.entity - : entity // ignore: cast_nullable_to_non_nullable - as RecipeCreateEntity, - titleValidationError: freezed == titleValidationError - ? _value.titleValidationError - : titleValidationError // ignore: cast_nullable_to_non_nullable - as String?, - descriptionValidationError: freezed == descriptionValidationError - ? _value.descriptionValidationError - : descriptionValidationError // ignore: cast_nullable_to_non_nullable - as String?, - cookingTimeValidationError: freezed == cookingTimeValidationError - ? _value.cookingTimeValidationError - : cookingTimeValidationError // ignore: cast_nullable_to_non_nullable - as String?, - activeTimeValidationError: freezed == activeTimeValidationError - ? _value.activeTimeValidationError - : activeTimeValidationError // ignore: cast_nullable_to_non_nullable - as String?, - servingsValidationError: freezed == servingsValidationError - ? _value.servingsValidationError - : servingsValidationError // ignore: cast_nullable_to_non_nullable - as String?, - energyPerServingValidationError: freezed == - energyPerServingValidationError - ? _value.energyPerServingValidationError - : energyPerServingValidationError // ignore: cast_nullable_to_non_nullable - as String?, - imageValidationError: freezed == imageValidationError - ? _value.imageValidationError - : imageValidationError // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$CreateRecipeStateImpl( + entity: + null == entity + ? _value.entity + : entity // ignore: cast_nullable_to_non_nullable + as RecipeCreateEntity, + titleValidationError: + freezed == titleValidationError + ? _value.titleValidationError + : titleValidationError // ignore: cast_nullable_to_non_nullable + as String?, + descriptionValidationError: + freezed == descriptionValidationError + ? _value.descriptionValidationError + : descriptionValidationError // ignore: cast_nullable_to_non_nullable + as String?, + cookingTimeValidationError: + freezed == cookingTimeValidationError + ? _value.cookingTimeValidationError + : cookingTimeValidationError // ignore: cast_nullable_to_non_nullable + as String?, + activeTimeValidationError: + freezed == activeTimeValidationError + ? _value.activeTimeValidationError + : activeTimeValidationError // ignore: cast_nullable_to_non_nullable + as String?, + servingsValidationError: + freezed == servingsValidationError + ? _value.servingsValidationError + : servingsValidationError // ignore: cast_nullable_to_non_nullable + as String?, + energyPerServingValidationError: + freezed == energyPerServingValidationError + ? _value.energyPerServingValidationError + : energyPerServingValidationError // ignore: cast_nullable_to_non_nullable + as String?, + imageValidationError: + freezed == imageValidationError + ? _value.imageValidationError + : imageValidationError // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } /// @nodoc class _$CreateRecipeStateImpl implements _CreateRecipeState { - const _$CreateRecipeStateImpl( - {required this.entity, - this.titleValidationError, - this.descriptionValidationError, - this.cookingTimeValidationError, - this.activeTimeValidationError, - this.servingsValidationError, - this.energyPerServingValidationError, - this.imageValidationError}); + const _$CreateRecipeStateImpl({ + required this.entity, + this.titleValidationError, + this.descriptionValidationError, + this.cookingTimeValidationError, + this.activeTimeValidationError, + this.servingsValidationError, + this.energyPerServingValidationError, + this.imageValidationError, + }); @override final RecipeCreateEntity entity; @@ -249,22 +275,32 @@ class _$CreateRecipeStateImpl implements _CreateRecipeState { (identical(other.entity, entity) || other.entity == entity) && (identical(other.titleValidationError, titleValidationError) || other.titleValidationError == titleValidationError) && - (identical(other.descriptionValidationError, - descriptionValidationError) || + (identical( + other.descriptionValidationError, + descriptionValidationError, + ) || other.descriptionValidationError == descriptionValidationError) && - (identical(other.cookingTimeValidationError, - cookingTimeValidationError) || + (identical( + other.cookingTimeValidationError, + cookingTimeValidationError, + ) || other.cookingTimeValidationError == cookingTimeValidationError) && - (identical(other.activeTimeValidationError, - activeTimeValidationError) || + (identical( + other.activeTimeValidationError, + activeTimeValidationError, + ) || other.activeTimeValidationError == activeTimeValidationError) && (identical( - other.servingsValidationError, servingsValidationError) || + other.servingsValidationError, + servingsValidationError, + ) || other.servingsValidationError == servingsValidationError) && - (identical(other.energyPerServingValidationError, - energyPerServingValidationError) || + (identical( + other.energyPerServingValidationError, + energyPerServingValidationError, + ) || other.energyPerServingValidationError == energyPerServingValidationError) && (identical(other.imageValidationError, imageValidationError) || @@ -273,15 +309,16 @@ class _$CreateRecipeStateImpl implements _CreateRecipeState { @override int get hashCode => Object.hash( - runtimeType, - entity, - titleValidationError, - descriptionValidationError, - cookingTimeValidationError, - activeTimeValidationError, - servingsValidationError, - energyPerServingValidationError, - imageValidationError); + runtimeType, + entity, + titleValidationError, + descriptionValidationError, + cookingTimeValidationError, + activeTimeValidationError, + servingsValidationError, + energyPerServingValidationError, + imageValidationError, + ); /// Create a copy of CreateRecipeState /// with the given fields replaced by the non-null parameter values. @@ -290,19 +327,22 @@ class _$CreateRecipeStateImpl implements _CreateRecipeState { @pragma('vm:prefer-inline') _$$CreateRecipeStateImplCopyWith<_$CreateRecipeStateImpl> get copyWith => __$$CreateRecipeStateImplCopyWithImpl<_$CreateRecipeStateImpl>( - this, _$identity); + this, + _$identity, + ); } abstract class _CreateRecipeState implements CreateRecipeState { - const factory _CreateRecipeState( - {required final RecipeCreateEntity entity, - final String? titleValidationError, - final String? descriptionValidationError, - final String? cookingTimeValidationError, - final String? activeTimeValidationError, - final String? servingsValidationError, - final String? energyPerServingValidationError, - final String? imageValidationError}) = _$CreateRecipeStateImpl; + const factory _CreateRecipeState({ + required final RecipeCreateEntity entity, + final String? titleValidationError, + final String? descriptionValidationError, + final String? cookingTimeValidationError, + final String? activeTimeValidationError, + final String? servingsValidationError, + final String? energyPerServingValidationError, + final String? imageValidationError, + }) = _$CreateRecipeStateImpl; @override RecipeCreateEntity get entity; diff --git a/lib/features/create_recipe/services/recipe_service.g.dart b/lib/features/create_recipe/services/recipe_service.g.dart index 58b81059..bc1210f4 100644 --- a/lib/features/create_recipe/services/recipe_service.g.dart +++ b/lib/features/create_recipe/services/recipe_service.g.dart @@ -143,11 +143,11 @@ class _CreateRecipeService implements CreateRecipeService { final _data = formData; final _options = _setStreamType( Options( - method: 'POST', - headers: _headers, - extra: _extra, - contentType: 'multipart/form-data', - ) + method: 'POST', + headers: _headers, + extra: _extra, + contentType: 'multipart/form-data', + ) .compose( _dio.options, '/api/recipes/create', diff --git a/lib/features/diary/models/diary_day_model.freezed.dart b/lib/features/diary/models/diary_day_model.freezed.dart index 38983ff8..a9efec29 100644 --- a/lib/features/diary/models/diary_day_model.freezed.dart +++ b/lib/features/diary/models/diary_day_model.freezed.dart @@ -12,7 +12,8 @@ part of 'diary_day_model.dart'; 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'); + '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', +); DiaryDayWrapperModel _$DiaryDayWrapperModelFromJson(Map json) { return _DiaryDayWrapperModel.fromJson(json); @@ -35,9 +36,10 @@ mixin _$DiaryDayWrapperModel { /// @nodoc abstract class $DiaryDayWrapperModelCopyWith<$Res> { - factory $DiaryDayWrapperModelCopyWith(DiaryDayWrapperModel value, - $Res Function(DiaryDayWrapperModel) then) = - _$DiaryDayWrapperModelCopyWithImpl<$Res, DiaryDayWrapperModel>; + factory $DiaryDayWrapperModelCopyWith( + DiaryDayWrapperModel value, + $Res Function(DiaryDayWrapperModel) then, + ) = _$DiaryDayWrapperModelCopyWithImpl<$Res, DiaryDayWrapperModel>; @useResult $Res call({@JsonKey(name: "diary") DiaryDayModel diary}); @@ -45,8 +47,10 @@ abstract class $DiaryDayWrapperModelCopyWith<$Res> { } /// @nodoc -class _$DiaryDayWrapperModelCopyWithImpl<$Res, - $Val extends DiaryDayWrapperModel> +class _$DiaryDayWrapperModelCopyWithImpl< + $Res, + $Val extends DiaryDayWrapperModel +> implements $DiaryDayWrapperModelCopyWith<$Res> { _$DiaryDayWrapperModelCopyWithImpl(this._value, this._then); @@ -59,15 +63,17 @@ class _$DiaryDayWrapperModelCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? diary = null, - }) { - return _then(_value.copyWith( - diary: null == diary - ? _value.diary - : diary // ignore: cast_nullable_to_non_nullable - as DiaryDayModel, - ) as $Val); + $Res call({Object? diary = null}) { + return _then( + _value.copyWith( + diary: + null == diary + ? _value.diary + : diary // ignore: cast_nullable_to_non_nullable + as DiaryDayModel, + ) + as $Val, + ); } /// Create a copy of DiaryDayWrapperModel @@ -84,9 +90,10 @@ class _$DiaryDayWrapperModelCopyWithImpl<$Res, /// @nodoc abstract class _$$DiaryDayWrapperModelImplCopyWith<$Res> implements $DiaryDayWrapperModelCopyWith<$Res> { - factory _$$DiaryDayWrapperModelImplCopyWith(_$DiaryDayWrapperModelImpl value, - $Res Function(_$DiaryDayWrapperModelImpl) then) = - __$$DiaryDayWrapperModelImplCopyWithImpl<$Res>; + factory _$$DiaryDayWrapperModelImplCopyWith( + _$DiaryDayWrapperModelImpl value, + $Res Function(_$DiaryDayWrapperModelImpl) then, + ) = __$$DiaryDayWrapperModelImplCopyWithImpl<$Res>; @override @useResult $Res call({@JsonKey(name: "diary") DiaryDayModel diary}); @@ -99,31 +106,34 @@ abstract class _$$DiaryDayWrapperModelImplCopyWith<$Res> class __$$DiaryDayWrapperModelImplCopyWithImpl<$Res> extends _$DiaryDayWrapperModelCopyWithImpl<$Res, _$DiaryDayWrapperModelImpl> implements _$$DiaryDayWrapperModelImplCopyWith<$Res> { - __$$DiaryDayWrapperModelImplCopyWithImpl(_$DiaryDayWrapperModelImpl _value, - $Res Function(_$DiaryDayWrapperModelImpl) _then) - : super(_value, _then); + __$$DiaryDayWrapperModelImplCopyWithImpl( + _$DiaryDayWrapperModelImpl _value, + $Res Function(_$DiaryDayWrapperModelImpl) _then, + ) : super(_value, _then); /// Create a copy of DiaryDayWrapperModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? diary = null, - }) { - return _then(_$DiaryDayWrapperModelImpl( - diary: null == diary - ? _value.diary - : diary // ignore: cast_nullable_to_non_nullable - as DiaryDayModel, - )); + $Res call({Object? diary = null}) { + return _then( + _$DiaryDayWrapperModelImpl( + diary: + null == diary + ? _value.diary + : diary // ignore: cast_nullable_to_non_nullable + as DiaryDayModel, + ), + ); } } /// @nodoc @JsonSerializable() class _$DiaryDayWrapperModelImpl implements _DiaryDayWrapperModel { - const _$DiaryDayWrapperModelImpl( - {@JsonKey(name: "diary") required this.diary}); + const _$DiaryDayWrapperModelImpl({ + @JsonKey(name: "diary") required this.diary, + }); factory _$DiaryDayWrapperModelImpl.fromJson(Map json) => _$$DiaryDayWrapperModelImplFromJson(json); @@ -155,22 +165,22 @@ class _$DiaryDayWrapperModelImpl implements _DiaryDayWrapperModel { @override @pragma('vm:prefer-inline') _$$DiaryDayWrapperModelImplCopyWith<_$DiaryDayWrapperModelImpl> - get copyWith => - __$$DiaryDayWrapperModelImplCopyWithImpl<_$DiaryDayWrapperModelImpl>( - this, _$identity); + get copyWith => + __$$DiaryDayWrapperModelImplCopyWithImpl<_$DiaryDayWrapperModelImpl>( + this, + _$identity, + ); @override Map toJson() { - return _$$DiaryDayWrapperModelImplToJson( - this, - ); + return _$$DiaryDayWrapperModelImplToJson(this); } } abstract class _DiaryDayWrapperModel implements DiaryDayWrapperModel { - const factory _DiaryDayWrapperModel( - {@JsonKey(name: "diary") required final DiaryDayModel diary}) = - _$DiaryDayWrapperModelImpl; + const factory _DiaryDayWrapperModel({ + @JsonKey(name: "diary") required final DiaryDayModel diary, + }) = _$DiaryDayWrapperModelImpl; factory _DiaryDayWrapperModel.fromJson(Map json) = _$DiaryDayWrapperModelImpl.fromJson; @@ -184,7 +194,7 @@ abstract class _DiaryDayWrapperModel implements DiaryDayWrapperModel { @override @JsonKey(includeFromJson: false, includeToJson: false) _$$DiaryDayWrapperModelImplCopyWith<_$DiaryDayWrapperModelImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } DiaryDayModel _$DiaryDayModelFromJson(Map json) { @@ -223,18 +233,20 @@ mixin _$DiaryDayModel { /// @nodoc abstract class $DiaryDayModelCopyWith<$Res> { factory $DiaryDayModelCopyWith( - DiaryDayModel value, $Res Function(DiaryDayModel) then) = - _$DiaryDayModelCopyWithImpl<$Res, DiaryDayModel>; + DiaryDayModel value, + $Res Function(DiaryDayModel) then, + ) = _$DiaryDayModelCopyWithImpl<$Res, DiaryDayModel>; @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "date") String date, - @JsonKey(name: "wakeup") String? wakeup, - @JsonKey(name: "retire") String? retire, - @JsonKey(name: "closed") int closed, - @JsonKey(name: "comment") String comment, - @JsonKey(name: "state") TypeOfDiaryModel typeOfDiary, - @JsonKey(name: "meals") List meals}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "date") String date, + @JsonKey(name: "wakeup") String? wakeup, + @JsonKey(name: "retire") String? retire, + @JsonKey(name: "closed") int closed, + @JsonKey(name: "comment") String comment, + @JsonKey(name: "state") TypeOfDiaryModel typeOfDiary, + @JsonKey(name: "meals") List meals, + }); $TypeOfDiaryModelCopyWith<$Res> get typeOfDiary; } @@ -263,40 +275,51 @@ class _$DiaryDayModelCopyWithImpl<$Res, $Val extends DiaryDayModel> Object? typeOfDiary = null, Object? meals = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - date: null == date - ? _value.date - : date // ignore: cast_nullable_to_non_nullable - as String, - wakeup: freezed == wakeup - ? _value.wakeup - : wakeup // ignore: cast_nullable_to_non_nullable - as String?, - retire: freezed == retire - ? _value.retire - : retire // ignore: cast_nullable_to_non_nullable - as String?, - closed: null == closed - ? _value.closed - : closed // ignore: cast_nullable_to_non_nullable - as int, - comment: null == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as String, - typeOfDiary: null == typeOfDiary - ? _value.typeOfDiary - : typeOfDiary // ignore: cast_nullable_to_non_nullable - as TypeOfDiaryModel, - meals: null == meals - ? _value.meals - : meals // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + date: + null == date + ? _value.date + : date // ignore: cast_nullable_to_non_nullable + as String, + wakeup: + freezed == wakeup + ? _value.wakeup + : wakeup // ignore: cast_nullable_to_non_nullable + as String?, + retire: + freezed == retire + ? _value.retire + : retire // ignore: cast_nullable_to_non_nullable + as String?, + closed: + null == closed + ? _value.closed + : closed // ignore: cast_nullable_to_non_nullable + as int, + comment: + null == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as String, + typeOfDiary: + null == typeOfDiary + ? _value.typeOfDiary + : typeOfDiary // ignore: cast_nullable_to_non_nullable + as TypeOfDiaryModel, + meals: + null == meals + ? _value.meals + : meals // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } /// Create a copy of DiaryDayModel @@ -314,19 +337,21 @@ class _$DiaryDayModelCopyWithImpl<$Res, $Val extends DiaryDayModel> abstract class _$$DiaryDayModelImplCopyWith<$Res> implements $DiaryDayModelCopyWith<$Res> { factory _$$DiaryDayModelImplCopyWith( - _$DiaryDayModelImpl value, $Res Function(_$DiaryDayModelImpl) then) = - __$$DiaryDayModelImplCopyWithImpl<$Res>; + _$DiaryDayModelImpl value, + $Res Function(_$DiaryDayModelImpl) then, + ) = __$$DiaryDayModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "date") String date, - @JsonKey(name: "wakeup") String? wakeup, - @JsonKey(name: "retire") String? retire, - @JsonKey(name: "closed") int closed, - @JsonKey(name: "comment") String comment, - @JsonKey(name: "state") TypeOfDiaryModel typeOfDiary, - @JsonKey(name: "meals") List meals}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "date") String date, + @JsonKey(name: "wakeup") String? wakeup, + @JsonKey(name: "retire") String? retire, + @JsonKey(name: "closed") int closed, + @JsonKey(name: "comment") String comment, + @JsonKey(name: "state") TypeOfDiaryModel typeOfDiary, + @JsonKey(name: "meals") List meals, + }); @override $TypeOfDiaryModelCopyWith<$Res> get typeOfDiary; @@ -337,8 +362,9 @@ class __$$DiaryDayModelImplCopyWithImpl<$Res> extends _$DiaryDayModelCopyWithImpl<$Res, _$DiaryDayModelImpl> implements _$$DiaryDayModelImplCopyWith<$Res> { __$$DiaryDayModelImplCopyWithImpl( - _$DiaryDayModelImpl _value, $Res Function(_$DiaryDayModelImpl) _then) - : super(_value, _then); + _$DiaryDayModelImpl _value, + $Res Function(_$DiaryDayModelImpl) _then, + ) : super(_value, _then); /// Create a copy of DiaryDayModel /// with the given fields replaced by the non-null parameter values. @@ -354,56 +380,66 @@ class __$$DiaryDayModelImplCopyWithImpl<$Res> Object? typeOfDiary = null, Object? meals = null, }) { - return _then(_$DiaryDayModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - date: null == date - ? _value.date - : date // ignore: cast_nullable_to_non_nullable - as String, - wakeup: freezed == wakeup - ? _value.wakeup - : wakeup // ignore: cast_nullable_to_non_nullable - as String?, - retire: freezed == retire - ? _value.retire - : retire // ignore: cast_nullable_to_non_nullable - as String?, - closed: null == closed - ? _value.closed - : closed // ignore: cast_nullable_to_non_nullable - as int, - comment: null == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as String, - typeOfDiary: null == typeOfDiary - ? _value.typeOfDiary - : typeOfDiary // ignore: cast_nullable_to_non_nullable - as TypeOfDiaryModel, - meals: null == meals - ? _value._meals - : meals // ignore: cast_nullable_to_non_nullable - as List, - )); + return _then( + _$DiaryDayModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + date: + null == date + ? _value.date + : date // ignore: cast_nullable_to_non_nullable + as String, + wakeup: + freezed == wakeup + ? _value.wakeup + : wakeup // ignore: cast_nullable_to_non_nullable + as String?, + retire: + freezed == retire + ? _value.retire + : retire // ignore: cast_nullable_to_non_nullable + as String?, + closed: + null == closed + ? _value.closed + : closed // ignore: cast_nullable_to_non_nullable + as int, + comment: + null == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as String, + typeOfDiary: + null == typeOfDiary + ? _value.typeOfDiary + : typeOfDiary // ignore: cast_nullable_to_non_nullable + as TypeOfDiaryModel, + meals: + null == meals + ? _value._meals + : meals // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } /// @nodoc @JsonSerializable() class _$DiaryDayModelImpl implements _DiaryDayModel { - const _$DiaryDayModelImpl( - {@JsonKey(name: "id") required this.id, - @JsonKey(name: "date") required this.date, - @JsonKey(name: "wakeup") this.wakeup, - @JsonKey(name: "retire") this.retire, - @JsonKey(name: "closed") required this.closed, - @JsonKey(name: "comment") required this.comment, - @JsonKey(name: "state") required this.typeOfDiary, - @JsonKey(name: "meals") required final List meals}) - : _meals = meals; + const _$DiaryDayModelImpl({ + @JsonKey(name: "id") required this.id, + @JsonKey(name: "date") required this.date, + @JsonKey(name: "wakeup") this.wakeup, + @JsonKey(name: "retire") this.retire, + @JsonKey(name: "closed") required this.closed, + @JsonKey(name: "comment") required this.comment, + @JsonKey(name: "state") required this.typeOfDiary, + @JsonKey(name: "meals") required final List meals, + }) : _meals = meals; factory _$DiaryDayModelImpl.fromJson(Map json) => _$$DiaryDayModelImplFromJson(json); @@ -461,8 +497,17 @@ class _$DiaryDayModelImpl implements _DiaryDayModel { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, date, wakeup, retire, closed, - comment, typeOfDiary, const DeepCollectionEquality().hash(_meals)); + int get hashCode => Object.hash( + runtimeType, + id, + date, + wakeup, + retire, + closed, + comment, + typeOfDiary, + const DeepCollectionEquality().hash(_meals), + ); /// Create a copy of DiaryDayModel /// with the given fields replaced by the non-null parameter values. @@ -474,23 +519,21 @@ class _$DiaryDayModelImpl implements _DiaryDayModel { @override Map toJson() { - return _$$DiaryDayModelImplToJson( - this, - ); + return _$$DiaryDayModelImplToJson(this); } } abstract class _DiaryDayModel implements DiaryDayModel { - const factory _DiaryDayModel( - {@JsonKey(name: "id") required final int id, - @JsonKey(name: "date") required final String date, - @JsonKey(name: "wakeup") final String? wakeup, - @JsonKey(name: "retire") final String? retire, - @JsonKey(name: "closed") required final int closed, - @JsonKey(name: "comment") required final String comment, - @JsonKey(name: "state") required final TypeOfDiaryModel typeOfDiary, - @JsonKey(name: "meals") required final List meals}) = - _$DiaryDayModelImpl; + const factory _DiaryDayModel({ + @JsonKey(name: "id") required final int id, + @JsonKey(name: "date") required final String date, + @JsonKey(name: "wakeup") final String? wakeup, + @JsonKey(name: "retire") final String? retire, + @JsonKey(name: "closed") required final int closed, + @JsonKey(name: "comment") required final String comment, + @JsonKey(name: "state") required final TypeOfDiaryModel typeOfDiary, + @JsonKey(name: "meals") required final List meals, + }) = _$DiaryDayModelImpl; factory _DiaryDayModel.fromJson(Map json) = _$DiaryDayModelImpl.fromJson; @@ -564,14 +607,15 @@ abstract class $MealModelCopyWith<$Res> { factory $MealModelCopyWith(MealModel value, $Res Function(MealModel) then) = _$MealModelCopyWithImpl<$Res, MealModel>; @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "time") String time, - @JsonKey(name: "type_no") int typeNumber, - @JsonKey(name: "satiety") int satiety, - @JsonKey(name: "mood") int mood, - @JsonKey(name: "portions") List portions, - @JsonKey(name: "photos") List photos}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "time") String time, + @JsonKey(name: "type_no") int typeNumber, + @JsonKey(name: "satiety") int satiety, + @JsonKey(name: "mood") int mood, + @JsonKey(name: "portions") List portions, + @JsonKey(name: "photos") List photos, + }); } /// @nodoc @@ -597,36 +641,46 @@ class _$MealModelCopyWithImpl<$Res, $Val extends MealModel> Object? portions = null, Object? photos = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - time: null == time - ? _value.time - : time // ignore: cast_nullable_to_non_nullable - as String, - typeNumber: null == typeNumber - ? _value.typeNumber - : typeNumber // ignore: cast_nullable_to_non_nullable - as int, - satiety: null == satiety - ? _value.satiety - : satiety // ignore: cast_nullable_to_non_nullable - as int, - mood: null == mood - ? _value.mood - : mood // ignore: cast_nullable_to_non_nullable - as int, - portions: null == portions - ? _value.portions - : portions // ignore: cast_nullable_to_non_nullable - as List, - photos: null == photos - ? _value.photos - : photos // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + time: + null == time + ? _value.time + : time // ignore: cast_nullable_to_non_nullable + as String, + typeNumber: + null == typeNumber + ? _value.typeNumber + : typeNumber // ignore: cast_nullable_to_non_nullable + as int, + satiety: + null == satiety + ? _value.satiety + : satiety // ignore: cast_nullable_to_non_nullable + as int, + mood: + null == mood + ? _value.mood + : mood // ignore: cast_nullable_to_non_nullable + as int, + portions: + null == portions + ? _value.portions + : portions // ignore: cast_nullable_to_non_nullable + as List, + photos: + null == photos + ? _value.photos + : photos // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } @@ -634,18 +688,20 @@ class _$MealModelCopyWithImpl<$Res, $Val extends MealModel> abstract class _$$MealModelImplCopyWith<$Res> implements $MealModelCopyWith<$Res> { factory _$$MealModelImplCopyWith( - _$MealModelImpl value, $Res Function(_$MealModelImpl) then) = - __$$MealModelImplCopyWithImpl<$Res>; + _$MealModelImpl value, + $Res Function(_$MealModelImpl) then, + ) = __$$MealModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "time") String time, - @JsonKey(name: "type_no") int typeNumber, - @JsonKey(name: "satiety") int satiety, - @JsonKey(name: "mood") int mood, - @JsonKey(name: "portions") List portions, - @JsonKey(name: "photos") List photos}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "time") String time, + @JsonKey(name: "type_no") int typeNumber, + @JsonKey(name: "satiety") int satiety, + @JsonKey(name: "mood") int mood, + @JsonKey(name: "portions") List portions, + @JsonKey(name: "photos") List photos, + }); } /// @nodoc @@ -653,8 +709,9 @@ class __$$MealModelImplCopyWithImpl<$Res> extends _$MealModelCopyWithImpl<$Res, _$MealModelImpl> implements _$$MealModelImplCopyWith<$Res> { __$$MealModelImplCopyWithImpl( - _$MealModelImpl _value, $Res Function(_$MealModelImpl) _then) - : super(_value, _then); + _$MealModelImpl _value, + $Res Function(_$MealModelImpl) _then, + ) : super(_value, _then); /// Create a copy of MealModel /// with the given fields replaced by the non-null parameter values. @@ -669,52 +726,61 @@ class __$$MealModelImplCopyWithImpl<$Res> Object? portions = null, Object? photos = null, }) { - return _then(_$MealModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - time: null == time - ? _value.time - : time // ignore: cast_nullable_to_non_nullable - as String, - typeNumber: null == typeNumber - ? _value.typeNumber - : typeNumber // ignore: cast_nullable_to_non_nullable - as int, - satiety: null == satiety - ? _value.satiety - : satiety // ignore: cast_nullable_to_non_nullable - as int, - mood: null == mood - ? _value.mood - : mood // ignore: cast_nullable_to_non_nullable - as int, - portions: null == portions - ? _value._portions - : portions // ignore: cast_nullable_to_non_nullable - as List, - photos: null == photos - ? _value._photos - : photos // ignore: cast_nullable_to_non_nullable - as List, - )); + return _then( + _$MealModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + time: + null == time + ? _value.time + : time // ignore: cast_nullable_to_non_nullable + as String, + typeNumber: + null == typeNumber + ? _value.typeNumber + : typeNumber // ignore: cast_nullable_to_non_nullable + as int, + satiety: + null == satiety + ? _value.satiety + : satiety // ignore: cast_nullable_to_non_nullable + as int, + mood: + null == mood + ? _value.mood + : mood // ignore: cast_nullable_to_non_nullable + as int, + portions: + null == portions + ? _value._portions + : portions // ignore: cast_nullable_to_non_nullable + as List, + photos: + null == photos + ? _value._photos + : photos // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } /// @nodoc @JsonSerializable() class _$MealModelImpl implements _MealModel { - const _$MealModelImpl( - {@JsonKey(name: "id") required this.id, - @JsonKey(name: "time") required this.time, - @JsonKey(name: "type_no") required this.typeNumber, - @JsonKey(name: "satiety") required this.satiety, - @JsonKey(name: "mood") required this.mood, - @JsonKey(name: "portions") required final List portions, - @JsonKey(name: "photos") required final List photos}) - : _portions = portions, - _photos = photos; + const _$MealModelImpl({ + @JsonKey(name: "id") required this.id, + @JsonKey(name: "time") required this.time, + @JsonKey(name: "type_no") required this.typeNumber, + @JsonKey(name: "satiety") required this.satiety, + @JsonKey(name: "mood") required this.mood, + @JsonKey(name: "portions") required final List portions, + @JsonKey(name: "photos") required final List photos, + }) : _portions = portions, + _photos = photos; factory _$MealModelImpl.fromJson(Map json) => _$$MealModelImplFromJson(json); @@ -775,14 +841,15 @@ class _$MealModelImpl implements _MealModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - id, - time, - typeNumber, - satiety, - mood, - const DeepCollectionEquality().hash(_portions), - const DeepCollectionEquality().hash(_photos)); + runtimeType, + id, + time, + typeNumber, + satiety, + mood, + const DeepCollectionEquality().hash(_portions), + const DeepCollectionEquality().hash(_photos), + ); /// Create a copy of MealModel /// with the given fields replaced by the non-null parameter values. @@ -794,22 +861,20 @@ class _$MealModelImpl implements _MealModel { @override Map toJson() { - return _$$MealModelImplToJson( - this, - ); + return _$$MealModelImplToJson(this); } } abstract class _MealModel implements MealModel { - const factory _MealModel( - {@JsonKey(name: "id") required final int id, - @JsonKey(name: "time") required final String time, - @JsonKey(name: "type_no") required final int typeNumber, - @JsonKey(name: "satiety") required final int satiety, - @JsonKey(name: "mood") required final int mood, - @JsonKey(name: "portions") required final List portions, - @JsonKey(name: "photos") - required final List photos}) = _$MealModelImpl; + const factory _MealModel({ + @JsonKey(name: "id") required final int id, + @JsonKey(name: "time") required final String time, + @JsonKey(name: "type_no") required final int typeNumber, + @JsonKey(name: "satiety") required final int satiety, + @JsonKey(name: "mood") required final int mood, + @JsonKey(name: "portions") required final List portions, + @JsonKey(name: "photos") required final List photos, + }) = _$MealModelImpl; factory _MealModel.fromJson(Map json) = _$MealModelImpl.fromJson; @@ -872,14 +937,16 @@ mixin _$DiaryPhotoModel { /// @nodoc abstract class $DiaryPhotoModelCopyWith<$Res> { factory $DiaryPhotoModelCopyWith( - DiaryPhotoModel value, $Res Function(DiaryPhotoModel) then) = - _$DiaryPhotoModelCopyWithImpl<$Res, DiaryPhotoModel>; + DiaryPhotoModel value, + $Res Function(DiaryPhotoModel) then, + ) = _$DiaryPhotoModelCopyWithImpl<$Res, DiaryPhotoModel>; @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "original_name") String originalName, - @JsonKey(name: "path") String path, - @JsonKey(name: "size") int size}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "original_name") String originalName, + @JsonKey(name: "path") String path, + @JsonKey(name: "size") int size, + }); } /// @nodoc @@ -902,40 +969,49 @@ class _$DiaryPhotoModelCopyWithImpl<$Res, $Val extends DiaryPhotoModel> Object? path = null, Object? size = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - originalName: null == originalName - ? _value.originalName - : originalName // ignore: cast_nullable_to_non_nullable - as String, - path: null == path - ? _value.path - : path // ignore: cast_nullable_to_non_nullable - as String, - size: null == size - ? _value.size - : size // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + originalName: + null == originalName + ? _value.originalName + : originalName // ignore: cast_nullable_to_non_nullable + as String, + path: + null == path + ? _value.path + : path // ignore: cast_nullable_to_non_nullable + as String, + size: + null == size + ? _value.size + : size // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } } /// @nodoc abstract class _$$DiaryPhotoModelImplCopyWith<$Res> implements $DiaryPhotoModelCopyWith<$Res> { - factory _$$DiaryPhotoModelImplCopyWith(_$DiaryPhotoModelImpl value, - $Res Function(_$DiaryPhotoModelImpl) then) = - __$$DiaryPhotoModelImplCopyWithImpl<$Res>; + factory _$$DiaryPhotoModelImplCopyWith( + _$DiaryPhotoModelImpl value, + $Res Function(_$DiaryPhotoModelImpl) then, + ) = __$$DiaryPhotoModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "original_name") String originalName, - @JsonKey(name: "path") String path, - @JsonKey(name: "size") int size}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "original_name") String originalName, + @JsonKey(name: "path") String path, + @JsonKey(name: "size") int size, + }); } /// @nodoc @@ -943,8 +1019,9 @@ class __$$DiaryPhotoModelImplCopyWithImpl<$Res> extends _$DiaryPhotoModelCopyWithImpl<$Res, _$DiaryPhotoModelImpl> implements _$$DiaryPhotoModelImplCopyWith<$Res> { __$$DiaryPhotoModelImplCopyWithImpl( - _$DiaryPhotoModelImpl _value, $Res Function(_$DiaryPhotoModelImpl) _then) - : super(_value, _then); + _$DiaryPhotoModelImpl _value, + $Res Function(_$DiaryPhotoModelImpl) _then, + ) : super(_value, _then); /// Create a copy of DiaryPhotoModel /// with the given fields replaced by the non-null parameter values. @@ -956,35 +1033,42 @@ class __$$DiaryPhotoModelImplCopyWithImpl<$Res> Object? path = null, Object? size = null, }) { - return _then(_$DiaryPhotoModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - originalName: null == originalName - ? _value.originalName - : originalName // ignore: cast_nullable_to_non_nullable - as String, - path: null == path - ? _value.path - : path // ignore: cast_nullable_to_non_nullable - as String, - size: null == size - ? _value.size - : size // ignore: cast_nullable_to_non_nullable - as int, - )); + return _then( + _$DiaryPhotoModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + originalName: + null == originalName + ? _value.originalName + : originalName // ignore: cast_nullable_to_non_nullable + as String, + path: + null == path + ? _value.path + : path // ignore: cast_nullable_to_non_nullable + as String, + size: + null == size + ? _value.size + : size // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } /// @nodoc @JsonSerializable() class _$DiaryPhotoModelImpl implements _DiaryPhotoModel { - const _$DiaryPhotoModelImpl( - {@JsonKey(name: "id") required this.id, - @JsonKey(name: "original_name") required this.originalName, - @JsonKey(name: "path") required this.path, - @JsonKey(name: "size") required this.size}); + const _$DiaryPhotoModelImpl({ + @JsonKey(name: "id") required this.id, + @JsonKey(name: "original_name") required this.originalName, + @JsonKey(name: "path") required this.path, + @JsonKey(name: "size") required this.size, + }); factory _$DiaryPhotoModelImpl.fromJson(Map json) => _$$DiaryPhotoModelImplFromJson(json); @@ -1030,22 +1114,23 @@ class _$DiaryPhotoModelImpl implements _DiaryPhotoModel { @pragma('vm:prefer-inline') _$$DiaryPhotoModelImplCopyWith<_$DiaryPhotoModelImpl> get copyWith => __$$DiaryPhotoModelImplCopyWithImpl<_$DiaryPhotoModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$DiaryPhotoModelImplToJson( - this, - ); + return _$$DiaryPhotoModelImplToJson(this); } } abstract class _DiaryPhotoModel implements DiaryPhotoModel { - const factory _DiaryPhotoModel( - {@JsonKey(name: "id") required final int id, - @JsonKey(name: "original_name") required final String originalName, - @JsonKey(name: "path") required final String path, - @JsonKey(name: "size") required final int size}) = _$DiaryPhotoModelImpl; + const factory _DiaryPhotoModel({ + @JsonKey(name: "id") required final int id, + @JsonKey(name: "original_name") required final String originalName, + @JsonKey(name: "path") required final String path, + @JsonKey(name: "size") required final int size, + }) = _$DiaryPhotoModelImpl; factory _DiaryPhotoModel.fromJson(Map json) = _$DiaryPhotoModelImpl.fromJson; @@ -1105,18 +1190,20 @@ mixin _$PortionModel { /// @nodoc abstract class $PortionModelCopyWith<$Res> { factory $PortionModelCopyWith( - PortionModel value, $Res Function(PortionModel) then) = - _$PortionModelCopyWithImpl<$Res, PortionModel>; + PortionModel value, + $Res Function(PortionModel) then, + ) = _$PortionModelCopyWithImpl<$Res, PortionModel>; @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "product_nutritional_value_id") - int? productNutritionalValueId, - @JsonKey(name: "product_name") String productName, - @JsonKey(name: "quantity") int quantity, - @JsonKey(name: "portion") String portion, - @JsonKey(name: "from_diet") bool fromDiet, - @JsonKey(name: "state") PortionState portionState}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "product_nutritional_value_id") + int? productNutritionalValueId, + @JsonKey(name: "product_name") String productName, + @JsonKey(name: "quantity") int quantity, + @JsonKey(name: "portion") String portion, + @JsonKey(name: "from_diet") bool fromDiet, + @JsonKey(name: "state") PortionState portionState, + }); } /// @nodoc @@ -1142,36 +1229,46 @@ class _$PortionModelCopyWithImpl<$Res, $Val extends PortionModel> Object? fromDiet = null, Object? portionState = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - productNutritionalValueId: freezed == productNutritionalValueId - ? _value.productNutritionalValueId - : productNutritionalValueId // ignore: cast_nullable_to_non_nullable - as int?, - productName: null == productName - ? _value.productName - : productName // ignore: cast_nullable_to_non_nullable - as String, - quantity: null == quantity - ? _value.quantity - : quantity // ignore: cast_nullable_to_non_nullable - as int, - portion: null == portion - ? _value.portion - : portion // ignore: cast_nullable_to_non_nullable - as String, - fromDiet: null == fromDiet - ? _value.fromDiet - : fromDiet // ignore: cast_nullable_to_non_nullable - as bool, - portionState: null == portionState - ? _value.portionState - : portionState // ignore: cast_nullable_to_non_nullable - as PortionState, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + productNutritionalValueId: + freezed == productNutritionalValueId + ? _value.productNutritionalValueId + : productNutritionalValueId // ignore: cast_nullable_to_non_nullable + as int?, + productName: + null == productName + ? _value.productName + : productName // ignore: cast_nullable_to_non_nullable + as String, + quantity: + null == quantity + ? _value.quantity + : quantity // ignore: cast_nullable_to_non_nullable + as int, + portion: + null == portion + ? _value.portion + : portion // ignore: cast_nullable_to_non_nullable + as String, + fromDiet: + null == fromDiet + ? _value.fromDiet + : fromDiet // ignore: cast_nullable_to_non_nullable + as bool, + portionState: + null == portionState + ? _value.portionState + : portionState // ignore: cast_nullable_to_non_nullable + as PortionState, + ) + as $Val, + ); } } @@ -1179,19 +1276,21 @@ class _$PortionModelCopyWithImpl<$Res, $Val extends PortionModel> abstract class _$$PortionModelImplCopyWith<$Res> implements $PortionModelCopyWith<$Res> { factory _$$PortionModelImplCopyWith( - _$PortionModelImpl value, $Res Function(_$PortionModelImpl) then) = - __$$PortionModelImplCopyWithImpl<$Res>; + _$PortionModelImpl value, + $Res Function(_$PortionModelImpl) then, + ) = __$$PortionModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "product_nutritional_value_id") - int? productNutritionalValueId, - @JsonKey(name: "product_name") String productName, - @JsonKey(name: "quantity") int quantity, - @JsonKey(name: "portion") String portion, - @JsonKey(name: "from_diet") bool fromDiet, - @JsonKey(name: "state") PortionState portionState}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "product_nutritional_value_id") + int? productNutritionalValueId, + @JsonKey(name: "product_name") String productName, + @JsonKey(name: "quantity") int quantity, + @JsonKey(name: "portion") String portion, + @JsonKey(name: "from_diet") bool fromDiet, + @JsonKey(name: "state") PortionState portionState, + }); } /// @nodoc @@ -1199,8 +1298,9 @@ class __$$PortionModelImplCopyWithImpl<$Res> extends _$PortionModelCopyWithImpl<$Res, _$PortionModelImpl> implements _$$PortionModelImplCopyWith<$Res> { __$$PortionModelImplCopyWithImpl( - _$PortionModelImpl _value, $Res Function(_$PortionModelImpl) _then) - : super(_value, _then); + _$PortionModelImpl _value, + $Res Function(_$PortionModelImpl) _then, + ) : super(_value, _then); /// Create a copy of PortionModel /// with the given fields replaced by the non-null parameter values. @@ -1215,51 +1315,61 @@ class __$$PortionModelImplCopyWithImpl<$Res> Object? fromDiet = null, Object? portionState = null, }) { - return _then(_$PortionModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - productNutritionalValueId: freezed == productNutritionalValueId - ? _value.productNutritionalValueId - : productNutritionalValueId // ignore: cast_nullable_to_non_nullable - as int?, - productName: null == productName - ? _value.productName - : productName // ignore: cast_nullable_to_non_nullable - as String, - quantity: null == quantity - ? _value.quantity - : quantity // ignore: cast_nullable_to_non_nullable - as int, - portion: null == portion - ? _value.portion - : portion // ignore: cast_nullable_to_non_nullable - as String, - fromDiet: null == fromDiet - ? _value.fromDiet - : fromDiet // ignore: cast_nullable_to_non_nullable - as bool, - portionState: null == portionState - ? _value.portionState - : portionState // ignore: cast_nullable_to_non_nullable - as PortionState, - )); + return _then( + _$PortionModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + productNutritionalValueId: + freezed == productNutritionalValueId + ? _value.productNutritionalValueId + : productNutritionalValueId // ignore: cast_nullable_to_non_nullable + as int?, + productName: + null == productName + ? _value.productName + : productName // ignore: cast_nullable_to_non_nullable + as String, + quantity: + null == quantity + ? _value.quantity + : quantity // ignore: cast_nullable_to_non_nullable + as int, + portion: + null == portion + ? _value.portion + : portion // ignore: cast_nullable_to_non_nullable + as String, + fromDiet: + null == fromDiet + ? _value.fromDiet + : fromDiet // ignore: cast_nullable_to_non_nullable + as bool, + portionState: + null == portionState + ? _value.portionState + : portionState // ignore: cast_nullable_to_non_nullable + as PortionState, + ), + ); } } /// @nodoc @JsonSerializable() class _$PortionModelImpl implements _PortionModel { - const _$PortionModelImpl( - {@JsonKey(name: "id") required this.id, - @JsonKey(name: "product_nutritional_value_id") - this.productNutritionalValueId, - @JsonKey(name: "product_name") required this.productName, - @JsonKey(name: "quantity") required this.quantity, - @JsonKey(name: "portion") required this.portion, - @JsonKey(name: "from_diet") required this.fromDiet, - @JsonKey(name: "state") required this.portionState}); + const _$PortionModelImpl({ + @JsonKey(name: "id") required this.id, + @JsonKey(name: "product_nutritional_value_id") + this.productNutritionalValueId, + @JsonKey(name: "product_name") required this.productName, + @JsonKey(name: "quantity") required this.quantity, + @JsonKey(name: "portion") required this.portion, + @JsonKey(name: "from_diet") required this.fromDiet, + @JsonKey(name: "state") required this.portionState, + }); factory _$PortionModelImpl.fromJson(Map json) => _$$PortionModelImplFromJson(json); @@ -1297,8 +1407,10 @@ class _$PortionModelImpl implements _PortionModel { (other.runtimeType == runtimeType && other is _$PortionModelImpl && (identical(other.id, id) || other.id == id) && - (identical(other.productNutritionalValueId, - productNutritionalValueId) || + (identical( + other.productNutritionalValueId, + productNutritionalValueId, + ) || other.productNutritionalValueId == productNutritionalValueId) && (identical(other.productName, productName) || other.productName == productName) && @@ -1313,8 +1425,16 @@ class _$PortionModelImpl implements _PortionModel { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, productNutritionalValueId, - productName, quantity, portion, fromDiet, portionState); + int get hashCode => Object.hash( + runtimeType, + id, + productNutritionalValueId, + productName, + quantity, + portion, + fromDiet, + portionState, + ); /// Create a copy of PortionModel /// with the given fields replaced by the non-null parameter values. @@ -1326,23 +1446,21 @@ class _$PortionModelImpl implements _PortionModel { @override Map toJson() { - return _$$PortionModelImplToJson( - this, - ); + return _$$PortionModelImplToJson(this); } } abstract class _PortionModel implements PortionModel { - const factory _PortionModel( - {@JsonKey(name: "id") required final int id, - @JsonKey(name: "product_nutritional_value_id") - final int? productNutritionalValueId, - @JsonKey(name: "product_name") required final String productName, - @JsonKey(name: "quantity") required final int quantity, - @JsonKey(name: "portion") required final String portion, - @JsonKey(name: "from_diet") required final bool fromDiet, - @JsonKey(name: "state") required final PortionState portionState}) = - _$PortionModelImpl; + const factory _PortionModel({ + @JsonKey(name: "id") required final int id, + @JsonKey(name: "product_nutritional_value_id") + final int? productNutritionalValueId, + @JsonKey(name: "product_name") required final String productName, + @JsonKey(name: "quantity") required final int quantity, + @JsonKey(name: "portion") required final String portion, + @JsonKey(name: "from_diet") required final bool fromDiet, + @JsonKey(name: "state") required final PortionState portionState, + }) = _$PortionModelImpl; factory _PortionModel.fromJson(Map json) = _$PortionModelImpl.fromJson; @@ -1401,12 +1519,14 @@ mixin _$TypeOfDiaryModel { /// @nodoc abstract class $TypeOfDiaryModelCopyWith<$Res> { factory $TypeOfDiaryModelCopyWith( - TypeOfDiaryModel value, $Res Function(TypeOfDiaryModel) then) = - _$TypeOfDiaryModelCopyWithImpl<$Res, TypeOfDiaryModel>; + TypeOfDiaryModel value, + $Res Function(TypeOfDiaryModel) then, + ) = _$TypeOfDiaryModelCopyWithImpl<$Res, TypeOfDiaryModel>; @useResult - $Res call( - {@JsonKey(name: "has_chosen_diet") bool hasChosenDiet, - @JsonKey(name: "has_chosen_plan") bool hasChosenPlan}); + $Res call({ + @JsonKey(name: "has_chosen_diet") bool hasChosenDiet, + @JsonKey(name: "has_chosen_plan") bool hasChosenPlan, + }); } /// @nodoc @@ -1423,71 +1543,78 @@ class _$TypeOfDiaryModelCopyWithImpl<$Res, $Val extends TypeOfDiaryModel> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? hasChosenDiet = null, - Object? hasChosenPlan = null, - }) { - return _then(_value.copyWith( - hasChosenDiet: null == hasChosenDiet - ? _value.hasChosenDiet - : hasChosenDiet // ignore: cast_nullable_to_non_nullable - as bool, - hasChosenPlan: null == hasChosenPlan - ? _value.hasChosenPlan - : hasChosenPlan // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + $Res call({Object? hasChosenDiet = null, Object? hasChosenPlan = null}) { + return _then( + _value.copyWith( + hasChosenDiet: + null == hasChosenDiet + ? _value.hasChosenDiet + : hasChosenDiet // ignore: cast_nullable_to_non_nullable + as bool, + hasChosenPlan: + null == hasChosenPlan + ? _value.hasChosenPlan + : hasChosenPlan // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } } /// @nodoc abstract class _$$TypeOfDiaryModelImplCopyWith<$Res> implements $TypeOfDiaryModelCopyWith<$Res> { - factory _$$TypeOfDiaryModelImplCopyWith(_$TypeOfDiaryModelImpl value, - $Res Function(_$TypeOfDiaryModelImpl) then) = - __$$TypeOfDiaryModelImplCopyWithImpl<$Res>; + factory _$$TypeOfDiaryModelImplCopyWith( + _$TypeOfDiaryModelImpl value, + $Res Function(_$TypeOfDiaryModelImpl) then, + ) = __$$TypeOfDiaryModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "has_chosen_diet") bool hasChosenDiet, - @JsonKey(name: "has_chosen_plan") bool hasChosenPlan}); + $Res call({ + @JsonKey(name: "has_chosen_diet") bool hasChosenDiet, + @JsonKey(name: "has_chosen_plan") bool hasChosenPlan, + }); } /// @nodoc class __$$TypeOfDiaryModelImplCopyWithImpl<$Res> extends _$TypeOfDiaryModelCopyWithImpl<$Res, _$TypeOfDiaryModelImpl> implements _$$TypeOfDiaryModelImplCopyWith<$Res> { - __$$TypeOfDiaryModelImplCopyWithImpl(_$TypeOfDiaryModelImpl _value, - $Res Function(_$TypeOfDiaryModelImpl) _then) - : super(_value, _then); + __$$TypeOfDiaryModelImplCopyWithImpl( + _$TypeOfDiaryModelImpl _value, + $Res Function(_$TypeOfDiaryModelImpl) _then, + ) : super(_value, _then); /// Create a copy of TypeOfDiaryModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? hasChosenDiet = null, - Object? hasChosenPlan = null, - }) { - return _then(_$TypeOfDiaryModelImpl( - hasChosenDiet: null == hasChosenDiet - ? _value.hasChosenDiet - : hasChosenDiet // ignore: cast_nullable_to_non_nullable - as bool, - hasChosenPlan: null == hasChosenPlan - ? _value.hasChosenPlan - : hasChosenPlan // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? hasChosenDiet = null, Object? hasChosenPlan = null}) { + return _then( + _$TypeOfDiaryModelImpl( + hasChosenDiet: + null == hasChosenDiet + ? _value.hasChosenDiet + : hasChosenDiet // ignore: cast_nullable_to_non_nullable + as bool, + hasChosenPlan: + null == hasChosenPlan + ? _value.hasChosenPlan + : hasChosenPlan // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } /// @nodoc @JsonSerializable() class _$TypeOfDiaryModelImpl implements _TypeOfDiaryModel { - const _$TypeOfDiaryModelImpl( - {@JsonKey(name: "has_chosen_diet") required this.hasChosenDiet, - @JsonKey(name: "has_chosen_plan") required this.hasChosenPlan}); + const _$TypeOfDiaryModelImpl({ + @JsonKey(name: "has_chosen_diet") required this.hasChosenDiet, + @JsonKey(name: "has_chosen_plan") required this.hasChosenPlan, + }); factory _$TypeOfDiaryModelImpl.fromJson(Map json) => _$$TypeOfDiaryModelImplFromJson(json); @@ -1526,21 +1653,21 @@ class _$TypeOfDiaryModelImpl implements _TypeOfDiaryModel { @pragma('vm:prefer-inline') _$$TypeOfDiaryModelImplCopyWith<_$TypeOfDiaryModelImpl> get copyWith => __$$TypeOfDiaryModelImplCopyWithImpl<_$TypeOfDiaryModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$TypeOfDiaryModelImplToJson( - this, - ); + return _$$TypeOfDiaryModelImplToJson(this); } } abstract class _TypeOfDiaryModel implements TypeOfDiaryModel { - const factory _TypeOfDiaryModel( - {@JsonKey(name: "has_chosen_diet") required final bool hasChosenDiet, - @JsonKey(name: "has_chosen_plan") - required final bool hasChosenPlan}) = _$TypeOfDiaryModelImpl; + const factory _TypeOfDiaryModel({ + @JsonKey(name: "has_chosen_diet") required final bool hasChosenDiet, + @JsonKey(name: "has_chosen_plan") required final bool hasChosenPlan, + }) = _$TypeOfDiaryModelImpl; factory _TypeOfDiaryModel.fromJson(Map json) = _$TypeOfDiaryModelImpl.fromJson; @@ -1586,13 +1713,15 @@ mixin _$ProductInMeal { /// @nodoc abstract class $ProductInMealCopyWith<$Res> { factory $ProductInMealCopyWith( - ProductInMeal value, $Res Function(ProductInMeal) then) = - _$ProductInMealCopyWithImpl<$Res, ProductInMeal>; + ProductInMeal value, + $Res Function(ProductInMeal) then, + ) = _$ProductInMealCopyWithImpl<$Res, ProductInMeal>; @useResult - $Res call( - {@JsonKey(name: 'product_name') String productName, - @JsonKey(name: 'portion') String portion, - @JsonKey(name: 'quantity') int quantity}); + $Res call({ + @JsonKey(name: 'product_name') String productName, + @JsonKey(name: 'portion') String portion, + @JsonKey(name: 'quantity') int quantity, + }); } /// @nodoc @@ -1614,20 +1743,26 @@ class _$ProductInMealCopyWithImpl<$Res, $Val extends ProductInMeal> Object? portion = null, Object? quantity = null, }) { - return _then(_value.copyWith( - productName: null == productName - ? _value.productName - : productName // ignore: cast_nullable_to_non_nullable - as String, - portion: null == portion - ? _value.portion - : portion // ignore: cast_nullable_to_non_nullable - as String, - quantity: null == quantity - ? _value.quantity - : quantity // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + return _then( + _value.copyWith( + productName: + null == productName + ? _value.productName + : productName // ignore: cast_nullable_to_non_nullable + as String, + portion: + null == portion + ? _value.portion + : portion // ignore: cast_nullable_to_non_nullable + as String, + quantity: + null == quantity + ? _value.quantity + : quantity // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } } @@ -1635,14 +1770,16 @@ class _$ProductInMealCopyWithImpl<$Res, $Val extends ProductInMeal> abstract class _$$ProductInMealImplCopyWith<$Res> implements $ProductInMealCopyWith<$Res> { factory _$$ProductInMealImplCopyWith( - _$ProductInMealImpl value, $Res Function(_$ProductInMealImpl) then) = - __$$ProductInMealImplCopyWithImpl<$Res>; + _$ProductInMealImpl value, + $Res Function(_$ProductInMealImpl) then, + ) = __$$ProductInMealImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: 'product_name') String productName, - @JsonKey(name: 'portion') String portion, - @JsonKey(name: 'quantity') int quantity}); + $Res call({ + @JsonKey(name: 'product_name') String productName, + @JsonKey(name: 'portion') String portion, + @JsonKey(name: 'quantity') int quantity, + }); } /// @nodoc @@ -1650,8 +1787,9 @@ class __$$ProductInMealImplCopyWithImpl<$Res> extends _$ProductInMealCopyWithImpl<$Res, _$ProductInMealImpl> implements _$$ProductInMealImplCopyWith<$Res> { __$$ProductInMealImplCopyWithImpl( - _$ProductInMealImpl _value, $Res Function(_$ProductInMealImpl) _then) - : super(_value, _then); + _$ProductInMealImpl _value, + $Res Function(_$ProductInMealImpl) _then, + ) : super(_value, _then); /// Create a copy of ProductInMeal /// with the given fields replaced by the non-null parameter values. @@ -1662,30 +1800,36 @@ class __$$ProductInMealImplCopyWithImpl<$Res> Object? portion = null, Object? quantity = null, }) { - return _then(_$ProductInMealImpl( - productName: null == productName - ? _value.productName - : productName // ignore: cast_nullable_to_non_nullable - as String, - portion: null == portion - ? _value.portion - : portion // ignore: cast_nullable_to_non_nullable - as String, - quantity: null == quantity - ? _value.quantity - : quantity // ignore: cast_nullable_to_non_nullable - as int, - )); + return _then( + _$ProductInMealImpl( + productName: + null == productName + ? _value.productName + : productName // ignore: cast_nullable_to_non_nullable + as String, + portion: + null == portion + ? _value.portion + : portion // ignore: cast_nullable_to_non_nullable + as String, + quantity: + null == quantity + ? _value.quantity + : quantity // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } /// @nodoc @JsonSerializable() class _$ProductInMealImpl implements _ProductInMeal { - const _$ProductInMealImpl( - {@JsonKey(name: 'product_name') required this.productName, - @JsonKey(name: 'portion') required this.portion, - @JsonKey(name: 'quantity') required this.quantity}); + const _$ProductInMealImpl({ + @JsonKey(name: 'product_name') required this.productName, + @JsonKey(name: 'portion') required this.portion, + @JsonKey(name: 'quantity') required this.quantity, + }); factory _$ProductInMealImpl.fromJson(Map json) => _$$ProductInMealImplFromJson(json); @@ -1731,18 +1875,16 @@ class _$ProductInMealImpl implements _ProductInMeal { @override Map toJson() { - return _$$ProductInMealImplToJson( - this, - ); + return _$$ProductInMealImplToJson(this); } } abstract class _ProductInMeal implements ProductInMeal { - const factory _ProductInMeal( - {@JsonKey(name: 'product_name') required final String productName, - @JsonKey(name: 'portion') required final String portion, - @JsonKey(name: 'quantity') required final int quantity}) = - _$ProductInMealImpl; + const factory _ProductInMeal({ + @JsonKey(name: 'product_name') required final String productName, + @JsonKey(name: 'portion') required final String portion, + @JsonKey(name: 'quantity') required final int quantity, + }) = _$ProductInMealImpl; factory _ProductInMeal.fromJson(Map json) = _$ProductInMealImpl.fromJson; diff --git a/lib/features/diary/models/diary_day_model.g.dart b/lib/features/diary/models/diary_day_model.g.dart index 9e4d7520..c36c90e0 100644 --- a/lib/features/diary/models/diary_day_model.g.dart +++ b/lib/features/diary/models/diary_day_model.g.dart @@ -7,16 +7,14 @@ part of 'diary_day_model.dart'; // ************************************************************************** _$DiaryDayWrapperModelImpl _$$DiaryDayWrapperModelImplFromJson( - Map json) => - _$DiaryDayWrapperModelImpl( - diary: DiaryDayModel.fromJson(json['diary'] as Map), - ); + Map json, +) => _$DiaryDayWrapperModelImpl( + diary: DiaryDayModel.fromJson(json['diary'] as Map), +); Map _$$DiaryDayWrapperModelImplToJson( - _$DiaryDayWrapperModelImpl instance) => - { - 'diary': instance.diary, - }; + _$DiaryDayWrapperModelImpl instance, +) => {'diary': instance.diary}; _$DiaryDayModelImpl _$$DiaryDayModelImplFromJson(Map json) => _$DiaryDayModelImpl( @@ -26,11 +24,13 @@ _$DiaryDayModelImpl _$$DiaryDayModelImplFromJson(Map json) => retire: json['retire'] as String?, closed: (json['closed'] as num).toInt(), comment: json['comment'] as String, - typeOfDiary: - TypeOfDiaryModel.fromJson(json['state'] as Map), - meals: (json['meals'] as List) - .map((e) => MealModel.fromJson(e as Map)) - .toList(), + typeOfDiary: TypeOfDiaryModel.fromJson( + json['state'] as Map, + ), + meals: + (json['meals'] as List) + .map((e) => MealModel.fromJson(e as Map)) + .toList(), ); Map _$$DiaryDayModelImplToJson(_$DiaryDayModelImpl instance) => @@ -52,12 +52,14 @@ _$MealModelImpl _$$MealModelImplFromJson(Map json) => typeNumber: (json['type_no'] as num).toInt(), satiety: (json['satiety'] as num).toInt(), mood: (json['mood'] as num).toInt(), - portions: (json['portions'] as List) - .map((e) => PortionModel.fromJson(e as Map)) - .toList(), - photos: (json['photos'] as List) - .map((e) => DiaryPhotoModel.fromJson(e as Map)) - .toList(), + portions: + (json['portions'] as List) + .map((e) => PortionModel.fromJson(e as Map)) + .toList(), + photos: + (json['photos'] as List) + .map((e) => DiaryPhotoModel.fromJson(e as Map)) + .toList(), ); Map _$$MealModelImplToJson(_$MealModelImpl instance) => @@ -72,22 +74,22 @@ Map _$$MealModelImplToJson(_$MealModelImpl instance) => }; _$DiaryPhotoModelImpl _$$DiaryPhotoModelImplFromJson( - Map json) => - _$DiaryPhotoModelImpl( - id: (json['id'] as num).toInt(), - originalName: json['original_name'] as String, - path: json['path'] as String, - size: (json['size'] as num).toInt(), - ); + Map json, +) => _$DiaryPhotoModelImpl( + id: (json['id'] as num).toInt(), + originalName: json['original_name'] as String, + path: json['path'] as String, + size: (json['size'] as num).toInt(), +); Map _$$DiaryPhotoModelImplToJson( - _$DiaryPhotoModelImpl instance) => - { - 'id': instance.id, - 'original_name': instance.originalName, - 'path': instance.path, - 'size': instance.size, - }; + _$DiaryPhotoModelImpl instance, +) => { + 'id': instance.id, + 'original_name': instance.originalName, + 'path': instance.path, + 'size': instance.size, +}; _$PortionModelImpl _$$PortionModelImplFromJson(Map json) => _$PortionModelImpl( @@ -124,18 +126,18 @@ const _$PortionStateEnumMap = { }; _$TypeOfDiaryModelImpl _$$TypeOfDiaryModelImplFromJson( - Map json) => - _$TypeOfDiaryModelImpl( - hasChosenDiet: json['has_chosen_diet'] as bool, - hasChosenPlan: json['has_chosen_plan'] as bool, - ); + Map json, +) => _$TypeOfDiaryModelImpl( + hasChosenDiet: json['has_chosen_diet'] as bool, + hasChosenPlan: json['has_chosen_plan'] as bool, +); Map _$$TypeOfDiaryModelImplToJson( - _$TypeOfDiaryModelImpl instance) => - { - 'has_chosen_diet': instance.hasChosenDiet, - 'has_chosen_plan': instance.hasChosenPlan, - }; + _$TypeOfDiaryModelImpl instance, +) => { + 'has_chosen_diet': instance.hasChosenDiet, + 'has_chosen_plan': instance.hasChosenPlan, +}; _$ProductInMealImpl _$$ProductInMealImplFromJson(Map json) => _$ProductInMealImpl( diff --git a/lib/features/diary/models/diary_index_model.freezed.dart b/lib/features/diary/models/diary_index_model.freezed.dart index 9b78696c..206c1069 100644 --- a/lib/features/diary/models/diary_index_model.freezed.dart +++ b/lib/features/diary/models/diary_index_model.freezed.dart @@ -12,7 +12,8 @@ part of 'diary_index_model.dart'; 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'); + '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', +); DiaryIndexModel _$DiaryIndexModelFromJson(Map json) { return _DiaryIndexModel.fromJson(json); @@ -35,8 +36,9 @@ mixin _$DiaryIndexModel { /// @nodoc abstract class $DiaryIndexModelCopyWith<$Res> { factory $DiaryIndexModelCopyWith( - DiaryIndexModel value, $Res Function(DiaryIndexModel) then) = - _$DiaryIndexModelCopyWithImpl<$Res, DiaryIndexModel>; + DiaryIndexModel value, + $Res Function(DiaryIndexModel) then, + ) = _$DiaryIndexModelCopyWithImpl<$Res, DiaryIndexModel>; @useResult $Res call({int id}); } @@ -55,24 +57,27 @@ class _$DiaryIndexModelCopyWithImpl<$Res, $Val extends DiaryIndexModel> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + $Res call({Object? id = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } } /// @nodoc abstract class _$$DiaryIndexModelImplCopyWith<$Res> implements $DiaryIndexModelCopyWith<$Res> { - factory _$$DiaryIndexModelImplCopyWith(_$DiaryIndexModelImpl value, - $Res Function(_$DiaryIndexModelImpl) then) = - __$$DiaryIndexModelImplCopyWithImpl<$Res>; + factory _$$DiaryIndexModelImplCopyWith( + _$DiaryIndexModelImpl value, + $Res Function(_$DiaryIndexModelImpl) then, + ) = __$$DiaryIndexModelImplCopyWithImpl<$Res>; @override @useResult $Res call({int id}); @@ -83,22 +88,24 @@ class __$$DiaryIndexModelImplCopyWithImpl<$Res> extends _$DiaryIndexModelCopyWithImpl<$Res, _$DiaryIndexModelImpl> implements _$$DiaryIndexModelImplCopyWith<$Res> { __$$DiaryIndexModelImplCopyWithImpl( - _$DiaryIndexModelImpl _value, $Res Function(_$DiaryIndexModelImpl) _then) - : super(_value, _then); + _$DiaryIndexModelImpl _value, + $Res Function(_$DiaryIndexModelImpl) _then, + ) : super(_value, _then); /// Create a copy of DiaryIndexModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - }) { - return _then(_$DiaryIndexModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - )); + $Res call({Object? id = null}) { + return _then( + _$DiaryIndexModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } @@ -137,13 +144,13 @@ class _$DiaryIndexModelImpl implements _DiaryIndexModel { @pragma('vm:prefer-inline') _$$DiaryIndexModelImplCopyWith<_$DiaryIndexModelImpl> get copyWith => __$$DiaryIndexModelImplCopyWithImpl<_$DiaryIndexModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$DiaryIndexModelImplToJson( - this, - ); + return _$$DiaryIndexModelImplToJson(this); } } diff --git a/lib/features/diary/models/diary_index_model.g.dart b/lib/features/diary/models/diary_index_model.g.dart index 268132fa..c59e6a83 100644 --- a/lib/features/diary/models/diary_index_model.g.dart +++ b/lib/features/diary/models/diary_index_model.g.dart @@ -7,13 +7,9 @@ part of 'diary_index_model.dart'; // ************************************************************************** _$DiaryIndexModelImpl _$$DiaryIndexModelImplFromJson( - Map json) => - _$DiaryIndexModelImpl( - id: (json['id'] as num).toInt(), - ); + Map json, +) => _$DiaryIndexModelImpl(id: (json['id'] as num).toInt()); Map _$$DiaryIndexModelImplToJson( - _$DiaryIndexModelImpl instance) => - { - 'id': instance.id, - }; + _$DiaryIndexModelImpl instance, +) => {'id': instance.id}; diff --git a/lib/features/diary/models/finish_diary_day_model.freezed.dart b/lib/features/diary/models/finish_diary_day_model.freezed.dart index b9192501..8b590859 100644 --- a/lib/features/diary/models/finish_diary_day_model.freezed.dart +++ b/lib/features/diary/models/finish_diary_day_model.freezed.dart @@ -12,7 +12,8 @@ part of 'finish_diary_day_model.dart'; 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'); + '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', +); FinishDiaryDayModel _$FinishDiaryDayModelFromJson(Map json) { return _FinishDiaryDayModel.fromJson(json); @@ -36,8 +37,9 @@ mixin _$FinishDiaryDayModel { /// @nodoc abstract class $FinishDiaryDayModelCopyWith<$Res> { factory $FinishDiaryDayModelCopyWith( - FinishDiaryDayModel value, $Res Function(FinishDiaryDayModel) then) = - _$FinishDiaryDayModelCopyWithImpl<$Res, FinishDiaryDayModel>; + FinishDiaryDayModel value, + $Res Function(FinishDiaryDayModel) then, + ) = _$FinishDiaryDayModelCopyWithImpl<$Res, FinishDiaryDayModel>; @useResult $Res call({String wakeUp, String retire}); } @@ -56,29 +58,32 @@ class _$FinishDiaryDayModelCopyWithImpl<$Res, $Val extends FinishDiaryDayModel> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? wakeUp = null, - Object? retire = null, - }) { - return _then(_value.copyWith( - wakeUp: null == wakeUp - ? _value.wakeUp - : wakeUp // ignore: cast_nullable_to_non_nullable - as String, - retire: null == retire - ? _value.retire - : retire // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? wakeUp = null, Object? retire = null}) { + return _then( + _value.copyWith( + wakeUp: + null == wakeUp + ? _value.wakeUp + : wakeUp // ignore: cast_nullable_to_non_nullable + as String, + retire: + null == retire + ? _value.retire + : retire // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc abstract class _$$FinishDiaryDayModelImplCopyWith<$Res> implements $FinishDiaryDayModelCopyWith<$Res> { - factory _$$FinishDiaryDayModelImplCopyWith(_$FinishDiaryDayModelImpl value, - $Res Function(_$FinishDiaryDayModelImpl) then) = - __$$FinishDiaryDayModelImplCopyWithImpl<$Res>; + factory _$$FinishDiaryDayModelImplCopyWith( + _$FinishDiaryDayModelImpl value, + $Res Function(_$FinishDiaryDayModelImpl) then, + ) = __$$FinishDiaryDayModelImplCopyWithImpl<$Res>; @override @useResult $Res call({String wakeUp, String retire}); @@ -88,28 +93,30 @@ abstract class _$$FinishDiaryDayModelImplCopyWith<$Res> class __$$FinishDiaryDayModelImplCopyWithImpl<$Res> extends _$FinishDiaryDayModelCopyWithImpl<$Res, _$FinishDiaryDayModelImpl> implements _$$FinishDiaryDayModelImplCopyWith<$Res> { - __$$FinishDiaryDayModelImplCopyWithImpl(_$FinishDiaryDayModelImpl _value, - $Res Function(_$FinishDiaryDayModelImpl) _then) - : super(_value, _then); + __$$FinishDiaryDayModelImplCopyWithImpl( + _$FinishDiaryDayModelImpl _value, + $Res Function(_$FinishDiaryDayModelImpl) _then, + ) : super(_value, _then); /// Create a copy of FinishDiaryDayModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? wakeUp = null, - Object? retire = null, - }) { - return _then(_$FinishDiaryDayModelImpl( - wakeUp: null == wakeUp - ? _value.wakeUp - : wakeUp // ignore: cast_nullable_to_non_nullable - as String, - retire: null == retire - ? _value.retire - : retire // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? wakeUp = null, Object? retire = null}) { + return _then( + _$FinishDiaryDayModelImpl( + wakeUp: + null == wakeUp + ? _value.wakeUp + : wakeUp // ignore: cast_nullable_to_non_nullable + as String, + retire: + null == retire + ? _value.retire + : retire // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -151,20 +158,21 @@ class _$FinishDiaryDayModelImpl implements _FinishDiaryDayModel { @pragma('vm:prefer-inline') _$$FinishDiaryDayModelImplCopyWith<_$FinishDiaryDayModelImpl> get copyWith => __$$FinishDiaryDayModelImplCopyWithImpl<_$FinishDiaryDayModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$FinishDiaryDayModelImplToJson( - this, - ); + return _$$FinishDiaryDayModelImplToJson(this); } } abstract class _FinishDiaryDayModel implements FinishDiaryDayModel { - const factory _FinishDiaryDayModel( - {required final String wakeUp, - required final String retire}) = _$FinishDiaryDayModelImpl; + const factory _FinishDiaryDayModel({ + required final String wakeUp, + required final String retire, + }) = _$FinishDiaryDayModelImpl; factory _FinishDiaryDayModel.fromJson(Map json) = _$FinishDiaryDayModelImpl.fromJson; diff --git a/lib/features/diary/models/finish_diary_day_model.g.dart b/lib/features/diary/models/finish_diary_day_model.g.dart index a8d97c84..b20f81a9 100644 --- a/lib/features/diary/models/finish_diary_day_model.g.dart +++ b/lib/features/diary/models/finish_diary_day_model.g.dart @@ -7,15 +7,12 @@ part of 'finish_diary_day_model.dart'; // ************************************************************************** _$FinishDiaryDayModelImpl _$$FinishDiaryDayModelImplFromJson( - Map json) => - _$FinishDiaryDayModelImpl( - wakeUp: json['wakeUp'] as String, - retire: json['retire'] as String, - ); + Map json, +) => _$FinishDiaryDayModelImpl( + wakeUp: json['wakeUp'] as String, + retire: json['retire'] as String, +); Map _$$FinishDiaryDayModelImplToJson( - _$FinishDiaryDayModelImpl instance) => - { - 'wakeUp': instance.wakeUp, - 'retire': instance.retire, - }; + _$FinishDiaryDayModelImpl instance, +) => {'wakeUp': instance.wakeUp, 'retire': instance.retire}; diff --git a/lib/features/diary/models/nutrition_model.freezed.dart b/lib/features/diary/models/nutrition_model.freezed.dart index 46da50b5..827c3519 100644 --- a/lib/features/diary/models/nutrition_model.freezed.dart +++ b/lib/features/diary/models/nutrition_model.freezed.dart @@ -12,7 +12,8 @@ part of 'nutrition_model.dart'; 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'); + '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', +); NutritionDataModel _$NutritionDataModelFromJson(Map json) { return _NutritionDataModel.fromJson(json); @@ -37,12 +38,14 @@ mixin _$NutritionDataModel { /// @nodoc abstract class $NutritionDataModelCopyWith<$Res> { factory $NutritionDataModelCopyWith( - NutritionDataModel value, $Res Function(NutritionDataModel) then) = - _$NutritionDataModelCopyWithImpl<$Res, NutritionDataModel>; + NutritionDataModel value, + $Res Function(NutritionDataModel) then, + ) = _$NutritionDataModelCopyWithImpl<$Res, NutritionDataModel>; @useResult - $Res call( - {NutritionModel dailyNutritionIntake, - NutritionModel dailyNutritionRecommendation}); + $Res call({ + NutritionModel dailyNutritionIntake, + NutritionModel dailyNutritionRecommendation, + }); $NutritionModelCopyWith<$Res> get dailyNutritionIntake; $NutritionModelCopyWith<$Res> get dailyNutritionRecommendation; @@ -66,16 +69,21 @@ class _$NutritionDataModelCopyWithImpl<$Res, $Val extends NutritionDataModel> Object? dailyNutritionIntake = null, Object? dailyNutritionRecommendation = null, }) { - return _then(_value.copyWith( - dailyNutritionIntake: null == dailyNutritionIntake - ? _value.dailyNutritionIntake - : dailyNutritionIntake // ignore: cast_nullable_to_non_nullable - as NutritionModel, - dailyNutritionRecommendation: null == dailyNutritionRecommendation - ? _value.dailyNutritionRecommendation - : dailyNutritionRecommendation // ignore: cast_nullable_to_non_nullable - as NutritionModel, - ) as $Val); + return _then( + _value.copyWith( + dailyNutritionIntake: + null == dailyNutritionIntake + ? _value.dailyNutritionIntake + : dailyNutritionIntake // ignore: cast_nullable_to_non_nullable + as NutritionModel, + dailyNutritionRecommendation: + null == dailyNutritionRecommendation + ? _value.dailyNutritionRecommendation + : dailyNutritionRecommendation // ignore: cast_nullable_to_non_nullable + as NutritionModel, + ) + as $Val, + ); } /// Create a copy of NutritionDataModel @@ -93,10 +101,12 @@ class _$NutritionDataModelCopyWithImpl<$Res, $Val extends NutritionDataModel> @override @pragma('vm:prefer-inline') $NutritionModelCopyWith<$Res> get dailyNutritionRecommendation { - return $NutritionModelCopyWith<$Res>(_value.dailyNutritionRecommendation, - (value) { + return $NutritionModelCopyWith<$Res>(_value.dailyNutritionRecommendation, ( + value, + ) { return _then( - _value.copyWith(dailyNutritionRecommendation: value) as $Val); + _value.copyWith(dailyNutritionRecommendation: value) as $Val, + ); }); } } @@ -104,14 +114,16 @@ class _$NutritionDataModelCopyWithImpl<$Res, $Val extends NutritionDataModel> /// @nodoc abstract class _$$NutritionDataModelImplCopyWith<$Res> implements $NutritionDataModelCopyWith<$Res> { - factory _$$NutritionDataModelImplCopyWith(_$NutritionDataModelImpl value, - $Res Function(_$NutritionDataModelImpl) then) = - __$$NutritionDataModelImplCopyWithImpl<$Res>; + factory _$$NutritionDataModelImplCopyWith( + _$NutritionDataModelImpl value, + $Res Function(_$NutritionDataModelImpl) then, + ) = __$$NutritionDataModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {NutritionModel dailyNutritionIntake, - NutritionModel dailyNutritionRecommendation}); + $Res call({ + NutritionModel dailyNutritionIntake, + NutritionModel dailyNutritionRecommendation, + }); @override $NutritionModelCopyWith<$Res> get dailyNutritionIntake; @@ -123,9 +135,10 @@ abstract class _$$NutritionDataModelImplCopyWith<$Res> class __$$NutritionDataModelImplCopyWithImpl<$Res> extends _$NutritionDataModelCopyWithImpl<$Res, _$NutritionDataModelImpl> implements _$$NutritionDataModelImplCopyWith<$Res> { - __$$NutritionDataModelImplCopyWithImpl(_$NutritionDataModelImpl _value, - $Res Function(_$NutritionDataModelImpl) _then) - : super(_value, _then); + __$$NutritionDataModelImplCopyWithImpl( + _$NutritionDataModelImpl _value, + $Res Function(_$NutritionDataModelImpl) _then, + ) : super(_value, _then); /// Create a copy of NutritionDataModel /// with the given fields replaced by the non-null parameter values. @@ -135,25 +148,30 @@ class __$$NutritionDataModelImplCopyWithImpl<$Res> Object? dailyNutritionIntake = null, Object? dailyNutritionRecommendation = null, }) { - return _then(_$NutritionDataModelImpl( - dailyNutritionIntake: null == dailyNutritionIntake - ? _value.dailyNutritionIntake - : dailyNutritionIntake // ignore: cast_nullable_to_non_nullable - as NutritionModel, - dailyNutritionRecommendation: null == dailyNutritionRecommendation - ? _value.dailyNutritionRecommendation - : dailyNutritionRecommendation // ignore: cast_nullable_to_non_nullable - as NutritionModel, - )); + return _then( + _$NutritionDataModelImpl( + dailyNutritionIntake: + null == dailyNutritionIntake + ? _value.dailyNutritionIntake + : dailyNutritionIntake // ignore: cast_nullable_to_non_nullable + as NutritionModel, + dailyNutritionRecommendation: + null == dailyNutritionRecommendation + ? _value.dailyNutritionRecommendation + : dailyNutritionRecommendation // ignore: cast_nullable_to_non_nullable + as NutritionModel, + ), + ); } } /// @nodoc @JsonSerializable() class _$NutritionDataModelImpl implements _NutritionDataModel { - const _$NutritionDataModelImpl( - {required this.dailyNutritionIntake, - required this.dailyNutritionRecommendation}); + const _$NutritionDataModelImpl({ + required this.dailyNutritionIntake, + required this.dailyNutritionRecommendation, + }); factory _$NutritionDataModelImpl.fromJson(Map json) => _$$NutritionDataModelImplFromJson(json); @@ -175,8 +193,10 @@ class _$NutritionDataModelImpl implements _NutritionDataModel { other is _$NutritionDataModelImpl && (identical(other.dailyNutritionIntake, dailyNutritionIntake) || other.dailyNutritionIntake == dailyNutritionIntake) && - (identical(other.dailyNutritionRecommendation, - dailyNutritionRecommendation) || + (identical( + other.dailyNutritionRecommendation, + dailyNutritionRecommendation, + ) || other.dailyNutritionRecommendation == dailyNutritionRecommendation)); } @@ -184,7 +204,10 @@ class _$NutritionDataModelImpl implements _NutritionDataModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, dailyNutritionIntake, dailyNutritionRecommendation); + runtimeType, + dailyNutritionIntake, + dailyNutritionRecommendation, + ); /// Create a copy of NutritionDataModel /// with the given fields replaced by the non-null parameter values. @@ -193,21 +216,21 @@ class _$NutritionDataModelImpl implements _NutritionDataModel { @pragma('vm:prefer-inline') _$$NutritionDataModelImplCopyWith<_$NutritionDataModelImpl> get copyWith => __$$NutritionDataModelImplCopyWithImpl<_$NutritionDataModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$NutritionDataModelImplToJson( - this, - ); + return _$$NutritionDataModelImplToJson(this); } } abstract class _NutritionDataModel implements NutritionDataModel { - const factory _NutritionDataModel( - {required final NutritionModel dailyNutritionIntake, - required final NutritionModel dailyNutritionRecommendation}) = - _$NutritionDataModelImpl; + const factory _NutritionDataModel({ + required final NutritionModel dailyNutritionIntake, + required final NutritionModel dailyNutritionRecommendation, + }) = _$NutritionDataModelImpl; factory _NutritionDataModel.fromJson(Map json) = _$NutritionDataModelImpl.fromJson; @@ -249,11 +272,16 @@ mixin _$NutritionModel { /// @nodoc abstract class $NutritionModelCopyWith<$Res> { factory $NutritionModelCopyWith( - NutritionModel value, $Res Function(NutritionModel) then) = - _$NutritionModelCopyWithImpl<$Res, NutritionModel>; + NutritionModel value, + $Res Function(NutritionModel) then, + ) = _$NutritionModelCopyWithImpl<$Res, NutritionModel>; @useResult - $Res call( - {double energy, double proteins, double fats, double carbohydrates}); + $Res call({ + double energy, + double proteins, + double fats, + double carbohydrates, + }); } /// @nodoc @@ -276,37 +304,49 @@ class _$NutritionModelCopyWithImpl<$Res, $Val extends NutritionModel> Object? fats = null, Object? carbohydrates = null, }) { - return _then(_value.copyWith( - energy: null == energy - ? _value.energy - : energy // ignore: cast_nullable_to_non_nullable - as double, - proteins: null == proteins - ? _value.proteins - : proteins // ignore: cast_nullable_to_non_nullable - as double, - fats: null == fats - ? _value.fats - : fats // ignore: cast_nullable_to_non_nullable - as double, - carbohydrates: null == carbohydrates - ? _value.carbohydrates - : carbohydrates // ignore: cast_nullable_to_non_nullable - as double, - ) as $Val); + return _then( + _value.copyWith( + energy: + null == energy + ? _value.energy + : energy // ignore: cast_nullable_to_non_nullable + as double, + proteins: + null == proteins + ? _value.proteins + : proteins // ignore: cast_nullable_to_non_nullable + as double, + fats: + null == fats + ? _value.fats + : fats // ignore: cast_nullable_to_non_nullable + as double, + carbohydrates: + null == carbohydrates + ? _value.carbohydrates + : carbohydrates // ignore: cast_nullable_to_non_nullable + as double, + ) + as $Val, + ); } } /// @nodoc abstract class _$$NutritionModelImplCopyWith<$Res> implements $NutritionModelCopyWith<$Res> { - factory _$$NutritionModelImplCopyWith(_$NutritionModelImpl value, - $Res Function(_$NutritionModelImpl) then) = - __$$NutritionModelImplCopyWithImpl<$Res>; + factory _$$NutritionModelImplCopyWith( + _$NutritionModelImpl value, + $Res Function(_$NutritionModelImpl) then, + ) = __$$NutritionModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {double energy, double proteins, double fats, double carbohydrates}); + $Res call({ + double energy, + double proteins, + double fats, + double carbohydrates, + }); } /// @nodoc @@ -314,8 +354,9 @@ class __$$NutritionModelImplCopyWithImpl<$Res> extends _$NutritionModelCopyWithImpl<$Res, _$NutritionModelImpl> implements _$$NutritionModelImplCopyWith<$Res> { __$$NutritionModelImplCopyWithImpl( - _$NutritionModelImpl _value, $Res Function(_$NutritionModelImpl) _then) - : super(_value, _then); + _$NutritionModelImpl _value, + $Res Function(_$NutritionModelImpl) _then, + ) : super(_value, _then); /// Create a copy of NutritionModel /// with the given fields replaced by the non-null parameter values. @@ -327,35 +368,42 @@ class __$$NutritionModelImplCopyWithImpl<$Res> Object? fats = null, Object? carbohydrates = null, }) { - return _then(_$NutritionModelImpl( - energy: null == energy - ? _value.energy - : energy // ignore: cast_nullable_to_non_nullable - as double, - proteins: null == proteins - ? _value.proteins - : proteins // ignore: cast_nullable_to_non_nullable - as double, - fats: null == fats - ? _value.fats - : fats // ignore: cast_nullable_to_non_nullable - as double, - carbohydrates: null == carbohydrates - ? _value.carbohydrates - : carbohydrates // ignore: cast_nullable_to_non_nullable - as double, - )); + return _then( + _$NutritionModelImpl( + energy: + null == energy + ? _value.energy + : energy // ignore: cast_nullable_to_non_nullable + as double, + proteins: + null == proteins + ? _value.proteins + : proteins // ignore: cast_nullable_to_non_nullable + as double, + fats: + null == fats + ? _value.fats + : fats // ignore: cast_nullable_to_non_nullable + as double, + carbohydrates: + null == carbohydrates + ? _value.carbohydrates + : carbohydrates // ignore: cast_nullable_to_non_nullable + as double, + ), + ); } } /// @nodoc @JsonSerializable() class _$NutritionModelImpl implements _NutritionModel { - const _$NutritionModelImpl( - {required this.energy, - required this.proteins, - required this.fats, - required this.carbohydrates}); + const _$NutritionModelImpl({ + required this.energy, + required this.proteins, + required this.fats, + required this.carbohydrates, + }); factory _$NutritionModelImpl.fromJson(Map json) => _$$NutritionModelImplFromJson(json); @@ -399,22 +447,23 @@ class _$NutritionModelImpl implements _NutritionModel { @pragma('vm:prefer-inline') _$$NutritionModelImplCopyWith<_$NutritionModelImpl> get copyWith => __$$NutritionModelImplCopyWithImpl<_$NutritionModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$NutritionModelImplToJson( - this, - ); + return _$$NutritionModelImplToJson(this); } } abstract class _NutritionModel implements NutritionModel { - const factory _NutritionModel( - {required final double energy, - required final double proteins, - required final double fats, - required final double carbohydrates}) = _$NutritionModelImpl; + const factory _NutritionModel({ + required final double energy, + required final double proteins, + required final double fats, + required final double carbohydrates, + }) = _$NutritionModelImpl; factory _NutritionModel.fromJson(Map json) = _$NutritionModelImpl.fromJson; diff --git a/lib/features/diary/models/nutrition_model.g.dart b/lib/features/diary/models/nutrition_model.g.dart index 6ecd533c..88c1d938 100644 --- a/lib/features/diary/models/nutrition_model.g.dart +++ b/lib/features/diary/models/nutrition_model.g.dart @@ -7,20 +7,22 @@ part of 'nutrition_model.dart'; // ************************************************************************** _$NutritionDataModelImpl _$$NutritionDataModelImplFromJson( - Map json) => - _$NutritionDataModelImpl( - dailyNutritionIntake: NutritionModel.fromJson( - json['dailyNutritionIntake'] as Map), - dailyNutritionRecommendation: NutritionModel.fromJson( - json['dailyNutritionRecommendation'] as Map), - ); + Map json, +) => _$NutritionDataModelImpl( + dailyNutritionIntake: NutritionModel.fromJson( + json['dailyNutritionIntake'] as Map, + ), + dailyNutritionRecommendation: NutritionModel.fromJson( + json['dailyNutritionRecommendation'] as Map, + ), +); Map _$$NutritionDataModelImplToJson( - _$NutritionDataModelImpl instance) => - { - 'dailyNutritionIntake': instance.dailyNutritionIntake, - 'dailyNutritionRecommendation': instance.dailyNutritionRecommendation, - }; + _$NutritionDataModelImpl instance, +) => { + 'dailyNutritionIntake': instance.dailyNutritionIntake, + 'dailyNutritionRecommendation': instance.dailyNutritionRecommendation, +}; _$NutritionModelImpl _$$NutritionModelImplFromJson(Map json) => _$NutritionModelImpl( @@ -31,10 +33,10 @@ _$NutritionModelImpl _$$NutritionModelImplFromJson(Map json) => ); Map _$$NutritionModelImplToJson( - _$NutritionModelImpl instance) => - { - 'energy': instance.energy, - 'proteins': instance.proteins, - 'fats': instance.fats, - 'carbohydrates': instance.carbohydrates, - }; + _$NutritionModelImpl instance, +) => { + 'energy': instance.energy, + 'proteins': instance.proteins, + 'fats': instance.fats, + 'carbohydrates': instance.carbohydrates, +}; diff --git a/lib/features/diary/models/product_moderation_model.freezed.dart b/lib/features/diary/models/product_moderation_model.freezed.dart index ec1db929..047b1311 100644 --- a/lib/features/diary/models/product_moderation_model.freezed.dart +++ b/lib/features/diary/models/product_moderation_model.freezed.dart @@ -12,10 +12,12 @@ part of 'product_moderation_model.dart'; 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'); + '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', +); ProductModerationModel _$ProductModerationModelFromJson( - Map json) { + Map json, +) { return _ProductModerationModel.fromJson(json); } @@ -43,21 +45,25 @@ mixin _$ProductModerationModel { /// @nodoc abstract class $ProductModerationModelCopyWith<$Res> { - factory $ProductModerationModelCopyWith(ProductModerationModel value, - $Res Function(ProductModerationModel) then) = - _$ProductModerationModelCopyWithImpl<$Res, ProductModerationModel>; + factory $ProductModerationModelCopyWith( + ProductModerationModel value, + $Res Function(ProductModerationModel) then, + ) = _$ProductModerationModelCopyWithImpl<$Res, ProductModerationModel>; @useResult - $Res call( - {String name, - @JsonKey(name: 'energy_on_100gr') double energy, - @JsonKey(name: 'proteins_on_100gr') double proteins, - @JsonKey(name: 'fats_on_100gr') double fats, - @JsonKey(name: 'carbohydrates_on_100gr') double carbohydrates}); + $Res call({ + String name, + @JsonKey(name: 'energy_on_100gr') double energy, + @JsonKey(name: 'proteins_on_100gr') double proteins, + @JsonKey(name: 'fats_on_100gr') double fats, + @JsonKey(name: 'carbohydrates_on_100gr') double carbohydrates, + }); } /// @nodoc -class _$ProductModerationModelCopyWithImpl<$Res, - $Val extends ProductModerationModel> +class _$ProductModerationModelCopyWithImpl< + $Res, + $Val extends ProductModerationModel +> implements $ProductModerationModelCopyWith<$Res> { _$ProductModerationModelCopyWithImpl(this._value, this._then); @@ -77,28 +83,36 @@ class _$ProductModerationModelCopyWithImpl<$Res, Object? fats = null, Object? carbohydrates = null, }) { - return _then(_value.copyWith( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - energy: null == energy - ? _value.energy - : energy // ignore: cast_nullable_to_non_nullable - as double, - proteins: null == proteins - ? _value.proteins - : proteins // ignore: cast_nullable_to_non_nullable - as double, - fats: null == fats - ? _value.fats - : fats // ignore: cast_nullable_to_non_nullable - as double, - carbohydrates: null == carbohydrates - ? _value.carbohydrates - : carbohydrates // ignore: cast_nullable_to_non_nullable - as double, - ) as $Val); + return _then( + _value.copyWith( + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + energy: + null == energy + ? _value.energy + : energy // ignore: cast_nullable_to_non_nullable + as double, + proteins: + null == proteins + ? _value.proteins + : proteins // ignore: cast_nullable_to_non_nullable + as double, + fats: + null == fats + ? _value.fats + : fats // ignore: cast_nullable_to_non_nullable + as double, + carbohydrates: + null == carbohydrates + ? _value.carbohydrates + : carbohydrates // ignore: cast_nullable_to_non_nullable + as double, + ) + as $Val, + ); } } @@ -106,28 +120,29 @@ class _$ProductModerationModelCopyWithImpl<$Res, abstract class _$$ProductModerationModelImplCopyWith<$Res> implements $ProductModerationModelCopyWith<$Res> { factory _$$ProductModerationModelImplCopyWith( - _$ProductModerationModelImpl value, - $Res Function(_$ProductModerationModelImpl) then) = - __$$ProductModerationModelImplCopyWithImpl<$Res>; + _$ProductModerationModelImpl value, + $Res Function(_$ProductModerationModelImpl) then, + ) = __$$ProductModerationModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String name, - @JsonKey(name: 'energy_on_100gr') double energy, - @JsonKey(name: 'proteins_on_100gr') double proteins, - @JsonKey(name: 'fats_on_100gr') double fats, - @JsonKey(name: 'carbohydrates_on_100gr') double carbohydrates}); + $Res call({ + String name, + @JsonKey(name: 'energy_on_100gr') double energy, + @JsonKey(name: 'proteins_on_100gr') double proteins, + @JsonKey(name: 'fats_on_100gr') double fats, + @JsonKey(name: 'carbohydrates_on_100gr') double carbohydrates, + }); } /// @nodoc class __$$ProductModerationModelImplCopyWithImpl<$Res> - extends _$ProductModerationModelCopyWithImpl<$Res, - _$ProductModerationModelImpl> + extends + _$ProductModerationModelCopyWithImpl<$Res, _$ProductModerationModelImpl> implements _$$ProductModerationModelImplCopyWith<$Res> { __$$ProductModerationModelImplCopyWithImpl( - _$ProductModerationModelImpl _value, - $Res Function(_$ProductModerationModelImpl) _then) - : super(_value, _then); + _$ProductModerationModelImpl _value, + $Res Function(_$ProductModerationModelImpl) _then, + ) : super(_value, _then); /// Create a copy of ProductModerationModel /// with the given fields replaced by the non-null parameter values. @@ -140,40 +155,48 @@ class __$$ProductModerationModelImplCopyWithImpl<$Res> Object? fats = null, Object? carbohydrates = null, }) { - return _then(_$ProductModerationModelImpl( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - energy: null == energy - ? _value.energy - : energy // ignore: cast_nullable_to_non_nullable - as double, - proteins: null == proteins - ? _value.proteins - : proteins // ignore: cast_nullable_to_non_nullable - as double, - fats: null == fats - ? _value.fats - : fats // ignore: cast_nullable_to_non_nullable - as double, - carbohydrates: null == carbohydrates - ? _value.carbohydrates - : carbohydrates // ignore: cast_nullable_to_non_nullable - as double, - )); + return _then( + _$ProductModerationModelImpl( + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + energy: + null == energy + ? _value.energy + : energy // ignore: cast_nullable_to_non_nullable + as double, + proteins: + null == proteins + ? _value.proteins + : proteins // ignore: cast_nullable_to_non_nullable + as double, + fats: + null == fats + ? _value.fats + : fats // ignore: cast_nullable_to_non_nullable + as double, + carbohydrates: + null == carbohydrates + ? _value.carbohydrates + : carbohydrates // ignore: cast_nullable_to_non_nullable + as double, + ), + ); } } /// @nodoc @JsonSerializable() class _$ProductModerationModelImpl implements _ProductModerationModel { - const _$ProductModerationModelImpl( - {required this.name, - @JsonKey(name: 'energy_on_100gr') required this.energy, - @JsonKey(name: 'proteins_on_100gr') required this.proteins, - @JsonKey(name: 'fats_on_100gr') required this.fats, - @JsonKey(name: 'carbohydrates_on_100gr') required this.carbohydrates}); + const _$ProductModerationModelImpl({ + required this.name, + @JsonKey(name: 'energy_on_100gr') required this.energy, + @JsonKey(name: 'proteins_on_100gr') required this.proteins, + @JsonKey(name: 'fats_on_100gr') required this.fats, + @JsonKey(name: 'carbohydrates_on_100gr') required this.carbohydrates, + }); factory _$ProductModerationModelImpl.fromJson(Map json) => _$$ProductModerationModelImplFromJson(json); @@ -223,25 +246,27 @@ class _$ProductModerationModelImpl implements _ProductModerationModel { @override @pragma('vm:prefer-inline') _$$ProductModerationModelImplCopyWith<_$ProductModerationModelImpl> - get copyWith => __$$ProductModerationModelImplCopyWithImpl< - _$ProductModerationModelImpl>(this, _$identity); + get copyWith => + __$$ProductModerationModelImplCopyWithImpl<_$ProductModerationModelImpl>( + this, + _$identity, + ); @override Map toJson() { - return _$$ProductModerationModelImplToJson( - this, - ); + return _$$ProductModerationModelImplToJson(this); } } abstract class _ProductModerationModel implements ProductModerationModel { - const factory _ProductModerationModel( - {required final String name, - @JsonKey(name: 'energy_on_100gr') required final double energy, - @JsonKey(name: 'proteins_on_100gr') required final double proteins, - @JsonKey(name: 'fats_on_100gr') required final double fats, - @JsonKey(name: 'carbohydrates_on_100gr') - required final double carbohydrates}) = _$ProductModerationModelImpl; + const factory _ProductModerationModel({ + required final String name, + @JsonKey(name: 'energy_on_100gr') required final double energy, + @JsonKey(name: 'proteins_on_100gr') required final double proteins, + @JsonKey(name: 'fats_on_100gr') required final double fats, + @JsonKey(name: 'carbohydrates_on_100gr') + required final double carbohydrates, + }) = _$ProductModerationModelImpl; factory _ProductModerationModel.fromJson(Map json) = _$ProductModerationModelImpl.fromJson; @@ -266,5 +291,5 @@ abstract class _ProductModerationModel implements ProductModerationModel { @override @JsonKey(includeFromJson: false, includeToJson: false) _$$ProductModerationModelImplCopyWith<_$ProductModerationModelImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/features/diary/models/product_moderation_model.g.dart b/lib/features/diary/models/product_moderation_model.g.dart index cb27b8a5..ce1fe7d7 100644 --- a/lib/features/diary/models/product_moderation_model.g.dart +++ b/lib/features/diary/models/product_moderation_model.g.dart @@ -7,21 +7,21 @@ part of 'product_moderation_model.dart'; // ************************************************************************** _$ProductModerationModelImpl _$$ProductModerationModelImplFromJson( - Map json) => - _$ProductModerationModelImpl( - name: json['name'] as String, - energy: (json['energy_on_100gr'] as num).toDouble(), - proteins: (json['proteins_on_100gr'] as num).toDouble(), - fats: (json['fats_on_100gr'] as num).toDouble(), - carbohydrates: (json['carbohydrates_on_100gr'] as num).toDouble(), - ); + Map json, +) => _$ProductModerationModelImpl( + name: json['name'] as String, + energy: (json['energy_on_100gr'] as num).toDouble(), + proteins: (json['proteins_on_100gr'] as num).toDouble(), + fats: (json['fats_on_100gr'] as num).toDouble(), + carbohydrates: (json['carbohydrates_on_100gr'] as num).toDouble(), +); Map _$$ProductModerationModelImplToJson( - _$ProductModerationModelImpl instance) => - { - 'name': instance.name, - 'energy_on_100gr': instance.energy, - 'proteins_on_100gr': instance.proteins, - 'fats_on_100gr': instance.fats, - 'carbohydrates_on_100gr': instance.carbohydrates, - }; + _$ProductModerationModelImpl instance, +) => { + 'name': instance.name, + 'energy_on_100gr': instance.energy, + 'proteins_on_100gr': instance.proteins, + 'fats_on_100gr': instance.fats, + 'carbohydrates_on_100gr': instance.carbohydrates, +}; diff --git a/lib/features/diary/presentation/bloc/diary_state.freezed.dart b/lib/features/diary/presentation/bloc/diary_state.freezed.dart index 176be0c9..47a89b60 100644 --- a/lib/features/diary/presentation/bloc/diary_state.freezed.dart +++ b/lib/features/diary/presentation/bloc/diary_state.freezed.dart @@ -12,7 +12,8 @@ part of 'diary_state.dart'; 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'); + '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 _$DiaryState { @@ -21,48 +22,55 @@ mixin _$DiaryState { TResult Function() $default, { required TResult Function() loading, required TResult Function(String errorMessage) error, - required TResult Function(DiaryDayModel diary, NutritionDataModel nutrition, - DateTime selectedDay, int selectedMeal) - loaded, - }) => - throw _privateConstructorUsedError; + required TResult Function( + DiaryDayModel diary, + NutritionDataModel nutrition, + DateTime selectedDay, + int selectedMeal, + ) + loaded, + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, TResult? Function(String errorMessage)? error, - TResult? Function(DiaryDayModel diary, NutritionDataModel nutrition, - DateTime selectedDay, int selectedMeal)? - loaded, - }) => - throw _privateConstructorUsedError; + TResult? Function( + DiaryDayModel diary, + NutritionDataModel nutrition, + DateTime selectedDay, + int selectedMeal, + )? + loaded, + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, TResult Function(String errorMessage)? error, - TResult Function(DiaryDayModel diary, NutritionDataModel nutrition, - DateTime selectedDay, int selectedMeal)? - loaded, + TResult Function( + DiaryDayModel diary, + NutritionDataModel nutrition, + DateTime selectedDay, + int selectedMeal, + )? + loaded, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult map( TResult Function(_DiaryState value) $default, { required TResult Function(DiaryStateLoading value) loading, required TResult Function(DiaryStateError value) error, required TResult Function(DiaryStateLoaded value) loaded, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull( TResult? Function(_DiaryState value)? $default, { TResult? Function(DiaryStateLoading value)? loading, TResult? Function(DiaryStateError value)? error, TResult? Function(DiaryStateLoaded value)? loaded, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_DiaryState value)? $default, { @@ -70,15 +78,15 @@ mixin _$DiaryState { TResult Function(DiaryStateError value)? error, TResult Function(DiaryStateLoaded value)? loaded, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc abstract class $DiaryStateCopyWith<$Res> { factory $DiaryStateCopyWith( - DiaryState value, $Res Function(DiaryState) then) = - _$DiaryStateCopyWithImpl<$Res, DiaryState>; + DiaryState value, + $Res Function(DiaryState) then, + ) = _$DiaryStateCopyWithImpl<$Res, DiaryState>; } /// @nodoc @@ -98,8 +106,9 @@ class _$DiaryStateCopyWithImpl<$Res, $Val extends DiaryState> /// @nodoc abstract class _$$DiaryStateImplCopyWith<$Res> { factory _$$DiaryStateImplCopyWith( - _$DiaryStateImpl value, $Res Function(_$DiaryStateImpl) then) = - __$$DiaryStateImplCopyWithImpl<$Res>; + _$DiaryStateImpl value, + $Res Function(_$DiaryStateImpl) then, + ) = __$$DiaryStateImplCopyWithImpl<$Res>; } /// @nodoc @@ -107,8 +116,9 @@ class __$$DiaryStateImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateImpl> implements _$$DiaryStateImplCopyWith<$Res> { __$$DiaryStateImplCopyWithImpl( - _$DiaryStateImpl _value, $Res Function(_$DiaryStateImpl) _then) - : super(_value, _then); + _$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. @@ -139,9 +149,13 @@ class _$DiaryStateImpl implements _DiaryState { TResult Function() $default, { required TResult Function() loading, required TResult Function(String errorMessage) error, - required TResult Function(DiaryDayModel diary, NutritionDataModel nutrition, - DateTime selectedDay, int selectedMeal) - loaded, + required TResult Function( + DiaryDayModel diary, + NutritionDataModel nutrition, + DateTime selectedDay, + int selectedMeal, + ) + loaded, }) { return $default(); } @@ -152,9 +166,13 @@ class _$DiaryStateImpl implements _DiaryState { TResult? Function()? $default, { TResult? Function()? loading, TResult? Function(String errorMessage)? error, - TResult? Function(DiaryDayModel diary, NutritionDataModel nutrition, - DateTime selectedDay, int selectedMeal)? - loaded, + TResult? Function( + DiaryDayModel diary, + NutritionDataModel nutrition, + DateTime selectedDay, + int selectedMeal, + )? + loaded, }) { return $default?.call(); } @@ -165,9 +183,13 @@ class _$DiaryStateImpl implements _DiaryState { TResult Function()? $default, { TResult Function()? loading, TResult Function(String errorMessage)? error, - TResult Function(DiaryDayModel diary, NutritionDataModel nutrition, - DateTime selectedDay, int selectedMeal)? - loaded, + TResult Function( + DiaryDayModel diary, + NutritionDataModel nutrition, + DateTime selectedDay, + int selectedMeal, + )? + loaded, required TResult orElse(), }) { if ($default != null) { @@ -220,18 +242,20 @@ abstract class _DiaryState implements DiaryState { /// @nodoc abstract class _$$DiaryStateLoadingImplCopyWith<$Res> { - factory _$$DiaryStateLoadingImplCopyWith(_$DiaryStateLoadingImpl value, - $Res Function(_$DiaryStateLoadingImpl) then) = - __$$DiaryStateLoadingImplCopyWithImpl<$Res>; + factory _$$DiaryStateLoadingImplCopyWith( + _$DiaryStateLoadingImpl value, + $Res Function(_$DiaryStateLoadingImpl) then, + ) = __$$DiaryStateLoadingImplCopyWithImpl<$Res>; } /// @nodoc class __$$DiaryStateLoadingImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateLoadingImpl> implements _$$DiaryStateLoadingImplCopyWith<$Res> { - __$$DiaryStateLoadingImplCopyWithImpl(_$DiaryStateLoadingImpl _value, - $Res Function(_$DiaryStateLoadingImpl) _then) - : super(_value, _then); + __$$DiaryStateLoadingImplCopyWithImpl( + _$DiaryStateLoadingImpl _value, + $Res Function(_$DiaryStateLoadingImpl) _then, + ) : super(_value, _then); /// Create a copy of DiaryState /// with the given fields replaced by the non-null parameter values. @@ -262,9 +286,13 @@ class _$DiaryStateLoadingImpl implements DiaryStateLoading { TResult Function() $default, { required TResult Function() loading, required TResult Function(String errorMessage) error, - required TResult Function(DiaryDayModel diary, NutritionDataModel nutrition, - DateTime selectedDay, int selectedMeal) - loaded, + required TResult Function( + DiaryDayModel diary, + NutritionDataModel nutrition, + DateTime selectedDay, + int selectedMeal, + ) + loaded, }) { return loading(); } @@ -275,9 +303,13 @@ class _$DiaryStateLoadingImpl implements DiaryStateLoading { TResult? Function()? $default, { TResult? Function()? loading, TResult? Function(String errorMessage)? error, - TResult? Function(DiaryDayModel diary, NutritionDataModel nutrition, - DateTime selectedDay, int selectedMeal)? - loaded, + TResult? Function( + DiaryDayModel diary, + NutritionDataModel nutrition, + DateTime selectedDay, + int selectedMeal, + )? + loaded, }) { return loading?.call(); } @@ -288,9 +320,13 @@ class _$DiaryStateLoadingImpl implements DiaryStateLoading { TResult Function()? $default, { TResult Function()? loading, TResult Function(String errorMessage)? error, - TResult Function(DiaryDayModel diary, NutritionDataModel nutrition, - DateTime selectedDay, int selectedMeal)? - loaded, + TResult Function( + DiaryDayModel diary, + NutritionDataModel nutrition, + DateTime selectedDay, + int selectedMeal, + )? + loaded, required TResult orElse(), }) { if (loading != null) { @@ -343,9 +379,10 @@ abstract class DiaryStateLoading implements DiaryState { /// @nodoc abstract class _$$DiaryStateErrorImplCopyWith<$Res> { - factory _$$DiaryStateErrorImplCopyWith(_$DiaryStateErrorImpl value, - $Res Function(_$DiaryStateErrorImpl) then) = - __$$DiaryStateErrorImplCopyWithImpl<$Res>; + factory _$$DiaryStateErrorImplCopyWith( + _$DiaryStateErrorImpl value, + $Res Function(_$DiaryStateErrorImpl) then, + ) = __$$DiaryStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String errorMessage}); } @@ -355,22 +392,24 @@ class __$$DiaryStateErrorImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateErrorImpl> implements _$$DiaryStateErrorImplCopyWith<$Res> { __$$DiaryStateErrorImplCopyWithImpl( - _$DiaryStateErrorImpl _value, $Res Function(_$DiaryStateErrorImpl) _then) - : super(_value, _then); + _$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({ - Object? errorMessage = null, - }) { - return _then(_$DiaryStateErrorImpl( - errorMessage: null == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? errorMessage = null}) { + return _then( + _$DiaryStateErrorImpl( + errorMessage: + null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -406,7 +445,9 @@ class _$DiaryStateErrorImpl implements DiaryStateError { @pragma('vm:prefer-inline') _$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith => __$$DiaryStateErrorImplCopyWithImpl<_$DiaryStateErrorImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs @@ -414,9 +455,13 @@ class _$DiaryStateErrorImpl implements DiaryStateError { TResult Function() $default, { required TResult Function() loading, required TResult Function(String errorMessage) error, - required TResult Function(DiaryDayModel diary, NutritionDataModel nutrition, - DateTime selectedDay, int selectedMeal) - loaded, + required TResult Function( + DiaryDayModel diary, + NutritionDataModel nutrition, + DateTime selectedDay, + int selectedMeal, + ) + loaded, }) { return error(errorMessage); } @@ -427,9 +472,13 @@ class _$DiaryStateErrorImpl implements DiaryStateError { TResult? Function()? $default, { TResult? Function()? loading, TResult? Function(String errorMessage)? error, - TResult? Function(DiaryDayModel diary, NutritionDataModel nutrition, - DateTime selectedDay, int selectedMeal)? - loaded, + TResult? Function( + DiaryDayModel diary, + NutritionDataModel nutrition, + DateTime selectedDay, + int selectedMeal, + )? + loaded, }) { return error?.call(errorMessage); } @@ -440,9 +489,13 @@ class _$DiaryStateErrorImpl implements DiaryStateError { TResult Function()? $default, { TResult Function()? loading, TResult Function(String errorMessage)? error, - TResult Function(DiaryDayModel diary, NutritionDataModel nutrition, - DateTime selectedDay, int selectedMeal)? - loaded, + TResult Function( + DiaryDayModel diary, + NutritionDataModel nutrition, + DateTime selectedDay, + int selectedMeal, + )? + loaded, required TResult orElse(), }) { if (error != null) { @@ -504,15 +557,17 @@ abstract class DiaryStateError implements DiaryState { /// @nodoc abstract class _$$DiaryStateLoadedImplCopyWith<$Res> { - factory _$$DiaryStateLoadedImplCopyWith(_$DiaryStateLoadedImpl value, - $Res Function(_$DiaryStateLoadedImpl) then) = - __$$DiaryStateLoadedImplCopyWithImpl<$Res>; + factory _$$DiaryStateLoadedImplCopyWith( + _$DiaryStateLoadedImpl value, + $Res Function(_$DiaryStateLoadedImpl) then, + ) = __$$DiaryStateLoadedImplCopyWithImpl<$Res>; @useResult - $Res call( - {DiaryDayModel diary, - NutritionDataModel nutrition, - DateTime selectedDay, - int selectedMeal}); + $Res call({ + DiaryDayModel diary, + NutritionDataModel nutrition, + DateTime selectedDay, + int selectedMeal, + }); $DiaryDayModelCopyWith<$Res> get diary; $NutritionDataModelCopyWith<$Res> get nutrition; @@ -522,9 +577,10 @@ abstract class _$$DiaryStateLoadedImplCopyWith<$Res> { class __$$DiaryStateLoadedImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateLoadedImpl> implements _$$DiaryStateLoadedImplCopyWith<$Res> { - __$$DiaryStateLoadedImplCopyWithImpl(_$DiaryStateLoadedImpl _value, - $Res Function(_$DiaryStateLoadedImpl) _then) - : super(_value, _then); + __$$DiaryStateLoadedImplCopyWithImpl( + _$DiaryStateLoadedImpl _value, + $Res Function(_$DiaryStateLoadedImpl) _then, + ) : super(_value, _then); /// Create a copy of DiaryState /// with the given fields replaced by the non-null parameter values. @@ -536,24 +592,30 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res> Object? selectedDay = null, Object? selectedMeal = null, }) { - return _then(_$DiaryStateLoadedImpl( - diary: null == diary - ? _value.diary - : diary // ignore: cast_nullable_to_non_nullable - as DiaryDayModel, - nutrition: null == nutrition - ? _value.nutrition - : nutrition // ignore: cast_nullable_to_non_nullable - as NutritionDataModel, - selectedDay: null == selectedDay - ? _value.selectedDay - : selectedDay // ignore: cast_nullable_to_non_nullable - as DateTime, - selectedMeal: null == selectedMeal - ? _value.selectedMeal - : selectedMeal // ignore: cast_nullable_to_non_nullable - as int, - )); + return _then( + _$DiaryStateLoadedImpl( + diary: + null == diary + ? _value.diary + : diary // ignore: cast_nullable_to_non_nullable + as DiaryDayModel, + nutrition: + null == nutrition + ? _value.nutrition + : nutrition // ignore: cast_nullable_to_non_nullable + as NutritionDataModel, + selectedDay: + null == selectedDay + ? _value.selectedDay + : selectedDay // ignore: cast_nullable_to_non_nullable + as DateTime, + selectedMeal: + null == selectedMeal + ? _value.selectedMeal + : selectedMeal // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } /// Create a copy of DiaryState @@ -580,11 +642,12 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res> /// @nodoc class _$DiaryStateLoadedImpl implements DiaryStateLoaded { - const _$DiaryStateLoadedImpl( - {required this.diary, - required this.nutrition, - required this.selectedDay, - required this.selectedMeal}); + const _$DiaryStateLoadedImpl({ + required this.diary, + required this.nutrition, + required this.selectedDay, + required this.selectedMeal, + }); @override final DiaryDayModel diary; @@ -625,7 +688,9 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded { @pragma('vm:prefer-inline') _$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith => __$$DiaryStateLoadedImplCopyWithImpl<_$DiaryStateLoadedImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs @@ -633,9 +698,13 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded { TResult Function() $default, { required TResult Function() loading, required TResult Function(String errorMessage) error, - required TResult Function(DiaryDayModel diary, NutritionDataModel nutrition, - DateTime selectedDay, int selectedMeal) - loaded, + required TResult Function( + DiaryDayModel diary, + NutritionDataModel nutrition, + DateTime selectedDay, + int selectedMeal, + ) + loaded, }) { return loaded(diary, nutrition, selectedDay, selectedMeal); } @@ -646,9 +715,13 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded { TResult? Function()? $default, { TResult? Function()? loading, TResult? Function(String errorMessage)? error, - TResult? Function(DiaryDayModel diary, NutritionDataModel nutrition, - DateTime selectedDay, int selectedMeal)? - loaded, + TResult? Function( + DiaryDayModel diary, + NutritionDataModel nutrition, + DateTime selectedDay, + int selectedMeal, + )? + loaded, }) { return loaded?.call(diary, nutrition, selectedDay, selectedMeal); } @@ -659,9 +732,13 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded { TResult Function()? $default, { TResult Function()? loading, TResult Function(String errorMessage)? error, - TResult Function(DiaryDayModel diary, NutritionDataModel nutrition, - DateTime selectedDay, int selectedMeal)? - loaded, + TResult Function( + DiaryDayModel diary, + NutritionDataModel nutrition, + DateTime selectedDay, + int selectedMeal, + )? + loaded, required TResult orElse(), }) { if (loaded != null) { @@ -709,11 +786,12 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded { } abstract class DiaryStateLoaded implements DiaryState { - const factory DiaryStateLoaded( - {required final DiaryDayModel diary, - required final NutritionDataModel nutrition, - required final DateTime selectedDay, - required final int selectedMeal}) = _$DiaryStateLoadedImpl; + const factory DiaryStateLoaded({ + required final DiaryDayModel diary, + required final NutritionDataModel nutrition, + required final DateTime selectedDay, + required final int selectedMeal, + }) = _$DiaryStateLoadedImpl; DiaryDayModel get diary; NutritionDataModel get nutrition; diff --git a/lib/features/diary/services/diary_service.g.dart b/lib/features/diary/services/diary_service.g.dart index c7b3820f..c369088f 100644 --- a/lib/features/diary/services/diary_service.g.dart +++ b/lib/features/diary/services/diary_service.g.dart @@ -38,11 +38,13 @@ class _DiaryService implements DiaryService { final _result = await _dio.fetch>(_options); late List _value; try { - _value = _result.data! - .map( - (dynamic i) => DiaryDayModel.fromJson(i as Map), - ) - .toList(); + _value = + _result.data! + .map( + (dynamic i) => + DiaryDayModel.fromJson(i as Map), + ) + .toList(); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; @@ -125,11 +127,11 @@ class _DiaryService implements DiaryService { ); final _options = _setStreamType( Options( - method: 'POST', - headers: _headers, - extra: _extra, - contentType: 'multipart/form-data', - ) + method: 'POST', + headers: _headers, + extra: _extra, + contentType: 'multipart/form-data', + ) .compose( _dio.options, '/api/diary/${diary}/meals/${typeNo}/photo/upload', diff --git a/lib/features/diets/models/diet_likes_model.freezed.dart b/lib/features/diets/models/diet_likes_model.freezed.dart index 7c1b630d..c851169c 100644 --- a/lib/features/diets/models/diet_likes_model.freezed.dart +++ b/lib/features/diets/models/diet_likes_model.freezed.dart @@ -12,7 +12,8 @@ part of 'diet_likes_model.dart'; 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'); + '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', +); DietLikesModel _$DietLikesModelFromJson(Map json) { return _DietLikesModel.fromJson(json); @@ -38,12 +39,14 @@ mixin _$DietLikesModel { /// @nodoc abstract class $DietLikesModelCopyWith<$Res> { factory $DietLikesModelCopyWith( - DietLikesModel value, $Res Function(DietLikesModel) then) = - _$DietLikesModelCopyWithImpl<$Res, DietLikesModel>; + DietLikesModel value, + $Res Function(DietLikesModel) then, + ) = _$DietLikesModelCopyWithImpl<$Res, DietLikesModel>; @useResult - $Res call( - {@JsonKey(name: 'total_likers') int totalLikes, - @JsonKey(name: 'is_liked') bool isLiked}); + $Res call({ + @JsonKey(name: 'total_likers') int totalLikes, + @JsonKey(name: 'is_liked') bool isLiked, + }); } /// @nodoc @@ -60,34 +63,38 @@ class _$DietLikesModelCopyWithImpl<$Res, $Val extends DietLikesModel> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? totalLikes = null, - Object? isLiked = null, - }) { - return _then(_value.copyWith( - totalLikes: null == totalLikes - ? _value.totalLikes - : totalLikes // ignore: cast_nullable_to_non_nullable - as int, - isLiked: null == isLiked - ? _value.isLiked - : isLiked // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + $Res call({Object? totalLikes = null, Object? isLiked = null}) { + return _then( + _value.copyWith( + totalLikes: + null == totalLikes + ? _value.totalLikes + : totalLikes // ignore: cast_nullable_to_non_nullable + as int, + isLiked: + null == isLiked + ? _value.isLiked + : isLiked // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } } /// @nodoc abstract class _$$DietLikesModelImplCopyWith<$Res> implements $DietLikesModelCopyWith<$Res> { - factory _$$DietLikesModelImplCopyWith(_$DietLikesModelImpl value, - $Res Function(_$DietLikesModelImpl) then) = - __$$DietLikesModelImplCopyWithImpl<$Res>; + factory _$$DietLikesModelImplCopyWith( + _$DietLikesModelImpl value, + $Res Function(_$DietLikesModelImpl) then, + ) = __$$DietLikesModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: 'total_likers') int totalLikes, - @JsonKey(name: 'is_liked') bool isLiked}); + $Res call({ + @JsonKey(name: 'total_likers') int totalLikes, + @JsonKey(name: 'is_liked') bool isLiked, + }); } /// @nodoc @@ -95,36 +102,39 @@ class __$$DietLikesModelImplCopyWithImpl<$Res> extends _$DietLikesModelCopyWithImpl<$Res, _$DietLikesModelImpl> implements _$$DietLikesModelImplCopyWith<$Res> { __$$DietLikesModelImplCopyWithImpl( - _$DietLikesModelImpl _value, $Res Function(_$DietLikesModelImpl) _then) - : super(_value, _then); + _$DietLikesModelImpl _value, + $Res Function(_$DietLikesModelImpl) _then, + ) : super(_value, _then); /// Create a copy of DietLikesModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? totalLikes = null, - Object? isLiked = null, - }) { - return _then(_$DietLikesModelImpl( - totalLikes: null == totalLikes - ? _value.totalLikes - : totalLikes // ignore: cast_nullable_to_non_nullable - as int, - isLiked: null == isLiked - ? _value.isLiked - : isLiked // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? totalLikes = null, Object? isLiked = null}) { + return _then( + _$DietLikesModelImpl( + totalLikes: + null == totalLikes + ? _value.totalLikes + : totalLikes // ignore: cast_nullable_to_non_nullable + as int, + isLiked: + null == isLiked + ? _value.isLiked + : isLiked // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } /// @nodoc @JsonSerializable() class _$DietLikesModelImpl implements _DietLikesModel { - const _$DietLikesModelImpl( - {@JsonKey(name: 'total_likers') required this.totalLikes, - @JsonKey(name: 'is_liked') required this.isLiked}); + const _$DietLikesModelImpl({ + @JsonKey(name: 'total_likers') required this.totalLikes, + @JsonKey(name: 'is_liked') required this.isLiked, + }); factory _$DietLikesModelImpl.fromJson(Map json) => _$$DietLikesModelImplFromJson(json); @@ -162,21 +172,21 @@ class _$DietLikesModelImpl implements _DietLikesModel { @pragma('vm:prefer-inline') _$$DietLikesModelImplCopyWith<_$DietLikesModelImpl> get copyWith => __$$DietLikesModelImplCopyWithImpl<_$DietLikesModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$DietLikesModelImplToJson( - this, - ); + return _$$DietLikesModelImplToJson(this); } } abstract class _DietLikesModel implements DietLikesModel { - const factory _DietLikesModel( - {@JsonKey(name: 'total_likers') required final int totalLikes, - @JsonKey(name: 'is_liked') required final bool isLiked}) = - _$DietLikesModelImpl; + const factory _DietLikesModel({ + @JsonKey(name: 'total_likers') required final int totalLikes, + @JsonKey(name: 'is_liked') required final bool isLiked, + }) = _$DietLikesModelImpl; factory _DietLikesModel.fromJson(Map json) = _$DietLikesModelImpl.fromJson; diff --git a/lib/features/diets/models/diet_likes_model.g.dart b/lib/features/diets/models/diet_likes_model.g.dart index 36ddacba..5b0ab3c5 100644 --- a/lib/features/diets/models/diet_likes_model.g.dart +++ b/lib/features/diets/models/diet_likes_model.g.dart @@ -13,8 +13,8 @@ _$DietLikesModelImpl _$$DietLikesModelImplFromJson(Map json) => ); Map _$$DietLikesModelImplToJson( - _$DietLikesModelImpl instance) => - { - 'total_likers': instance.totalLikes, - 'is_liked': instance.isLiked, - }; + _$DietLikesModelImpl instance, +) => { + 'total_likers': instance.totalLikes, + 'is_liked': instance.isLiked, +}; diff --git a/lib/features/diets/presentation/cubit/about_diet_state.freezed.dart b/lib/features/diets/presentation/cubit/about_diet_state.freezed.dart index 493edb32..7cb9b86e 100644 --- a/lib/features/diets/presentation/cubit/about_diet_state.freezed.dart +++ b/lib/features/diets/presentation/cubit/about_diet_state.freezed.dart @@ -12,7 +12,8 @@ part of 'about_diet_state.dart'; 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'); + '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 _$AboutDietState { @@ -22,10 +23,9 @@ mixin _$AboutDietState { required TResult Function() initial, required TResult Function() loading, required TResult Function(Diet diet, bool isStarted, bool hasStartedDiet) - loaded, + loaded, required TResult Function(String message) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { @@ -33,8 +33,7 @@ mixin _$AboutDietState { TResult? Function()? loading, TResult? Function(Diet diet, bool isStarted, bool hasStartedDiet)? loaded, TResult? Function(String message)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { @@ -43,8 +42,7 @@ mixin _$AboutDietState { TResult Function(Diet diet, bool isStarted, bool hasStartedDiet)? loaded, TResult Function(String message)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult map( TResult Function(_AboutDietState value) $default, { @@ -52,8 +50,7 @@ mixin _$AboutDietState { required TResult Function(DietStateLoading value) loading, required TResult Function(DietStateLoaded value) loaded, required TResult Function(DietStateError value) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull( TResult? Function(_AboutDietState value)? $default, { @@ -61,8 +58,7 @@ mixin _$AboutDietState { TResult? Function(DietStateLoading value)? loading, TResult? Function(DietStateLoaded value)? loaded, TResult? Function(DietStateError value)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_AboutDietState value)? $default, { @@ -71,15 +67,15 @@ mixin _$AboutDietState { TResult Function(DietStateLoaded value)? loaded, TResult Function(DietStateError value)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc abstract class $AboutDietStateCopyWith<$Res> { factory $AboutDietStateCopyWith( - AboutDietState value, $Res Function(AboutDietState) then) = - _$AboutDietStateCopyWithImpl<$Res, AboutDietState>; + AboutDietState value, + $Res Function(AboutDietState) then, + ) = _$AboutDietStateCopyWithImpl<$Res, AboutDietState>; } /// @nodoc @@ -98,9 +94,10 @@ class _$AboutDietStateCopyWithImpl<$Res, $Val extends AboutDietState> /// @nodoc abstract class _$$AboutDietStateImplCopyWith<$Res> { - factory _$$AboutDietStateImplCopyWith(_$AboutDietStateImpl value, - $Res Function(_$AboutDietStateImpl) then) = - __$$AboutDietStateImplCopyWithImpl<$Res>; + factory _$$AboutDietStateImplCopyWith( + _$AboutDietStateImpl value, + $Res Function(_$AboutDietStateImpl) then, + ) = __$$AboutDietStateImplCopyWithImpl<$Res>; } /// @nodoc @@ -108,8 +105,9 @@ class __$$AboutDietStateImplCopyWithImpl<$Res> extends _$AboutDietStateCopyWithImpl<$Res, _$AboutDietStateImpl> implements _$$AboutDietStateImplCopyWith<$Res> { __$$AboutDietStateImplCopyWithImpl( - _$AboutDietStateImpl _value, $Res Function(_$AboutDietStateImpl) _then) - : super(_value, _then); + _$AboutDietStateImpl _value, + $Res Function(_$AboutDietStateImpl) _then, + ) : super(_value, _then); /// Create a copy of AboutDietState /// with the given fields replaced by the non-null parameter values. @@ -141,7 +139,7 @@ class _$AboutDietStateImpl implements _AboutDietState { required TResult Function() initial, required TResult Function() loading, required TResult Function(Diet diet, bool isStarted, bool hasStartedDiet) - loaded, + loaded, required TResult Function(String message) error, }) { return $default(); @@ -222,18 +220,20 @@ abstract class _AboutDietState implements AboutDietState { /// @nodoc abstract class _$$DietStateInitialImplCopyWith<$Res> { - factory _$$DietStateInitialImplCopyWith(_$DietStateInitialImpl value, - $Res Function(_$DietStateInitialImpl) then) = - __$$DietStateInitialImplCopyWithImpl<$Res>; + factory _$$DietStateInitialImplCopyWith( + _$DietStateInitialImpl value, + $Res Function(_$DietStateInitialImpl) then, + ) = __$$DietStateInitialImplCopyWithImpl<$Res>; } /// @nodoc class __$$DietStateInitialImplCopyWithImpl<$Res> extends _$AboutDietStateCopyWithImpl<$Res, _$DietStateInitialImpl> implements _$$DietStateInitialImplCopyWith<$Res> { - __$$DietStateInitialImplCopyWithImpl(_$DietStateInitialImpl _value, - $Res Function(_$DietStateInitialImpl) _then) - : super(_value, _then); + __$$DietStateInitialImplCopyWithImpl( + _$DietStateInitialImpl _value, + $Res Function(_$DietStateInitialImpl) _then, + ) : super(_value, _then); /// Create a copy of AboutDietState /// with the given fields replaced by the non-null parameter values. @@ -265,7 +265,7 @@ class _$DietStateInitialImpl implements DietStateInitial { required TResult Function() initial, required TResult Function() loading, required TResult Function(Diet diet, bool isStarted, bool hasStartedDiet) - loaded, + loaded, required TResult Function(String message) error, }) { return initial(); @@ -346,18 +346,20 @@ abstract class DietStateInitial implements AboutDietState { /// @nodoc abstract class _$$DietStateLoadingImplCopyWith<$Res> { - factory _$$DietStateLoadingImplCopyWith(_$DietStateLoadingImpl value, - $Res Function(_$DietStateLoadingImpl) then) = - __$$DietStateLoadingImplCopyWithImpl<$Res>; + factory _$$DietStateLoadingImplCopyWith( + _$DietStateLoadingImpl value, + $Res Function(_$DietStateLoadingImpl) then, + ) = __$$DietStateLoadingImplCopyWithImpl<$Res>; } /// @nodoc class __$$DietStateLoadingImplCopyWithImpl<$Res> extends _$AboutDietStateCopyWithImpl<$Res, _$DietStateLoadingImpl> implements _$$DietStateLoadingImplCopyWith<$Res> { - __$$DietStateLoadingImplCopyWithImpl(_$DietStateLoadingImpl _value, - $Res Function(_$DietStateLoadingImpl) _then) - : super(_value, _then); + __$$DietStateLoadingImplCopyWithImpl( + _$DietStateLoadingImpl _value, + $Res Function(_$DietStateLoadingImpl) _then, + ) : super(_value, _then); /// Create a copy of AboutDietState /// with the given fields replaced by the non-null parameter values. @@ -389,7 +391,7 @@ class _$DietStateLoadingImpl implements DietStateLoading { required TResult Function() initial, required TResult Function() loading, required TResult Function(Diet diet, bool isStarted, bool hasStartedDiet) - loaded, + loaded, required TResult Function(String message) error, }) { return loading(); @@ -470,9 +472,10 @@ abstract class DietStateLoading implements AboutDietState { /// @nodoc abstract class _$$DietStateLoadedImplCopyWith<$Res> { - factory _$$DietStateLoadedImplCopyWith(_$DietStateLoadedImpl value, - $Res Function(_$DietStateLoadedImpl) then) = - __$$DietStateLoadedImplCopyWithImpl<$Res>; + factory _$$DietStateLoadedImplCopyWith( + _$DietStateLoadedImpl value, + $Res Function(_$DietStateLoadedImpl) then, + ) = __$$DietStateLoadedImplCopyWithImpl<$Res>; @useResult $Res call({Diet diet, bool isStarted, bool hasStartedDiet}); @@ -484,8 +487,9 @@ class __$$DietStateLoadedImplCopyWithImpl<$Res> extends _$AboutDietStateCopyWithImpl<$Res, _$DietStateLoadedImpl> implements _$$DietStateLoadedImplCopyWith<$Res> { __$$DietStateLoadedImplCopyWithImpl( - _$DietStateLoadedImpl _value, $Res Function(_$DietStateLoadedImpl) _then) - : super(_value, _then); + _$DietStateLoadedImpl _value, + $Res Function(_$DietStateLoadedImpl) _then, + ) : super(_value, _then); /// Create a copy of AboutDietState /// with the given fields replaced by the non-null parameter values. @@ -496,20 +500,25 @@ class __$$DietStateLoadedImplCopyWithImpl<$Res> Object? isStarted = null, Object? hasStartedDiet = null, }) { - return _then(_$DietStateLoadedImpl( - diet: null == diet - ? _value.diet - : diet // ignore: cast_nullable_to_non_nullable - as Diet, - isStarted: null == isStarted - ? _value.isStarted - : isStarted // ignore: cast_nullable_to_non_nullable - as bool, - hasStartedDiet: null == hasStartedDiet - ? _value.hasStartedDiet - : hasStartedDiet // ignore: cast_nullable_to_non_nullable - as bool, - )); + return _then( + _$DietStateLoadedImpl( + diet: + null == diet + ? _value.diet + : diet // ignore: cast_nullable_to_non_nullable + as Diet, + isStarted: + null == isStarted + ? _value.isStarted + : isStarted // ignore: cast_nullable_to_non_nullable + as bool, + hasStartedDiet: + null == hasStartedDiet + ? _value.hasStartedDiet + : hasStartedDiet // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } /// Create a copy of AboutDietState @@ -526,10 +535,11 @@ class __$$DietStateLoadedImplCopyWithImpl<$Res> /// @nodoc class _$DietStateLoadedImpl implements DietStateLoaded { - const _$DietStateLoadedImpl( - {required this.diet, - this.isStarted = false, - this.hasStartedDiet = false}); + const _$DietStateLoadedImpl({ + required this.diet, + this.isStarted = false, + this.hasStartedDiet = false, + }); @override final Diet diet; @@ -567,7 +577,9 @@ class _$DietStateLoadedImpl implements DietStateLoaded { @pragma('vm:prefer-inline') _$$DietStateLoadedImplCopyWith<_$DietStateLoadedImpl> get copyWith => __$$DietStateLoadedImplCopyWithImpl<_$DietStateLoadedImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs @@ -576,7 +588,7 @@ class _$DietStateLoadedImpl implements DietStateLoaded { required TResult Function() initial, required TResult Function() loading, required TResult Function(Diet diet, bool isStarted, bool hasStartedDiet) - loaded, + loaded, required TResult Function(String message) error, }) { return loaded(diet, isStarted, hasStartedDiet); @@ -652,10 +664,11 @@ class _$DietStateLoadedImpl implements DietStateLoaded { } abstract class DietStateLoaded implements AboutDietState { - const factory DietStateLoaded( - {required final Diet diet, - final bool isStarted, - final bool hasStartedDiet}) = _$DietStateLoadedImpl; + const factory DietStateLoaded({ + required final Diet diet, + final bool isStarted, + final bool hasStartedDiet, + }) = _$DietStateLoadedImpl; Diet get diet; bool get isStarted; @@ -670,9 +683,10 @@ abstract class DietStateLoaded implements AboutDietState { /// @nodoc abstract class _$$DietStateErrorImplCopyWith<$Res> { - factory _$$DietStateErrorImplCopyWith(_$DietStateErrorImpl value, - $Res Function(_$DietStateErrorImpl) then) = - __$$DietStateErrorImplCopyWithImpl<$Res>; + factory _$$DietStateErrorImplCopyWith( + _$DietStateErrorImpl value, + $Res Function(_$DietStateErrorImpl) then, + ) = __$$DietStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String message}); } @@ -682,22 +696,24 @@ class __$$DietStateErrorImplCopyWithImpl<$Res> extends _$AboutDietStateCopyWithImpl<$Res, _$DietStateErrorImpl> implements _$$DietStateErrorImplCopyWith<$Res> { __$$DietStateErrorImplCopyWithImpl( - _$DietStateErrorImpl _value, $Res Function(_$DietStateErrorImpl) _then) - : super(_value, _then); + _$DietStateErrorImpl _value, + $Res Function(_$DietStateErrorImpl) _then, + ) : super(_value, _then); /// Create a copy of AboutDietState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? message = null, - }) { - return _then(_$DietStateErrorImpl( - message: null == message - ? _value.message - : message // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? message = null}) { + return _then( + _$DietStateErrorImpl( + message: + null == message + ? _value.message + : message // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -732,7 +748,9 @@ class _$DietStateErrorImpl implements DietStateError { @pragma('vm:prefer-inline') _$$DietStateErrorImplCopyWith<_$DietStateErrorImpl> get copyWith => __$$DietStateErrorImplCopyWithImpl<_$DietStateErrorImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs @@ -741,7 +759,7 @@ class _$DietStateErrorImpl implements DietStateError { required TResult Function() initial, required TResult Function() loading, required TResult Function(Diet diet, bool isStarted, bool hasStartedDiet) - loaded, + loaded, required TResult Function(String message) error, }) { return error(message); diff --git a/lib/features/feed/models/comment_model.freezed.dart b/lib/features/feed/models/comment_model.freezed.dart index 4e520131..52044429 100644 --- a/lib/features/feed/models/comment_model.freezed.dart +++ b/lib/features/feed/models/comment_model.freezed.dart @@ -12,7 +12,8 @@ part of 'comment_model.dart'; 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'); + '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', +); CommentModel _$CommentModelFromJson(Map json) { return _CommentModel.fromJson(json); @@ -40,13 +41,15 @@ mixin _$CommentModel { /// @nodoc abstract class $CommentModelCopyWith<$Res> { factory $CommentModelCopyWith( - CommentModel value, $Res Function(CommentModel) then) = - _$CommentModelCopyWithImpl<$Res, CommentModel>; + CommentModel value, + $Res Function(CommentModel) then, + ) = _$CommentModelCopyWithImpl<$Res, CommentModel>; @useResult - $Res call( - {@JsonKey(name: "data") List data, - @JsonKey(name: "links") Links links, - @JsonKey(name: "meta") Meta meta}); + $Res call({ + @JsonKey(name: "data") List data, + @JsonKey(name: "links") Links links, + @JsonKey(name: "meta") Meta meta, + }); $LinksCopyWith<$Res> get links; $MetaCopyWith<$Res> get meta; @@ -66,25 +69,27 @@ class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? data = null, - Object? links = null, - Object? meta = null, - }) { - return _then(_value.copyWith( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as List, - links: null == links - ? _value.links - : links // ignore: cast_nullable_to_non_nullable - as Links, - meta: null == meta - ? _value.meta - : meta // ignore: cast_nullable_to_non_nullable - as Meta, - ) as $Val); + $Res call({Object? data = null, Object? links = null, Object? meta = null}) { + return _then( + _value.copyWith( + data: + null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as List, + links: + null == links + ? _value.links + : links // ignore: cast_nullable_to_non_nullable + as Links, + meta: + null == meta + ? _value.meta + : meta // ignore: cast_nullable_to_non_nullable + as Meta, + ) + as $Val, + ); } /// Create a copy of CommentModel @@ -112,14 +117,16 @@ class _$CommentModelCopyWithImpl<$Res, $Val extends CommentModel> abstract class _$$CommentModelImplCopyWith<$Res> implements $CommentModelCopyWith<$Res> { factory _$$CommentModelImplCopyWith( - _$CommentModelImpl value, $Res Function(_$CommentModelImpl) then) = - __$$CommentModelImplCopyWithImpl<$Res>; + _$CommentModelImpl value, + $Res Function(_$CommentModelImpl) then, + ) = __$$CommentModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "data") List data, - @JsonKey(name: "links") Links links, - @JsonKey(name: "meta") Meta meta}); + $Res call({ + @JsonKey(name: "data") List data, + @JsonKey(name: "links") Links links, + @JsonKey(name: "meta") Meta meta, + }); @override $LinksCopyWith<$Res> get links; @@ -132,43 +139,45 @@ class __$$CommentModelImplCopyWithImpl<$Res> extends _$CommentModelCopyWithImpl<$Res, _$CommentModelImpl> implements _$$CommentModelImplCopyWith<$Res> { __$$CommentModelImplCopyWithImpl( - _$CommentModelImpl _value, $Res Function(_$CommentModelImpl) _then) - : super(_value, _then); + _$CommentModelImpl _value, + $Res Function(_$CommentModelImpl) _then, + ) : super(_value, _then); /// Create a copy of CommentModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? data = null, - Object? links = null, - Object? meta = null, - }) { - return _then(_$CommentModelImpl( - data: null == data - ? _value._data - : data // ignore: cast_nullable_to_non_nullable - as List, - links: null == links - ? _value.links - : links // ignore: cast_nullable_to_non_nullable - as Links, - meta: null == meta - ? _value.meta - : meta // ignore: cast_nullable_to_non_nullable - as Meta, - )); + $Res call({Object? data = null, Object? links = null, Object? meta = null}) { + return _then( + _$CommentModelImpl( + data: + null == data + ? _value._data + : data // ignore: cast_nullable_to_non_nullable + as List, + links: + null == links + ? _value.links + : links // ignore: cast_nullable_to_non_nullable + as Links, + meta: + null == meta + ? _value.meta + : meta // ignore: cast_nullable_to_non_nullable + as Meta, + ), + ); } } /// @nodoc @JsonSerializable() class _$CommentModelImpl implements _CommentModel { - const _$CommentModelImpl( - {@JsonKey(name: "data") required final List data, - @JsonKey(name: "links") required this.links, - @JsonKey(name: "meta") required this.meta}) - : _data = data; + const _$CommentModelImpl({ + @JsonKey(name: "data") required final List data, + @JsonKey(name: "links") required this.links, + @JsonKey(name: "meta") required this.meta, + }) : _data = data; factory _$CommentModelImpl.fromJson(Map json) => _$$CommentModelImplFromJson(json); @@ -207,7 +216,11 @@ class _$CommentModelImpl implements _CommentModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_data), links, meta); + runtimeType, + const DeepCollectionEquality().hash(_data), + links, + meta, + ); /// Create a copy of CommentModel /// with the given fields replaced by the non-null parameter values. @@ -219,17 +232,16 @@ class _$CommentModelImpl implements _CommentModel { @override Map toJson() { - return _$$CommentModelImplToJson( - this, - ); + return _$$CommentModelImplToJson(this); } } abstract class _CommentModel implements CommentModel { - const factory _CommentModel( - {@JsonKey(name: "data") required final List data, - @JsonKey(name: "links") required final Links links, - @JsonKey(name: "meta") required final Meta meta}) = _$CommentModelImpl; + const factory _CommentModel({ + @JsonKey(name: "data") required final List data, + @JsonKey(name: "links") required final Links links, + @JsonKey(name: "meta") required final Meta meta, + }) = _$CommentModelImpl; factory _CommentModel.fromJson(Map json) = _$CommentModelImpl.fromJson; @@ -285,13 +297,14 @@ abstract class $CommentCopyWith<$Res> { factory $CommentCopyWith(Comment value, $Res Function(Comment) then) = _$CommentCopyWithImpl<$Res, Comment>; @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "author_name") String authorName, - @JsonKey(name: "author_profile_icon") String authorProfileIcon, - @JsonKey(name: "body") String body, - @JsonKey(name: "children_comments") List childrenComments, - @JsonKey(name: "created_at") DateTime createdAt}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "author_name") String authorName, + @JsonKey(name: "author_profile_icon") String authorProfileIcon, + @JsonKey(name: "body") String body, + @JsonKey(name: "children_comments") List childrenComments, + @JsonKey(name: "created_at") DateTime createdAt, + }); } /// @nodoc @@ -316,49 +329,60 @@ class _$CommentCopyWithImpl<$Res, $Val extends Comment> Object? childrenComments = null, Object? createdAt = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - authorName: null == authorName - ? _value.authorName - : authorName // ignore: cast_nullable_to_non_nullable - as String, - authorProfileIcon: null == authorProfileIcon - ? _value.authorProfileIcon - : authorProfileIcon // ignore: cast_nullable_to_non_nullable - as String, - body: null == body - ? _value.body - : body // ignore: cast_nullable_to_non_nullable - as String, - childrenComments: null == childrenComments - ? _value.childrenComments - : childrenComments // ignore: cast_nullable_to_non_nullable - as List, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + authorName: + null == authorName + ? _value.authorName + : authorName // ignore: cast_nullable_to_non_nullable + as String, + authorProfileIcon: + null == authorProfileIcon + ? _value.authorProfileIcon + : authorProfileIcon // ignore: cast_nullable_to_non_nullable + as String, + body: + null == body + ? _value.body + : body // ignore: cast_nullable_to_non_nullable + as String, + childrenComments: + null == childrenComments + ? _value.childrenComments + : childrenComments // ignore: cast_nullable_to_non_nullable + as List, + createdAt: + null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + ) + as $Val, + ); } } /// @nodoc abstract class _$$CommentImplCopyWith<$Res> implements $CommentCopyWith<$Res> { factory _$$CommentImplCopyWith( - _$CommentImpl value, $Res Function(_$CommentImpl) then) = - __$$CommentImplCopyWithImpl<$Res>; + _$CommentImpl value, + $Res Function(_$CommentImpl) then, + ) = __$$CommentImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "author_name") String authorName, - @JsonKey(name: "author_profile_icon") String authorProfileIcon, - @JsonKey(name: "body") String body, - @JsonKey(name: "children_comments") List childrenComments, - @JsonKey(name: "created_at") DateTime createdAt}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "author_name") String authorName, + @JsonKey(name: "author_profile_icon") String authorProfileIcon, + @JsonKey(name: "body") String body, + @JsonKey(name: "children_comments") List childrenComments, + @JsonKey(name: "created_at") DateTime createdAt, + }); } /// @nodoc @@ -366,8 +390,9 @@ class __$$CommentImplCopyWithImpl<$Res> extends _$CommentCopyWithImpl<$Res, _$CommentImpl> implements _$$CommentImplCopyWith<$Res> { __$$CommentImplCopyWithImpl( - _$CommentImpl _value, $Res Function(_$CommentImpl) _then) - : super(_value, _then); + _$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. @@ -381,47 +406,55 @@ class __$$CommentImplCopyWithImpl<$Res> Object? childrenComments = null, Object? createdAt = null, }) { - return _then(_$CommentImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - authorName: null == authorName - ? _value.authorName - : authorName // ignore: cast_nullable_to_non_nullable - as String, - authorProfileIcon: null == authorProfileIcon - ? _value.authorProfileIcon - : authorProfileIcon // ignore: cast_nullable_to_non_nullable - as String, - body: null == body - ? _value.body - : body // ignore: cast_nullable_to_non_nullable - as String, - childrenComments: null == childrenComments - ? _value._childrenComments - : childrenComments // ignore: cast_nullable_to_non_nullable - as List, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - )); + return _then( + _$CommentImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + authorName: + null == authorName + ? _value.authorName + : authorName // ignore: cast_nullable_to_non_nullable + as String, + authorProfileIcon: + null == authorProfileIcon + ? _value.authorProfileIcon + : authorProfileIcon // ignore: cast_nullable_to_non_nullable + as String, + body: + null == body + ? _value.body + : body // ignore: cast_nullable_to_non_nullable + as String, + childrenComments: + null == childrenComments + ? _value._childrenComments + : childrenComments // ignore: cast_nullable_to_non_nullable + as List, + createdAt: + null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + ), + ); } } /// @nodoc @JsonSerializable() class _$CommentImpl implements _Comment { - const _$CommentImpl( - {@JsonKey(name: "id") required this.id, - @JsonKey(name: "author_name") required this.authorName, - @JsonKey(name: "author_profile_icon") required this.authorProfileIcon, - @JsonKey(name: "body") required this.body, - @JsonKey(name: "children_comments") - required final List childrenComments, - @JsonKey(name: "created_at") required this.createdAt}) - : _childrenComments = childrenComments; + const _$CommentImpl({ + @JsonKey(name: "id") required this.id, + @JsonKey(name: "author_name") required this.authorName, + @JsonKey(name: "author_profile_icon") required this.authorProfileIcon, + @JsonKey(name: "body") required this.body, + @JsonKey(name: "children_comments") + required final List childrenComments, + @JsonKey(name: "created_at") required this.createdAt, + }) : _childrenComments = childrenComments; factory _$CommentImpl.fromJson(Map json) => _$$CommentImplFromJson(json); @@ -468,8 +501,10 @@ class _$CommentImpl implements _Comment { (identical(other.authorProfileIcon, authorProfileIcon) || other.authorProfileIcon == authorProfileIcon) && (identical(other.body, body) || other.body == body) && - const DeepCollectionEquality() - .equals(other._childrenComments, _childrenComments) && + const DeepCollectionEquality().equals( + other._childrenComments, + _childrenComments, + ) && (identical(other.createdAt, createdAt) || other.createdAt == createdAt)); } @@ -477,13 +512,14 @@ class _$CommentImpl implements _Comment { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - id, - authorName, - authorProfileIcon, - body, - const DeepCollectionEquality().hash(_childrenComments), - createdAt); + runtimeType, + id, + authorName, + authorProfileIcon, + body, + const DeepCollectionEquality().hash(_childrenComments), + createdAt, + ); /// Create a copy of Comment /// with the given fields replaced by the non-null parameter values. @@ -495,23 +531,21 @@ class _$CommentImpl implements _Comment { @override Map toJson() { - return _$$CommentImplToJson( - this, - ); + return _$$CommentImplToJson(this); } } abstract class _Comment implements Comment { - const factory _Comment( - {@JsonKey(name: "id") required final int id, - @JsonKey(name: "author_name") required final String authorName, - @JsonKey(name: "author_profile_icon") - required final String authorProfileIcon, - @JsonKey(name: "body") required final String body, - @JsonKey(name: "children_comments") - required final List childrenComments, - @JsonKey(name: "created_at") required final DateTime createdAt}) = - _$CommentImpl; + const factory _Comment({ + @JsonKey(name: "id") required final int id, + @JsonKey(name: "author_name") required final String authorName, + @JsonKey(name: "author_profile_icon") + required final String authorProfileIcon, + @JsonKey(name: "body") required final String body, + @JsonKey(name: "children_comments") + required final List childrenComments, + @JsonKey(name: "created_at") required final DateTime createdAt, + }) = _$CommentImpl; factory _Comment.fromJson(Map json) = _$CommentImpl.fromJson; diff --git a/lib/features/feed/models/comment_model.g.dart b/lib/features/feed/models/comment_model.g.dart index 1410cfcc..99448179 100644 --- a/lib/features/feed/models/comment_model.g.dart +++ b/lib/features/feed/models/comment_model.g.dart @@ -8,9 +8,10 @@ part of 'comment_model.dart'; _$CommentModelImpl _$$CommentModelImplFromJson(Map json) => _$CommentModelImpl( - data: (json['data'] as List) - .map((e) => Comment.fromJson(e as Map)) - .toList(), + data: + (json['data'] as List) + .map((e) => Comment.fromJson(e as Map)) + .toList(), links: Links.fromJson(json['links'] as Map), meta: Meta.fromJson(json['meta'] as Map), ); @@ -28,9 +29,10 @@ _$CommentImpl _$$CommentImplFromJson(Map json) => authorName: json['author_name'] as String, authorProfileIcon: json['author_profile_icon'] as String, body: json['body'] as String, - childrenComments: (json['children_comments'] as List) - .map((e) => Comment.fromJson(e as Map)) - .toList(), + childrenComments: + (json['children_comments'] as List) + .map((e) => Comment.fromJson(e as Map)) + .toList(), createdAt: DateTime.parse(json['created_at'] as String), ); diff --git a/lib/features/feed/models/diets_pagination_model.freezed.dart b/lib/features/feed/models/diets_pagination_model.freezed.dart index fcbf3b63..398cb653 100644 --- a/lib/features/feed/models/diets_pagination_model.freezed.dart +++ b/lib/features/feed/models/diets_pagination_model.freezed.dart @@ -12,7 +12,8 @@ part of 'diets_pagination_model.dart'; 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'); + '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', +); DietsPagination _$DietsPaginationFromJson(Map json) { return _DietsPagination.fromJson(json); @@ -40,13 +41,15 @@ mixin _$DietsPagination { /// @nodoc abstract class $DietsPaginationCopyWith<$Res> { factory $DietsPaginationCopyWith( - DietsPagination value, $Res Function(DietsPagination) then) = - _$DietsPaginationCopyWithImpl<$Res, DietsPagination>; + DietsPagination value, + $Res Function(DietsPagination) then, + ) = _$DietsPaginationCopyWithImpl<$Res, DietsPagination>; @useResult - $Res call( - {@JsonKey(name: "data") List data, - @JsonKey(name: "links") Links links, - @JsonKey(name: "meta") Meta meta}); + $Res call({ + @JsonKey(name: "data") List data, + @JsonKey(name: "links") Links links, + @JsonKey(name: "meta") Meta meta, + }); $LinksCopyWith<$Res> get links; $MetaCopyWith<$Res> get meta; @@ -66,25 +69,27 @@ class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? data = null, - Object? links = null, - Object? meta = null, - }) { - return _then(_value.copyWith( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as List, - links: null == links - ? _value.links - : links // ignore: cast_nullable_to_non_nullable - as Links, - meta: null == meta - ? _value.meta - : meta // ignore: cast_nullable_to_non_nullable - as Meta, - ) as $Val); + $Res call({Object? data = null, Object? links = null, Object? meta = null}) { + return _then( + _value.copyWith( + data: + null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as List, + links: + null == links + ? _value.links + : links // ignore: cast_nullable_to_non_nullable + as Links, + meta: + null == meta + ? _value.meta + : meta // ignore: cast_nullable_to_non_nullable + as Meta, + ) + as $Val, + ); } /// Create a copy of DietsPagination @@ -111,15 +116,17 @@ class _$DietsPaginationCopyWithImpl<$Res, $Val extends DietsPagination> /// @nodoc abstract class _$$DietsPaginationImplCopyWith<$Res> implements $DietsPaginationCopyWith<$Res> { - factory _$$DietsPaginationImplCopyWith(_$DietsPaginationImpl value, - $Res Function(_$DietsPaginationImpl) then) = - __$$DietsPaginationImplCopyWithImpl<$Res>; + factory _$$DietsPaginationImplCopyWith( + _$DietsPaginationImpl value, + $Res Function(_$DietsPaginationImpl) then, + ) = __$$DietsPaginationImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "data") List data, - @JsonKey(name: "links") Links links, - @JsonKey(name: "meta") Meta meta}); + $Res call({ + @JsonKey(name: "data") List data, + @JsonKey(name: "links") Links links, + @JsonKey(name: "meta") Meta meta, + }); @override $LinksCopyWith<$Res> get links; @@ -132,43 +139,45 @@ class __$$DietsPaginationImplCopyWithImpl<$Res> extends _$DietsPaginationCopyWithImpl<$Res, _$DietsPaginationImpl> implements _$$DietsPaginationImplCopyWith<$Res> { __$$DietsPaginationImplCopyWithImpl( - _$DietsPaginationImpl _value, $Res Function(_$DietsPaginationImpl) _then) - : super(_value, _then); + _$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({ - Object? data = null, - Object? links = null, - Object? meta = null, - }) { - return _then(_$DietsPaginationImpl( - data: null == data - ? _value._data - : data // ignore: cast_nullable_to_non_nullable - as List, - links: null == links - ? _value.links - : links // ignore: cast_nullable_to_non_nullable - as Links, - meta: null == meta - ? _value.meta - : meta // ignore: cast_nullable_to_non_nullable - as Meta, - )); + $Res call({Object? data = null, Object? links = null, Object? meta = null}) { + return _then( + _$DietsPaginationImpl( + data: + null == data + ? _value._data + : data // ignore: cast_nullable_to_non_nullable + as List, + links: + null == links + ? _value.links + : links // ignore: cast_nullable_to_non_nullable + as Links, + meta: + null == meta + ? _value.meta + : meta // ignore: cast_nullable_to_non_nullable + as Meta, + ), + ); } } /// @nodoc @JsonSerializable() class _$DietsPaginationImpl implements _DietsPagination { - const _$DietsPaginationImpl( - {@JsonKey(name: "data") required final List data, - @JsonKey(name: "links") required this.links, - @JsonKey(name: "meta") required this.meta}) - : _data = data; + const _$DietsPaginationImpl({ + @JsonKey(name: "data") required final List data, + @JsonKey(name: "links") required this.links, + @JsonKey(name: "meta") required this.meta, + }) : _data = data; factory _$DietsPaginationImpl.fromJson(Map json) => _$$DietsPaginationImplFromJson(json); @@ -207,7 +216,11 @@ class _$DietsPaginationImpl implements _DietsPagination { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_data), links, meta); + runtimeType, + const DeepCollectionEquality().hash(_data), + links, + meta, + ); /// Create a copy of DietsPagination /// with the given fields replaced by the non-null parameter values. @@ -216,21 +229,22 @@ class _$DietsPaginationImpl implements _DietsPagination { @pragma('vm:prefer-inline') _$$DietsPaginationImplCopyWith<_$DietsPaginationImpl> get copyWith => __$$DietsPaginationImplCopyWithImpl<_$DietsPaginationImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$DietsPaginationImplToJson( - this, - ); + return _$$DietsPaginationImplToJson(this); } } abstract class _DietsPagination implements DietsPagination { - const factory _DietsPagination( - {@JsonKey(name: "data") required final List data, - @JsonKey(name: "links") required final Links links, - @JsonKey(name: "meta") required final Meta meta}) = _$DietsPaginationImpl; + const factory _DietsPagination({ + @JsonKey(name: "data") required final List data, + @JsonKey(name: "links") required final Links links, + @JsonKey(name: "meta") required final Meta meta, + }) = _$DietsPaginationImpl; factory _DietsPagination.fromJson(Map json) = _$DietsPaginationImpl.fromJson; @@ -305,23 +319,24 @@ abstract class $DietCopyWith<$Res> { factory $DietCopyWith(Diet value, $Res Function(Diet) then) = _$DietCopyWithImpl<$Res, Diet>; @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "name") String name, - @JsonKey(name: "image") String image, - @JsonKey(name: "duration") int duration, - @JsonKey(name: "state") DietState state, - @JsonKey(name: "type") DietType type, - @JsonKey(name: "details") String details, - @JsonKey(name: "daily_schedule") - Map>> dailySchedule, - @JsonKey(name: "author") Author author, - @JsonKey(name: "total_likes") int totalLikes, - @JsonKey(name: "total_views") int totalViews, - @JsonKey(name: "total_comments") int totalComments, - @JsonKey(name: "was_liked_by_me") bool wasLikedByMe, - @JsonKey(name: "is_favorite") bool isFavorite, - @JsonKey(name: "daily_nutrition") List dailyNutrition}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "name") String name, + @JsonKey(name: "image") String image, + @JsonKey(name: "duration") int duration, + @JsonKey(name: "state") DietState state, + @JsonKey(name: "type") DietType type, + @JsonKey(name: "details") String details, + @JsonKey(name: "daily_schedule") + Map>> dailySchedule, + @JsonKey(name: "author") Author author, + @JsonKey(name: "total_likes") int totalLikes, + @JsonKey(name: "total_views") int totalViews, + @JsonKey(name: "total_comments") int totalComments, + @JsonKey(name: "was_liked_by_me") bool wasLikedByMe, + @JsonKey(name: "is_favorite") bool isFavorite, + @JsonKey(name: "daily_nutrition") List dailyNutrition, + }); $DietTypeCopyWith<$Res> get type; $AuthorCopyWith<$Res> get author; @@ -358,68 +373,86 @@ class _$DietCopyWithImpl<$Res, $Val extends Diet> Object? isFavorite = null, Object? dailyNutrition = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - image: null == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String, - duration: null == duration - ? _value.duration - : duration // ignore: cast_nullable_to_non_nullable - as int, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as DietState, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as DietType, - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as String, - dailySchedule: null == dailySchedule - ? _value.dailySchedule - : dailySchedule // ignore: cast_nullable_to_non_nullable - as Map>>, - author: null == author - ? _value.author - : author // ignore: cast_nullable_to_non_nullable - as Author, - totalLikes: null == totalLikes - ? _value.totalLikes - : totalLikes // ignore: cast_nullable_to_non_nullable - as int, - totalViews: null == totalViews - ? _value.totalViews - : totalViews // ignore: cast_nullable_to_non_nullable - as int, - totalComments: null == totalComments - ? _value.totalComments - : totalComments // ignore: cast_nullable_to_non_nullable - as int, - wasLikedByMe: null == wasLikedByMe - ? _value.wasLikedByMe - : wasLikedByMe // ignore: cast_nullable_to_non_nullable - as bool, - isFavorite: null == isFavorite - ? _value.isFavorite - : isFavorite // ignore: cast_nullable_to_non_nullable - as bool, - dailyNutrition: null == dailyNutrition - ? _value.dailyNutrition - : dailyNutrition // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + image: + null == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String, + duration: + null == duration + ? _value.duration + : duration // ignore: cast_nullable_to_non_nullable + as int, + state: + null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as DietState, + type: + null == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as DietType, + details: + null == details + ? _value.details + : details // ignore: cast_nullable_to_non_nullable + as String, + dailySchedule: + null == dailySchedule + ? _value.dailySchedule + : dailySchedule // ignore: cast_nullable_to_non_nullable + as Map>>, + author: + null == author + ? _value.author + : author // ignore: cast_nullable_to_non_nullable + as Author, + totalLikes: + null == totalLikes + ? _value.totalLikes + : totalLikes // ignore: cast_nullable_to_non_nullable + as int, + totalViews: + null == totalViews + ? _value.totalViews + : totalViews // ignore: cast_nullable_to_non_nullable + as int, + totalComments: + null == totalComments + ? _value.totalComments + : totalComments // ignore: cast_nullable_to_non_nullable + as int, + wasLikedByMe: + null == wasLikedByMe + ? _value.wasLikedByMe + : wasLikedByMe // ignore: cast_nullable_to_non_nullable + as bool, + isFavorite: + null == isFavorite + ? _value.isFavorite + : isFavorite // ignore: cast_nullable_to_non_nullable + as bool, + dailyNutrition: + null == dailyNutrition + ? _value.dailyNutrition + : dailyNutrition // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } /// Create a copy of Diet @@ -446,27 +479,29 @@ class _$DietCopyWithImpl<$Res, $Val extends Diet> /// @nodoc abstract class _$$DietImplCopyWith<$Res> implements $DietCopyWith<$Res> { factory _$$DietImplCopyWith( - _$DietImpl value, $Res Function(_$DietImpl) then) = - __$$DietImplCopyWithImpl<$Res>; + _$DietImpl value, + $Res Function(_$DietImpl) then, + ) = __$$DietImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "name") String name, - @JsonKey(name: "image") String image, - @JsonKey(name: "duration") int duration, - @JsonKey(name: "state") DietState state, - @JsonKey(name: "type") DietType type, - @JsonKey(name: "details") String details, - @JsonKey(name: "daily_schedule") - Map>> dailySchedule, - @JsonKey(name: "author") Author author, - @JsonKey(name: "total_likes") int totalLikes, - @JsonKey(name: "total_views") int totalViews, - @JsonKey(name: "total_comments") int totalComments, - @JsonKey(name: "was_liked_by_me") bool wasLikedByMe, - @JsonKey(name: "is_favorite") bool isFavorite, - @JsonKey(name: "daily_nutrition") List dailyNutrition}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "name") String name, + @JsonKey(name: "image") String image, + @JsonKey(name: "duration") int duration, + @JsonKey(name: "state") DietState state, + @JsonKey(name: "type") DietType type, + @JsonKey(name: "details") String details, + @JsonKey(name: "daily_schedule") + Map>> dailySchedule, + @JsonKey(name: "author") Author author, + @JsonKey(name: "total_likes") int totalLikes, + @JsonKey(name: "total_views") int totalViews, + @JsonKey(name: "total_comments") int totalComments, + @JsonKey(name: "was_liked_by_me") bool wasLikedByMe, + @JsonKey(name: "is_favorite") bool isFavorite, + @JsonKey(name: "daily_nutrition") List dailyNutrition, + }); @override $DietTypeCopyWith<$Res> get type; @@ -479,7 +514,7 @@ class __$$DietImplCopyWithImpl<$Res> extends _$DietCopyWithImpl<$Res, _$DietImpl> implements _$$DietImplCopyWith<$Res> { __$$DietImplCopyWithImpl(_$DietImpl _value, $Res Function(_$DietImpl) _then) - : super(_value, _then); + : super(_value, _then); /// Create a copy of Diet /// with the given fields replaced by the non-null parameter values. @@ -502,94 +537,111 @@ class __$$DietImplCopyWithImpl<$Res> Object? isFavorite = null, Object? dailyNutrition = null, }) { - return _then(_$DietImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - image: null == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String, - duration: null == duration - ? _value.duration - : duration // ignore: cast_nullable_to_non_nullable - as int, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as DietState, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as DietType, - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as String, - dailySchedule: null == dailySchedule - ? _value._dailySchedule - : dailySchedule // ignore: cast_nullable_to_non_nullable - as Map>>, - author: null == author - ? _value.author - : author // ignore: cast_nullable_to_non_nullable - as Author, - totalLikes: null == totalLikes - ? _value.totalLikes - : totalLikes // ignore: cast_nullable_to_non_nullable - as int, - totalViews: null == totalViews - ? _value.totalViews - : totalViews // ignore: cast_nullable_to_non_nullable - as int, - totalComments: null == totalComments - ? _value.totalComments - : totalComments // ignore: cast_nullable_to_non_nullable - as int, - wasLikedByMe: null == wasLikedByMe - ? _value.wasLikedByMe - : wasLikedByMe // ignore: cast_nullable_to_non_nullable - as bool, - isFavorite: null == isFavorite - ? _value.isFavorite - : isFavorite // ignore: cast_nullable_to_non_nullable - as bool, - dailyNutrition: null == dailyNutrition - ? _value._dailyNutrition - : dailyNutrition // ignore: cast_nullable_to_non_nullable - as List, - )); + return _then( + _$DietImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + image: + null == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String, + duration: + null == duration + ? _value.duration + : duration // ignore: cast_nullable_to_non_nullable + as int, + state: + null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as DietState, + type: + null == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as DietType, + details: + null == details + ? _value.details + : details // ignore: cast_nullable_to_non_nullable + as String, + dailySchedule: + null == dailySchedule + ? _value._dailySchedule + : dailySchedule // ignore: cast_nullable_to_non_nullable + as Map>>, + author: + null == author + ? _value.author + : author // ignore: cast_nullable_to_non_nullable + as Author, + totalLikes: + null == totalLikes + ? _value.totalLikes + : totalLikes // ignore: cast_nullable_to_non_nullable + as int, + totalViews: + null == totalViews + ? _value.totalViews + : totalViews // ignore: cast_nullable_to_non_nullable + as int, + totalComments: + null == totalComments + ? _value.totalComments + : totalComments // ignore: cast_nullable_to_non_nullable + as int, + wasLikedByMe: + null == wasLikedByMe + ? _value.wasLikedByMe + : wasLikedByMe // ignore: cast_nullable_to_non_nullable + as bool, + isFavorite: + null == isFavorite + ? _value.isFavorite + : isFavorite // ignore: cast_nullable_to_non_nullable + as bool, + dailyNutrition: + null == dailyNutrition + ? _value._dailyNutrition + : dailyNutrition // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } /// @nodoc @JsonSerializable() class _$DietImpl implements _Diet { - const _$DietImpl( - {@JsonKey(name: "id") required this.id, - @JsonKey(name: "name") required this.name, - @JsonKey(name: "image") required this.image, - @JsonKey(name: "duration") required this.duration, - @JsonKey(name: "state") required this.state, - @JsonKey(name: "type") required this.type, - @JsonKey(name: "details") required this.details, - @JsonKey(name: "daily_schedule") - required final Map>> dailySchedule, - @JsonKey(name: "author") required this.author, - @JsonKey(name: "total_likes") required this.totalLikes, - @JsonKey(name: "total_views") required this.totalViews, - @JsonKey(name: "total_comments") required this.totalComments, - @JsonKey(name: "was_liked_by_me") required this.wasLikedByMe, - @JsonKey(name: "is_favorite") required this.isFavorite, - @JsonKey(name: "daily_nutrition") - required final List dailyNutrition}) - : _dailySchedule = dailySchedule, - _dailyNutrition = dailyNutrition; + const _$DietImpl({ + @JsonKey(name: "id") required this.id, + @JsonKey(name: "name") required this.name, + @JsonKey(name: "image") required this.image, + @JsonKey(name: "duration") required this.duration, + @JsonKey(name: "state") required this.state, + @JsonKey(name: "type") required this.type, + @JsonKey(name: "details") required this.details, + @JsonKey(name: "daily_schedule") + required final Map>> dailySchedule, + @JsonKey(name: "author") required this.author, + @JsonKey(name: "total_likes") required this.totalLikes, + @JsonKey(name: "total_views") required this.totalViews, + @JsonKey(name: "total_comments") required this.totalComments, + @JsonKey(name: "was_liked_by_me") required this.wasLikedByMe, + @JsonKey(name: "is_favorite") required this.isFavorite, + @JsonKey(name: "daily_nutrition") + required final List dailyNutrition, + }) : _dailySchedule = dailySchedule, + _dailyNutrition = dailyNutrition; factory _$DietImpl.fromJson(Map json) => _$$DietImplFromJson(json); @@ -669,8 +721,10 @@ class _$DietImpl implements _Diet { (identical(other.state, state) || other.state == state) && (identical(other.type, type) || other.type == type) && (identical(other.details, details) || other.details == details) && - const DeepCollectionEquality() - .equals(other._dailySchedule, _dailySchedule) && + const DeepCollectionEquality().equals( + other._dailySchedule, + _dailySchedule, + ) && (identical(other.author, author) || other.author == author) && (identical(other.totalLikes, totalLikes) || other.totalLikes == totalLikes) && @@ -682,29 +736,32 @@ class _$DietImpl implements _Diet { other.wasLikedByMe == wasLikedByMe) && (identical(other.isFavorite, isFavorite) || other.isFavorite == isFavorite) && - const DeepCollectionEquality() - .equals(other._dailyNutrition, _dailyNutrition)); + const DeepCollectionEquality().equals( + other._dailyNutrition, + _dailyNutrition, + )); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - id, - name, - image, - duration, - state, - type, - details, - const DeepCollectionEquality().hash(_dailySchedule), - author, - totalLikes, - totalViews, - totalComments, - wasLikedByMe, - isFavorite, - const DeepCollectionEquality().hash(_dailyNutrition)); + runtimeType, + id, + name, + image, + duration, + state, + type, + details, + const DeepCollectionEquality().hash(_dailySchedule), + author, + totalLikes, + totalViews, + totalComments, + wasLikedByMe, + isFavorite, + const DeepCollectionEquality().hash(_dailyNutrition), + ); /// Create a copy of Diet /// with the given fields replaced by the non-null parameter values. @@ -716,31 +773,30 @@ class _$DietImpl implements _Diet { @override Map toJson() { - return _$$DietImplToJson( - this, - ); + return _$$DietImplToJson(this); } } abstract class _Diet implements Diet { - const factory _Diet( - {@JsonKey(name: "id") required final int id, - @JsonKey(name: "name") required final String name, - @JsonKey(name: "image") required final String image, - @JsonKey(name: "duration") required final int duration, - @JsonKey(name: "state") required final DietState state, - @JsonKey(name: "type") required final DietType type, - @JsonKey(name: "details") required final String details, - @JsonKey(name: "daily_schedule") - required final Map>> dailySchedule, - @JsonKey(name: "author") required final Author author, - @JsonKey(name: "total_likes") required final int totalLikes, - @JsonKey(name: "total_views") required final int totalViews, - @JsonKey(name: "total_comments") required final int totalComments, - @JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe, - @JsonKey(name: "is_favorite") required final bool isFavorite, - @JsonKey(name: "daily_nutrition") - required final List dailyNutrition}) = _$DietImpl; + const factory _Diet({ + @JsonKey(name: "id") required final int id, + @JsonKey(name: "name") required final String name, + @JsonKey(name: "image") required final String image, + @JsonKey(name: "duration") required final int duration, + @JsonKey(name: "state") required final DietState state, + @JsonKey(name: "type") required final DietType type, + @JsonKey(name: "details") required final String details, + @JsonKey(name: "daily_schedule") + required final Map>> dailySchedule, + @JsonKey(name: "author") required final Author author, + @JsonKey(name: "total_likes") required final int totalLikes, + @JsonKey(name: "total_views") required final int totalViews, + @JsonKey(name: "total_comments") required final int totalComments, + @JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe, + @JsonKey(name: "is_favorite") required final bool isFavorite, + @JsonKey(name: "daily_nutrition") + required final List dailyNutrition, + }) = _$DietImpl; factory _Diet.fromJson(Map json) = _$DietImpl.fromJson; @@ -820,8 +876,9 @@ mixin _$CreatedDiet { /// @nodoc abstract class $CreatedDietCopyWith<$Res> { factory $CreatedDietCopyWith( - CreatedDiet value, $Res Function(CreatedDiet) then) = - _$CreatedDietCopyWithImpl<$Res, CreatedDiet>; + CreatedDiet value, + $Res Function(CreatedDiet) then, + ) = _$CreatedDietCopyWithImpl<$Res, CreatedDiet>; @useResult $Res call({@JsonKey(name: "id") int id}); } @@ -840,15 +897,17 @@ class _$CreatedDietCopyWithImpl<$Res, $Val extends CreatedDiet> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + $Res call({Object? id = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } } @@ -856,8 +915,9 @@ class _$CreatedDietCopyWithImpl<$Res, $Val extends CreatedDiet> abstract class _$$CreatedDietImplCopyWith<$Res> implements $CreatedDietCopyWith<$Res> { factory _$$CreatedDietImplCopyWith( - _$CreatedDietImpl value, $Res Function(_$CreatedDietImpl) then) = - __$$CreatedDietImplCopyWithImpl<$Res>; + _$CreatedDietImpl value, + $Res Function(_$CreatedDietImpl) then, + ) = __$$CreatedDietImplCopyWithImpl<$Res>; @override @useResult $Res call({@JsonKey(name: "id") int id}); @@ -868,22 +928,24 @@ class __$$CreatedDietImplCopyWithImpl<$Res> extends _$CreatedDietCopyWithImpl<$Res, _$CreatedDietImpl> implements _$$CreatedDietImplCopyWith<$Res> { __$$CreatedDietImplCopyWithImpl( - _$CreatedDietImpl _value, $Res Function(_$CreatedDietImpl) _then) - : super(_value, _then); + _$CreatedDietImpl _value, + $Res Function(_$CreatedDietImpl) _then, + ) : super(_value, _then); /// Create a copy of CreatedDiet /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - }) { - return _then(_$CreatedDietImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - )); + $Res call({Object? id = null}) { + return _then( + _$CreatedDietImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } @@ -926,9 +988,7 @@ class _$CreatedDietImpl implements _CreatedDiet { @override Map toJson() { - return _$$CreatedDietImplToJson( - this, - ); + return _$$CreatedDietImplToJson(this); } } @@ -984,13 +1044,14 @@ abstract class $AuthorCopyWith<$Res> { factory $AuthorCopyWith(Author value, $Res Function(Author) then) = _$AuthorCopyWithImpl<$Res, Author>; @useResult - $Res call( - {@JsonKey(name: "author_slug") String authorSlug, - @JsonKey(name: "author_name") String authorName, - @JsonKey(name: "author_profile_icon") String authorProfileIcon, - @JsonKey(name: "author_is_me") bool authorIsMe, - @JsonKey(name: "is_entity_subscribed_by_me") bool? isEntitySubscribedByMe, - @JsonKey(name: "author_place_in_rating") int? authorPlaceInRating}); + $Res call({ + @JsonKey(name: "author_slug") String authorSlug, + @JsonKey(name: "author_name") String authorName, + @JsonKey(name: "author_profile_icon") String authorProfileIcon, + @JsonKey(name: "author_is_me") bool authorIsMe, + @JsonKey(name: "is_entity_subscribed_by_me") bool? isEntitySubscribedByMe, + @JsonKey(name: "author_place_in_rating") int? authorPlaceInRating, + }); } /// @nodoc @@ -1015,49 +1076,60 @@ class _$AuthorCopyWithImpl<$Res, $Val extends Author> Object? isEntitySubscribedByMe = freezed, Object? authorPlaceInRating = freezed, }) { - return _then(_value.copyWith( - authorSlug: null == authorSlug - ? _value.authorSlug - : authorSlug // ignore: cast_nullable_to_non_nullable - as String, - authorName: null == authorName - ? _value.authorName - : authorName // ignore: cast_nullable_to_non_nullable - as String, - authorProfileIcon: null == authorProfileIcon - ? _value.authorProfileIcon - : authorProfileIcon // ignore: cast_nullable_to_non_nullable - as String, - authorIsMe: null == authorIsMe - ? _value.authorIsMe - : authorIsMe // ignore: cast_nullable_to_non_nullable - as bool, - isEntitySubscribedByMe: freezed == isEntitySubscribedByMe - ? _value.isEntitySubscribedByMe - : isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable - as bool?, - authorPlaceInRating: freezed == authorPlaceInRating - ? _value.authorPlaceInRating - : authorPlaceInRating // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); + return _then( + _value.copyWith( + authorSlug: + null == authorSlug + ? _value.authorSlug + : authorSlug // ignore: cast_nullable_to_non_nullable + as String, + authorName: + null == authorName + ? _value.authorName + : authorName // ignore: cast_nullable_to_non_nullable + as String, + authorProfileIcon: + null == authorProfileIcon + ? _value.authorProfileIcon + : authorProfileIcon // ignore: cast_nullable_to_non_nullable + as String, + authorIsMe: + null == authorIsMe + ? _value.authorIsMe + : authorIsMe // ignore: cast_nullable_to_non_nullable + as bool, + isEntitySubscribedByMe: + freezed == isEntitySubscribedByMe + ? _value.isEntitySubscribedByMe + : isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable + as bool?, + authorPlaceInRating: + freezed == authorPlaceInRating + ? _value.authorPlaceInRating + : authorPlaceInRating // ignore: cast_nullable_to_non_nullable + as int?, + ) + as $Val, + ); } } /// @nodoc abstract class _$$AuthorImplCopyWith<$Res> implements $AuthorCopyWith<$Res> { factory _$$AuthorImplCopyWith( - _$AuthorImpl value, $Res Function(_$AuthorImpl) then) = - __$$AuthorImplCopyWithImpl<$Res>; + _$AuthorImpl value, + $Res Function(_$AuthorImpl) then, + ) = __$$AuthorImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "author_slug") String authorSlug, - @JsonKey(name: "author_name") String authorName, - @JsonKey(name: "author_profile_icon") String authorProfileIcon, - @JsonKey(name: "author_is_me") bool authorIsMe, - @JsonKey(name: "is_entity_subscribed_by_me") bool? isEntitySubscribedByMe, - @JsonKey(name: "author_place_in_rating") int? authorPlaceInRating}); + $Res call({ + @JsonKey(name: "author_slug") String authorSlug, + @JsonKey(name: "author_name") String authorName, + @JsonKey(name: "author_profile_icon") String authorProfileIcon, + @JsonKey(name: "author_is_me") bool authorIsMe, + @JsonKey(name: "is_entity_subscribed_by_me") bool? isEntitySubscribedByMe, + @JsonKey(name: "author_place_in_rating") int? authorPlaceInRating, + }); } /// @nodoc @@ -1065,8 +1137,9 @@ class __$$AuthorImplCopyWithImpl<$Res> extends _$AuthorCopyWithImpl<$Res, _$AuthorImpl> implements _$$AuthorImplCopyWith<$Res> { __$$AuthorImplCopyWithImpl( - _$AuthorImpl _value, $Res Function(_$AuthorImpl) _then) - : super(_value, _then); + _$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. @@ -1080,45 +1153,54 @@ class __$$AuthorImplCopyWithImpl<$Res> Object? isEntitySubscribedByMe = freezed, Object? authorPlaceInRating = freezed, }) { - return _then(_$AuthorImpl( - authorSlug: null == authorSlug - ? _value.authorSlug - : authorSlug // ignore: cast_nullable_to_non_nullable - as String, - authorName: null == authorName - ? _value.authorName - : authorName // ignore: cast_nullable_to_non_nullable - as String, - authorProfileIcon: null == authorProfileIcon - ? _value.authorProfileIcon - : authorProfileIcon // ignore: cast_nullable_to_non_nullable - as String, - authorIsMe: null == authorIsMe - ? _value.authorIsMe - : authorIsMe // ignore: cast_nullable_to_non_nullable - as bool, - isEntitySubscribedByMe: freezed == isEntitySubscribedByMe - ? _value.isEntitySubscribedByMe - : isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable - as bool?, - authorPlaceInRating: freezed == authorPlaceInRating - ? _value.authorPlaceInRating - : authorPlaceInRating // ignore: cast_nullable_to_non_nullable - as int?, - )); + return _then( + _$AuthorImpl( + authorSlug: + null == authorSlug + ? _value.authorSlug + : authorSlug // ignore: cast_nullable_to_non_nullable + as String, + authorName: + null == authorName + ? _value.authorName + : authorName // ignore: cast_nullable_to_non_nullable + as String, + authorProfileIcon: + null == authorProfileIcon + ? _value.authorProfileIcon + : authorProfileIcon // ignore: cast_nullable_to_non_nullable + as String, + authorIsMe: + null == authorIsMe + ? _value.authorIsMe + : authorIsMe // ignore: cast_nullable_to_non_nullable + as bool, + isEntitySubscribedByMe: + freezed == isEntitySubscribedByMe + ? _value.isEntitySubscribedByMe + : isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable + as bool?, + authorPlaceInRating: + freezed == authorPlaceInRating + ? _value.authorPlaceInRating + : authorPlaceInRating // ignore: cast_nullable_to_non_nullable + as int?, + ), + ); } } /// @nodoc @JsonSerializable() class _$AuthorImpl implements _Author { - const _$AuthorImpl( - {@JsonKey(name: "author_slug") required this.authorSlug, - @JsonKey(name: "author_name") required this.authorName, - @JsonKey(name: "author_profile_icon") required this.authorProfileIcon, - @JsonKey(name: "author_is_me") required this.authorIsMe, - @JsonKey(name: "is_entity_subscribed_by_me") this.isEntitySubscribedByMe, - @JsonKey(name: "author_place_in_rating") this.authorPlaceInRating}); + const _$AuthorImpl({ + @JsonKey(name: "author_slug") required this.authorSlug, + @JsonKey(name: "author_name") required this.authorName, + @JsonKey(name: "author_profile_icon") required this.authorProfileIcon, + @JsonKey(name: "author_is_me") required this.authorIsMe, + @JsonKey(name: "is_entity_subscribed_by_me") this.isEntitySubscribedByMe, + @JsonKey(name: "author_place_in_rating") this.authorPlaceInRating, + }); factory _$AuthorImpl.fromJson(Map json) => _$$AuthorImplFromJson(json); @@ -1169,13 +1251,14 @@ class _$AuthorImpl implements _Author { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - authorSlug, - authorName, - authorProfileIcon, - authorIsMe, - isEntitySubscribedByMe, - authorPlaceInRating); + runtimeType, + authorSlug, + authorName, + authorProfileIcon, + authorIsMe, + isEntitySubscribedByMe, + authorPlaceInRating, + ); /// Create a copy of Author /// with the given fields replaced by the non-null parameter values. @@ -1187,23 +1270,21 @@ class _$AuthorImpl implements _Author { @override Map toJson() { - return _$$AuthorImplToJson( - this, - ); + return _$$AuthorImplToJson(this); } } abstract class _Author implements Author { - const factory _Author( - {@JsonKey(name: "author_slug") required final String authorSlug, - @JsonKey(name: "author_name") required final String authorName, - @JsonKey(name: "author_profile_icon") - required final String authorProfileIcon, - @JsonKey(name: "author_is_me") required final bool authorIsMe, - @JsonKey(name: "is_entity_subscribed_by_me") - final bool? isEntitySubscribedByMe, - @JsonKey(name: "author_place_in_rating") - final int? authorPlaceInRating}) = _$AuthorImpl; + const factory _Author({ + @JsonKey(name: "author_slug") required final String authorSlug, + @JsonKey(name: "author_name") required final String authorName, + @JsonKey(name: "author_profile_icon") + required final String authorProfileIcon, + @JsonKey(name: "author_is_me") required final bool authorIsMe, + @JsonKey(name: "is_entity_subscribed_by_me") + final bool? isEntitySubscribedByMe, + @JsonKey(name: "author_place_in_rating") final int? authorPlaceInRating, + }) = _$AuthorImpl; factory _Author.fromJson(Map json) = _$AuthorImpl.fromJson; @@ -1249,10 +1330,11 @@ mixin _$DailySchedule { @JsonKey(name: 'nutrition', includeToJson: false) DailyNutrition? get dailyNutrition => throw _privateConstructorUsedError; @JsonKey( - name: 'product_nutritional_value_id', - includeToJson: true, - includeFromJson: false, - includeIfNull: false) + name: 'product_nutritional_value_id', + includeToJson: true, + includeFromJson: false, + includeIfNull: false, + ) String? get productNutritionalValueId => throw _privateConstructorUsedError; /// Serializes this DailySchedule to a JSON map. @@ -1268,21 +1350,24 @@ mixin _$DailySchedule { /// @nodoc abstract class $DailyScheduleCopyWith<$Res> { factory $DailyScheduleCopyWith( - DailySchedule value, $Res Function(DailySchedule) then) = - _$DailyScheduleCopyWithImpl<$Res, DailySchedule>; + DailySchedule value, + $Res Function(DailySchedule) then, + ) = _$DailyScheduleCopyWithImpl<$Res, DailySchedule>; @useResult - $Res call( - {@JsonKey(name: "name") String name, - @JsonKey(name: "portion") Portion portion, - @JsonKey(name: "quantity", fromJson: _parseQuantity) int quantity, - @JsonKey(name: 'nutrition', includeToJson: false) - DailyNutrition? dailyNutrition, - @JsonKey( - name: 'product_nutritional_value_id', - includeToJson: true, - includeFromJson: false, - includeIfNull: false) - String? productNutritionalValueId}); + $Res call({ + @JsonKey(name: "name") String name, + @JsonKey(name: "portion") Portion portion, + @JsonKey(name: "quantity", fromJson: _parseQuantity) int quantity, + @JsonKey(name: 'nutrition', includeToJson: false) + DailyNutrition? dailyNutrition, + @JsonKey( + name: 'product_nutritional_value_id', + includeToJson: true, + includeFromJson: false, + includeIfNull: false, + ) + String? productNutritionalValueId, + }); $DailyNutritionCopyWith<$Res>? get dailyNutrition; } @@ -1308,28 +1393,36 @@ class _$DailyScheduleCopyWithImpl<$Res, $Val extends DailySchedule> Object? dailyNutrition = freezed, Object? productNutritionalValueId = freezed, }) { - return _then(_value.copyWith( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - portion: null == portion - ? _value.portion - : portion // ignore: cast_nullable_to_non_nullable - as Portion, - quantity: null == quantity - ? _value.quantity - : quantity // ignore: cast_nullable_to_non_nullable - as int, - dailyNutrition: freezed == dailyNutrition - ? _value.dailyNutrition - : dailyNutrition // ignore: cast_nullable_to_non_nullable - as DailyNutrition?, - productNutritionalValueId: freezed == productNutritionalValueId - ? _value.productNutritionalValueId - : productNutritionalValueId // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + portion: + null == portion + ? _value.portion + : portion // ignore: cast_nullable_to_non_nullable + as Portion, + quantity: + null == quantity + ? _value.quantity + : quantity // ignore: cast_nullable_to_non_nullable + as int, + dailyNutrition: + freezed == dailyNutrition + ? _value.dailyNutrition + : dailyNutrition // ignore: cast_nullable_to_non_nullable + as DailyNutrition?, + productNutritionalValueId: + freezed == productNutritionalValueId + ? _value.productNutritionalValueId + : productNutritionalValueId // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } /// Create a copy of DailySchedule @@ -1351,22 +1444,25 @@ class _$DailyScheduleCopyWithImpl<$Res, $Val extends DailySchedule> abstract class _$$DailyScheduleImplCopyWith<$Res> implements $DailyScheduleCopyWith<$Res> { factory _$$DailyScheduleImplCopyWith( - _$DailyScheduleImpl value, $Res Function(_$DailyScheduleImpl) then) = - __$$DailyScheduleImplCopyWithImpl<$Res>; + _$DailyScheduleImpl value, + $Res Function(_$DailyScheduleImpl) then, + ) = __$$DailyScheduleImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "name") String name, - @JsonKey(name: "portion") Portion portion, - @JsonKey(name: "quantity", fromJson: _parseQuantity) int quantity, - @JsonKey(name: 'nutrition', includeToJson: false) - DailyNutrition? dailyNutrition, - @JsonKey( - name: 'product_nutritional_value_id', - includeToJson: true, - includeFromJson: false, - includeIfNull: false) - String? productNutritionalValueId}); + $Res call({ + @JsonKey(name: "name") String name, + @JsonKey(name: "portion") Portion portion, + @JsonKey(name: "quantity", fromJson: _parseQuantity) int quantity, + @JsonKey(name: 'nutrition', includeToJson: false) + DailyNutrition? dailyNutrition, + @JsonKey( + name: 'product_nutritional_value_id', + includeToJson: true, + includeFromJson: false, + includeIfNull: false, + ) + String? productNutritionalValueId, + }); @override $DailyNutritionCopyWith<$Res>? get dailyNutrition; @@ -1377,8 +1473,9 @@ class __$$DailyScheduleImplCopyWithImpl<$Res> extends _$DailyScheduleCopyWithImpl<$Res, _$DailyScheduleImpl> implements _$$DailyScheduleImplCopyWith<$Res> { __$$DailyScheduleImplCopyWithImpl( - _$DailyScheduleImpl _value, $Res Function(_$DailyScheduleImpl) _then) - : super(_value, _then); + _$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. @@ -1391,46 +1488,54 @@ class __$$DailyScheduleImplCopyWithImpl<$Res> Object? dailyNutrition = freezed, Object? productNutritionalValueId = freezed, }) { - return _then(_$DailyScheduleImpl( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - portion: null == portion - ? _value.portion - : portion // ignore: cast_nullable_to_non_nullable - as Portion, - quantity: null == quantity - ? _value.quantity - : quantity // ignore: cast_nullable_to_non_nullable - as int, - dailyNutrition: freezed == dailyNutrition - ? _value.dailyNutrition - : dailyNutrition // ignore: cast_nullable_to_non_nullable - as DailyNutrition?, - productNutritionalValueId: freezed == productNutritionalValueId - ? _value.productNutritionalValueId - : productNutritionalValueId // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$DailyScheduleImpl( + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + portion: + null == portion + ? _value.portion + : portion // ignore: cast_nullable_to_non_nullable + as Portion, + quantity: + null == quantity + ? _value.quantity + : quantity // ignore: cast_nullable_to_non_nullable + as int, + dailyNutrition: + freezed == dailyNutrition + ? _value.dailyNutrition + : dailyNutrition // ignore: cast_nullable_to_non_nullable + as DailyNutrition?, + productNutritionalValueId: + freezed == productNutritionalValueId + ? _value.productNutritionalValueId + : productNutritionalValueId // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } /// @nodoc @JsonSerializable() class _$DailyScheduleImpl implements _DailySchedule { - const _$DailyScheduleImpl( - {@JsonKey(name: "name") required this.name, - @JsonKey(name: "portion") required this.portion, - @JsonKey(name: "quantity", fromJson: _parseQuantity) - required this.quantity, - @JsonKey(name: 'nutrition', includeToJson: false) this.dailyNutrition, - @JsonKey( - name: 'product_nutritional_value_id', - includeToJson: true, - includeFromJson: false, - includeIfNull: false) - this.productNutritionalValueId}); + const _$DailyScheduleImpl({ + @JsonKey(name: "name") required this.name, + @JsonKey(name: "portion") required this.portion, + @JsonKey(name: "quantity", fromJson: _parseQuantity) required this.quantity, + @JsonKey(name: 'nutrition', includeToJson: false) this.dailyNutrition, + @JsonKey( + name: 'product_nutritional_value_id', + includeToJson: true, + includeFromJson: false, + includeIfNull: false, + ) + this.productNutritionalValueId, + }); factory _$DailyScheduleImpl.fromJson(Map json) => _$$DailyScheduleImplFromJson(json); @@ -1449,10 +1554,11 @@ class _$DailyScheduleImpl implements _DailySchedule { final DailyNutrition? dailyNutrition; @override @JsonKey( - name: 'product_nutritional_value_id', - includeToJson: true, - includeFromJson: false, - includeIfNull: false) + name: 'product_nutritional_value_id', + includeToJson: true, + includeFromJson: false, + includeIfNull: false, + ) final String? productNutritionalValueId; @override @@ -1471,15 +1577,23 @@ class _$DailyScheduleImpl implements _DailySchedule { other.quantity == quantity) && (identical(other.dailyNutrition, dailyNutrition) || other.dailyNutrition == dailyNutrition) && - (identical(other.productNutritionalValueId, - productNutritionalValueId) || + (identical( + other.productNutritionalValueId, + productNutritionalValueId, + ) || other.productNutritionalValueId == productNutritionalValueId)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, name, portion, quantity, - dailyNutrition, productNutritionalValueId); + int get hashCode => Object.hash( + runtimeType, + name, + portion, + quantity, + dailyNutrition, + productNutritionalValueId, + ); /// Create a copy of DailySchedule /// with the given fields replaced by the non-null parameter values. @@ -1491,26 +1605,26 @@ class _$DailyScheduleImpl implements _DailySchedule { @override Map toJson() { - return _$$DailyScheduleImplToJson( - this, - ); + return _$$DailyScheduleImplToJson(this); } } abstract class _DailySchedule implements DailySchedule { - const factory _DailySchedule( - {@JsonKey(name: "name") required final String name, - @JsonKey(name: "portion") required final Portion portion, - @JsonKey(name: "quantity", fromJson: _parseQuantity) - required final int quantity, - @JsonKey(name: 'nutrition', includeToJson: false) - final DailyNutrition? dailyNutrition, - @JsonKey( - name: 'product_nutritional_value_id', - includeToJson: true, - includeFromJson: false, - includeIfNull: false) - final String? productNutritionalValueId}) = _$DailyScheduleImpl; + const factory _DailySchedule({ + @JsonKey(name: "name") required final String name, + @JsonKey(name: "portion") required final Portion portion, + @JsonKey(name: "quantity", fromJson: _parseQuantity) + required final int quantity, + @JsonKey(name: 'nutrition', includeToJson: false) + final DailyNutrition? dailyNutrition, + @JsonKey( + name: 'product_nutritional_value_id', + includeToJson: true, + includeFromJson: false, + includeIfNull: false, + ) + final String? productNutritionalValueId, + }) = _$DailyScheduleImpl; factory _DailySchedule.fromJson(Map json) = _$DailyScheduleImpl.fromJson; @@ -1529,10 +1643,11 @@ abstract class _DailySchedule implements DailySchedule { DailyNutrition? get dailyNutrition; @override @JsonKey( - name: 'product_nutritional_value_id', - includeToJson: true, - includeFromJson: false, - includeIfNull: false) + name: 'product_nutritional_value_id', + includeToJson: true, + includeFromJson: false, + includeIfNull: false, + ) String? get productNutritionalValueId; /// Create a copy of DailySchedule @@ -1573,11 +1688,12 @@ abstract class $DietTypeCopyWith<$Res> { factory $DietTypeCopyWith(DietType value, $Res Function(DietType) then) = _$DietTypeCopyWithImpl<$Res, DietType>; @useResult - $Res call( - {@JsonKey(name: "light") bool? light, - @JsonKey(name: "veg") bool? veg, - @JsonKey(name: "carb") bool? carb, - @JsonKey(name: "meat") bool? meat}); + $Res call({ + @JsonKey(name: "light") bool? light, + @JsonKey(name: "veg") bool? veg, + @JsonKey(name: "carb") bool? carb, + @JsonKey(name: "meat") bool? meat, + }); } /// @nodoc @@ -1600,24 +1716,31 @@ class _$DietTypeCopyWithImpl<$Res, $Val extends DietType> Object? carb = freezed, Object? meat = freezed, }) { - return _then(_value.copyWith( - light: freezed == light - ? _value.light - : light // ignore: cast_nullable_to_non_nullable - as bool?, - veg: freezed == veg - ? _value.veg - : veg // ignore: cast_nullable_to_non_nullable - as bool?, - carb: freezed == carb - ? _value.carb - : carb // ignore: cast_nullable_to_non_nullable - as bool?, - meat: freezed == meat - ? _value.meat - : meat // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); + return _then( + _value.copyWith( + light: + freezed == light + ? _value.light + : light // ignore: cast_nullable_to_non_nullable + as bool?, + veg: + freezed == veg + ? _value.veg + : veg // ignore: cast_nullable_to_non_nullable + as bool?, + carb: + freezed == carb + ? _value.carb + : carb // ignore: cast_nullable_to_non_nullable + as bool?, + meat: + freezed == meat + ? _value.meat + : meat // ignore: cast_nullable_to_non_nullable + as bool?, + ) + as $Val, + ); } } @@ -1625,15 +1748,17 @@ class _$DietTypeCopyWithImpl<$Res, $Val extends DietType> abstract class _$$DietTypeImplCopyWith<$Res> implements $DietTypeCopyWith<$Res> { factory _$$DietTypeImplCopyWith( - _$DietTypeImpl value, $Res Function(_$DietTypeImpl) then) = - __$$DietTypeImplCopyWithImpl<$Res>; + _$DietTypeImpl value, + $Res Function(_$DietTypeImpl) then, + ) = __$$DietTypeImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "light") bool? light, - @JsonKey(name: "veg") bool? veg, - @JsonKey(name: "carb") bool? carb, - @JsonKey(name: "meat") bool? meat}); + $Res call({ + @JsonKey(name: "light") bool? light, + @JsonKey(name: "veg") bool? veg, + @JsonKey(name: "carb") bool? carb, + @JsonKey(name: "meat") bool? meat, + }); } /// @nodoc @@ -1641,8 +1766,9 @@ class __$$DietTypeImplCopyWithImpl<$Res> extends _$DietTypeCopyWithImpl<$Res, _$DietTypeImpl> implements _$$DietTypeImplCopyWith<$Res> { __$$DietTypeImplCopyWithImpl( - _$DietTypeImpl _value, $Res Function(_$DietTypeImpl) _then) - : super(_value, _then); + _$DietTypeImpl _value, + $Res Function(_$DietTypeImpl) _then, + ) : super(_value, _then); /// Create a copy of DietType /// with the given fields replaced by the non-null parameter values. @@ -1654,36 +1780,42 @@ class __$$DietTypeImplCopyWithImpl<$Res> Object? carb = freezed, Object? meat = freezed, }) { - return _then(_$DietTypeImpl( - light: freezed == light - ? _value.light - : light // ignore: cast_nullable_to_non_nullable - as bool?, - veg: freezed == veg - ? _value.veg - : veg // ignore: cast_nullable_to_non_nullable - as bool?, - carb: freezed == carb - ? _value.carb - : carb // ignore: cast_nullable_to_non_nullable - as bool?, - meat: freezed == meat - ? _value.meat - : meat // ignore: cast_nullable_to_non_nullable - as bool?, - )); + return _then( + _$DietTypeImpl( + light: + freezed == light + ? _value.light + : light // ignore: cast_nullable_to_non_nullable + as bool?, + veg: + freezed == veg + ? _value.veg + : veg // ignore: cast_nullable_to_non_nullable + as bool?, + carb: + freezed == carb + ? _value.carb + : carb // ignore: cast_nullable_to_non_nullable + as bool?, + meat: + freezed == meat + ? _value.meat + : meat // ignore: cast_nullable_to_non_nullable + as bool?, + ), + ); } } /// @nodoc @JsonSerializable() class _$DietTypeImpl extends _DietType { - const _$DietTypeImpl( - {@JsonKey(name: "light") this.light, - @JsonKey(name: "veg") this.veg, - @JsonKey(name: "carb") this.carb, - @JsonKey(name: "meat") this.meat}) - : super._(); + const _$DietTypeImpl({ + @JsonKey(name: "light") this.light, + @JsonKey(name: "veg") this.veg, + @JsonKey(name: "carb") this.carb, + @JsonKey(name: "meat") this.meat, + }) : super._(); factory _$DietTypeImpl.fromJson(Map json) => _$$DietTypeImplFromJson(json); @@ -1731,18 +1863,17 @@ class _$DietTypeImpl extends _DietType { @override Map toJson() { - return _$$DietTypeImplToJson( - this, - ); + return _$$DietTypeImplToJson(this); } } abstract class _DietType extends DietType { - const factory _DietType( - {@JsonKey(name: "light") final bool? light, - @JsonKey(name: "veg") final bool? veg, - @JsonKey(name: "carb") final bool? carb, - @JsonKey(name: "meat") final bool? meat}) = _$DietTypeImpl; + const factory _DietType({ + @JsonKey(name: "light") final bool? light, + @JsonKey(name: "veg") final bool? veg, + @JsonKey(name: "carb") final bool? carb, + @JsonKey(name: "meat") final bool? meat, + }) = _$DietTypeImpl; const _DietType._() : super._(); factory _DietType.fromJson(Map json) = @@ -1797,14 +1928,16 @@ mixin _$DailyNutrition { /// @nodoc abstract class $DailyNutritionCopyWith<$Res> { factory $DailyNutritionCopyWith( - DailyNutrition value, $Res Function(DailyNutrition) then) = - _$DailyNutritionCopyWithImpl<$Res, DailyNutrition>; + DailyNutrition value, + $Res Function(DailyNutrition) then, + ) = _$DailyNutritionCopyWithImpl<$Res, DailyNutrition>; @useResult - $Res call( - {@JsonKey(name: 'energy') double energy, - @JsonKey(name: 'proteins') double proteins, - @JsonKey(name: 'fats') double fats, - @JsonKey(name: 'carbohydrates') double carbohydrates}); + $Res call({ + @JsonKey(name: 'energy') double energy, + @JsonKey(name: 'proteins') double proteins, + @JsonKey(name: 'fats') double fats, + @JsonKey(name: 'carbohydrates') double carbohydrates, + }); } /// @nodoc @@ -1827,40 +1960,49 @@ class _$DailyNutritionCopyWithImpl<$Res, $Val extends DailyNutrition> Object? fats = null, Object? carbohydrates = null, }) { - return _then(_value.copyWith( - energy: null == energy - ? _value.energy - : energy // ignore: cast_nullable_to_non_nullable - as double, - proteins: null == proteins - ? _value.proteins - : proteins // ignore: cast_nullable_to_non_nullable - as double, - fats: null == fats - ? _value.fats - : fats // ignore: cast_nullable_to_non_nullable - as double, - carbohydrates: null == carbohydrates - ? _value.carbohydrates - : carbohydrates // ignore: cast_nullable_to_non_nullable - as double, - ) as $Val); + return _then( + _value.copyWith( + energy: + null == energy + ? _value.energy + : energy // ignore: cast_nullable_to_non_nullable + as double, + proteins: + null == proteins + ? _value.proteins + : proteins // ignore: cast_nullable_to_non_nullable + as double, + fats: + null == fats + ? _value.fats + : fats // ignore: cast_nullable_to_non_nullable + as double, + carbohydrates: + null == carbohydrates + ? _value.carbohydrates + : carbohydrates // ignore: cast_nullable_to_non_nullable + as double, + ) + as $Val, + ); } } /// @nodoc abstract class _$$DailyNutritionImplCopyWith<$Res> implements $DailyNutritionCopyWith<$Res> { - factory _$$DailyNutritionImplCopyWith(_$DailyNutritionImpl value, - $Res Function(_$DailyNutritionImpl) then) = - __$$DailyNutritionImplCopyWithImpl<$Res>; + factory _$$DailyNutritionImplCopyWith( + _$DailyNutritionImpl value, + $Res Function(_$DailyNutritionImpl) then, + ) = __$$DailyNutritionImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: 'energy') double energy, - @JsonKey(name: 'proteins') double proteins, - @JsonKey(name: 'fats') double fats, - @JsonKey(name: 'carbohydrates') double carbohydrates}); + $Res call({ + @JsonKey(name: 'energy') double energy, + @JsonKey(name: 'proteins') double proteins, + @JsonKey(name: 'fats') double fats, + @JsonKey(name: 'carbohydrates') double carbohydrates, + }); } /// @nodoc @@ -1868,8 +2010,9 @@ class __$$DailyNutritionImplCopyWithImpl<$Res> extends _$DailyNutritionCopyWithImpl<$Res, _$DailyNutritionImpl> implements _$$DailyNutritionImplCopyWith<$Res> { __$$DailyNutritionImplCopyWithImpl( - _$DailyNutritionImpl _value, $Res Function(_$DailyNutritionImpl) _then) - : super(_value, _then); + _$DailyNutritionImpl _value, + $Res Function(_$DailyNutritionImpl) _then, + ) : super(_value, _then); /// Create a copy of DailyNutrition /// with the given fields replaced by the non-null parameter values. @@ -1881,35 +2024,42 @@ class __$$DailyNutritionImplCopyWithImpl<$Res> Object? fats = null, Object? carbohydrates = null, }) { - return _then(_$DailyNutritionImpl( - energy: null == energy - ? _value.energy - : energy // ignore: cast_nullable_to_non_nullable - as double, - proteins: null == proteins - ? _value.proteins - : proteins // ignore: cast_nullable_to_non_nullable - as double, - fats: null == fats - ? _value.fats - : fats // ignore: cast_nullable_to_non_nullable - as double, - carbohydrates: null == carbohydrates - ? _value.carbohydrates - : carbohydrates // ignore: cast_nullable_to_non_nullable - as double, - )); + return _then( + _$DailyNutritionImpl( + energy: + null == energy + ? _value.energy + : energy // ignore: cast_nullable_to_non_nullable + as double, + proteins: + null == proteins + ? _value.proteins + : proteins // ignore: cast_nullable_to_non_nullable + as double, + fats: + null == fats + ? _value.fats + : fats // ignore: cast_nullable_to_non_nullable + as double, + carbohydrates: + null == carbohydrates + ? _value.carbohydrates + : carbohydrates // ignore: cast_nullable_to_non_nullable + as double, + ), + ); } } /// @nodoc @JsonSerializable() class _$DailyNutritionImpl implements _DailyNutrition { - const _$DailyNutritionImpl( - {@JsonKey(name: 'energy') required this.energy, - @JsonKey(name: 'proteins') required this.proteins, - @JsonKey(name: 'fats') required this.fats, - @JsonKey(name: 'carbohydrates') required this.carbohydrates}); + const _$DailyNutritionImpl({ + @JsonKey(name: 'energy') required this.energy, + @JsonKey(name: 'proteins') required this.proteins, + @JsonKey(name: 'fats') required this.fats, + @JsonKey(name: 'carbohydrates') required this.carbohydrates, + }); factory _$DailyNutritionImpl.fromJson(Map json) => _$$DailyNutritionImplFromJson(json); @@ -1957,23 +2107,23 @@ class _$DailyNutritionImpl implements _DailyNutrition { @pragma('vm:prefer-inline') _$$DailyNutritionImplCopyWith<_$DailyNutritionImpl> get copyWith => __$$DailyNutritionImplCopyWithImpl<_$DailyNutritionImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$DailyNutritionImplToJson( - this, - ); + return _$$DailyNutritionImplToJson(this); } } abstract class _DailyNutrition implements DailyNutrition { - const factory _DailyNutrition( - {@JsonKey(name: 'energy') required final double energy, - @JsonKey(name: 'proteins') required final double proteins, - @JsonKey(name: 'fats') required final double fats, - @JsonKey(name: 'carbohydrates') - required final double carbohydrates}) = _$DailyNutritionImpl; + const factory _DailyNutrition({ + @JsonKey(name: 'energy') required final double energy, + @JsonKey(name: 'proteins') required final double proteins, + @JsonKey(name: 'fats') required final double fats, + @JsonKey(name: 'carbohydrates') required final double carbohydrates, + }) = _$DailyNutritionImpl; factory _DailyNutrition.fromJson(Map json) = _$DailyNutritionImpl.fromJson; diff --git a/lib/features/feed/models/diets_pagination_model.g.dart b/lib/features/feed/models/diets_pagination_model.g.dart index 3e7099a5..f8e66d9f 100644 --- a/lib/features/feed/models/diets_pagination_model.g.dart +++ b/lib/features/feed/models/diets_pagination_model.g.dart @@ -7,75 +7,87 @@ part of 'diets_pagination_model.dart'; // ************************************************************************** _$DietsPaginationImpl _$$DietsPaginationImplFromJson( - Map json) => - _$DietsPaginationImpl( - data: (json['data'] as List) + Map json, +) => _$DietsPaginationImpl( + data: + (json['data'] as List) .map((e) => Diet.fromJson(e as Map)) .toList(), - links: Links.fromJson(json['links'] as Map), - meta: Meta.fromJson(json['meta'] as Map), - ); + links: Links.fromJson(json['links'] as Map), + meta: Meta.fromJson(json['meta'] as Map), +); Map _$$DietsPaginationImplToJson( - _$DietsPaginationImpl instance) => - { - 'data': instance.data, - 'links': instance.links, - 'meta': instance.meta, - }; + _$DietsPaginationImpl instance, +) => { + 'data': instance.data, + 'links': instance.links, + 'meta': instance.meta, +}; _$DietImpl _$$DietImplFromJson(Map json) => _$DietImpl( - id: (json['id'] as num).toInt(), - name: json['name'] as String, - image: json['image'] as String, - duration: (json['duration'] as num).toInt(), - state: $enumDecode(_$DietStateEnumMap, json['state']), - type: DietType.fromJson(json['type'] as Map), - details: json['details'] as String, - dailySchedule: (json['daily_schedule'] as Map).map( + id: (json['id'] as num).toInt(), + name: json['name'] as String, + image: json['image'] as String, + duration: (json['duration'] as num).toInt(), + state: $enumDecode(_$DietStateEnumMap, json['state']), + type: DietType.fromJson(json['type'] as Map), + details: json['details'] as String, + dailySchedule: (json['daily_schedule'] as Map).map( + (k, e) => MapEntry( + int.parse(k), + (e as Map).map( (k, e) => MapEntry( - int.parse(k), - (e as Map).map( - (k, e) => MapEntry( - int.parse(k), - (e as Map).map( - (k, e) => MapEntry(int.parse(k), - DailySchedule.fromJson(e as Map)), - )), - )), + int.parse(k), + (e as Map).map( + (k, e) => MapEntry( + int.parse(k), + DailySchedule.fromJson(e as Map), + ), + ), + ), ), - author: Author.fromJson(json['author'] as Map), - totalLikes: (json['total_likes'] as num).toInt(), - totalViews: (json['total_views'] as num).toInt(), - totalComments: (json['total_comments'] as num).toInt(), - wasLikedByMe: json['was_liked_by_me'] as bool, - isFavorite: json['is_favorite'] as bool, - dailyNutrition: (json['daily_nutrition'] as List) + ), + ), + author: Author.fromJson(json['author'] as Map), + totalLikes: (json['total_likes'] as num).toInt(), + totalViews: (json['total_views'] as num).toInt(), + totalComments: (json['total_comments'] as num).toInt(), + wasLikedByMe: json['was_liked_by_me'] as bool, + isFavorite: json['is_favorite'] as bool, + dailyNutrition: + (json['daily_nutrition'] as List) .map((e) => DailyNutrition.fromJson(e as Map)) .toList(), - ); +); -Map _$$DietImplToJson(_$DietImpl instance) => - { - 'id': instance.id, - 'name': instance.name, - 'image': instance.image, - 'duration': instance.duration, - 'state': _$DietStateEnumMap[instance.state]!, - 'type': instance.type, - 'details': instance.details, - 'daily_schedule': instance.dailySchedule.map((k, e) => MapEntry( - k.toString(), - e.map((k, e) => MapEntry( - k.toString(), e.map((k, e) => MapEntry(k.toString(), e)))))), - 'author': instance.author, - 'total_likes': instance.totalLikes, - 'total_views': instance.totalViews, - 'total_comments': instance.totalComments, - 'was_liked_by_me': instance.wasLikedByMe, - 'is_favorite': instance.isFavorite, - 'daily_nutrition': instance.dailyNutrition, - }; +Map _$$DietImplToJson( + _$DietImpl instance, +) => { + 'id': instance.id, + 'name': instance.name, + 'image': instance.image, + 'duration': instance.duration, + 'state': _$DietStateEnumMap[instance.state]!, + 'type': instance.type, + 'details': instance.details, + 'daily_schedule': instance.dailySchedule.map( + (k, e) => MapEntry( + k.toString(), + e.map( + (k, e) => + MapEntry(k.toString(), e.map((k, e) => MapEntry(k.toString(), e))), + ), + ), + ), + 'author': instance.author, + 'total_likes': instance.totalLikes, + 'total_views': instance.totalViews, + 'total_comments': instance.totalComments, + 'was_liked_by_me': instance.wasLikedByMe, + 'is_favorite': instance.isFavorite, + 'daily_nutrition': instance.dailyNutrition, +}; const _$DietStateEnumMap = { DietState.active: 'active', @@ -84,23 +96,19 @@ const _$DietStateEnumMap = { }; _$CreatedDietImpl _$$CreatedDietImplFromJson(Map json) => - _$CreatedDietImpl( - id: (json['id'] as num).toInt(), - ); + _$CreatedDietImpl(id: (json['id'] as num).toInt()); Map _$$CreatedDietImplToJson(_$CreatedDietImpl instance) => - { - 'id': instance.id, - }; + {'id': instance.id}; _$AuthorImpl _$$AuthorImplFromJson(Map json) => _$AuthorImpl( - authorSlug: json['author_slug'] as String, - authorName: json['author_name'] as String, - authorProfileIcon: json['author_profile_icon'] as String, - authorIsMe: json['author_is_me'] as bool, - isEntitySubscribedByMe: json['is_entity_subscribed_by_me'] as bool?, - authorPlaceInRating: (json['author_place_in_rating'] as num?)?.toInt(), - ); + authorSlug: json['author_slug'] as String, + authorName: json['author_name'] as String, + authorProfileIcon: json['author_profile_icon'] as String, + authorIsMe: json['author_is_me'] as bool, + isEntitySubscribedByMe: json['is_entity_subscribed_by_me'] as bool?, + authorPlaceInRating: (json['author_place_in_rating'] as num?)?.toInt(), +); Map _$$AuthorImplToJson(_$AuthorImpl instance) => { @@ -117,9 +125,12 @@ _$DailyScheduleImpl _$$DailyScheduleImplFromJson(Map json) => name: json['name'] as String, portion: $enumDecode(_$PortionEnumMap, json['portion']), quantity: _parseQuantity(json['quantity']), - dailyNutrition: json['nutrition'] == null - ? null - : DailyNutrition.fromJson(json['nutrition'] as Map), + dailyNutrition: + json['nutrition'] == null + ? null + : DailyNutrition.fromJson( + json['nutrition'] as Map, + ), ); Map _$$DailyScheduleImplToJson(_$DailyScheduleImpl instance) => @@ -162,10 +173,10 @@ _$DailyNutritionImpl _$$DailyNutritionImplFromJson(Map json) => ); Map _$$DailyNutritionImplToJson( - _$DailyNutritionImpl instance) => - { - 'energy': instance.energy, - 'proteins': instance.proteins, - 'fats': instance.fats, - 'carbohydrates': instance.carbohydrates, - }; + _$DailyNutritionImpl instance, +) => { + 'energy': instance.energy, + 'proteins': instance.proteins, + 'fats': instance.fats, + 'carbohydrates': instance.carbohydrates, +}; 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 4b2ad476..48ffdc6b 100644 --- a/lib/features/feed/models/feed_blog_post_model.freezed.dart +++ b/lib/features/feed/models/feed_blog_post_model.freezed.dart @@ -12,7 +12,8 @@ part of 'feed_blog_post_model.dart'; 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'); + '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', +); FeedBlogPostModel _$FeedBlogPostModelFromJson(Map json) { return _FeedBlogPostModel.fromJson(json); @@ -54,23 +55,25 @@ mixin _$FeedBlogPostModel { /// @nodoc abstract class $FeedBlogPostModelCopyWith<$Res> { factory $FeedBlogPostModelCopyWith( - FeedBlogPostModel value, $Res Function(FeedBlogPostModel) then) = - _$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>; + FeedBlogPostModel value, + $Res Function(FeedBlogPostModel) then, + ) = _$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>; @useResult - $Res call( - {int id, - String state, - String image, - String description, - Author author, - @JsonKey(name: "video_url") String videoUrl, - @JsonKey(name: "created_at", fromJson: parseDate) DateTime createdAt, - @JsonKey(name: "updated_at", fromJson: parseDate) DateTime updatedAt, - String title, - @JsonKey(name: "total_likes") int totalLikes, - @JsonKey(name: "total_views") int totalViews, - @JsonKey(name: "total_comments") int totalComments, - @JsonKey(name: "was_liked_by_me") bool wasLikedByMe}); + $Res call({ + int id, + String state, + String image, + String description, + Author author, + @JsonKey(name: "video_url") String videoUrl, + @JsonKey(name: "created_at", fromJson: parseDate) DateTime createdAt, + @JsonKey(name: "updated_at", fromJson: parseDate) DateTime updatedAt, + String title, + @JsonKey(name: "total_likes") int totalLikes, + @JsonKey(name: "total_views") int totalViews, + @JsonKey(name: "total_comments") int totalComments, + @JsonKey(name: "was_liked_by_me") bool wasLikedByMe, + }); $AuthorCopyWith<$Res> get author; } @@ -104,60 +107,76 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel> Object? totalComments = null, Object? wasLikedByMe = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String, - image: null == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - author: null == author - ? _value.author - : author // ignore: cast_nullable_to_non_nullable - as Author, - videoUrl: null == videoUrl - ? _value.videoUrl - : videoUrl // ignore: cast_nullable_to_non_nullable - as String, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - totalLikes: null == totalLikes - ? _value.totalLikes - : totalLikes // ignore: cast_nullable_to_non_nullable - as int, - totalViews: null == totalViews - ? _value.totalViews - : totalViews // ignore: cast_nullable_to_non_nullable - as int, - totalComments: null == totalComments - ? _value.totalComments - : totalComments // ignore: cast_nullable_to_non_nullable - as int, - wasLikedByMe: null == wasLikedByMe - ? _value.wasLikedByMe - : wasLikedByMe // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + state: + null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String, + image: + null == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String, + description: + null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + author: + null == author + ? _value.author + : author // ignore: cast_nullable_to_non_nullable + as Author, + videoUrl: + null == videoUrl + ? _value.videoUrl + : videoUrl // ignore: cast_nullable_to_non_nullable + as String, + createdAt: + null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: + null == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + totalLikes: + null == totalLikes + ? _value.totalLikes + : totalLikes // ignore: cast_nullable_to_non_nullable + as int, + totalViews: + null == totalViews + ? _value.totalViews + : totalViews // ignore: cast_nullable_to_non_nullable + as int, + totalComments: + null == totalComments + ? _value.totalComments + : totalComments // ignore: cast_nullable_to_non_nullable + as int, + wasLikedByMe: + null == wasLikedByMe + ? _value.wasLikedByMe + : wasLikedByMe // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } /// Create a copy of FeedBlogPostModel @@ -174,25 +193,27 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel> /// @nodoc abstract class _$$FeedBlogPostModelImplCopyWith<$Res> implements $FeedBlogPostModelCopyWith<$Res> { - factory _$$FeedBlogPostModelImplCopyWith(_$FeedBlogPostModelImpl value, - $Res Function(_$FeedBlogPostModelImpl) then) = - __$$FeedBlogPostModelImplCopyWithImpl<$Res>; + factory _$$FeedBlogPostModelImplCopyWith( + _$FeedBlogPostModelImpl value, + $Res Function(_$FeedBlogPostModelImpl) then, + ) = __$$FeedBlogPostModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - String state, - String image, - String description, - Author author, - @JsonKey(name: "video_url") String videoUrl, - @JsonKey(name: "created_at", fromJson: parseDate) DateTime createdAt, - @JsonKey(name: "updated_at", fromJson: parseDate) DateTime updatedAt, - String title, - @JsonKey(name: "total_likes") int totalLikes, - @JsonKey(name: "total_views") int totalViews, - @JsonKey(name: "total_comments") int totalComments, - @JsonKey(name: "was_liked_by_me") bool wasLikedByMe}); + $Res call({ + int id, + String state, + String image, + String description, + Author author, + @JsonKey(name: "video_url") String videoUrl, + @JsonKey(name: "created_at", fromJson: parseDate) DateTime createdAt, + @JsonKey(name: "updated_at", fromJson: parseDate) DateTime updatedAt, + String title, + @JsonKey(name: "total_likes") int totalLikes, + @JsonKey(name: "total_views") int totalViews, + @JsonKey(name: "total_comments") int totalComments, + @JsonKey(name: "was_liked_by_me") bool wasLikedByMe, + }); @override $AuthorCopyWith<$Res> get author; @@ -202,9 +223,10 @@ abstract class _$$FeedBlogPostModelImplCopyWith<$Res> class __$$FeedBlogPostModelImplCopyWithImpl<$Res> extends _$FeedBlogPostModelCopyWithImpl<$Res, _$FeedBlogPostModelImpl> implements _$$FeedBlogPostModelImplCopyWith<$Res> { - __$$FeedBlogPostModelImplCopyWithImpl(_$FeedBlogPostModelImpl _value, - $Res Function(_$FeedBlogPostModelImpl) _then) - : super(_value, _then); + __$$FeedBlogPostModelImplCopyWithImpl( + _$FeedBlogPostModelImpl _value, + $Res Function(_$FeedBlogPostModelImpl) _then, + ) : super(_value, _then); /// Create a copy of FeedBlogPostModel /// with the given fields replaced by the non-null parameter values. @@ -225,80 +247,96 @@ class __$$FeedBlogPostModelImplCopyWithImpl<$Res> Object? totalComments = null, Object? wasLikedByMe = null, }) { - return _then(_$FeedBlogPostModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String, - image: null == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - author: null == author - ? _value.author - : author // ignore: cast_nullable_to_non_nullable - as Author, - videoUrl: null == videoUrl - ? _value.videoUrl - : videoUrl // ignore: cast_nullable_to_non_nullable - as String, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - totalLikes: null == totalLikes - ? _value.totalLikes - : totalLikes // ignore: cast_nullable_to_non_nullable - as int, - totalViews: null == totalViews - ? _value.totalViews - : totalViews // ignore: cast_nullable_to_non_nullable - as int, - totalComments: null == totalComments - ? _value.totalComments - : totalComments // ignore: cast_nullable_to_non_nullable - as int, - wasLikedByMe: null == wasLikedByMe - ? _value.wasLikedByMe - : wasLikedByMe // ignore: cast_nullable_to_non_nullable - as bool, - )); + return _then( + _$FeedBlogPostModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + state: + null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String, + image: + null == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String, + description: + null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + author: + null == author + ? _value.author + : author // ignore: cast_nullable_to_non_nullable + as Author, + videoUrl: + null == videoUrl + ? _value.videoUrl + : videoUrl // ignore: cast_nullable_to_non_nullable + as String, + createdAt: + null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: + null == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + totalLikes: + null == totalLikes + ? _value.totalLikes + : totalLikes // ignore: cast_nullable_to_non_nullable + as int, + totalViews: + null == totalViews + ? _value.totalViews + : totalViews // ignore: cast_nullable_to_non_nullable + as int, + totalComments: + null == totalComments + ? _value.totalComments + : totalComments // ignore: cast_nullable_to_non_nullable + as int, + wasLikedByMe: + null == wasLikedByMe + ? _value.wasLikedByMe + : wasLikedByMe // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } /// @nodoc @JsonSerializable() class _$FeedBlogPostModelImpl implements _FeedBlogPostModel { - const _$FeedBlogPostModelImpl( - {required this.id, - required this.state, - required this.image, - required this.description, - required this.author, - @JsonKey(name: "video_url") required this.videoUrl, - @JsonKey(name: "created_at", fromJson: parseDate) required this.createdAt, - @JsonKey(name: "updated_at", fromJson: parseDate) required this.updatedAt, - required this.title, - @JsonKey(name: "total_likes") required this.totalLikes, - @JsonKey(name: "total_views") required this.totalViews, - @JsonKey(name: "total_comments") required this.totalComments, - @JsonKey(name: "was_liked_by_me") required this.wasLikedByMe}); + const _$FeedBlogPostModelImpl({ + required this.id, + required this.state, + required this.image, + required this.description, + required this.author, + @JsonKey(name: "video_url") required this.videoUrl, + @JsonKey(name: "created_at", fromJson: parseDate) required this.createdAt, + @JsonKey(name: "updated_at", fromJson: parseDate) required this.updatedAt, + required this.title, + @JsonKey(name: "total_likes") required this.totalLikes, + @JsonKey(name: "total_views") required this.totalViews, + @JsonKey(name: "total_comments") required this.totalComments, + @JsonKey(name: "was_liked_by_me") required this.wasLikedByMe, + }); factory _$FeedBlogPostModelImpl.fromJson(Map json) => _$$FeedBlogPostModelImplFromJson(json); @@ -373,20 +411,21 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - id, - state, - image, - description, - author, - videoUrl, - createdAt, - updatedAt, - title, - totalLikes, - totalViews, - totalComments, - wasLikedByMe); + runtimeType, + id, + state, + image, + description, + author, + videoUrl, + createdAt, + updatedAt, + title, + totalLikes, + totalViews, + totalComments, + wasLikedByMe, + ); /// Create a copy of FeedBlogPostModel /// with the given fields replaced by the non-null parameter values. @@ -395,34 +434,34 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel { @pragma('vm:prefer-inline') _$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith => __$$FeedBlogPostModelImplCopyWithImpl<_$FeedBlogPostModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$FeedBlogPostModelImplToJson( - this, - ); + return _$$FeedBlogPostModelImplToJson(this); } } abstract class _FeedBlogPostModel implements FeedBlogPostModel { - const factory _FeedBlogPostModel( - {required final int id, - required final String state, - required final String image, - required final String description, - required final Author author, - @JsonKey(name: "video_url") required final String videoUrl, - @JsonKey(name: "created_at", fromJson: parseDate) - required final DateTime createdAt, - @JsonKey(name: "updated_at", fromJson: parseDate) - required final DateTime updatedAt, - required final String title, - @JsonKey(name: "total_likes") required final int totalLikes, - @JsonKey(name: "total_views") required final int totalViews, - @JsonKey(name: "total_comments") required final int totalComments, - @JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe}) = - _$FeedBlogPostModelImpl; + const factory _FeedBlogPostModel({ + required final int id, + required final String state, + required final String image, + required final String description, + required final Author author, + @JsonKey(name: "video_url") required final String videoUrl, + @JsonKey(name: "created_at", fromJson: parseDate) + required final DateTime createdAt, + @JsonKey(name: "updated_at", fromJson: parseDate) + required final DateTime updatedAt, + required final String title, + @JsonKey(name: "total_likes") required final int totalLikes, + @JsonKey(name: "total_views") required final int totalViews, + @JsonKey(name: "total_comments") required final int totalComments, + @JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe, + }) = _$FeedBlogPostModelImpl; factory _FeedBlogPostModel.fromJson(Map json) = _$FeedBlogPostModelImpl.fromJson; diff --git a/lib/features/feed/models/feed_blog_post_model.g.dart b/lib/features/feed/models/feed_blog_post_model.g.dart index 024d2b47..82fe9e9f 100644 --- a/lib/features/feed/models/feed_blog_post_model.g.dart +++ b/lib/features/feed/models/feed_blog_post_model.g.dart @@ -7,37 +7,37 @@ part of 'feed_blog_post_model.dart'; // ************************************************************************** _$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson( - Map json) => - _$FeedBlogPostModelImpl( - id: (json['id'] as num).toInt(), - state: json['state'] as String, - image: json['image'] as String, - description: json['description'] as String, - author: Author.fromJson(json['author'] as Map), - videoUrl: json['video_url'] as String, - createdAt: parseDate(json['created_at'] as String), - updatedAt: parseDate(json['updated_at'] as String), - title: json['title'] as String, - totalLikes: (json['total_likes'] as num).toInt(), - totalViews: (json['total_views'] as num).toInt(), - totalComments: (json['total_comments'] as num).toInt(), - wasLikedByMe: json['was_liked_by_me'] as bool, - ); + Map json, +) => _$FeedBlogPostModelImpl( + id: (json['id'] as num).toInt(), + state: json['state'] as String, + image: json['image'] as String, + description: json['description'] as String, + author: Author.fromJson(json['author'] as Map), + videoUrl: json['video_url'] as String, + createdAt: parseDate(json['created_at'] as String), + updatedAt: parseDate(json['updated_at'] as String), + title: json['title'] as String, + totalLikes: (json['total_likes'] as num).toInt(), + totalViews: (json['total_views'] as num).toInt(), + totalComments: (json['total_comments'] as num).toInt(), + wasLikedByMe: json['was_liked_by_me'] as bool, +); Map _$$FeedBlogPostModelImplToJson( - _$FeedBlogPostModelImpl instance) => - { - 'id': instance.id, - 'state': instance.state, - 'image': instance.image, - 'description': instance.description, - 'author': instance.author, - 'video_url': instance.videoUrl, - 'created_at': instance.createdAt.toIso8601String(), - 'updated_at': instance.updatedAt.toIso8601String(), - 'title': instance.title, - 'total_likes': instance.totalLikes, - 'total_views': instance.totalViews, - 'total_comments': instance.totalComments, - 'was_liked_by_me': instance.wasLikedByMe, - }; + _$FeedBlogPostModelImpl instance, +) => { + 'id': instance.id, + 'state': instance.state, + 'image': instance.image, + 'description': instance.description, + 'author': instance.author, + 'video_url': instance.videoUrl, + 'created_at': instance.createdAt.toIso8601String(), + 'updated_at': instance.updatedAt.toIso8601String(), + 'title': instance.title, + 'total_likes': instance.totalLikes, + 'total_views': instance.totalViews, + 'total_comments': instance.totalComments, + 'was_liked_by_me': instance.wasLikedByMe, +}; 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..fb7c0eb3 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 @@ -12,10 +12,12 @@ part of 'feed_blog_post_settings_model.dart'; 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'); + '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', +); FeedBlogPostSettingsModel _$FeedBlogPostSettingsModelFromJson( - Map json) { + Map json, +) { return _FeedBlogPostSettingsModel.fromJson(json); } @@ -38,20 +40,24 @@ mixin _$FeedBlogPostSettingsModel { /// @nodoc abstract class $FeedBlogPostSettingsModelCopyWith<$Res> { - factory $FeedBlogPostSettingsModelCopyWith(FeedBlogPostSettingsModel value, - $Res Function(FeedBlogPostSettingsModel) then) = - _$FeedBlogPostSettingsModelCopyWithImpl<$Res, FeedBlogPostSettingsModel>; + factory $FeedBlogPostSettingsModelCopyWith( + FeedBlogPostSettingsModel value, + $Res Function(FeedBlogPostSettingsModel) then, + ) = _$FeedBlogPostSettingsModelCopyWithImpl<$Res, FeedBlogPostSettingsModel>; @useResult - $Res call( - {@JsonKey(name: 'data') List feedBlogPostList, - Meta meta}); + $Res call({ + @JsonKey(name: 'data') List feedBlogPostList, + Meta meta, + }); $MetaCopyWith<$Res> get meta; } /// @nodoc -class _$FeedBlogPostSettingsModelCopyWithImpl<$Res, - $Val extends FeedBlogPostSettingsModel> +class _$FeedBlogPostSettingsModelCopyWithImpl< + $Res, + $Val extends FeedBlogPostSettingsModel +> implements $FeedBlogPostSettingsModelCopyWith<$Res> { _$FeedBlogPostSettingsModelCopyWithImpl(this._value, this._then); @@ -64,20 +70,22 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? feedBlogPostList = null, - Object? meta = null, - }) { - return _then(_value.copyWith( - feedBlogPostList: null == feedBlogPostList - ? _value.feedBlogPostList - : feedBlogPostList // ignore: cast_nullable_to_non_nullable - as List, - meta: null == meta - ? _value.meta - : meta // ignore: cast_nullable_to_non_nullable - as Meta, - ) as $Val); + $Res call({Object? feedBlogPostList = null, Object? meta = null}) { + return _then( + _value.copyWith( + feedBlogPostList: + null == feedBlogPostList + ? _value.feedBlogPostList + : feedBlogPostList // ignore: cast_nullable_to_non_nullable + as List, + meta: + null == meta + ? _value.meta + : meta // ignore: cast_nullable_to_non_nullable + as Meta, + ) + as $Val, + ); } /// Create a copy of FeedBlogPostSettingsModel @@ -95,14 +103,15 @@ class _$FeedBlogPostSettingsModelCopyWithImpl<$Res, abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res> implements $FeedBlogPostSettingsModelCopyWith<$Res> { factory _$$FeedBlogPostSettingsModelImplCopyWith( - _$FeedBlogPostSettingsModelImpl value, - $Res Function(_$FeedBlogPostSettingsModelImpl) then) = - __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>; + _$FeedBlogPostSettingsModelImpl value, + $Res Function(_$FeedBlogPostSettingsModelImpl) then, + ) = __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: 'data') List feedBlogPostList, - Meta meta}); + $Res call({ + @JsonKey(name: 'data') List feedBlogPostList, + Meta meta, + }); @override $MetaCopyWith<$Res> get meta; @@ -110,43 +119,47 @@ abstract class _$$FeedBlogPostSettingsModelImplCopyWith<$Res> /// @nodoc class __$$FeedBlogPostSettingsModelImplCopyWithImpl<$Res> - extends _$FeedBlogPostSettingsModelCopyWithImpl<$Res, - _$FeedBlogPostSettingsModelImpl> + extends + _$FeedBlogPostSettingsModelCopyWithImpl< + $Res, + _$FeedBlogPostSettingsModelImpl + > implements _$$FeedBlogPostSettingsModelImplCopyWith<$Res> { __$$FeedBlogPostSettingsModelImplCopyWithImpl( - _$FeedBlogPostSettingsModelImpl _value, - $Res Function(_$FeedBlogPostSettingsModelImpl) _then) - : super(_value, _then); + _$FeedBlogPostSettingsModelImpl _value, + $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({ - Object? feedBlogPostList = null, - Object? meta = null, - }) { - return _then(_$FeedBlogPostSettingsModelImpl( - feedBlogPostList: null == feedBlogPostList - ? _value._feedBlogPostList - : feedBlogPostList // ignore: cast_nullable_to_non_nullable - as List, - meta: null == meta - ? _value.meta - : meta // ignore: cast_nullable_to_non_nullable - as Meta, - )); + $Res call({Object? feedBlogPostList = null, Object? meta = null}) { + return _then( + _$FeedBlogPostSettingsModelImpl( + feedBlogPostList: + null == feedBlogPostList + ? _value._feedBlogPostList + : feedBlogPostList // ignore: cast_nullable_to_non_nullable + as List, + meta: + null == meta + ? _value.meta + : meta // ignore: cast_nullable_to_non_nullable + as Meta, + ), + ); } } /// @nodoc @JsonSerializable() class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel { - const _$FeedBlogPostSettingsModelImpl( - {@JsonKey(name: 'data') - required final List feedBlogPostList, - required this.meta}) - : _feedBlogPostList = feedBlogPostList; + const _$FeedBlogPostSettingsModelImpl({ + @JsonKey(name: 'data') + required final List feedBlogPostList, + required this.meta, + }) : _feedBlogPostList = feedBlogPostList; factory _$FeedBlogPostSettingsModelImpl.fromJson(Map json) => _$$FeedBlogPostSettingsModelImplFromJson(json); @@ -174,15 +187,20 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FeedBlogPostSettingsModelImpl && - const DeepCollectionEquality() - .equals(other._feedBlogPostList, _feedBlogPostList) && + const DeepCollectionEquality().equals( + other._feedBlogPostList, + _feedBlogPostList, + ) && (identical(other.meta, meta) || other.meta == meta)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(_feedBlogPostList), meta); + 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. @@ -190,22 +208,22 @@ class _$FeedBlogPostSettingsModelImpl implements _FeedBlogPostSettingsModel { @override @pragma('vm:prefer-inline') _$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl> - get copyWith => __$$FeedBlogPostSettingsModelImplCopyWithImpl< - _$FeedBlogPostSettingsModelImpl>(this, _$identity); + get copyWith => __$$FeedBlogPostSettingsModelImplCopyWithImpl< + _$FeedBlogPostSettingsModelImpl + >(this, _$identity); @override Map toJson() { - return _$$FeedBlogPostSettingsModelImplToJson( - this, - ); + return _$$FeedBlogPostSettingsModelImplToJson(this); } } abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel { - const factory _FeedBlogPostSettingsModel( - {@JsonKey(name: 'data') - required final List feedBlogPostList, - required final Meta meta}) = _$FeedBlogPostSettingsModelImpl; + const factory _FeedBlogPostSettingsModel({ + @JsonKey(name: 'data') + required final List feedBlogPostList, + required final Meta meta, + }) = _$FeedBlogPostSettingsModelImpl; factory _FeedBlogPostSettingsModel.fromJson(Map json) = _$FeedBlogPostSettingsModelImpl.fromJson; @@ -221,5 +239,5 @@ abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel { @override @JsonKey(includeFromJson: false, includeToJson: false) _$$FeedBlogPostSettingsModelImplCopyWith<_$FeedBlogPostSettingsModelImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/features/feed/models/feed_blog_post_settings_model.g.dart b/lib/features/feed/models/feed_blog_post_settings_model.g.dart index e300b594..510c3c4f 100644 --- a/lib/features/feed/models/feed_blog_post_settings_model.g.dart +++ b/lib/features/feed/models/feed_blog_post_settings_model.g.dart @@ -7,17 +7,18 @@ part of 'feed_blog_post_settings_model.dart'; // ************************************************************************** _$FeedBlogPostSettingsModelImpl _$$FeedBlogPostSettingsModelImplFromJson( - Map json) => - _$FeedBlogPostSettingsModelImpl( - feedBlogPostList: (json['data'] as List) + Map json, +) => _$FeedBlogPostSettingsModelImpl( + feedBlogPostList: + (json['data'] as List) .map((e) => FeedBlogPostModel.fromJson(e as Map)) .toList(), - meta: Meta.fromJson(json['meta'] as Map), - ); + meta: Meta.fromJson(json['meta'] as Map), +); Map _$$FeedBlogPostSettingsModelImplToJson( - _$FeedBlogPostSettingsModelImpl instance) => - { - 'data': instance.feedBlogPostList, - 'meta': instance.meta, - }; + _$FeedBlogPostSettingsModelImpl instance, +) => { + 'data': instance.feedBlogPostList, + 'meta': instance.meta, +}; diff --git a/lib/features/feed/models/feed_consultant_model.freezed.dart b/lib/features/feed/models/feed_consultant_model.freezed.dart index 221e7201..45ff6369 100644 --- a/lib/features/feed/models/feed_consultant_model.freezed.dart +++ b/lib/features/feed/models/feed_consultant_model.freezed.dart @@ -12,10 +12,12 @@ part of 'feed_consultant_model.dart'; 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'); + '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', +); FeedConsultantPaginationModel _$FeedConsultantPaginationModelFromJson( - Map json) { + Map json, +) { return _FeedConsultantPaginationModel.fromJson(json); } @@ -32,16 +34,19 @@ mixin _$FeedConsultantPaginationModel { /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) $FeedConsultantPaginationModelCopyWith - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $FeedConsultantPaginationModelCopyWith<$Res> { factory $FeedConsultantPaginationModelCopyWith( - FeedConsultantPaginationModel value, - $Res Function(FeedConsultantPaginationModel) then) = - _$FeedConsultantPaginationModelCopyWithImpl<$Res, - FeedConsultantPaginationModel>; + FeedConsultantPaginationModel value, + $Res Function(FeedConsultantPaginationModel) then, + ) = + _$FeedConsultantPaginationModelCopyWithImpl< + $Res, + FeedConsultantPaginationModel + >; @useResult $Res call({List data, Links links, Meta meta}); @@ -50,8 +55,10 @@ abstract class $FeedConsultantPaginationModelCopyWith<$Res> { } /// @nodoc -class _$FeedConsultantPaginationModelCopyWithImpl<$Res, - $Val extends FeedConsultantPaginationModel> +class _$FeedConsultantPaginationModelCopyWithImpl< + $Res, + $Val extends FeedConsultantPaginationModel +> implements $FeedConsultantPaginationModelCopyWith<$Res> { _$FeedConsultantPaginationModelCopyWithImpl(this._value, this._then); @@ -64,25 +71,27 @@ class _$FeedConsultantPaginationModelCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? data = null, - Object? links = null, - Object? meta = null, - }) { - return _then(_value.copyWith( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as List, - links: null == links - ? _value.links - : links // ignore: cast_nullable_to_non_nullable - as Links, - meta: null == meta - ? _value.meta - : meta // ignore: cast_nullable_to_non_nullable - as Meta, - ) as $Val); + $Res call({Object? data = null, Object? links = null, Object? meta = null}) { + return _then( + _value.copyWith( + data: + null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as List, + links: + null == links + ? _value.links + : links // ignore: cast_nullable_to_non_nullable + as Links, + meta: + null == meta + ? _value.meta + : meta // ignore: cast_nullable_to_non_nullable + as Meta, + ) + as $Val, + ); } /// Create a copy of FeedConsultantPaginationModel @@ -110,9 +119,9 @@ class _$FeedConsultantPaginationModelCopyWithImpl<$Res, abstract class _$$FeedConsultantPaginationModelImplCopyWith<$Res> implements $FeedConsultantPaginationModelCopyWith<$Res> { factory _$$FeedConsultantPaginationModelImplCopyWith( - _$FeedConsultantPaginationModelImpl value, - $Res Function(_$FeedConsultantPaginationModelImpl) then) = - __$$FeedConsultantPaginationModelImplCopyWithImpl<$Res>; + _$FeedConsultantPaginationModelImpl value, + $Res Function(_$FeedConsultantPaginationModelImpl) then, + ) = __$$FeedConsultantPaginationModelImplCopyWithImpl<$Res>; @override @useResult $Res call({List data, Links links, Meta meta}); @@ -125,37 +134,41 @@ abstract class _$$FeedConsultantPaginationModelImplCopyWith<$Res> /// @nodoc class __$$FeedConsultantPaginationModelImplCopyWithImpl<$Res> - extends _$FeedConsultantPaginationModelCopyWithImpl<$Res, - _$FeedConsultantPaginationModelImpl> + extends + _$FeedConsultantPaginationModelCopyWithImpl< + $Res, + _$FeedConsultantPaginationModelImpl + > implements _$$FeedConsultantPaginationModelImplCopyWith<$Res> { __$$FeedConsultantPaginationModelImplCopyWithImpl( - _$FeedConsultantPaginationModelImpl _value, - $Res Function(_$FeedConsultantPaginationModelImpl) _then) - : super(_value, _then); + _$FeedConsultantPaginationModelImpl _value, + $Res Function(_$FeedConsultantPaginationModelImpl) _then, + ) : super(_value, _then); /// Create a copy of FeedConsultantPaginationModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? data = null, - Object? links = null, - Object? meta = null, - }) { - return _then(_$FeedConsultantPaginationModelImpl( - data: null == data - ? _value._data - : data // ignore: cast_nullable_to_non_nullable - as List, - links: null == links - ? _value.links - : links // ignore: cast_nullable_to_non_nullable - as Links, - meta: null == meta - ? _value.meta - : meta // ignore: cast_nullable_to_non_nullable - as Meta, - )); + $Res call({Object? data = null, Object? links = null, Object? meta = null}) { + return _then( + _$FeedConsultantPaginationModelImpl( + data: + null == data + ? _value._data + : data // ignore: cast_nullable_to_non_nullable + as List, + links: + null == links + ? _value.links + : links // ignore: cast_nullable_to_non_nullable + as Links, + meta: + null == meta + ? _value.meta + : meta // ignore: cast_nullable_to_non_nullable + as Meta, + ), + ); } } @@ -163,15 +176,15 @@ class __$$FeedConsultantPaginationModelImplCopyWithImpl<$Res> @JsonSerializable() class _$FeedConsultantPaginationModelImpl implements _FeedConsultantPaginationModel { - const _$FeedConsultantPaginationModelImpl( - {required final List data, - required this.links, - required this.meta}) - : _data = data; + const _$FeedConsultantPaginationModelImpl({ + required final List data, + required this.links, + required this.meta, + }) : _data = data; factory _$FeedConsultantPaginationModelImpl.fromJson( - Map json) => - _$$FeedConsultantPaginationModelImplFromJson(json); + Map json, + ) => _$$FeedConsultantPaginationModelImplFromJson(json); final List _data; @override @@ -204,7 +217,11 @@ class _$FeedConsultantPaginationModelImpl @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_data), links, meta); + runtimeType, + const DeepCollectionEquality().hash(_data), + links, + meta, + ); /// Create a copy of FeedConsultantPaginationModel /// with the given fields replaced by the non-null parameter values. @@ -212,24 +229,25 @@ class _$FeedConsultantPaginationModelImpl @override @pragma('vm:prefer-inline') _$$FeedConsultantPaginationModelImplCopyWith< - _$FeedConsultantPaginationModelImpl> - get copyWith => __$$FeedConsultantPaginationModelImplCopyWithImpl< - _$FeedConsultantPaginationModelImpl>(this, _$identity); + _$FeedConsultantPaginationModelImpl + > + get copyWith => __$$FeedConsultantPaginationModelImplCopyWithImpl< + _$FeedConsultantPaginationModelImpl + >(this, _$identity); @override Map toJson() { - return _$$FeedConsultantPaginationModelImplToJson( - this, - ); + return _$$FeedConsultantPaginationModelImplToJson(this); } } abstract class _FeedConsultantPaginationModel implements FeedConsultantPaginationModel { - const factory _FeedConsultantPaginationModel( - {required final List data, - required final Links links, - required final Meta meta}) = _$FeedConsultantPaginationModelImpl; + const factory _FeedConsultantPaginationModel({ + required final List data, + required final Links links, + required final Meta meta, + }) = _$FeedConsultantPaginationModelImpl; factory _FeedConsultantPaginationModel.fromJson(Map json) = _$FeedConsultantPaginationModelImpl.fromJson; @@ -246,8 +264,9 @@ abstract class _FeedConsultantPaginationModel @override @JsonKey(includeFromJson: false, includeToJson: false) _$$FeedConsultantPaginationModelImplCopyWith< - _$FeedConsultantPaginationModelImpl> - get copyWith => throw _privateConstructorUsedError; + _$FeedConsultantPaginationModelImpl + > + get copyWith => throw _privateConstructorUsedError; } FeedConsultantModel _$FeedConsultantModelFromJson(Map json) { @@ -281,17 +300,19 @@ mixin _$FeedConsultantModel { /// @nodoc abstract class $FeedConsultantModelCopyWith<$Res> { factory $FeedConsultantModelCopyWith( - FeedConsultantModel value, $Res Function(FeedConsultantModel) then) = - _$FeedConsultantModelCopyWithImpl<$Res, FeedConsultantModel>; + FeedConsultantModel value, + $Res Function(FeedConsultantModel) then, + ) = _$FeedConsultantModelCopyWithImpl<$Res, FeedConsultantModel>; @useResult - $Res call( - {String slug, - String name, - @JsonKey(name: 'additional_info') String description, - @JsonKey(name: 'rating_place') int? ratingPlace, - @JsonKey(name: 'total_scores') int totalScores, - @JsonKey(name: 'profile_photo_url') String photo, - List badges}); + $Res call({ + String slug, + String name, + @JsonKey(name: 'additional_info') String description, + @JsonKey(name: 'rating_place') int? ratingPlace, + @JsonKey(name: 'total_scores') int totalScores, + @JsonKey(name: 'profile_photo_url') String photo, + List badges, + }); } /// @nodoc @@ -317,64 +338,77 @@ class _$FeedConsultantModelCopyWithImpl<$Res, $Val extends FeedConsultantModel> Object? photo = null, Object? badges = null, }) { - return _then(_value.copyWith( - slug: null == slug - ? _value.slug - : slug // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - ratingPlace: freezed == ratingPlace - ? _value.ratingPlace - : ratingPlace // ignore: cast_nullable_to_non_nullable - as int?, - totalScores: null == totalScores - ? _value.totalScores - : totalScores // ignore: cast_nullable_to_non_nullable - as int, - photo: null == photo - ? _value.photo - : photo // ignore: cast_nullable_to_non_nullable - as String, - badges: null == badges - ? _value.badges - : badges // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + return _then( + _value.copyWith( + slug: + null == slug + ? _value.slug + : slug // ignore: cast_nullable_to_non_nullable + as String, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + description: + null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + ratingPlace: + freezed == ratingPlace + ? _value.ratingPlace + : ratingPlace // ignore: cast_nullable_to_non_nullable + as int?, + totalScores: + null == totalScores + ? _value.totalScores + : totalScores // ignore: cast_nullable_to_non_nullable + as int, + photo: + null == photo + ? _value.photo + : photo // ignore: cast_nullable_to_non_nullable + as String, + badges: + null == badges + ? _value.badges + : badges // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc abstract class _$$FeedConsultantModelImplCopyWith<$Res> implements $FeedConsultantModelCopyWith<$Res> { - factory _$$FeedConsultantModelImplCopyWith(_$FeedConsultantModelImpl value, - $Res Function(_$FeedConsultantModelImpl) then) = - __$$FeedConsultantModelImplCopyWithImpl<$Res>; + factory _$$FeedConsultantModelImplCopyWith( + _$FeedConsultantModelImpl value, + $Res Function(_$FeedConsultantModelImpl) then, + ) = __$$FeedConsultantModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {String slug, - String name, - @JsonKey(name: 'additional_info') String description, - @JsonKey(name: 'rating_place') int? ratingPlace, - @JsonKey(name: 'total_scores') int totalScores, - @JsonKey(name: 'profile_photo_url') String photo, - List badges}); + $Res call({ + String slug, + String name, + @JsonKey(name: 'additional_info') String description, + @JsonKey(name: 'rating_place') int? ratingPlace, + @JsonKey(name: 'total_scores') int totalScores, + @JsonKey(name: 'profile_photo_url') String photo, + List badges, + }); } /// @nodoc class __$$FeedConsultantModelImplCopyWithImpl<$Res> extends _$FeedConsultantModelCopyWithImpl<$Res, _$FeedConsultantModelImpl> implements _$$FeedConsultantModelImplCopyWith<$Res> { - __$$FeedConsultantModelImplCopyWithImpl(_$FeedConsultantModelImpl _value, - $Res Function(_$FeedConsultantModelImpl) _then) - : super(_value, _then); + __$$FeedConsultantModelImplCopyWithImpl( + _$FeedConsultantModelImpl _value, + $Res Function(_$FeedConsultantModelImpl) _then, + ) : super(_value, _then); /// Create a copy of FeedConsultantModel /// with the given fields replaced by the non-null parameter values. @@ -389,51 +423,60 @@ class __$$FeedConsultantModelImplCopyWithImpl<$Res> Object? photo = null, Object? badges = null, }) { - return _then(_$FeedConsultantModelImpl( - slug: null == slug - ? _value.slug - : slug // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - ratingPlace: freezed == ratingPlace - ? _value.ratingPlace - : ratingPlace // ignore: cast_nullable_to_non_nullable - as int?, - totalScores: null == totalScores - ? _value.totalScores - : totalScores // ignore: cast_nullable_to_non_nullable - as int, - photo: null == photo - ? _value.photo - : photo // ignore: cast_nullable_to_non_nullable - as String, - badges: null == badges - ? _value._badges - : badges // ignore: cast_nullable_to_non_nullable - as List, - )); + return _then( + _$FeedConsultantModelImpl( + slug: + null == slug + ? _value.slug + : slug // ignore: cast_nullable_to_non_nullable + as String, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + description: + null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + ratingPlace: + freezed == ratingPlace + ? _value.ratingPlace + : ratingPlace // ignore: cast_nullable_to_non_nullable + as int?, + totalScores: + null == totalScores + ? _value.totalScores + : totalScores // ignore: cast_nullable_to_non_nullable + as int, + photo: + null == photo + ? _value.photo + : photo // ignore: cast_nullable_to_non_nullable + as String, + badges: + null == badges + ? _value._badges + : badges // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } /// @nodoc @JsonSerializable() class _$FeedConsultantModelImpl implements _FeedConsultantModel { - const _$FeedConsultantModelImpl( - {required this.slug, - required this.name, - @JsonKey(name: 'additional_info') required this.description, - @JsonKey(name: 'rating_place') this.ratingPlace, - @JsonKey(name: 'total_scores') required this.totalScores, - @JsonKey(name: 'profile_photo_url') required this.photo, - required final List badges}) - : _badges = badges; + const _$FeedConsultantModelImpl({ + required this.slug, + required this.name, + @JsonKey(name: 'additional_info') required this.description, + @JsonKey(name: 'rating_place') this.ratingPlace, + @JsonKey(name: 'total_scores') required this.totalScores, + @JsonKey(name: 'profile_photo_url') required this.photo, + required final List badges, + }) : _badges = badges; factory _$FeedConsultantModelImpl.fromJson(Map json) => _$$FeedConsultantModelImplFromJson(json); @@ -487,14 +530,15 @@ class _$FeedConsultantModelImpl implements _FeedConsultantModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - slug, - name, - description, - ratingPlace, - totalScores, - photo, - const DeepCollectionEquality().hash(_badges)); + runtimeType, + slug, + name, + description, + ratingPlace, + totalScores, + photo, + const DeepCollectionEquality().hash(_badges), + ); /// Create a copy of FeedConsultantModel /// with the given fields replaced by the non-null parameter values. @@ -503,25 +547,26 @@ class _$FeedConsultantModelImpl implements _FeedConsultantModel { @pragma('vm:prefer-inline') _$$FeedConsultantModelImplCopyWith<_$FeedConsultantModelImpl> get copyWith => __$$FeedConsultantModelImplCopyWithImpl<_$FeedConsultantModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$FeedConsultantModelImplToJson( - this, - ); + return _$$FeedConsultantModelImplToJson(this); } } abstract class _FeedConsultantModel implements FeedConsultantModel { - const factory _FeedConsultantModel( - {required final String slug, - required final String name, - @JsonKey(name: 'additional_info') required final String description, - @JsonKey(name: 'rating_place') final int? ratingPlace, - @JsonKey(name: 'total_scores') required final int totalScores, - @JsonKey(name: 'profile_photo_url') required final String photo, - required final List badges}) = _$FeedConsultantModelImpl; + const factory _FeedConsultantModel({ + required final String slug, + required final String name, + @JsonKey(name: 'additional_info') required final String description, + @JsonKey(name: 'rating_place') final int? ratingPlace, + @JsonKey(name: 'total_scores') required final int totalScores, + @JsonKey(name: 'profile_photo_url') required final String photo, + required final List badges, + }) = _$FeedConsultantModelImpl; factory _FeedConsultantModel.fromJson(Map json) = _$FeedConsultantModelImpl.fromJson; diff --git a/lib/features/feed/models/feed_consultant_model.g.dart b/lib/features/feed/models/feed_consultant_model.g.dart index 71985b37..d4c901bf 100644 --- a/lib/features/feed/models/feed_consultant_model.g.dart +++ b/lib/features/feed/models/feed_consultant_model.g.dart @@ -7,46 +7,49 @@ part of 'feed_consultant_model.dart'; // ************************************************************************** _$FeedConsultantPaginationModelImpl - _$$FeedConsultantPaginationModelImplFromJson(Map json) => - _$FeedConsultantPaginationModelImpl( - data: (json['data'] as List) - .map((e) => - FeedConsultantModel.fromJson(e as Map)) +_$$FeedConsultantPaginationModelImplFromJson(Map json) => + _$FeedConsultantPaginationModelImpl( + data: + (json['data'] as List) + .map( + (e) => FeedConsultantModel.fromJson(e as Map), + ) .toList(), - links: Links.fromJson(json['links'] as Map), - meta: Meta.fromJson(json['meta'] as Map), - ); - -Map _$$FeedConsultantPaginationModelImplToJson( - _$FeedConsultantPaginationModelImpl instance) => - { - 'data': instance.data, - 'links': instance.links, - 'meta': instance.meta, - }; - -_$FeedConsultantModelImpl _$$FeedConsultantModelImplFromJson( - Map json) => - _$FeedConsultantModelImpl( - slug: json['slug'] as String, - name: json['name'] as String, - description: json['additional_info'] as String, - ratingPlace: (json['rating_place'] as num?)?.toInt(), - totalScores: (json['total_scores'] as num).toInt(), - photo: json['profile_photo_url'] as String, - badges: (json['badges'] as List) - .map((e) => BadgeModel.fromJson(e as Map)) - .toList(), + links: Links.fromJson(json['links'] as Map), + meta: Meta.fromJson(json['meta'] as Map), ); +Map _$$FeedConsultantPaginationModelImplToJson( + _$FeedConsultantPaginationModelImpl instance, +) => { + 'data': instance.data, + 'links': instance.links, + 'meta': instance.meta, +}; + +_$FeedConsultantModelImpl _$$FeedConsultantModelImplFromJson( + Map json, +) => _$FeedConsultantModelImpl( + slug: json['slug'] as String, + name: json['name'] as String, + description: json['additional_info'] as String, + ratingPlace: (json['rating_place'] as num?)?.toInt(), + totalScores: (json['total_scores'] as num).toInt(), + photo: json['profile_photo_url'] as String, + badges: + (json['badges'] as List) + .map((e) => BadgeModel.fromJson(e as Map)) + .toList(), +); + Map _$$FeedConsultantModelImplToJson( - _$FeedConsultantModelImpl instance) => - { - 'slug': instance.slug, - 'name': instance.name, - 'additional_info': instance.description, - 'rating_place': instance.ratingPlace, - 'total_scores': instance.totalScores, - 'profile_photo_url': instance.photo, - 'badges': instance.badges, - }; + _$FeedConsultantModelImpl instance, +) => { + 'slug': instance.slug, + 'name': instance.name, + 'additional_info': instance.description, + 'rating_place': instance.ratingPlace, + 'total_scores': instance.totalScores, + 'profile_photo_url': instance.photo, + 'badges': instance.badges, +}; diff --git a/lib/features/feed/models/plan_pagination_model.freezed.dart b/lib/features/feed/models/plan_pagination_model.freezed.dart index 6df539a9..94799f51 100644 --- a/lib/features/feed/models/plan_pagination_model.freezed.dart +++ b/lib/features/feed/models/plan_pagination_model.freezed.dart @@ -12,7 +12,8 @@ part of 'plan_pagination_model.dart'; 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'); + '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', +); PlanPaginationModel _$PlanPaginationModelFromJson(Map json) { return _PlanPaginationModel.fromJson(json); @@ -40,13 +41,15 @@ mixin _$PlanPaginationModel { /// @nodoc abstract class $PlanPaginationModelCopyWith<$Res> { factory $PlanPaginationModelCopyWith( - PlanPaginationModel value, $Res Function(PlanPaginationModel) then) = - _$PlanPaginationModelCopyWithImpl<$Res, PlanPaginationModel>; + PlanPaginationModel value, + $Res Function(PlanPaginationModel) then, + ) = _$PlanPaginationModelCopyWithImpl<$Res, PlanPaginationModel>; @useResult - $Res call( - {@JsonKey(name: "data") List data, - @JsonKey(name: "links") Links links, - @JsonKey(name: "meta") Meta meta}); + $Res call({ + @JsonKey(name: "data") List data, + @JsonKey(name: "links") Links links, + @JsonKey(name: "meta") Meta meta, + }); $LinksCopyWith<$Res> get links; $MetaCopyWith<$Res> get meta; @@ -66,25 +69,27 @@ class _$PlanPaginationModelCopyWithImpl<$Res, $Val extends PlanPaginationModel> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? data = null, - Object? links = null, - Object? meta = null, - }) { - return _then(_value.copyWith( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as List, - links: null == links - ? _value.links - : links // ignore: cast_nullable_to_non_nullable - as Links, - meta: null == meta - ? _value.meta - : meta // ignore: cast_nullable_to_non_nullable - as Meta, - ) as $Val); + $Res call({Object? data = null, Object? links = null, Object? meta = null}) { + return _then( + _value.copyWith( + data: + null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as List, + links: + null == links + ? _value.links + : links // ignore: cast_nullable_to_non_nullable + as Links, + meta: + null == meta + ? _value.meta + : meta // ignore: cast_nullable_to_non_nullable + as Meta, + ) + as $Val, + ); } /// Create a copy of PlanPaginationModel @@ -111,15 +116,17 @@ class _$PlanPaginationModelCopyWithImpl<$Res, $Val extends PlanPaginationModel> /// @nodoc abstract class _$$PlanPaginationModelImplCopyWith<$Res> implements $PlanPaginationModelCopyWith<$Res> { - factory _$$PlanPaginationModelImplCopyWith(_$PlanPaginationModelImpl value, - $Res Function(_$PlanPaginationModelImpl) then) = - __$$PlanPaginationModelImplCopyWithImpl<$Res>; + factory _$$PlanPaginationModelImplCopyWith( + _$PlanPaginationModelImpl value, + $Res Function(_$PlanPaginationModelImpl) then, + ) = __$$PlanPaginationModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "data") List data, - @JsonKey(name: "links") Links links, - @JsonKey(name: "meta") Meta meta}); + $Res call({ + @JsonKey(name: "data") List data, + @JsonKey(name: "links") Links links, + @JsonKey(name: "meta") Meta meta, + }); @override $LinksCopyWith<$Res> get links; @@ -131,44 +138,46 @@ abstract class _$$PlanPaginationModelImplCopyWith<$Res> class __$$PlanPaginationModelImplCopyWithImpl<$Res> extends _$PlanPaginationModelCopyWithImpl<$Res, _$PlanPaginationModelImpl> implements _$$PlanPaginationModelImplCopyWith<$Res> { - __$$PlanPaginationModelImplCopyWithImpl(_$PlanPaginationModelImpl _value, - $Res Function(_$PlanPaginationModelImpl) _then) - : super(_value, _then); + __$$PlanPaginationModelImplCopyWithImpl( + _$PlanPaginationModelImpl _value, + $Res Function(_$PlanPaginationModelImpl) _then, + ) : super(_value, _then); /// Create a copy of PlanPaginationModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? data = null, - Object? links = null, - Object? meta = null, - }) { - return _then(_$PlanPaginationModelImpl( - data: null == data - ? _value._data - : data // ignore: cast_nullable_to_non_nullable - as List, - links: null == links - ? _value.links - : links // ignore: cast_nullable_to_non_nullable - as Links, - meta: null == meta - ? _value.meta - : meta // ignore: cast_nullable_to_non_nullable - as Meta, - )); + $Res call({Object? data = null, Object? links = null, Object? meta = null}) { + return _then( + _$PlanPaginationModelImpl( + data: + null == data + ? _value._data + : data // ignore: cast_nullable_to_non_nullable + as List, + links: + null == links + ? _value.links + : links // ignore: cast_nullable_to_non_nullable + as Links, + meta: + null == meta + ? _value.meta + : meta // ignore: cast_nullable_to_non_nullable + as Meta, + ), + ); } } /// @nodoc @JsonSerializable() class _$PlanPaginationModelImpl implements _PlanPaginationModel { - const _$PlanPaginationModelImpl( - {@JsonKey(name: "data") required final List data, - @JsonKey(name: "links") required this.links, - @JsonKey(name: "meta") required this.meta}) - : _data = data; + const _$PlanPaginationModelImpl({ + @JsonKey(name: "data") required final List data, + @JsonKey(name: "links") required this.links, + @JsonKey(name: "meta") required this.meta, + }) : _data = data; factory _$PlanPaginationModelImpl.fromJson(Map json) => _$$PlanPaginationModelImplFromJson(json); @@ -207,7 +216,11 @@ class _$PlanPaginationModelImpl implements _PlanPaginationModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_data), links, meta); + runtimeType, + const DeepCollectionEquality().hash(_data), + links, + meta, + ); /// Create a copy of PlanPaginationModel /// with the given fields replaced by the non-null parameter values. @@ -216,22 +229,22 @@ class _$PlanPaginationModelImpl implements _PlanPaginationModel { @pragma('vm:prefer-inline') _$$PlanPaginationModelImplCopyWith<_$PlanPaginationModelImpl> get copyWith => __$$PlanPaginationModelImplCopyWithImpl<_$PlanPaginationModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$PlanPaginationModelImplToJson( - this, - ); + return _$$PlanPaginationModelImplToJson(this); } } abstract class _PlanPaginationModel implements PlanPaginationModel { - const factory _PlanPaginationModel( - {@JsonKey(name: "data") required final List data, - @JsonKey(name: "links") required final Links links, - @JsonKey(name: "meta") required final Meta meta}) = - _$PlanPaginationModelImpl; + const factory _PlanPaginationModel({ + @JsonKey(name: "data") required final List data, + @JsonKey(name: "links") required final Links links, + @JsonKey(name: "meta") required final Meta meta, + }) = _$PlanPaginationModelImpl; factory _PlanPaginationModel.fromJson(Map json) = _$PlanPaginationModelImpl.fromJson; @@ -316,27 +329,28 @@ abstract class $PlanModelCopyWith<$Res> { factory $PlanModelCopyWith(PlanModel value, $Res Function(PlanModel) then) = _$PlanModelCopyWithImpl<$Res, PlanModel>; @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "slug") String slug, - @JsonKey(name: "name") String name, - @JsonKey(name: "image") String image, - @JsonKey(name: "duration") int duration, - @JsonKey(name: "state") String state, - @JsonKey(name: "type", fromJson: planTypeFromJson) PlanType type, - @JsonKey(name: "details") String details, - @JsonKey(name: "packets_count") int packetsCount, - @JsonKey(name: "packet1_options") PacketOptions? packet1Options, - @JsonKey(name: "packet2_options") PacketOptions? packet2Options, - @JsonKey(name: "packet3_options") PacketOptions? packet3Options, - @JsonKey(name: "author") Author author, - @JsonKey(name: "total_likes") int totalLikes, - @JsonKey(name: "total_views") int totalViews, - @JsonKey(name: "total_comments") int totalComments, - @JsonKey(name: "is_favorite") bool isFavorite, - @JsonKey(name: "min_price_of_options") double minPriceOfOptions, - @JsonKey(name: "max_price_of_options") double maxPriceOfOptions, - @JsonKey(name: "was_liked_by_me") bool wasLikedByMe}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "slug") String slug, + @JsonKey(name: "name") String name, + @JsonKey(name: "image") String image, + @JsonKey(name: "duration") int duration, + @JsonKey(name: "state") String state, + @JsonKey(name: "type", fromJson: planTypeFromJson) PlanType type, + @JsonKey(name: "details") String details, + @JsonKey(name: "packets_count") int packetsCount, + @JsonKey(name: "packet1_options") PacketOptions? packet1Options, + @JsonKey(name: "packet2_options") PacketOptions? packet2Options, + @JsonKey(name: "packet3_options") PacketOptions? packet3Options, + @JsonKey(name: "author") Author author, + @JsonKey(name: "total_likes") int totalLikes, + @JsonKey(name: "total_views") int totalViews, + @JsonKey(name: "total_comments") int totalComments, + @JsonKey(name: "is_favorite") bool isFavorite, + @JsonKey(name: "min_price_of_options") double minPriceOfOptions, + @JsonKey(name: "max_price_of_options") double maxPriceOfOptions, + @JsonKey(name: "was_liked_by_me") bool wasLikedByMe, + }); $PlanTypeCopyWith<$Res> get type; $PacketOptionsCopyWith<$Res>? get packet1Options; @@ -381,88 +395,111 @@ class _$PlanModelCopyWithImpl<$Res, $Val extends PlanModel> Object? maxPriceOfOptions = null, Object? wasLikedByMe = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - slug: null == slug - ? _value.slug - : slug // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - image: null == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String, - duration: null == duration - ? _value.duration - : duration // ignore: cast_nullable_to_non_nullable - as int, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as PlanType, - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as String, - packetsCount: null == packetsCount - ? _value.packetsCount - : packetsCount // ignore: cast_nullable_to_non_nullable - as int, - packet1Options: freezed == packet1Options - ? _value.packet1Options - : packet1Options // ignore: cast_nullable_to_non_nullable - as PacketOptions?, - packet2Options: freezed == packet2Options - ? _value.packet2Options - : packet2Options // ignore: cast_nullable_to_non_nullable - as PacketOptions?, - packet3Options: freezed == packet3Options - ? _value.packet3Options - : packet3Options // ignore: cast_nullable_to_non_nullable - as PacketOptions?, - author: null == author - ? _value.author - : author // ignore: cast_nullable_to_non_nullable - as Author, - totalLikes: null == totalLikes - ? _value.totalLikes - : totalLikes // ignore: cast_nullable_to_non_nullable - as int, - totalViews: null == totalViews - ? _value.totalViews - : totalViews // ignore: cast_nullable_to_non_nullable - as int, - totalComments: null == totalComments - ? _value.totalComments - : totalComments // ignore: cast_nullable_to_non_nullable - as int, - isFavorite: null == isFavorite - ? _value.isFavorite - : isFavorite // ignore: cast_nullable_to_non_nullable - as bool, - minPriceOfOptions: null == minPriceOfOptions - ? _value.minPriceOfOptions - : minPriceOfOptions // ignore: cast_nullable_to_non_nullable - as double, - maxPriceOfOptions: null == maxPriceOfOptions - ? _value.maxPriceOfOptions - : maxPriceOfOptions // ignore: cast_nullable_to_non_nullable - as double, - wasLikedByMe: null == wasLikedByMe - ? _value.wasLikedByMe - : wasLikedByMe // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + slug: + null == slug + ? _value.slug + : slug // ignore: cast_nullable_to_non_nullable + as String, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + image: + null == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String, + duration: + null == duration + ? _value.duration + : duration // ignore: cast_nullable_to_non_nullable + as int, + state: + null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String, + type: + null == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as PlanType, + details: + null == details + ? _value.details + : details // ignore: cast_nullable_to_non_nullable + as String, + packetsCount: + null == packetsCount + ? _value.packetsCount + : packetsCount // ignore: cast_nullable_to_non_nullable + as int, + packet1Options: + freezed == packet1Options + ? _value.packet1Options + : packet1Options // ignore: cast_nullable_to_non_nullable + as PacketOptions?, + packet2Options: + freezed == packet2Options + ? _value.packet2Options + : packet2Options // ignore: cast_nullable_to_non_nullable + as PacketOptions?, + packet3Options: + freezed == packet3Options + ? _value.packet3Options + : packet3Options // ignore: cast_nullable_to_non_nullable + as PacketOptions?, + author: + null == author + ? _value.author + : author // ignore: cast_nullable_to_non_nullable + as Author, + totalLikes: + null == totalLikes + ? _value.totalLikes + : totalLikes // ignore: cast_nullable_to_non_nullable + as int, + totalViews: + null == totalViews + ? _value.totalViews + : totalViews // ignore: cast_nullable_to_non_nullable + as int, + totalComments: + null == totalComments + ? _value.totalComments + : totalComments // ignore: cast_nullable_to_non_nullable + as int, + isFavorite: + null == isFavorite + ? _value.isFavorite + : isFavorite // ignore: cast_nullable_to_non_nullable + as bool, + minPriceOfOptions: + null == minPriceOfOptions + ? _value.minPriceOfOptions + : minPriceOfOptions // ignore: cast_nullable_to_non_nullable + as double, + maxPriceOfOptions: + null == maxPriceOfOptions + ? _value.maxPriceOfOptions + : maxPriceOfOptions // ignore: cast_nullable_to_non_nullable + as double, + wasLikedByMe: + null == wasLikedByMe + ? _value.wasLikedByMe + : wasLikedByMe // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } /// Create a copy of PlanModel @@ -532,31 +569,33 @@ class _$PlanModelCopyWithImpl<$Res, $Val extends PlanModel> abstract class _$$PlanModelImplCopyWith<$Res> implements $PlanModelCopyWith<$Res> { factory _$$PlanModelImplCopyWith( - _$PlanModelImpl value, $Res Function(_$PlanModelImpl) then) = - __$$PlanModelImplCopyWithImpl<$Res>; + _$PlanModelImpl value, + $Res Function(_$PlanModelImpl) then, + ) = __$$PlanModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "slug") String slug, - @JsonKey(name: "name") String name, - @JsonKey(name: "image") String image, - @JsonKey(name: "duration") int duration, - @JsonKey(name: "state") String state, - @JsonKey(name: "type", fromJson: planTypeFromJson) PlanType type, - @JsonKey(name: "details") String details, - @JsonKey(name: "packets_count") int packetsCount, - @JsonKey(name: "packet1_options") PacketOptions? packet1Options, - @JsonKey(name: "packet2_options") PacketOptions? packet2Options, - @JsonKey(name: "packet3_options") PacketOptions? packet3Options, - @JsonKey(name: "author") Author author, - @JsonKey(name: "total_likes") int totalLikes, - @JsonKey(name: "total_views") int totalViews, - @JsonKey(name: "total_comments") int totalComments, - @JsonKey(name: "is_favorite") bool isFavorite, - @JsonKey(name: "min_price_of_options") double minPriceOfOptions, - @JsonKey(name: "max_price_of_options") double maxPriceOfOptions, - @JsonKey(name: "was_liked_by_me") bool wasLikedByMe}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "slug") String slug, + @JsonKey(name: "name") String name, + @JsonKey(name: "image") String image, + @JsonKey(name: "duration") int duration, + @JsonKey(name: "state") String state, + @JsonKey(name: "type", fromJson: planTypeFromJson) PlanType type, + @JsonKey(name: "details") String details, + @JsonKey(name: "packets_count") int packetsCount, + @JsonKey(name: "packet1_options") PacketOptions? packet1Options, + @JsonKey(name: "packet2_options") PacketOptions? packet2Options, + @JsonKey(name: "packet3_options") PacketOptions? packet3Options, + @JsonKey(name: "author") Author author, + @JsonKey(name: "total_likes") int totalLikes, + @JsonKey(name: "total_views") int totalViews, + @JsonKey(name: "total_comments") int totalComments, + @JsonKey(name: "is_favorite") bool isFavorite, + @JsonKey(name: "min_price_of_options") double minPriceOfOptions, + @JsonKey(name: "max_price_of_options") double maxPriceOfOptions, + @JsonKey(name: "was_liked_by_me") bool wasLikedByMe, + }); @override $PlanTypeCopyWith<$Res> get type; @@ -575,8 +614,9 @@ class __$$PlanModelImplCopyWithImpl<$Res> extends _$PlanModelCopyWithImpl<$Res, _$PlanModelImpl> implements _$$PlanModelImplCopyWith<$Res> { __$$PlanModelImplCopyWithImpl( - _$PlanModelImpl _value, $Res Function(_$PlanModelImpl) _then) - : super(_value, _then); + _$PlanModelImpl _value, + $Res Function(_$PlanModelImpl) _then, + ) : super(_value, _then); /// Create a copy of PlanModel /// with the given fields replaced by the non-null parameter values. @@ -604,115 +644,138 @@ class __$$PlanModelImplCopyWithImpl<$Res> Object? maxPriceOfOptions = null, Object? wasLikedByMe = null, }) { - return _then(_$PlanModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - slug: null == slug - ? _value.slug - : slug // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - image: null == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String, - duration: null == duration - ? _value.duration - : duration // ignore: cast_nullable_to_non_nullable - as int, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as PlanType, - details: null == details - ? _value.details - : details // ignore: cast_nullable_to_non_nullable - as String, - packetsCount: null == packetsCount - ? _value.packetsCount - : packetsCount // ignore: cast_nullable_to_non_nullable - as int, - packet1Options: freezed == packet1Options - ? _value.packet1Options - : packet1Options // ignore: cast_nullable_to_non_nullable - as PacketOptions?, - packet2Options: freezed == packet2Options - ? _value.packet2Options - : packet2Options // ignore: cast_nullable_to_non_nullable - as PacketOptions?, - packet3Options: freezed == packet3Options - ? _value.packet3Options - : packet3Options // ignore: cast_nullable_to_non_nullable - as PacketOptions?, - author: null == author - ? _value.author - : author // ignore: cast_nullable_to_non_nullable - as Author, - totalLikes: null == totalLikes - ? _value.totalLikes - : totalLikes // ignore: cast_nullable_to_non_nullable - as int, - totalViews: null == totalViews - ? _value.totalViews - : totalViews // ignore: cast_nullable_to_non_nullable - as int, - totalComments: null == totalComments - ? _value.totalComments - : totalComments // ignore: cast_nullable_to_non_nullable - as int, - isFavorite: null == isFavorite - ? _value.isFavorite - : isFavorite // ignore: cast_nullable_to_non_nullable - as bool, - minPriceOfOptions: null == minPriceOfOptions - ? _value.minPriceOfOptions - : minPriceOfOptions // ignore: cast_nullable_to_non_nullable - as double, - maxPriceOfOptions: null == maxPriceOfOptions - ? _value.maxPriceOfOptions - : maxPriceOfOptions // ignore: cast_nullable_to_non_nullable - as double, - wasLikedByMe: null == wasLikedByMe - ? _value.wasLikedByMe - : wasLikedByMe // ignore: cast_nullable_to_non_nullable - as bool, - )); + return _then( + _$PlanModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + slug: + null == slug + ? _value.slug + : slug // ignore: cast_nullable_to_non_nullable + as String, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + image: + null == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String, + duration: + null == duration + ? _value.duration + : duration // ignore: cast_nullable_to_non_nullable + as int, + state: + null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String, + type: + null == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as PlanType, + details: + null == details + ? _value.details + : details // ignore: cast_nullable_to_non_nullable + as String, + packetsCount: + null == packetsCount + ? _value.packetsCount + : packetsCount // ignore: cast_nullable_to_non_nullable + as int, + packet1Options: + freezed == packet1Options + ? _value.packet1Options + : packet1Options // ignore: cast_nullable_to_non_nullable + as PacketOptions?, + packet2Options: + freezed == packet2Options + ? _value.packet2Options + : packet2Options // ignore: cast_nullable_to_non_nullable + as PacketOptions?, + packet3Options: + freezed == packet3Options + ? _value.packet3Options + : packet3Options // ignore: cast_nullable_to_non_nullable + as PacketOptions?, + author: + null == author + ? _value.author + : author // ignore: cast_nullable_to_non_nullable + as Author, + totalLikes: + null == totalLikes + ? _value.totalLikes + : totalLikes // ignore: cast_nullable_to_non_nullable + as int, + totalViews: + null == totalViews + ? _value.totalViews + : totalViews // ignore: cast_nullable_to_non_nullable + as int, + totalComments: + null == totalComments + ? _value.totalComments + : totalComments // ignore: cast_nullable_to_non_nullable + as int, + isFavorite: + null == isFavorite + ? _value.isFavorite + : isFavorite // ignore: cast_nullable_to_non_nullable + as bool, + minPriceOfOptions: + null == minPriceOfOptions + ? _value.minPriceOfOptions + : minPriceOfOptions // ignore: cast_nullable_to_non_nullable + as double, + maxPriceOfOptions: + null == maxPriceOfOptions + ? _value.maxPriceOfOptions + : maxPriceOfOptions // ignore: cast_nullable_to_non_nullable + as double, + wasLikedByMe: + null == wasLikedByMe + ? _value.wasLikedByMe + : wasLikedByMe // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } /// @nodoc @JsonSerializable() class _$PlanModelImpl implements _PlanModel { - const _$PlanModelImpl( - {@JsonKey(name: "id") required this.id, - @JsonKey(name: "slug") required this.slug, - @JsonKey(name: "name") required this.name, - @JsonKey(name: "image") required this.image, - @JsonKey(name: "duration") required this.duration, - @JsonKey(name: "state") required this.state, - @JsonKey(name: "type", fromJson: planTypeFromJson) required this.type, - @JsonKey(name: "details") required this.details, - @JsonKey(name: "packets_count") required this.packetsCount, - @JsonKey(name: "packet1_options") this.packet1Options, - @JsonKey(name: "packet2_options") this.packet2Options, - @JsonKey(name: "packet3_options") this.packet3Options, - @JsonKey(name: "author") required this.author, - @JsonKey(name: "total_likes") required this.totalLikes, - @JsonKey(name: "total_views") required this.totalViews, - @JsonKey(name: "total_comments") required this.totalComments, - @JsonKey(name: "is_favorite") required this.isFavorite, - @JsonKey(name: "min_price_of_options") required this.minPriceOfOptions, - @JsonKey(name: "max_price_of_options") required this.maxPriceOfOptions, - @JsonKey(name: "was_liked_by_me") required this.wasLikedByMe}); + const _$PlanModelImpl({ + @JsonKey(name: "id") required this.id, + @JsonKey(name: "slug") required this.slug, + @JsonKey(name: "name") required this.name, + @JsonKey(name: "image") required this.image, + @JsonKey(name: "duration") required this.duration, + @JsonKey(name: "state") required this.state, + @JsonKey(name: "type", fromJson: planTypeFromJson) required this.type, + @JsonKey(name: "details") required this.details, + @JsonKey(name: "packets_count") required this.packetsCount, + @JsonKey(name: "packet1_options") this.packet1Options, + @JsonKey(name: "packet2_options") this.packet2Options, + @JsonKey(name: "packet3_options") this.packet3Options, + @JsonKey(name: "author") required this.author, + @JsonKey(name: "total_likes") required this.totalLikes, + @JsonKey(name: "total_views") required this.totalViews, + @JsonKey(name: "total_comments") required this.totalComments, + @JsonKey(name: "is_favorite") required this.isFavorite, + @JsonKey(name: "min_price_of_options") required this.minPriceOfOptions, + @JsonKey(name: "max_price_of_options") required this.maxPriceOfOptions, + @JsonKey(name: "was_liked_by_me") required this.wasLikedByMe, + }); factory _$PlanModelImpl.fromJson(Map json) => _$$PlanModelImplFromJson(json); @@ -825,28 +888,28 @@ class _$PlanModelImpl implements _PlanModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hashAll([ - runtimeType, - id, - slug, - name, - image, - duration, - state, - type, - details, - packetsCount, - packet1Options, - packet2Options, - packet3Options, - author, - totalLikes, - totalViews, - totalComments, - isFavorite, - minPriceOfOptions, - maxPriceOfOptions, - wasLikedByMe - ]); + runtimeType, + id, + slug, + name, + image, + duration, + state, + type, + details, + packetsCount, + packet1Options, + packet2Options, + packet3Options, + author, + totalLikes, + totalViews, + totalComments, + isFavorite, + minPriceOfOptions, + maxPriceOfOptions, + wasLikedByMe, + ]); /// Create a copy of PlanModel /// with the given fields replaced by the non-null parameter values. @@ -858,38 +921,36 @@ class _$PlanModelImpl implements _PlanModel { @override Map toJson() { - return _$$PlanModelImplToJson( - this, - ); + return _$$PlanModelImplToJson(this); } } abstract class _PlanModel implements PlanModel { - const factory _PlanModel( - {@JsonKey(name: "id") required final int id, - @JsonKey(name: "slug") required final String slug, - @JsonKey(name: "name") required final String name, - @JsonKey(name: "image") required final String image, - @JsonKey(name: "duration") required final int duration, - @JsonKey(name: "state") required final String state, - @JsonKey(name: "type", fromJson: planTypeFromJson) - required final PlanType type, - @JsonKey(name: "details") required final String details, - @JsonKey(name: "packets_count") required final int packetsCount, - @JsonKey(name: "packet1_options") final PacketOptions? packet1Options, - @JsonKey(name: "packet2_options") final PacketOptions? packet2Options, - @JsonKey(name: "packet3_options") final PacketOptions? packet3Options, - @JsonKey(name: "author") required final Author author, - @JsonKey(name: "total_likes") required final int totalLikes, - @JsonKey(name: "total_views") required final int totalViews, - @JsonKey(name: "total_comments") required final int totalComments, - @JsonKey(name: "is_favorite") required final bool isFavorite, - @JsonKey(name: "min_price_of_options") - required final double minPriceOfOptions, - @JsonKey(name: "max_price_of_options") - required final double maxPriceOfOptions, - @JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe}) = - _$PlanModelImpl; + const factory _PlanModel({ + @JsonKey(name: "id") required final int id, + @JsonKey(name: "slug") required final String slug, + @JsonKey(name: "name") required final String name, + @JsonKey(name: "image") required final String image, + @JsonKey(name: "duration") required final int duration, + @JsonKey(name: "state") required final String state, + @JsonKey(name: "type", fromJson: planTypeFromJson) + required final PlanType type, + @JsonKey(name: "details") required final String details, + @JsonKey(name: "packets_count") required final int packetsCount, + @JsonKey(name: "packet1_options") final PacketOptions? packet1Options, + @JsonKey(name: "packet2_options") final PacketOptions? packet2Options, + @JsonKey(name: "packet3_options") final PacketOptions? packet3Options, + @JsonKey(name: "author") required final Author author, + @JsonKey(name: "total_likes") required final int totalLikes, + @JsonKey(name: "total_views") required final int totalViews, + @JsonKey(name: "total_comments") required final int totalComments, + @JsonKey(name: "is_favorite") required final bool isFavorite, + @JsonKey(name: "min_price_of_options") + required final double minPriceOfOptions, + @JsonKey(name: "max_price_of_options") + required final double maxPriceOfOptions, + @JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe, + }) = _$PlanModelImpl; factory _PlanModel.fromJson(Map json) = _$PlanModelImpl.fromJson; @@ -991,14 +1052,16 @@ mixin _$PacketOptions { /// @nodoc abstract class $PacketOptionsCopyWith<$Res> { factory $PacketOptionsCopyWith( - PacketOptions value, $Res Function(PacketOptions) then) = - _$PacketOptionsCopyWithImpl<$Res, PacketOptions>; + PacketOptions value, + $Res Function(PacketOptions) then, + ) = _$PacketOptionsCopyWithImpl<$Res, PacketOptions>; @useResult - $Res call( - {@JsonKey(name: "items") List items, - @JsonKey(name: "price") dynamic price, - @JsonKey(name: "short") String short, - @JsonKey(name: "description") String description}); + $Res call({ + @JsonKey(name: "items") List items, + @JsonKey(name: "price") dynamic price, + @JsonKey(name: "short") String short, + @JsonKey(name: "description") String description, + }); } /// @nodoc @@ -1021,24 +1084,31 @@ class _$PacketOptionsCopyWithImpl<$Res, $Val extends PacketOptions> Object? short = null, Object? description = null, }) { - return _then(_value.copyWith( - items: null == items - ? _value.items - : items // ignore: cast_nullable_to_non_nullable - as List, - price: freezed == price - ? _value.price - : price // ignore: cast_nullable_to_non_nullable - as dynamic, - short: null == short - ? _value.short - : short // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + return _then( + _value.copyWith( + items: + null == items + ? _value.items + : items // ignore: cast_nullable_to_non_nullable + as List, + price: + freezed == price + ? _value.price + : price // ignore: cast_nullable_to_non_nullable + as dynamic, + short: + null == short + ? _value.short + : short // ignore: cast_nullable_to_non_nullable + as String, + description: + null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } @@ -1046,15 +1116,17 @@ class _$PacketOptionsCopyWithImpl<$Res, $Val extends PacketOptions> abstract class _$$PacketOptionsImplCopyWith<$Res> implements $PacketOptionsCopyWith<$Res> { factory _$$PacketOptionsImplCopyWith( - _$PacketOptionsImpl value, $Res Function(_$PacketOptionsImpl) then) = - __$$PacketOptionsImplCopyWithImpl<$Res>; + _$PacketOptionsImpl value, + $Res Function(_$PacketOptionsImpl) then, + ) = __$$PacketOptionsImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "items") List items, - @JsonKey(name: "price") dynamic price, - @JsonKey(name: "short") String short, - @JsonKey(name: "description") String description}); + $Res call({ + @JsonKey(name: "items") List items, + @JsonKey(name: "price") dynamic price, + @JsonKey(name: "short") String short, + @JsonKey(name: "description") String description, + }); } /// @nodoc @@ -1062,8 +1134,9 @@ class __$$PacketOptionsImplCopyWithImpl<$Res> extends _$PacketOptionsCopyWithImpl<$Res, _$PacketOptionsImpl> implements _$$PacketOptionsImplCopyWith<$Res> { __$$PacketOptionsImplCopyWithImpl( - _$PacketOptionsImpl _value, $Res Function(_$PacketOptionsImpl) _then) - : super(_value, _then); + _$PacketOptionsImpl _value, + $Res Function(_$PacketOptionsImpl) _then, + ) : super(_value, _then); /// Create a copy of PacketOptions /// with the given fields replaced by the non-null parameter values. @@ -1075,36 +1148,42 @@ class __$$PacketOptionsImplCopyWithImpl<$Res> Object? short = null, Object? description = null, }) { - return _then(_$PacketOptionsImpl( - items: null == items - ? _value._items - : items // ignore: cast_nullable_to_non_nullable - as List, - price: freezed == price - ? _value.price - : price // ignore: cast_nullable_to_non_nullable - as dynamic, - short: null == short - ? _value.short - : short // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - )); + return _then( + _$PacketOptionsImpl( + items: + null == items + ? _value._items + : items // ignore: cast_nullable_to_non_nullable + as List, + price: + freezed == price + ? _value.price + : price // ignore: cast_nullable_to_non_nullable + as dynamic, + short: + null == short + ? _value.short + : short // ignore: cast_nullable_to_non_nullable + as String, + description: + null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } /// @nodoc @JsonSerializable() class _$PacketOptionsImpl implements _PacketOptions { - const _$PacketOptionsImpl( - {@JsonKey(name: "items") required final List items, - @JsonKey(name: "price") required this.price, - @JsonKey(name: "short") required this.short, - @JsonKey(name: "description") required this.description}) - : _items = items; + const _$PacketOptionsImpl({ + @JsonKey(name: "items") required final List items, + @JsonKey(name: "price") required this.price, + @JsonKey(name: "short") required this.short, + @JsonKey(name: "description") required this.description, + }) : _items = items; factory _$PacketOptionsImpl.fromJson(Map json) => _$$PacketOptionsImplFromJson(json); @@ -1148,11 +1227,12 @@ class _$PacketOptionsImpl implements _PacketOptions { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_items), - const DeepCollectionEquality().hash(price), - short, - description); + runtimeType, + const DeepCollectionEquality().hash(_items), + const DeepCollectionEquality().hash(price), + short, + description, + ); /// Create a copy of PacketOptions /// with the given fields replaced by the non-null parameter values. @@ -1164,19 +1244,17 @@ class _$PacketOptionsImpl implements _PacketOptions { @override Map toJson() { - return _$$PacketOptionsImplToJson( - this, - ); + return _$$PacketOptionsImplToJson(this); } } abstract class _PacketOptions implements PacketOptions { - const factory _PacketOptions( - {@JsonKey(name: "items") required final List items, - @JsonKey(name: "price") required final dynamic price, - @JsonKey(name: "short") required final String short, - @JsonKey(name: "description") required final String description}) = - _$PacketOptionsImpl; + const factory _PacketOptions({ + @JsonKey(name: "items") required final List items, + @JsonKey(name: "price") required final dynamic price, + @JsonKey(name: "short") required final String short, + @JsonKey(name: "description") required final String description, + }) = _$PacketOptionsImpl; factory _PacketOptions.fromJson(Map json) = _$PacketOptionsImpl.fromJson; @@ -1232,11 +1310,12 @@ abstract class $PlanTypeCopyWith<$Res> { factory $PlanTypeCopyWith(PlanType value, $Res Function(PlanType) then) = _$PlanTypeCopyWithImpl<$Res, PlanType>; @useResult - $Res call( - {@JsonKey(name: "fit") bool? fit, - @JsonKey(name: "slim") bool? slim, - @JsonKey(name: "behavior") bool? behavior, - @JsonKey(name: "wellness") bool? wellness}); + $Res call({ + @JsonKey(name: "fit") bool? fit, + @JsonKey(name: "slim") bool? slim, + @JsonKey(name: "behavior") bool? behavior, + @JsonKey(name: "wellness") bool? wellness, + }); } /// @nodoc @@ -1259,24 +1338,31 @@ class _$PlanTypeCopyWithImpl<$Res, $Val extends PlanType> Object? behavior = freezed, Object? wellness = freezed, }) { - return _then(_value.copyWith( - fit: freezed == fit - ? _value.fit - : fit // ignore: cast_nullable_to_non_nullable - as bool?, - slim: freezed == slim - ? _value.slim - : slim // ignore: cast_nullable_to_non_nullable - as bool?, - behavior: freezed == behavior - ? _value.behavior - : behavior // ignore: cast_nullable_to_non_nullable - as bool?, - wellness: freezed == wellness - ? _value.wellness - : wellness // ignore: cast_nullable_to_non_nullable - as bool?, - ) as $Val); + return _then( + _value.copyWith( + fit: + freezed == fit + ? _value.fit + : fit // ignore: cast_nullable_to_non_nullable + as bool?, + slim: + freezed == slim + ? _value.slim + : slim // ignore: cast_nullable_to_non_nullable + as bool?, + behavior: + freezed == behavior + ? _value.behavior + : behavior // ignore: cast_nullable_to_non_nullable + as bool?, + wellness: + freezed == wellness + ? _value.wellness + : wellness // ignore: cast_nullable_to_non_nullable + as bool?, + ) + as $Val, + ); } } @@ -1284,15 +1370,17 @@ class _$PlanTypeCopyWithImpl<$Res, $Val extends PlanType> abstract class _$$PlanTypeImplCopyWith<$Res> implements $PlanTypeCopyWith<$Res> { factory _$$PlanTypeImplCopyWith( - _$PlanTypeImpl value, $Res Function(_$PlanTypeImpl) then) = - __$$PlanTypeImplCopyWithImpl<$Res>; + _$PlanTypeImpl value, + $Res Function(_$PlanTypeImpl) then, + ) = __$$PlanTypeImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "fit") bool? fit, - @JsonKey(name: "slim") bool? slim, - @JsonKey(name: "behavior") bool? behavior, - @JsonKey(name: "wellness") bool? wellness}); + $Res call({ + @JsonKey(name: "fit") bool? fit, + @JsonKey(name: "slim") bool? slim, + @JsonKey(name: "behavior") bool? behavior, + @JsonKey(name: "wellness") bool? wellness, + }); } /// @nodoc @@ -1300,8 +1388,9 @@ class __$$PlanTypeImplCopyWithImpl<$Res> extends _$PlanTypeCopyWithImpl<$Res, _$PlanTypeImpl> implements _$$PlanTypeImplCopyWith<$Res> { __$$PlanTypeImplCopyWithImpl( - _$PlanTypeImpl _value, $Res Function(_$PlanTypeImpl) _then) - : super(_value, _then); + _$PlanTypeImpl _value, + $Res Function(_$PlanTypeImpl) _then, + ) : super(_value, _then); /// Create a copy of PlanType /// with the given fields replaced by the non-null parameter values. @@ -1313,36 +1402,42 @@ class __$$PlanTypeImplCopyWithImpl<$Res> Object? behavior = freezed, Object? wellness = freezed, }) { - return _then(_$PlanTypeImpl( - fit: freezed == fit - ? _value.fit - : fit // ignore: cast_nullable_to_non_nullable - as bool?, - slim: freezed == slim - ? _value.slim - : slim // ignore: cast_nullable_to_non_nullable - as bool?, - behavior: freezed == behavior - ? _value.behavior - : behavior // ignore: cast_nullable_to_non_nullable - as bool?, - wellness: freezed == wellness - ? _value.wellness - : wellness // ignore: cast_nullable_to_non_nullable - as bool?, - )); + return _then( + _$PlanTypeImpl( + fit: + freezed == fit + ? _value.fit + : fit // ignore: cast_nullable_to_non_nullable + as bool?, + slim: + freezed == slim + ? _value.slim + : slim // ignore: cast_nullable_to_non_nullable + as bool?, + behavior: + freezed == behavior + ? _value.behavior + : behavior // ignore: cast_nullable_to_non_nullable + as bool?, + wellness: + freezed == wellness + ? _value.wellness + : wellness // ignore: cast_nullable_to_non_nullable + as bool?, + ), + ); } } /// @nodoc @JsonSerializable() class _$PlanTypeImpl extends _PlanType { - const _$PlanTypeImpl( - {@JsonKey(name: "fit") required this.fit, - @JsonKey(name: "slim") required this.slim, - @JsonKey(name: "behavior") required this.behavior, - @JsonKey(name: "wellness") required this.wellness}) - : super._(); + const _$PlanTypeImpl({ + @JsonKey(name: "fit") required this.fit, + @JsonKey(name: "slim") required this.slim, + @JsonKey(name: "behavior") required this.behavior, + @JsonKey(name: "wellness") required this.wellness, + }) : super._(); factory _$PlanTypeImpl.fromJson(Map json) => _$$PlanTypeImplFromJson(json); @@ -1392,19 +1487,17 @@ class _$PlanTypeImpl extends _PlanType { @override Map toJson() { - return _$$PlanTypeImplToJson( - this, - ); + return _$$PlanTypeImplToJson(this); } } abstract class _PlanType extends PlanType { - const factory _PlanType( - {@JsonKey(name: "fit") required final bool? fit, - @JsonKey(name: "slim") required final bool? slim, - @JsonKey(name: "behavior") required final bool? behavior, - @JsonKey(name: "wellness") required final bool? wellness}) = - _$PlanTypeImpl; + const factory _PlanType({ + @JsonKey(name: "fit") required final bool? fit, + @JsonKey(name: "slim") required final bool? slim, + @JsonKey(name: "behavior") required final bool? behavior, + @JsonKey(name: "wellness") required final bool? wellness, + }) = _$PlanTypeImpl; const _PlanType._() : super._(); factory _PlanType.fromJson(Map json) = diff --git a/lib/features/feed/models/plan_pagination_model.g.dart b/lib/features/feed/models/plan_pagination_model.g.dart index 0db54936..5b2921d8 100644 --- a/lib/features/feed/models/plan_pagination_model.g.dart +++ b/lib/features/feed/models/plan_pagination_model.g.dart @@ -7,22 +7,23 @@ part of 'plan_pagination_model.dart'; // ************************************************************************** _$PlanPaginationModelImpl _$$PlanPaginationModelImplFromJson( - Map json) => - _$PlanPaginationModelImpl( - data: (json['data'] as List) + Map json, +) => _$PlanPaginationModelImpl( + data: + (json['data'] as List) .map((e) => PlanModel.fromJson(e as Map)) .toList(), - links: Links.fromJson(json['links'] as Map), - meta: Meta.fromJson(json['meta'] as Map), - ); + links: Links.fromJson(json['links'] as Map), + meta: Meta.fromJson(json['meta'] as Map), +); Map _$$PlanPaginationModelImplToJson( - _$PlanPaginationModelImpl instance) => - { - 'data': instance.data, - 'links': instance.links, - 'meta': instance.meta, - }; + _$PlanPaginationModelImpl instance, +) => { + 'data': instance.data, + 'links': instance.links, + 'meta': instance.meta, +}; _$PlanModelImpl _$$PlanModelImplFromJson(Map json) => _$PlanModelImpl( @@ -35,18 +36,24 @@ _$PlanModelImpl _$$PlanModelImplFromJson(Map json) => type: planTypeFromJson(json['type']), details: json['details'] as String, packetsCount: (json['packets_count'] as num).toInt(), - packet1Options: json['packet1_options'] == null - ? null - : PacketOptions.fromJson( - json['packet1_options'] as Map), - packet2Options: json['packet2_options'] == null - ? null - : PacketOptions.fromJson( - json['packet2_options'] as Map), - packet3Options: json['packet3_options'] == null - ? null - : PacketOptions.fromJson( - json['packet3_options'] as Map), + packet1Options: + json['packet1_options'] == null + ? null + : PacketOptions.fromJson( + json['packet1_options'] as Map, + ), + packet2Options: + json['packet2_options'] == null + ? null + : PacketOptions.fromJson( + json['packet2_options'] as Map, + ), + packet3Options: + json['packet3_options'] == null + ? null + : PacketOptions.fromJson( + json['packet3_options'] as Map, + ), author: Author.fromJson(json['author'] as Map), totalLikes: (json['total_likes'] as num).toInt(), totalViews: (json['total_views'] as num).toInt(), diff --git a/lib/features/feed/models/recipes_model.freezed.dart b/lib/features/feed/models/recipes_model.freezed.dart index 6123bc74..21c0d2c1 100644 --- a/lib/features/feed/models/recipes_model.freezed.dart +++ b/lib/features/feed/models/recipes_model.freezed.dart @@ -12,7 +12,8 @@ part of 'recipes_model.dart'; 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'); + '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', +); Recipe _$RecipeFromJson(Map json) { return _Recipes.fromJson(json); @@ -67,28 +68,29 @@ abstract class $RecipeCopyWith<$Res> { factory $RecipeCopyWith(Recipe value, $Res Function(Recipe) then) = _$RecipeCopyWithImpl<$Res, Recipe>; @useResult - $Res call( - {int id, - String image, - String state, - @JsonKey(name: 'cooking_time') int cookingTime, - @JsonKey(name: 'active_time') int activeCookingTime, - List? ingredients, - String description, - List? steps, - @JsonKey(name: 'video_url') String? videoUrl, - @JsonKey(name: 'created_at') DateTime createdAt, - @JsonKey(name: 'updated_at') DateTime updatedAt, - String? title, - String? type, - String slug, - @JsonKey(name: 'total_comments') int commentsCount, - @JsonKey(name: 'was_liked_by_me') bool wasLikedByMe, - @JsonKey(name: 'is_favorite') bool isFavorite, - @JsonKey(name: 'energy_per_serving') double calories, - @JsonKey(name: 'total_likes') int likesCount, - @JsonKey(name: 'total_views') int viewsCount, - Author author}); + $Res call({ + int id, + String image, + String state, + @JsonKey(name: 'cooking_time') int cookingTime, + @JsonKey(name: 'active_time') int activeCookingTime, + List? ingredients, + String description, + List? steps, + @JsonKey(name: 'video_url') String? videoUrl, + @JsonKey(name: 'created_at') DateTime createdAt, + @JsonKey(name: 'updated_at') DateTime updatedAt, + String? title, + String? type, + String slug, + @JsonKey(name: 'total_comments') int commentsCount, + @JsonKey(name: 'was_liked_by_me') bool wasLikedByMe, + @JsonKey(name: 'is_favorite') bool isFavorite, + @JsonKey(name: 'energy_per_serving') double calories, + @JsonKey(name: 'total_likes') int likesCount, + @JsonKey(name: 'total_views') int viewsCount, + Author author, + }); $AuthorCopyWith<$Res> get author; } @@ -130,92 +132,116 @@ class _$RecipeCopyWithImpl<$Res, $Val extends Recipe> Object? viewsCount = null, Object? author = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - image: null == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String, - cookingTime: null == cookingTime - ? _value.cookingTime - : cookingTime // ignore: cast_nullable_to_non_nullable - as int, - activeCookingTime: null == activeCookingTime - ? _value.activeCookingTime - : activeCookingTime // ignore: cast_nullable_to_non_nullable - as int, - ingredients: freezed == ingredients - ? _value.ingredients - : ingredients // ignore: cast_nullable_to_non_nullable - as List?, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - steps: freezed == steps - ? _value.steps - : steps // ignore: cast_nullable_to_non_nullable - as List?, - videoUrl: freezed == videoUrl - ? _value.videoUrl - : videoUrl // ignore: cast_nullable_to_non_nullable - as String?, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - title: freezed == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String?, - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String?, - slug: null == slug - ? _value.slug - : slug // ignore: cast_nullable_to_non_nullable - as String, - commentsCount: null == commentsCount - ? _value.commentsCount - : commentsCount // ignore: cast_nullable_to_non_nullable - as int, - wasLikedByMe: null == wasLikedByMe - ? _value.wasLikedByMe - : wasLikedByMe // ignore: cast_nullable_to_non_nullable - as bool, - isFavorite: null == isFavorite - ? _value.isFavorite - : isFavorite // ignore: cast_nullable_to_non_nullable - as bool, - calories: null == calories - ? _value.calories - : calories // ignore: cast_nullable_to_non_nullable - as double, - likesCount: null == likesCount - ? _value.likesCount - : likesCount // ignore: cast_nullable_to_non_nullable - as int, - viewsCount: null == viewsCount - ? _value.viewsCount - : viewsCount // ignore: cast_nullable_to_non_nullable - as int, - author: null == author - ? _value.author - : author // ignore: cast_nullable_to_non_nullable - as Author, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + image: + null == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String, + state: + null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String, + cookingTime: + null == cookingTime + ? _value.cookingTime + : cookingTime // ignore: cast_nullable_to_non_nullable + as int, + activeCookingTime: + null == activeCookingTime + ? _value.activeCookingTime + : activeCookingTime // ignore: cast_nullable_to_non_nullable + as int, + ingredients: + freezed == ingredients + ? _value.ingredients + : ingredients // ignore: cast_nullable_to_non_nullable + as List?, + description: + null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + steps: + freezed == steps + ? _value.steps + : steps // ignore: cast_nullable_to_non_nullable + as List?, + videoUrl: + freezed == videoUrl + ? _value.videoUrl + : videoUrl // ignore: cast_nullable_to_non_nullable + as String?, + createdAt: + null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: + null == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + title: + freezed == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String?, + type: + freezed == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as String?, + slug: + null == slug + ? _value.slug + : slug // ignore: cast_nullable_to_non_nullable + as String, + commentsCount: + null == commentsCount + ? _value.commentsCount + : commentsCount // ignore: cast_nullable_to_non_nullable + as int, + wasLikedByMe: + null == wasLikedByMe + ? _value.wasLikedByMe + : wasLikedByMe // ignore: cast_nullable_to_non_nullable + as bool, + isFavorite: + null == isFavorite + ? _value.isFavorite + : isFavorite // ignore: cast_nullable_to_non_nullable + as bool, + calories: + null == calories + ? _value.calories + : calories // ignore: cast_nullable_to_non_nullable + as double, + likesCount: + null == likesCount + ? _value.likesCount + : likesCount // ignore: cast_nullable_to_non_nullable + as int, + viewsCount: + null == viewsCount + ? _value.viewsCount + : viewsCount // ignore: cast_nullable_to_non_nullable + as int, + author: + null == author + ? _value.author + : author // ignore: cast_nullable_to_non_nullable + as Author, + ) + as $Val, + ); } /// Create a copy of Recipe @@ -232,32 +258,34 @@ class _$RecipeCopyWithImpl<$Res, $Val extends Recipe> /// @nodoc abstract class _$$RecipesImplCopyWith<$Res> implements $RecipeCopyWith<$Res> { factory _$$RecipesImplCopyWith( - _$RecipesImpl value, $Res Function(_$RecipesImpl) then) = - __$$RecipesImplCopyWithImpl<$Res>; + _$RecipesImpl value, + $Res Function(_$RecipesImpl) then, + ) = __$$RecipesImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - String image, - String state, - @JsonKey(name: 'cooking_time') int cookingTime, - @JsonKey(name: 'active_time') int activeCookingTime, - List? ingredients, - String description, - List? steps, - @JsonKey(name: 'video_url') String? videoUrl, - @JsonKey(name: 'created_at') DateTime createdAt, - @JsonKey(name: 'updated_at') DateTime updatedAt, - String? title, - String? type, - String slug, - @JsonKey(name: 'total_comments') int commentsCount, - @JsonKey(name: 'was_liked_by_me') bool wasLikedByMe, - @JsonKey(name: 'is_favorite') bool isFavorite, - @JsonKey(name: 'energy_per_serving') double calories, - @JsonKey(name: 'total_likes') int likesCount, - @JsonKey(name: 'total_views') int viewsCount, - Author author}); + $Res call({ + int id, + String image, + String state, + @JsonKey(name: 'cooking_time') int cookingTime, + @JsonKey(name: 'active_time') int activeCookingTime, + List? ingredients, + String description, + List? steps, + @JsonKey(name: 'video_url') String? videoUrl, + @JsonKey(name: 'created_at') DateTime createdAt, + @JsonKey(name: 'updated_at') DateTime updatedAt, + String? title, + String? type, + String slug, + @JsonKey(name: 'total_comments') int commentsCount, + @JsonKey(name: 'was_liked_by_me') bool wasLikedByMe, + @JsonKey(name: 'is_favorite') bool isFavorite, + @JsonKey(name: 'energy_per_serving') double calories, + @JsonKey(name: 'total_likes') int likesCount, + @JsonKey(name: 'total_views') int viewsCount, + Author author, + }); @override $AuthorCopyWith<$Res> get author; @@ -268,8 +296,9 @@ class __$$RecipesImplCopyWithImpl<$Res> extends _$RecipeCopyWithImpl<$Res, _$RecipesImpl> implements _$$RecipesImplCopyWith<$Res> { __$$RecipesImplCopyWithImpl( - _$RecipesImpl _value, $Res Function(_$RecipesImpl) _then) - : super(_value, _then); + _$RecipesImpl _value, + $Res Function(_$RecipesImpl) _then, + ) : super(_value, _then); /// Create a copy of Recipe /// with the given fields replaced by the non-null parameter values. @@ -298,122 +327,145 @@ class __$$RecipesImplCopyWithImpl<$Res> Object? viewsCount = null, Object? author = null, }) { - return _then(_$RecipesImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - image: null == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String, - cookingTime: null == cookingTime - ? _value.cookingTime - : cookingTime // ignore: cast_nullable_to_non_nullable - as int, - activeCookingTime: null == activeCookingTime - ? _value.activeCookingTime - : activeCookingTime // ignore: cast_nullable_to_non_nullable - as int, - ingredients: freezed == ingredients - ? _value._ingredients - : ingredients // ignore: cast_nullable_to_non_nullable - as List?, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - steps: freezed == steps - ? _value._steps - : steps // ignore: cast_nullable_to_non_nullable - as List?, - videoUrl: freezed == videoUrl - ? _value.videoUrl - : videoUrl // ignore: cast_nullable_to_non_nullable - as String?, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - title: freezed == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String?, - type: freezed == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String?, - slug: null == slug - ? _value.slug - : slug // ignore: cast_nullable_to_non_nullable - as String, - commentsCount: null == commentsCount - ? _value.commentsCount - : commentsCount // ignore: cast_nullable_to_non_nullable - as int, - wasLikedByMe: null == wasLikedByMe - ? _value.wasLikedByMe - : wasLikedByMe // ignore: cast_nullable_to_non_nullable - as bool, - isFavorite: null == isFavorite - ? _value.isFavorite - : isFavorite // ignore: cast_nullable_to_non_nullable - as bool, - calories: null == calories - ? _value.calories - : calories // ignore: cast_nullable_to_non_nullable - as double, - likesCount: null == likesCount - ? _value.likesCount - : likesCount // ignore: cast_nullable_to_non_nullable - as int, - viewsCount: null == viewsCount - ? _value.viewsCount - : viewsCount // ignore: cast_nullable_to_non_nullable - as int, - author: null == author - ? _value.author - : author // ignore: cast_nullable_to_non_nullable - as Author, - )); + return _then( + _$RecipesImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + image: + null == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String, + state: + null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String, + cookingTime: + null == cookingTime + ? _value.cookingTime + : cookingTime // ignore: cast_nullable_to_non_nullable + as int, + activeCookingTime: + null == activeCookingTime + ? _value.activeCookingTime + : activeCookingTime // ignore: cast_nullable_to_non_nullable + as int, + ingredients: + freezed == ingredients + ? _value._ingredients + : ingredients // ignore: cast_nullable_to_non_nullable + as List?, + description: + null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + steps: + freezed == steps + ? _value._steps + : steps // ignore: cast_nullable_to_non_nullable + as List?, + videoUrl: + freezed == videoUrl + ? _value.videoUrl + : videoUrl // ignore: cast_nullable_to_non_nullable + as String?, + createdAt: + null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: + null == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + title: + freezed == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String?, + type: + freezed == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as String?, + slug: + null == slug + ? _value.slug + : slug // ignore: cast_nullable_to_non_nullable + as String, + commentsCount: + null == commentsCount + ? _value.commentsCount + : commentsCount // ignore: cast_nullable_to_non_nullable + as int, + wasLikedByMe: + null == wasLikedByMe + ? _value.wasLikedByMe + : wasLikedByMe // ignore: cast_nullable_to_non_nullable + as bool, + isFavorite: + null == isFavorite + ? _value.isFavorite + : isFavorite // ignore: cast_nullable_to_non_nullable + as bool, + calories: + null == calories + ? _value.calories + : calories // ignore: cast_nullable_to_non_nullable + as double, + likesCount: + null == likesCount + ? _value.likesCount + : likesCount // ignore: cast_nullable_to_non_nullable + as int, + viewsCount: + null == viewsCount + ? _value.viewsCount + : viewsCount // ignore: cast_nullable_to_non_nullable + as int, + author: + null == author + ? _value.author + : author // ignore: cast_nullable_to_non_nullable + as Author, + ), + ); } } /// @nodoc @JsonSerializable() class _$RecipesImpl implements _Recipes { - const _$RecipesImpl( - {required this.id, - required this.image, - required this.state, - @JsonKey(name: 'cooking_time') required this.cookingTime, - @JsonKey(name: 'active_time') required this.activeCookingTime, - required final List? ingredients, - required this.description, - required final List? steps, - @JsonKey(name: 'video_url') required this.videoUrl, - @JsonKey(name: 'created_at') required this.createdAt, - @JsonKey(name: 'updated_at') required this.updatedAt, - required this.title, - required this.type, - required this.slug, - @JsonKey(name: 'total_comments') required this.commentsCount, - @JsonKey(name: 'was_liked_by_me') required this.wasLikedByMe, - @JsonKey(name: 'is_favorite') required this.isFavorite, - @JsonKey(name: 'energy_per_serving') required this.calories, - @JsonKey(name: 'total_likes') required this.likesCount, - @JsonKey(name: 'total_views') required this.viewsCount, - required this.author}) - : _ingredients = ingredients, - _steps = steps; + const _$RecipesImpl({ + required this.id, + required this.image, + required this.state, + @JsonKey(name: 'cooking_time') required this.cookingTime, + @JsonKey(name: 'active_time') required this.activeCookingTime, + required final List? ingredients, + required this.description, + required final List? steps, + @JsonKey(name: 'video_url') required this.videoUrl, + @JsonKey(name: 'created_at') required this.createdAt, + @JsonKey(name: 'updated_at') required this.updatedAt, + required this.title, + required this.type, + required this.slug, + @JsonKey(name: 'total_comments') required this.commentsCount, + @JsonKey(name: 'was_liked_by_me') required this.wasLikedByMe, + @JsonKey(name: 'is_favorite') required this.isFavorite, + @JsonKey(name: 'energy_per_serving') required this.calories, + @JsonKey(name: 'total_likes') required this.likesCount, + @JsonKey(name: 'total_views') required this.viewsCount, + required this.author, + }) : _ingredients = ingredients, + _steps = steps; factory _$RecipesImpl.fromJson(Map json) => _$$RecipesImplFromJson(json); @@ -505,8 +557,10 @@ class _$RecipesImpl implements _Recipes { other.cookingTime == cookingTime) && (identical(other.activeCookingTime, activeCookingTime) || other.activeCookingTime == activeCookingTime) && - const DeepCollectionEquality() - .equals(other._ingredients, _ingredients) && + const DeepCollectionEquality().equals( + other._ingredients, + _ingredients, + ) && (identical(other.description, description) || other.description == description) && const DeepCollectionEquality().equals(other._steps, _steps) && @@ -537,29 +591,29 @@ class _$RecipesImpl implements _Recipes { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hashAll([ - runtimeType, - id, - image, - state, - cookingTime, - activeCookingTime, - const DeepCollectionEquality().hash(_ingredients), - description, - const DeepCollectionEquality().hash(_steps), - videoUrl, - createdAt, - updatedAt, - title, - type, - slug, - commentsCount, - wasLikedByMe, - isFavorite, - calories, - likesCount, - viewsCount, - author - ]); + runtimeType, + id, + image, + state, + cookingTime, + activeCookingTime, + const DeepCollectionEquality().hash(_ingredients), + description, + const DeepCollectionEquality().hash(_steps), + videoUrl, + createdAt, + updatedAt, + title, + type, + slug, + commentsCount, + wasLikedByMe, + isFavorite, + calories, + likesCount, + viewsCount, + author, + ]); /// Create a copy of Recipe /// with the given fields replaced by the non-null parameter values. @@ -571,35 +625,34 @@ class _$RecipesImpl implements _Recipes { @override Map toJson() { - return _$$RecipesImplToJson( - this, - ); + return _$$RecipesImplToJson(this); } } abstract class _Recipes implements Recipe { - const factory _Recipes( - {required final int id, - required final String image, - required final String state, - @JsonKey(name: 'cooking_time') required final int cookingTime, - @JsonKey(name: 'active_time') required final int activeCookingTime, - required final List? ingredients, - required final String description, - required final List? steps, - @JsonKey(name: 'video_url') required final String? videoUrl, - @JsonKey(name: 'created_at') required final DateTime createdAt, - @JsonKey(name: 'updated_at') required final DateTime updatedAt, - required final String? title, - required final String? type, - required final String slug, - @JsonKey(name: 'total_comments') required final int commentsCount, - @JsonKey(name: 'was_liked_by_me') required final bool wasLikedByMe, - @JsonKey(name: 'is_favorite') required final bool isFavorite, - @JsonKey(name: 'energy_per_serving') required final double calories, - @JsonKey(name: 'total_likes') required final int likesCount, - @JsonKey(name: 'total_views') required final int viewsCount, - required final Author author}) = _$RecipesImpl; + const factory _Recipes({ + required final int id, + required final String image, + required final String state, + @JsonKey(name: 'cooking_time') required final int cookingTime, + @JsonKey(name: 'active_time') required final int activeCookingTime, + required final List? ingredients, + required final String description, + required final List? steps, + @JsonKey(name: 'video_url') required final String? videoUrl, + @JsonKey(name: 'created_at') required final DateTime createdAt, + @JsonKey(name: 'updated_at') required final DateTime updatedAt, + required final String? title, + required final String? type, + required final String slug, + @JsonKey(name: 'total_comments') required final int commentsCount, + @JsonKey(name: 'was_liked_by_me') required final bool wasLikedByMe, + @JsonKey(name: 'is_favorite') required final bool isFavorite, + @JsonKey(name: 'energy_per_serving') required final double calories, + @JsonKey(name: 'total_likes') required final int likesCount, + @JsonKey(name: 'total_views') required final int viewsCount, + required final Author author, + }) = _$RecipesImpl; factory _Recipes.fromJson(Map json) = _$RecipesImpl.fromJson; @@ -688,8 +741,9 @@ mixin _$Ingredient { /// @nodoc abstract class $IngredientCopyWith<$Res> { factory $IngredientCopyWith( - Ingredient value, $Res Function(Ingredient) then) = - _$IngredientCopyWithImpl<$Res, Ingredient>; + Ingredient value, + $Res Function(Ingredient) then, + ) = _$IngredientCopyWithImpl<$Res, Ingredient>; @useResult $Res call({String name, String? unit, String portion}); } @@ -713,20 +767,26 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient> Object? unit = freezed, Object? portion = null, }) { - return _then(_value.copyWith( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - unit: freezed == unit - ? _value.unit - : unit // ignore: cast_nullable_to_non_nullable - as String?, - portion: null == portion - ? _value.portion - : portion // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + return _then( + _value.copyWith( + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + unit: + freezed == unit + ? _value.unit + : unit // ignore: cast_nullable_to_non_nullable + as String?, + portion: + null == portion + ? _value.portion + : portion // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } @@ -734,8 +794,9 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient> abstract class _$$IngredientImplCopyWith<$Res> implements $IngredientCopyWith<$Res> { factory _$$IngredientImplCopyWith( - _$IngredientImpl value, $Res Function(_$IngredientImpl) then) = - __$$IngredientImplCopyWithImpl<$Res>; + _$IngredientImpl value, + $Res Function(_$IngredientImpl) then, + ) = __$$IngredientImplCopyWithImpl<$Res>; @override @useResult $Res call({String name, String? unit, String portion}); @@ -746,8 +807,9 @@ class __$$IngredientImplCopyWithImpl<$Res> extends _$IngredientCopyWithImpl<$Res, _$IngredientImpl> implements _$$IngredientImplCopyWith<$Res> { __$$IngredientImplCopyWithImpl( - _$IngredientImpl _value, $Res Function(_$IngredientImpl) _then) - : super(_value, _then); + _$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. @@ -758,28 +820,36 @@ class __$$IngredientImplCopyWithImpl<$Res> Object? unit = freezed, Object? portion = null, }) { - return _then(_$IngredientImpl( - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - unit: freezed == unit - ? _value.unit - : unit // ignore: cast_nullable_to_non_nullable - as String?, - portion: null == portion - ? _value.portion - : portion // ignore: cast_nullable_to_non_nullable - as String, - )); + return _then( + _$IngredientImpl( + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + unit: + freezed == unit + ? _value.unit + : unit // ignore: cast_nullable_to_non_nullable + as String?, + portion: + null == portion + ? _value.portion + : portion // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } /// @nodoc @JsonSerializable() class _$IngredientImpl implements _Ingredient { - const _$IngredientImpl( - {required this.name, this.unit, required this.portion}); + const _$IngredientImpl({ + required this.name, + this.unit, + required this.portion, + }); factory _$IngredientImpl.fromJson(Map json) => _$$IngredientImplFromJson(json); @@ -820,17 +890,16 @@ class _$IngredientImpl implements _Ingredient { @override Map toJson() { - return _$$IngredientImplToJson( - this, - ); + return _$$IngredientImplToJson(this); } } abstract class _Ingredient implements Ingredient { - const factory _Ingredient( - {required final String name, - final String? unit, - required final String portion}) = _$IngredientImpl; + const factory _Ingredient({ + required final String name, + final String? unit, + required final String portion, + }) = _$IngredientImpl; factory _Ingredient.fromJson(Map json) = _$IngredientImpl.fromJson; @@ -890,28 +959,31 @@ class _$StepCopyWithImpl<$Res, $Val extends Step> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? image = null, - Object? description = null, - }) { - return _then(_value.copyWith( - image: null == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? image = null, Object? description = null}) { + return _then( + _value.copyWith( + image: + null == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String, + description: + null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc abstract class _$$StepImplCopyWith<$Res> implements $StepCopyWith<$Res> { factory _$$StepImplCopyWith( - _$StepImpl value, $Res Function(_$StepImpl) then) = - __$$StepImplCopyWithImpl<$Res>; + _$StepImpl value, + $Res Function(_$StepImpl) then, + ) = __$$StepImplCopyWithImpl<$Res>; @override @useResult $Res call({String image, String description}); @@ -922,26 +994,27 @@ class __$$StepImplCopyWithImpl<$Res> extends _$StepCopyWithImpl<$Res, _$StepImpl> implements _$$StepImplCopyWith<$Res> { __$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then) - : super(_value, _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({ - Object? image = null, - Object? description = null, - }) { - return _then(_$StepImpl( - image: null == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? image = null, Object? description = null}) { + return _then( + _$StepImpl( + image: + null == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String, + description: + null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -987,16 +1060,15 @@ class _$StepImpl implements _Step { @override Map toJson() { - return _$$StepImplToJson( - this, - ); + return _$$StepImplToJson(this); } } abstract class _Step implements Step { - const factory _Step( - {required final String image, - required final String description}) = _$StepImpl; + const factory _Step({ + required final String image, + required final String description, + }) = _$StepImpl; factory _Step.fromJson(Map json) = _$StepImpl.fromJson; diff --git a/lib/features/feed/models/recipes_model.g.dart b/lib/features/feed/models/recipes_model.g.dart index c0a684d9..207de5f7 100644 --- a/lib/features/feed/models/recipes_model.g.dart +++ b/lib/features/feed/models/recipes_model.g.dart @@ -13,13 +13,15 @@ _$RecipesImpl _$$RecipesImplFromJson(Map json) => state: json['state'] as String, cookingTime: (json['cooking_time'] as num).toInt(), activeCookingTime: (json['active_time'] as num).toInt(), - ingredients: (json['ingredients'] as List?) - ?.map((e) => Ingredient.fromJson(e as Map)) - .toList(), + ingredients: + (json['ingredients'] as List?) + ?.map((e) => Ingredient.fromJson(e as Map)) + .toList(), description: json['description'] as String, - steps: (json['steps'] as List?) - ?.map((e) => Step.fromJson(e as Map)) - .toList(), + steps: + (json['steps'] as List?) + ?.map((e) => Step.fromJson(e as Map)) + .toList(), videoUrl: json['video_url'] as String?, createdAt: DateTime.parse(json['created_at'] as String), updatedAt: DateTime.parse(json['updated_at'] as String), @@ -75,9 +77,9 @@ Map _$$IngredientImplToJson(_$IngredientImpl instance) => }; _$StepImpl _$$StepImplFromJson(Map json) => _$StepImpl( - image: json['image'] as String, - description: json['description'] as String, - ); + image: json['image'] as String, + description: json['description'] as String, +); Map _$$StepImplToJson(_$StepImpl instance) => { diff --git a/lib/features/feed/models/recipes_pagination_model.freezed.dart b/lib/features/feed/models/recipes_pagination_model.freezed.dart index 4e05ed5a..e2bbcf43 100644 --- a/lib/features/feed/models/recipes_pagination_model.freezed.dart +++ b/lib/features/feed/models/recipes_pagination_model.freezed.dart @@ -12,7 +12,8 @@ part of 'recipes_pagination_model.dart'; 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'); + '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', +); RecipesPagination _$RecipesPaginationFromJson(Map json) { return _RecipesPagination.fromJson(json); @@ -36,8 +37,9 @@ mixin _$RecipesPagination { /// @nodoc abstract class $RecipesPaginationCopyWith<$Res> { factory $RecipesPaginationCopyWith( - RecipesPagination value, $Res Function(RecipesPagination) then) = - _$RecipesPaginationCopyWithImpl<$Res, RecipesPagination>; + RecipesPagination value, + $Res Function(RecipesPagination) then, + ) = _$RecipesPaginationCopyWithImpl<$Res, RecipesPagination>; @useResult $Res call({@JsonKey(name: 'data') List recipesList}); } @@ -56,24 +58,27 @@ class _$RecipesPaginationCopyWithImpl<$Res, $Val extends RecipesPagination> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? recipesList = null, - }) { - return _then(_value.copyWith( - recipesList: null == recipesList - ? _value.recipesList - : recipesList // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? recipesList = null}) { + return _then( + _value.copyWith( + recipesList: + null == recipesList + ? _value.recipesList + : recipesList // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } /// @nodoc abstract class _$$RecipesPaginationImplCopyWith<$Res> implements $RecipesPaginationCopyWith<$Res> { - factory _$$RecipesPaginationImplCopyWith(_$RecipesPaginationImpl value, - $Res Function(_$RecipesPaginationImpl) then) = - __$$RecipesPaginationImplCopyWithImpl<$Res>; + factory _$$RecipesPaginationImplCopyWith( + _$RecipesPaginationImpl value, + $Res Function(_$RecipesPaginationImpl) then, + ) = __$$RecipesPaginationImplCopyWithImpl<$Res>; @override @useResult $Res call({@JsonKey(name: 'data') List recipesList}); @@ -83,32 +88,34 @@ abstract class _$$RecipesPaginationImplCopyWith<$Res> class __$$RecipesPaginationImplCopyWithImpl<$Res> extends _$RecipesPaginationCopyWithImpl<$Res, _$RecipesPaginationImpl> implements _$$RecipesPaginationImplCopyWith<$Res> { - __$$RecipesPaginationImplCopyWithImpl(_$RecipesPaginationImpl _value, - $Res Function(_$RecipesPaginationImpl) _then) - : super(_value, _then); + __$$RecipesPaginationImplCopyWithImpl( + _$RecipesPaginationImpl _value, + $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({ - Object? recipesList = null, - }) { - return _then(_$RecipesPaginationImpl( - recipesList: null == recipesList - ? _value._recipesList - : recipesList // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? recipesList = null}) { + return _then( + _$RecipesPaginationImpl( + recipesList: + null == recipesList + ? _value._recipesList + : recipesList // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } /// @nodoc @JsonSerializable() class _$RecipesPaginationImpl implements _RecipesPagination { - const _$RecipesPaginationImpl( - {@JsonKey(name: 'data') required final List recipesList}) - : _recipesList = recipesList; + const _$RecipesPaginationImpl({ + @JsonKey(name: 'data') required final List recipesList, + }) : _recipesList = recipesList; factory _$RecipesPaginationImpl.fromJson(Map json) => _$$RecipesPaginationImplFromJson(json); @@ -132,14 +139,18 @@ class _$RecipesPaginationImpl implements _RecipesPagination { return identical(this, other) || (other.runtimeType == runtimeType && other is _$RecipesPaginationImpl && - const DeepCollectionEquality() - .equals(other._recipesList, _recipesList)); + const DeepCollectionEquality().equals( + other._recipesList, + _recipesList, + )); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_recipesList)); + runtimeType, + const DeepCollectionEquality().hash(_recipesList), + ); /// Create a copy of RecipesPagination /// with the given fields replaced by the non-null parameter values. @@ -148,20 +159,20 @@ class _$RecipesPaginationImpl implements _RecipesPagination { @pragma('vm:prefer-inline') _$$RecipesPaginationImplCopyWith<_$RecipesPaginationImpl> get copyWith => __$$RecipesPaginationImplCopyWithImpl<_$RecipesPaginationImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$RecipesPaginationImplToJson( - this, - ); + return _$$RecipesPaginationImplToJson(this); } } abstract class _RecipesPagination implements RecipesPagination { - const factory _RecipesPagination( - {@JsonKey(name: 'data') required final List recipesList}) = - _$RecipesPaginationImpl; + const factory _RecipesPagination({ + @JsonKey(name: 'data') required final List recipesList, + }) = _$RecipesPaginationImpl; factory _RecipesPagination.fromJson(Map json) = _$RecipesPaginationImpl.fromJson; diff --git a/lib/features/feed/models/recipes_pagination_model.g.dart b/lib/features/feed/models/recipes_pagination_model.g.dart index ab5e7326..bdbe05a7 100644 --- a/lib/features/feed/models/recipes_pagination_model.g.dart +++ b/lib/features/feed/models/recipes_pagination_model.g.dart @@ -7,15 +7,14 @@ part of 'recipes_pagination_model.dart'; // ************************************************************************** _$RecipesPaginationImpl _$$RecipesPaginationImplFromJson( - Map json) => - _$RecipesPaginationImpl( - recipesList: (json['data'] as List) + Map json, +) => _$RecipesPaginationImpl( + recipesList: + (json['data'] as List) .map((e) => Recipe.fromJson(e as Map)) .toList(), - ); +); Map _$$RecipesPaginationImplToJson( - _$RecipesPaginationImpl instance) => - { - 'data': instance.recipesList, - }; + _$RecipesPaginationImpl instance, +) => {'data': instance.recipesList}; 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 c3b582ce..908be3fd 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 @@ -12,7 +12,8 @@ part of 'comments_state.dart'; 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'); + '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 _$CommentsState { @@ -22,16 +23,14 @@ mixin _$CommentsState { required TResult Function() loading, required TResult Function(CommentModel comment, int? replyId) loaded, required TResult Function(String errorMessage) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, TResult? Function(CommentModel comment, int? replyId)? loaded, TResult? Function(String errorMessage)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { @@ -39,24 +38,21 @@ mixin _$CommentsState { TResult Function(CommentModel comment, int? replyId)? loaded, TResult Function(String errorMessage)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult map( TResult Function(_CommentsState value) $default, { required TResult Function(CommentsStateLoading value) loading, required TResult Function(CommentsStateLoaded value) loaded, required TResult Function(CommentsStateError value) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull( TResult? Function(_CommentsState value)? $default, { TResult? Function(CommentsStateLoading value)? loading, TResult? Function(CommentsStateLoaded value)? loaded, TResult? Function(CommentsStateError value)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_CommentsState value)? $default, { @@ -64,15 +60,15 @@ mixin _$CommentsState { TResult Function(CommentsStateLoaded value)? loaded, TResult Function(CommentsStateError value)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc abstract class $CommentsStateCopyWith<$Res> { factory $CommentsStateCopyWith( - CommentsState value, $Res Function(CommentsState) then) = - _$CommentsStateCopyWithImpl<$Res, CommentsState>; + CommentsState value, + $Res Function(CommentsState) then, + ) = _$CommentsStateCopyWithImpl<$Res, CommentsState>; } /// @nodoc @@ -92,8 +88,9 @@ class _$CommentsStateCopyWithImpl<$Res, $Val extends CommentsState> /// @nodoc abstract class _$$CommentsStateImplCopyWith<$Res> { factory _$$CommentsStateImplCopyWith( - _$CommentsStateImpl value, $Res Function(_$CommentsStateImpl) then) = - __$$CommentsStateImplCopyWithImpl<$Res>; + _$CommentsStateImpl value, + $Res Function(_$CommentsStateImpl) then, + ) = __$$CommentsStateImplCopyWithImpl<$Res>; } /// @nodoc @@ -101,8 +98,9 @@ class __$$CommentsStateImplCopyWithImpl<$Res> extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateImpl> implements _$$CommentsStateImplCopyWith<$Res> { __$$CommentsStateImplCopyWithImpl( - _$CommentsStateImpl _value, $Res Function(_$CommentsStateImpl) _then) - : super(_value, _then); + _$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. @@ -208,18 +206,20 @@ abstract class _CommentsState implements CommentsState { /// @nodoc abstract class _$$CommentsStateLoadingImplCopyWith<$Res> { - factory _$$CommentsStateLoadingImplCopyWith(_$CommentsStateLoadingImpl value, - $Res Function(_$CommentsStateLoadingImpl) then) = - __$$CommentsStateLoadingImplCopyWithImpl<$Res>; + factory _$$CommentsStateLoadingImplCopyWith( + _$CommentsStateLoadingImpl value, + $Res Function(_$CommentsStateLoadingImpl) then, + ) = __$$CommentsStateLoadingImplCopyWithImpl<$Res>; } /// @nodoc class __$$CommentsStateLoadingImplCopyWithImpl<$Res> extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateLoadingImpl> implements _$$CommentsStateLoadingImplCopyWith<$Res> { - __$$CommentsStateLoadingImplCopyWithImpl(_$CommentsStateLoadingImpl _value, - $Res Function(_$CommentsStateLoadingImpl) _then) - : super(_value, _then); + __$$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. @@ -326,9 +326,10 @@ abstract class CommentsStateLoading implements CommentsState { /// @nodoc abstract class _$$CommentsStateLoadedImplCopyWith<$Res> { - factory _$$CommentsStateLoadedImplCopyWith(_$CommentsStateLoadedImpl value, - $Res Function(_$CommentsStateLoadedImpl) then) = - __$$CommentsStateLoadedImplCopyWithImpl<$Res>; + factory _$$CommentsStateLoadedImplCopyWith( + _$CommentsStateLoadedImpl value, + $Res Function(_$CommentsStateLoadedImpl) then, + ) = __$$CommentsStateLoadedImplCopyWithImpl<$Res>; @useResult $Res call({CommentModel comment, int? replyId}); @@ -339,28 +340,30 @@ abstract class _$$CommentsStateLoadedImplCopyWith<$Res> { class __$$CommentsStateLoadedImplCopyWithImpl<$Res> extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateLoadedImpl> implements _$$CommentsStateLoadedImplCopyWith<$Res> { - __$$CommentsStateLoadedImplCopyWithImpl(_$CommentsStateLoadedImpl _value, - $Res Function(_$CommentsStateLoadedImpl) _then) - : super(_value, _then); + __$$CommentsStateLoadedImplCopyWithImpl( + _$CommentsStateLoadedImpl _value, + $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({ - Object? comment = null, - Object? replyId = freezed, - }) { - return _then(_$CommentsStateLoadedImpl( - comment: null == comment - ? _value.comment - : comment // ignore: cast_nullable_to_non_nullable - as CommentModel, - replyId: freezed == replyId - ? _value.replyId - : replyId // ignore: cast_nullable_to_non_nullable - as int?, - )); + $Res call({Object? comment = null, Object? replyId = freezed}) { + return _then( + _$CommentsStateLoadedImpl( + comment: + null == comment + ? _value.comment + : comment // ignore: cast_nullable_to_non_nullable + as CommentModel, + replyId: + freezed == replyId + ? _value.replyId + : replyId // ignore: cast_nullable_to_non_nullable + as int?, + ), + ); } /// Create a copy of CommentsState @@ -408,7 +411,9 @@ class _$CommentsStateLoadedImpl implements CommentsStateLoaded { @pragma('vm:prefer-inline') _$$CommentsStateLoadedImplCopyWith<_$CommentsStateLoadedImpl> get copyWith => __$$CommentsStateLoadedImplCopyWithImpl<_$CommentsStateLoadedImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs @@ -486,9 +491,10 @@ class _$CommentsStateLoadedImpl implements CommentsStateLoaded { } abstract class CommentsStateLoaded implements CommentsState { - const factory CommentsStateLoaded( - {required final CommentModel comment, - final int? replyId}) = _$CommentsStateLoadedImpl; + const factory CommentsStateLoaded({ + required final CommentModel comment, + final int? replyId, + }) = _$CommentsStateLoadedImpl; CommentModel get comment; int? get replyId; @@ -502,9 +508,10 @@ abstract class CommentsStateLoaded implements CommentsState { /// @nodoc abstract class _$$CommentsStateErrorImplCopyWith<$Res> { - factory _$$CommentsStateErrorImplCopyWith(_$CommentsStateErrorImpl value, - $Res Function(_$CommentsStateErrorImpl) then) = - __$$CommentsStateErrorImplCopyWithImpl<$Res>; + factory _$$CommentsStateErrorImplCopyWith( + _$CommentsStateErrorImpl value, + $Res Function(_$CommentsStateErrorImpl) then, + ) = __$$CommentsStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String errorMessage}); } @@ -513,23 +520,25 @@ abstract class _$$CommentsStateErrorImplCopyWith<$Res> { class __$$CommentsStateErrorImplCopyWithImpl<$Res> extends _$CommentsStateCopyWithImpl<$Res, _$CommentsStateErrorImpl> implements _$$CommentsStateErrorImplCopyWith<$Res> { - __$$CommentsStateErrorImplCopyWithImpl(_$CommentsStateErrorImpl _value, - $Res Function(_$CommentsStateErrorImpl) _then) - : super(_value, _then); + __$$CommentsStateErrorImplCopyWithImpl( + _$CommentsStateErrorImpl _value, + $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({ - Object? errorMessage = null, - }) { - return _then(_$CommentsStateErrorImpl( - errorMessage: null == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? errorMessage = null}) { + return _then( + _$CommentsStateErrorImpl( + errorMessage: + null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -565,7 +574,9 @@ class _$CommentsStateErrorImpl implements CommentsStateError { @pragma('vm:prefer-inline') _$$CommentsStateErrorImplCopyWith<_$CommentsStateErrorImpl> get copyWith => __$$CommentsStateErrorImplCopyWithImpl<_$CommentsStateErrorImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs diff --git a/lib/features/feed/presentation/bloc/consultants_cubit/consultants_state.freezed.dart b/lib/features/feed/presentation/bloc/consultants_cubit/consultants_state.freezed.dart index 5dd8aa15..4cf56ef7 100644 --- a/lib/features/feed/presentation/bloc/consultants_cubit/consultants_state.freezed.dart +++ b/lib/features/feed/presentation/bloc/consultants_cubit/consultants_state.freezed.dart @@ -12,7 +12,8 @@ part of 'consultants_state.dart'; 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'); + '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 _$ConsultantsState { @@ -21,47 +22,46 @@ mixin _$ConsultantsState { TResult Function() $default, { required TResult Function() loading, required TResult Function( - List consultantsList, bool isLoading) - loaded, + List consultantsList, + bool isLoading, + ) + loaded, required TResult Function(String errorMessage) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, TResult? Function( - List consultantsList, bool isLoading)? - loaded, + List consultantsList, + bool isLoading, + )? + loaded, TResult? Function(String errorMessage)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, TResult Function(List consultantsList, bool isLoading)? - loaded, + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult map( TResult Function(_ConsultantsState value) $default, { required TResult Function(ConsultantsStateLoading value) loading, required TResult Function(ConsultantsStateLoaded value) loaded, required TResult Function(ConsultantsStateError value) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull( TResult? Function(_ConsultantsState value)? $default, { TResult? Function(ConsultantsStateLoading value)? loading, TResult? Function(ConsultantsStateLoaded value)? loaded, TResult? Function(ConsultantsStateError value)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_ConsultantsState value)? $default, { @@ -69,15 +69,15 @@ mixin _$ConsultantsState { TResult Function(ConsultantsStateLoaded value)? loaded, TResult Function(ConsultantsStateError value)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc abstract class $ConsultantsStateCopyWith<$Res> { factory $ConsultantsStateCopyWith( - ConsultantsState value, $Res Function(ConsultantsState) then) = - _$ConsultantsStateCopyWithImpl<$Res, ConsultantsState>; + ConsultantsState value, + $Res Function(ConsultantsState) then, + ) = _$ConsultantsStateCopyWithImpl<$Res, ConsultantsState>; } /// @nodoc @@ -96,18 +96,20 @@ class _$ConsultantsStateCopyWithImpl<$Res, $Val extends ConsultantsState> /// @nodoc abstract class _$$ConsultantsStateImplCopyWith<$Res> { - factory _$$ConsultantsStateImplCopyWith(_$ConsultantsStateImpl value, - $Res Function(_$ConsultantsStateImpl) then) = - __$$ConsultantsStateImplCopyWithImpl<$Res>; + factory _$$ConsultantsStateImplCopyWith( + _$ConsultantsStateImpl value, + $Res Function(_$ConsultantsStateImpl) then, + ) = __$$ConsultantsStateImplCopyWithImpl<$Res>; } /// @nodoc class __$$ConsultantsStateImplCopyWithImpl<$Res> extends _$ConsultantsStateCopyWithImpl<$Res, _$ConsultantsStateImpl> implements _$$ConsultantsStateImplCopyWith<$Res> { - __$$ConsultantsStateImplCopyWithImpl(_$ConsultantsStateImpl _value, - $Res Function(_$ConsultantsStateImpl) _then) - : super(_value, _then); + __$$ConsultantsStateImplCopyWithImpl( + _$ConsultantsStateImpl _value, + $Res Function(_$ConsultantsStateImpl) _then, + ) : super(_value, _then); /// Create a copy of ConsultantsState /// with the given fields replaced by the non-null parameter values. @@ -138,8 +140,10 @@ class _$ConsultantsStateImpl implements _ConsultantsState { TResult Function() $default, { required TResult Function() loading, required TResult Function( - List consultantsList, bool isLoading) - loaded, + List consultantsList, + bool isLoading, + ) + loaded, required TResult Function(String errorMessage) error, }) { return $default(); @@ -151,8 +155,10 @@ class _$ConsultantsStateImpl implements _ConsultantsState { TResult? Function()? $default, { TResult? Function()? loading, TResult? Function( - List consultantsList, bool isLoading)? - loaded, + List consultantsList, + bool isLoading, + )? + loaded, TResult? Function(String errorMessage)? error, }) { return $default?.call(); @@ -164,7 +170,7 @@ class _$ConsultantsStateImpl implements _ConsultantsState { TResult Function()? $default, { TResult Function()? loading, TResult Function(List consultantsList, bool isLoading)? - loaded, + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -219,9 +225,9 @@ abstract class _ConsultantsState implements ConsultantsState { /// @nodoc abstract class _$$ConsultantsStateLoadingImplCopyWith<$Res> { factory _$$ConsultantsStateLoadingImplCopyWith( - _$ConsultantsStateLoadingImpl value, - $Res Function(_$ConsultantsStateLoadingImpl) then) = - __$$ConsultantsStateLoadingImplCopyWithImpl<$Res>; + _$ConsultantsStateLoadingImpl value, + $Res Function(_$ConsultantsStateLoadingImpl) then, + ) = __$$ConsultantsStateLoadingImplCopyWithImpl<$Res>; } /// @nodoc @@ -229,9 +235,9 @@ class __$$ConsultantsStateLoadingImplCopyWithImpl<$Res> extends _$ConsultantsStateCopyWithImpl<$Res, _$ConsultantsStateLoadingImpl> implements _$$ConsultantsStateLoadingImplCopyWith<$Res> { __$$ConsultantsStateLoadingImplCopyWithImpl( - _$ConsultantsStateLoadingImpl _value, - $Res Function(_$ConsultantsStateLoadingImpl) _then) - : super(_value, _then); + _$ConsultantsStateLoadingImpl _value, + $Res Function(_$ConsultantsStateLoadingImpl) _then, + ) : super(_value, _then); /// Create a copy of ConsultantsState /// with the given fields replaced by the non-null parameter values. @@ -263,8 +269,10 @@ class _$ConsultantsStateLoadingImpl implements ConsultantsStateLoading { TResult Function() $default, { required TResult Function() loading, required TResult Function( - List consultantsList, bool isLoading) - loaded, + List consultantsList, + bool isLoading, + ) + loaded, required TResult Function(String errorMessage) error, }) { return loading(); @@ -276,8 +284,10 @@ class _$ConsultantsStateLoadingImpl implements ConsultantsStateLoading { TResult? Function()? $default, { TResult? Function()? loading, TResult? Function( - List consultantsList, bool isLoading)? - loaded, + List consultantsList, + bool isLoading, + )? + loaded, TResult? Function(String errorMessage)? error, }) { return loading?.call(); @@ -289,7 +299,7 @@ class _$ConsultantsStateLoadingImpl implements ConsultantsStateLoading { TResult Function()? $default, { TResult Function()? loading, TResult Function(List consultantsList, bool isLoading)? - loaded, + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -344,9 +354,9 @@ abstract class ConsultantsStateLoading implements ConsultantsState { /// @nodoc abstract class _$$ConsultantsStateLoadedImplCopyWith<$Res> { factory _$$ConsultantsStateLoadedImplCopyWith( - _$ConsultantsStateLoadedImpl value, - $Res Function(_$ConsultantsStateLoadedImpl) then) = - __$$ConsultantsStateLoadedImplCopyWithImpl<$Res>; + _$ConsultantsStateLoadedImpl value, + $Res Function(_$ConsultantsStateLoadedImpl) then, + ) = __$$ConsultantsStateLoadedImplCopyWithImpl<$Res>; @useResult $Res call({List consultantsList, bool isLoading}); } @@ -356,38 +366,39 @@ class __$$ConsultantsStateLoadedImplCopyWithImpl<$Res> extends _$ConsultantsStateCopyWithImpl<$Res, _$ConsultantsStateLoadedImpl> implements _$$ConsultantsStateLoadedImplCopyWith<$Res> { __$$ConsultantsStateLoadedImplCopyWithImpl( - _$ConsultantsStateLoadedImpl _value, - $Res Function(_$ConsultantsStateLoadedImpl) _then) - : super(_value, _then); + _$ConsultantsStateLoadedImpl _value, + $Res Function(_$ConsultantsStateLoadedImpl) _then, + ) : super(_value, _then); /// Create a copy of ConsultantsState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? consultantsList = null, - Object? isLoading = null, - }) { - return _then(_$ConsultantsStateLoadedImpl( - consultantsList: null == consultantsList - ? _value._consultantsList - : consultantsList // ignore: cast_nullable_to_non_nullable - as List, - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? consultantsList = null, Object? isLoading = null}) { + return _then( + _$ConsultantsStateLoadedImpl( + consultantsList: + null == consultantsList + ? _value._consultantsList + : consultantsList // ignore: cast_nullable_to_non_nullable + as List, + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } /// @nodoc class _$ConsultantsStateLoadedImpl implements ConsultantsStateLoaded { - const _$ConsultantsStateLoadedImpl( - {required final List consultantsList, - required this.isLoading}) - : _consultantsList = consultantsList; + const _$ConsultantsStateLoadedImpl({ + required final List consultantsList, + required this.isLoading, + }) : _consultantsList = consultantsList; final List _consultantsList; @override @@ -410,15 +421,20 @@ class _$ConsultantsStateLoadedImpl implements ConsultantsStateLoaded { return identical(this, other) || (other.runtimeType == runtimeType && other is _$ConsultantsStateLoadedImpl && - const DeepCollectionEquality() - .equals(other._consultantsList, _consultantsList) && + const DeepCollectionEquality().equals( + other._consultantsList, + _consultantsList, + ) && (identical(other.isLoading, isLoading) || other.isLoading == isLoading)); } @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(_consultantsList), isLoading); + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(_consultantsList), + isLoading, + ); /// Create a copy of ConsultantsState /// with the given fields replaced by the non-null parameter values. @@ -426,8 +442,11 @@ class _$ConsultantsStateLoadedImpl implements ConsultantsStateLoaded { @override @pragma('vm:prefer-inline') _$$ConsultantsStateLoadedImplCopyWith<_$ConsultantsStateLoadedImpl> - get copyWith => __$$ConsultantsStateLoadedImplCopyWithImpl< - _$ConsultantsStateLoadedImpl>(this, _$identity); + get copyWith => + __$$ConsultantsStateLoadedImplCopyWithImpl<_$ConsultantsStateLoadedImpl>( + this, + _$identity, + ); @override @optionalTypeArgs @@ -435,8 +454,10 @@ class _$ConsultantsStateLoadedImpl implements ConsultantsStateLoaded { TResult Function() $default, { required TResult Function() loading, required TResult Function( - List consultantsList, bool isLoading) - loaded, + List consultantsList, + bool isLoading, + ) + loaded, required TResult Function(String errorMessage) error, }) { return loaded(consultantsList, isLoading); @@ -448,8 +469,10 @@ class _$ConsultantsStateLoadedImpl implements ConsultantsStateLoaded { TResult? Function()? $default, { TResult? Function()? loading, TResult? Function( - List consultantsList, bool isLoading)? - loaded, + List consultantsList, + bool isLoading, + )? + loaded, TResult? Function(String errorMessage)? error, }) { return loaded?.call(consultantsList, isLoading); @@ -461,7 +484,7 @@ class _$ConsultantsStateLoadedImpl implements ConsultantsStateLoaded { TResult Function()? $default, { TResult Function()? loading, TResult Function(List consultantsList, bool isLoading)? - loaded, + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -510,9 +533,10 @@ class _$ConsultantsStateLoadedImpl implements ConsultantsStateLoaded { } abstract class ConsultantsStateLoaded implements ConsultantsState { - const factory ConsultantsStateLoaded( - {required final List consultantsList, - required final bool isLoading}) = _$ConsultantsStateLoadedImpl; + const factory ConsultantsStateLoaded({ + required final List consultantsList, + required final bool isLoading, + }) = _$ConsultantsStateLoadedImpl; List get consultantsList; bool get isLoading; @@ -521,15 +545,15 @@ abstract class ConsultantsStateLoaded implements ConsultantsState { /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) _$$ConsultantsStateLoadedImplCopyWith<_$ConsultantsStateLoadedImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class _$$ConsultantsStateErrorImplCopyWith<$Res> { factory _$$ConsultantsStateErrorImplCopyWith( - _$ConsultantsStateErrorImpl value, - $Res Function(_$ConsultantsStateErrorImpl) then) = - __$$ConsultantsStateErrorImplCopyWithImpl<$Res>; + _$ConsultantsStateErrorImpl value, + $Res Function(_$ConsultantsStateErrorImpl) then, + ) = __$$ConsultantsStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String errorMessage}); } @@ -538,23 +562,25 @@ abstract class _$$ConsultantsStateErrorImplCopyWith<$Res> { class __$$ConsultantsStateErrorImplCopyWithImpl<$Res> extends _$ConsultantsStateCopyWithImpl<$Res, _$ConsultantsStateErrorImpl> implements _$$ConsultantsStateErrorImplCopyWith<$Res> { - __$$ConsultantsStateErrorImplCopyWithImpl(_$ConsultantsStateErrorImpl _value, - $Res Function(_$ConsultantsStateErrorImpl) _then) - : super(_value, _then); + __$$ConsultantsStateErrorImplCopyWithImpl( + _$ConsultantsStateErrorImpl _value, + $Res Function(_$ConsultantsStateErrorImpl) _then, + ) : super(_value, _then); /// Create a copy of ConsultantsState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? errorMessage = null, - }) { - return _then(_$ConsultantsStateErrorImpl( - errorMessage: null == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? errorMessage = null}) { + return _then( + _$ConsultantsStateErrorImpl( + errorMessage: + null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -589,8 +615,11 @@ class _$ConsultantsStateErrorImpl implements ConsultantsStateError { @override @pragma('vm:prefer-inline') _$$ConsultantsStateErrorImplCopyWith<_$ConsultantsStateErrorImpl> - get copyWith => __$$ConsultantsStateErrorImplCopyWithImpl< - _$ConsultantsStateErrorImpl>(this, _$identity); + get copyWith => + __$$ConsultantsStateErrorImplCopyWithImpl<_$ConsultantsStateErrorImpl>( + this, + _$identity, + ); @override @optionalTypeArgs @@ -598,8 +627,10 @@ class _$ConsultantsStateErrorImpl implements ConsultantsStateError { TResult Function() $default, { required TResult Function() loading, required TResult Function( - List consultantsList, bool isLoading) - loaded, + List consultantsList, + bool isLoading, + ) + loaded, required TResult Function(String errorMessage) error, }) { return error(errorMessage); @@ -611,8 +642,10 @@ class _$ConsultantsStateErrorImpl implements ConsultantsStateError { TResult? Function()? $default, { TResult? Function()? loading, TResult? Function( - List consultantsList, bool isLoading)? - loaded, + List consultantsList, + bool isLoading, + )? + loaded, TResult? Function(String errorMessage)? error, }) { return error?.call(errorMessage); @@ -624,7 +657,7 @@ class _$ConsultantsStateErrorImpl implements ConsultantsStateError { TResult Function()? $default, { TResult Function()? loading, TResult Function(List consultantsList, bool isLoading)? - loaded, + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -682,5 +715,5 @@ abstract class ConsultantsStateError implements ConsultantsState { /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) _$$ConsultantsStateErrorImplCopyWith<_$ConsultantsStateErrorImpl> - get copyWith => throw _privateConstructorUsedError; + 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 aea14d0b..d6fc0b9f 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 @@ -12,7 +12,8 @@ part of 'diets_state.dart'; 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'); + '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 _$DietsState { @@ -31,14 +32,16 @@ mixin _$DietsState { /// @nodoc abstract class $DietsStateCopyWith<$Res> { factory $DietsStateCopyWith( - DietsState value, $Res Function(DietsState) then) = - _$DietsStateCopyWithImpl<$Res, DietsState>; + DietsState value, + $Res Function(DietsState) then, + ) = _$DietsStateCopyWithImpl<$Res, DietsState>; @useResult - $Res call( - {DietsFilterState filterState, - List dietsList, - bool isLoading, - String? errorMessage}); + $Res call({ + DietsFilterState filterState, + List dietsList, + bool isLoading, + String? errorMessage, + }); $DietsFilterStateCopyWith<$Res> get filterState; } @@ -63,24 +66,31 @@ class _$DietsStateCopyWithImpl<$Res, $Val extends DietsState> Object? isLoading = null, Object? errorMessage = freezed, }) { - return _then(_value.copyWith( - filterState: null == filterState - ? _value.filterState - : filterState // ignore: cast_nullable_to_non_nullable - as DietsFilterState, - dietsList: null == dietsList - ? _value.dietsList - : dietsList // ignore: cast_nullable_to_non_nullable - as List, - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - errorMessage: freezed == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + filterState: + null == filterState + ? _value.filterState + : filterState // ignore: cast_nullable_to_non_nullable + as DietsFilterState, + dietsList: + null == dietsList + ? _value.dietsList + : dietsList // ignore: cast_nullable_to_non_nullable + as List, + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + errorMessage: + freezed == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } /// Create a copy of DietsState @@ -98,15 +108,17 @@ class _$DietsStateCopyWithImpl<$Res, $Val extends DietsState> abstract class _$$DietsStateImplCopyWith<$Res> implements $DietsStateCopyWith<$Res> { factory _$$DietsStateImplCopyWith( - _$DietsStateImpl value, $Res Function(_$DietsStateImpl) then) = - __$$DietsStateImplCopyWithImpl<$Res>; + _$DietsStateImpl value, + $Res Function(_$DietsStateImpl) then, + ) = __$$DietsStateImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {DietsFilterState filterState, - List dietsList, - bool isLoading, - String? errorMessage}); + $Res call({ + DietsFilterState filterState, + List dietsList, + bool isLoading, + String? errorMessage, + }); @override $DietsFilterStateCopyWith<$Res> get filterState; @@ -117,8 +129,9 @@ class __$$DietsStateImplCopyWithImpl<$Res> extends _$DietsStateCopyWithImpl<$Res, _$DietsStateImpl> implements _$$DietsStateImplCopyWith<$Res> { __$$DietsStateImplCopyWithImpl( - _$DietsStateImpl _value, $Res Function(_$DietsStateImpl) _then) - : super(_value, _then); + _$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. @@ -130,36 +143,42 @@ class __$$DietsStateImplCopyWithImpl<$Res> Object? isLoading = null, Object? errorMessage = freezed, }) { - return _then(_$DietsStateImpl( - filterState: null == filterState - ? _value.filterState - : filterState // ignore: cast_nullable_to_non_nullable - as DietsFilterState, - dietsList: null == dietsList - ? _value._dietsList - : dietsList // ignore: cast_nullable_to_non_nullable - as List, - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - errorMessage: freezed == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$DietsStateImpl( + filterState: + null == filterState + ? _value.filterState + : filterState // ignore: cast_nullable_to_non_nullable + as DietsFilterState, + dietsList: + null == dietsList + ? _value._dietsList + : dietsList // ignore: cast_nullable_to_non_nullable + as List, + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + errorMessage: + freezed == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } /// @nodoc class _$DietsStateImpl implements _DietsState { - const _$DietsStateImpl( - {required this.filterState, - required final List dietsList, - required this.isLoading, - required this.errorMessage}) - : _dietsList = dietsList; + const _$DietsStateImpl({ + required this.filterState, + required final List dietsList, + required this.isLoading, + required this.errorMessage, + }) : _dietsList = dietsList; @override final DietsFilterState filterState; @@ -188,8 +207,10 @@ class _$DietsStateImpl implements _DietsState { other is _$DietsStateImpl && (identical(other.filterState, filterState) || other.filterState == filterState) && - const DeepCollectionEquality() - .equals(other._dietsList, _dietsList) && + const DeepCollectionEquality().equals( + other._dietsList, + _dietsList, + ) && (identical(other.isLoading, isLoading) || other.isLoading == isLoading) && (identical(other.errorMessage, errorMessage) || @@ -197,8 +218,13 @@ class _$DietsStateImpl implements _DietsState { } @override - int get hashCode => Object.hash(runtimeType, filterState, - const DeepCollectionEquality().hash(_dietsList), isLoading, errorMessage); + int get hashCode => Object.hash( + runtimeType, + filterState, + const DeepCollectionEquality().hash(_dietsList), + isLoading, + errorMessage, + ); /// Create a copy of DietsState /// with the given fields replaced by the non-null parameter values. @@ -210,11 +236,12 @@ class _$DietsStateImpl implements _DietsState { } abstract class _DietsState implements DietsState { - const factory _DietsState( - {required final DietsFilterState filterState, - required final List dietsList, - required final bool isLoading, - required final String? errorMessage}) = _$DietsStateImpl; + const factory _DietsState({ + required final DietsFilterState filterState, + required final List dietsList, + required final bool isLoading, + required final String? errorMessage, + }) = _$DietsStateImpl; @override DietsFilterState get filterState; @@ -249,8 +276,9 @@ mixin _$DietsFilterState { /// @nodoc abstract class $DietsFilterStateCopyWith<$Res> { factory $DietsFilterStateCopyWith( - DietsFilterState value, $Res Function(DietsFilterState) then) = - _$DietsFilterStateCopyWithImpl<$Res, DietsFilterState>; + DietsFilterState value, + $Res Function(DietsFilterState) then, + ) = _$DietsFilterStateCopyWithImpl<$Res, DietsFilterState>; @useResult $Res call({int sortingIndex, int durationIndex, int typeIndex}); } @@ -274,29 +302,36 @@ class _$DietsFilterStateCopyWithImpl<$Res, $Val extends DietsFilterState> Object? durationIndex = null, Object? typeIndex = null, }) { - return _then(_value.copyWith( - sortingIndex: null == sortingIndex - ? _value.sortingIndex - : sortingIndex // ignore: cast_nullable_to_non_nullable - as int, - durationIndex: null == durationIndex - ? _value.durationIndex - : durationIndex // ignore: cast_nullable_to_non_nullable - as int, - typeIndex: null == typeIndex - ? _value.typeIndex - : typeIndex // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + return _then( + _value.copyWith( + sortingIndex: + null == sortingIndex + ? _value.sortingIndex + : sortingIndex // ignore: cast_nullable_to_non_nullable + as int, + durationIndex: + null == durationIndex + ? _value.durationIndex + : durationIndex // ignore: cast_nullable_to_non_nullable + as int, + typeIndex: + null == typeIndex + ? _value.typeIndex + : typeIndex // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } } /// @nodoc abstract class _$$DietsFilterStateImplCopyWith<$Res> implements $DietsFilterStateCopyWith<$Res> { - factory _$$DietsFilterStateImplCopyWith(_$DietsFilterStateImpl value, - $Res Function(_$DietsFilterStateImpl) then) = - __$$DietsFilterStateImplCopyWithImpl<$Res>; + factory _$$DietsFilterStateImplCopyWith( + _$DietsFilterStateImpl value, + $Res Function(_$DietsFilterStateImpl) then, + ) = __$$DietsFilterStateImplCopyWithImpl<$Res>; @override @useResult $Res call({int sortingIndex, int durationIndex, int typeIndex}); @@ -306,9 +341,10 @@ abstract class _$$DietsFilterStateImplCopyWith<$Res> class __$$DietsFilterStateImplCopyWithImpl<$Res> extends _$DietsFilterStateCopyWithImpl<$Res, _$DietsFilterStateImpl> implements _$$DietsFilterStateImplCopyWith<$Res> { - __$$DietsFilterStateImplCopyWithImpl(_$DietsFilterStateImpl _value, - $Res Function(_$DietsFilterStateImpl) _then) - : super(_value, _then); + __$$DietsFilterStateImplCopyWithImpl( + _$DietsFilterStateImpl _value, + $Res Function(_$DietsFilterStateImpl) _then, + ) : super(_value, _then); /// Create a copy of DietsFilterState /// with the given fields replaced by the non-null parameter values. @@ -319,30 +355,36 @@ class __$$DietsFilterStateImplCopyWithImpl<$Res> Object? durationIndex = null, Object? typeIndex = null, }) { - return _then(_$DietsFilterStateImpl( - sortingIndex: null == sortingIndex - ? _value.sortingIndex - : sortingIndex // ignore: cast_nullable_to_non_nullable - as int, - durationIndex: null == durationIndex - ? _value.durationIndex - : durationIndex // ignore: cast_nullable_to_non_nullable - as int, - typeIndex: null == typeIndex - ? _value.typeIndex - : typeIndex // ignore: cast_nullable_to_non_nullable - as int, - )); + return _then( + _$DietsFilterStateImpl( + sortingIndex: + null == sortingIndex + ? _value.sortingIndex + : sortingIndex // ignore: cast_nullable_to_non_nullable + as int, + durationIndex: + null == durationIndex + ? _value.durationIndex + : durationIndex // ignore: cast_nullable_to_non_nullable + as int, + typeIndex: + null == typeIndex + ? _value.typeIndex + : typeIndex // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } /// @nodoc class _$DietsFilterStateImpl implements _DietsFilterState { - const _$DietsFilterStateImpl( - {required this.sortingIndex, - required this.durationIndex, - required this.typeIndex}); + const _$DietsFilterStateImpl({ + required this.sortingIndex, + required this.durationIndex, + required this.typeIndex, + }); @override final int sortingIndex; @@ -380,14 +422,17 @@ class _$DietsFilterStateImpl implements _DietsFilterState { @pragma('vm:prefer-inline') _$$DietsFilterStateImplCopyWith<_$DietsFilterStateImpl> get copyWith => __$$DietsFilterStateImplCopyWithImpl<_$DietsFilterStateImpl>( - this, _$identity); + this, + _$identity, + ); } abstract class _DietsFilterState implements DietsFilterState { - const factory _DietsFilterState( - {required final int sortingIndex, - required final int durationIndex, - required final int typeIndex}) = _$DietsFilterStateImpl; + const factory _DietsFilterState({ + required final int sortingIndex, + required final int durationIndex, + required final int typeIndex, + }) = _$DietsFilterStateImpl; @override int get sortingIndex; 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..280779d7 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 @@ -12,7 +12,8 @@ part of 'feed_state.dart'; 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'); + '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 _$FeedState { @@ -21,46 +22,43 @@ mixin _$FeedState { TResult Function() $default, { required TResult Function() loading, required TResult Function( - List feedBlogPostList, bool isLoading) - loaded, + List feedBlogPostList, + bool isLoading, + ) + loaded, required TResult Function(String errorMessage) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, TResult? Function(List feedBlogPostList, bool isLoading)? - loaded, + loaded, TResult? Function(String errorMessage)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, TResult Function(List feedBlogPostList, bool isLoading)? - loaded, + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult map( TResult Function(_FeedState value) $default, { required TResult Function(FeedStateLoading value) loading, required TResult Function(FeedStateLoaded value) loaded, required TResult Function(FeedStateError value) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull( TResult? Function(_FeedState value)? $default, { TResult? Function(FeedStateLoading value)? loading, TResult? Function(FeedStateLoaded value)? loaded, TResult? Function(FeedStateError value)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_FeedState value)? $default, { @@ -68,8 +66,7 @@ mixin _$FeedState { TResult Function(FeedStateLoaded value)? loaded, TResult Function(FeedStateError value)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc @@ -95,8 +92,9 @@ class _$FeedStateCopyWithImpl<$Res, $Val extends FeedState> /// @nodoc abstract class _$$FeedStateImplCopyWith<$Res> { factory _$$FeedStateImplCopyWith( - _$FeedStateImpl value, $Res Function(_$FeedStateImpl) then) = - __$$FeedStateImplCopyWithImpl<$Res>; + _$FeedStateImpl value, + $Res Function(_$FeedStateImpl) then, + ) = __$$FeedStateImplCopyWithImpl<$Res>; } /// @nodoc @@ -104,8 +102,9 @@ class __$$FeedStateImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateImpl> implements _$$FeedStateImplCopyWith<$Res> { __$$FeedStateImplCopyWithImpl( - _$FeedStateImpl _value, $Res Function(_$FeedStateImpl) _then) - : super(_value, _then); + _$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. @@ -136,8 +135,10 @@ class _$FeedStateImpl implements _FeedState { TResult Function() $default, { required TResult Function() loading, required TResult Function( - List feedBlogPostList, bool isLoading) - loaded, + List feedBlogPostList, + bool isLoading, + ) + loaded, required TResult Function(String errorMessage) error, }) { return $default(); @@ -149,7 +150,7 @@ class _$FeedStateImpl implements _FeedState { TResult? Function()? $default, { TResult? Function()? loading, TResult? Function(List feedBlogPostList, bool isLoading)? - loaded, + loaded, TResult? Function(String errorMessage)? error, }) { return $default?.call(); @@ -161,7 +162,7 @@ class _$FeedStateImpl implements _FeedState { TResult Function()? $default, { TResult Function()? loading, TResult Function(List feedBlogPostList, bool isLoading)? - loaded, + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -215,18 +216,20 @@ abstract class _FeedState implements FeedState { /// @nodoc abstract class _$$FeedStateLoadingImplCopyWith<$Res> { - factory _$$FeedStateLoadingImplCopyWith(_$FeedStateLoadingImpl value, - $Res Function(_$FeedStateLoadingImpl) then) = - __$$FeedStateLoadingImplCopyWithImpl<$Res>; + factory _$$FeedStateLoadingImplCopyWith( + _$FeedStateLoadingImpl value, + $Res Function(_$FeedStateLoadingImpl) then, + ) = __$$FeedStateLoadingImplCopyWithImpl<$Res>; } /// @nodoc class __$$FeedStateLoadingImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadingImpl> implements _$$FeedStateLoadingImplCopyWith<$Res> { - __$$FeedStateLoadingImplCopyWithImpl(_$FeedStateLoadingImpl _value, - $Res Function(_$FeedStateLoadingImpl) _then) - : super(_value, _then); + __$$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. @@ -257,8 +260,10 @@ class _$FeedStateLoadingImpl implements FeedStateLoading { TResult Function() $default, { required TResult Function() loading, required TResult Function( - List feedBlogPostList, bool isLoading) - loaded, + List feedBlogPostList, + bool isLoading, + ) + loaded, required TResult Function(String errorMessage) error, }) { return loading(); @@ -270,7 +275,7 @@ class _$FeedStateLoadingImpl implements FeedStateLoading { TResult? Function()? $default, { TResult? Function()? loading, TResult? Function(List feedBlogPostList, bool isLoading)? - loaded, + loaded, TResult? Function(String errorMessage)? error, }) { return loading?.call(); @@ -282,7 +287,7 @@ class _$FeedStateLoadingImpl implements FeedStateLoading { TResult Function()? $default, { TResult Function()? loading, TResult Function(List feedBlogPostList, bool isLoading)? - loaded, + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -336,9 +341,10 @@ abstract class FeedStateLoading implements FeedState { /// @nodoc abstract class _$$FeedStateLoadedImplCopyWith<$Res> { - factory _$$FeedStateLoadedImplCopyWith(_$FeedStateLoadedImpl value, - $Res Function(_$FeedStateLoadedImpl) then) = - __$$FeedStateLoadedImplCopyWithImpl<$Res>; + factory _$$FeedStateLoadedImplCopyWith( + _$FeedStateLoadedImpl value, + $Res Function(_$FeedStateLoadedImpl) then, + ) = __$$FeedStateLoadedImplCopyWithImpl<$Res>; @useResult $Res call({List feedBlogPostList, bool isLoading}); } @@ -348,37 +354,39 @@ class __$$FeedStateLoadedImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateLoadedImpl> implements _$$FeedStateLoadedImplCopyWith<$Res> { __$$FeedStateLoadedImplCopyWithImpl( - _$FeedStateLoadedImpl _value, $Res Function(_$FeedStateLoadedImpl) _then) - : super(_value, _then); + _$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({ - Object? feedBlogPostList = null, - Object? isLoading = null, - }) { - return _then(_$FeedStateLoadedImpl( - feedBlogPostList: null == feedBlogPostList - ? _value._feedBlogPostList - : feedBlogPostList // ignore: cast_nullable_to_non_nullable - as List, - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - )); + $Res call({Object? feedBlogPostList = null, Object? isLoading = null}) { + return _then( + _$FeedStateLoadedImpl( + feedBlogPostList: + null == feedBlogPostList + ? _value._feedBlogPostList + : feedBlogPostList // ignore: cast_nullable_to_non_nullable + as List, + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } /// @nodoc class _$FeedStateLoadedImpl implements FeedStateLoaded { - const _$FeedStateLoadedImpl( - {required final List feedBlogPostList, - required this.isLoading}) - : _feedBlogPostList = feedBlogPostList; + const _$FeedStateLoadedImpl({ + required final List feedBlogPostList, + required this.isLoading, + }) : _feedBlogPostList = feedBlogPostList; final List _feedBlogPostList; @override @@ -402,15 +410,20 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded { return identical(this, other) || (other.runtimeType == runtimeType && other is _$FeedStateLoadedImpl && - const DeepCollectionEquality() - .equals(other._feedBlogPostList, _feedBlogPostList) && + const DeepCollectionEquality().equals( + other._feedBlogPostList, + _feedBlogPostList, + ) && (identical(other.isLoading, isLoading) || other.isLoading == isLoading)); } @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(_feedBlogPostList), isLoading); + 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. @@ -419,7 +432,9 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded { @pragma('vm:prefer-inline') _$$FeedStateLoadedImplCopyWith<_$FeedStateLoadedImpl> get copyWith => __$$FeedStateLoadedImplCopyWithImpl<_$FeedStateLoadedImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs @@ -427,8 +442,10 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded { TResult Function() $default, { required TResult Function() loading, required TResult Function( - List feedBlogPostList, bool isLoading) - loaded, + List feedBlogPostList, + bool isLoading, + ) + loaded, required TResult Function(String errorMessage) error, }) { return loaded(feedBlogPostList, isLoading); @@ -440,7 +457,7 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded { TResult? Function()? $default, { TResult? Function()? loading, TResult? Function(List feedBlogPostList, bool isLoading)? - loaded, + loaded, TResult? Function(String errorMessage)? error, }) { return loaded?.call(feedBlogPostList, isLoading); @@ -452,7 +469,7 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded { TResult Function()? $default, { TResult Function()? loading, TResult Function(List feedBlogPostList, bool isLoading)? - loaded, + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -501,9 +518,10 @@ class _$FeedStateLoadedImpl implements FeedStateLoaded { } abstract class FeedStateLoaded implements FeedState { - const factory FeedStateLoaded( - {required final List feedBlogPostList, - required final bool isLoading}) = _$FeedStateLoadedImpl; + const factory FeedStateLoaded({ + required final List feedBlogPostList, + required final bool isLoading, + }) = _$FeedStateLoadedImpl; List get feedBlogPostList; bool get isLoading; @@ -517,9 +535,10 @@ abstract class FeedStateLoaded implements FeedState { /// @nodoc abstract class _$$FeedStateErrorImplCopyWith<$Res> { - factory _$$FeedStateErrorImplCopyWith(_$FeedStateErrorImpl value, - $Res Function(_$FeedStateErrorImpl) then) = - __$$FeedStateErrorImplCopyWithImpl<$Res>; + factory _$$FeedStateErrorImplCopyWith( + _$FeedStateErrorImpl value, + $Res Function(_$FeedStateErrorImpl) then, + ) = __$$FeedStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String errorMessage}); } @@ -529,22 +548,24 @@ class __$$FeedStateErrorImplCopyWithImpl<$Res> extends _$FeedStateCopyWithImpl<$Res, _$FeedStateErrorImpl> implements _$$FeedStateErrorImplCopyWith<$Res> { __$$FeedStateErrorImplCopyWithImpl( - _$FeedStateErrorImpl _value, $Res Function(_$FeedStateErrorImpl) _then) - : super(_value, _then); + _$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({ - Object? errorMessage = null, - }) { - return _then(_$FeedStateErrorImpl( - errorMessage: null == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? errorMessage = null}) { + return _then( + _$FeedStateErrorImpl( + errorMessage: + null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -580,7 +601,9 @@ class _$FeedStateErrorImpl implements FeedStateError { @pragma('vm:prefer-inline') _$$FeedStateErrorImplCopyWith<_$FeedStateErrorImpl> get copyWith => __$$FeedStateErrorImplCopyWithImpl<_$FeedStateErrorImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs @@ -588,8 +611,10 @@ class _$FeedStateErrorImpl implements FeedStateError { TResult Function() $default, { required TResult Function() loading, required TResult Function( - List feedBlogPostList, bool isLoading) - loaded, + List feedBlogPostList, + bool isLoading, + ) + loaded, required TResult Function(String errorMessage) error, }) { return error(errorMessage); @@ -601,7 +626,7 @@ class _$FeedStateErrorImpl implements FeedStateError { TResult? Function()? $default, { TResult? Function()? loading, TResult? Function(List feedBlogPostList, bool isLoading)? - loaded, + loaded, TResult? Function(String errorMessage)? error, }) { return error?.call(errorMessage); @@ -613,7 +638,7 @@ class _$FeedStateErrorImpl implements FeedStateError { TResult Function()? $default, { TResult Function()? loading, TResult Function(List feedBlogPostList, bool isLoading)? - loaded, + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { diff --git a/lib/features/feed/presentation/bloc/plans_cubit/plans_state.freezed.dart b/lib/features/feed/presentation/bloc/plans_cubit/plans_state.freezed.dart index 03d3ab67..729157a8 100644 --- a/lib/features/feed/presentation/bloc/plans_cubit/plans_state.freezed.dart +++ b/lib/features/feed/presentation/bloc/plans_cubit/plans_state.freezed.dart @@ -12,7 +12,8 @@ part of 'plans_state.dart'; 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'); + '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 _$PlansState { @@ -33,16 +34,18 @@ mixin _$PlansState { /// @nodoc abstract class $PlansStateCopyWith<$Res> { factory $PlansStateCopyWith( - PlansState value, $Res Function(PlansState) then) = - _$PlansStateCopyWithImpl<$Res, PlansState>; + PlansState value, + $Res Function(PlansState) then, + ) = _$PlansStateCopyWithImpl<$Res, PlansState>; @useResult - $Res call( - {bool isLoading, - List plans, - String? errorMessage, - PlansFilterState filterState, - int minPlanPrice, - int maxPlanPrice}); + $Res call({ + bool isLoading, + List plans, + String? errorMessage, + PlansFilterState filterState, + int minPlanPrice, + int maxPlanPrice, + }); $PlansFilterStateCopyWith<$Res> get filterState; } @@ -69,32 +72,41 @@ class _$PlansStateCopyWithImpl<$Res, $Val extends PlansState> Object? minPlanPrice = null, Object? maxPlanPrice = null, }) { - return _then(_value.copyWith( - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - plans: null == plans - ? _value.plans - : plans // ignore: cast_nullable_to_non_nullable - as List, - errorMessage: freezed == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String?, - filterState: null == filterState - ? _value.filterState - : filterState // ignore: cast_nullable_to_non_nullable - as PlansFilterState, - minPlanPrice: null == minPlanPrice - ? _value.minPlanPrice - : minPlanPrice // ignore: cast_nullable_to_non_nullable - as int, - maxPlanPrice: null == maxPlanPrice - ? _value.maxPlanPrice - : maxPlanPrice // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + return _then( + _value.copyWith( + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + plans: + null == plans + ? _value.plans + : plans // ignore: cast_nullable_to_non_nullable + as List, + errorMessage: + freezed == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String?, + filterState: + null == filterState + ? _value.filterState + : filterState // ignore: cast_nullable_to_non_nullable + as PlansFilterState, + minPlanPrice: + null == minPlanPrice + ? _value.minPlanPrice + : minPlanPrice // ignore: cast_nullable_to_non_nullable + as int, + maxPlanPrice: + null == maxPlanPrice + ? _value.maxPlanPrice + : maxPlanPrice // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } /// Create a copy of PlansState @@ -112,17 +124,19 @@ class _$PlansStateCopyWithImpl<$Res, $Val extends PlansState> abstract class _$$PlansStateImplCopyWith<$Res> implements $PlansStateCopyWith<$Res> { factory _$$PlansStateImplCopyWith( - _$PlansStateImpl value, $Res Function(_$PlansStateImpl) then) = - __$$PlansStateImplCopyWithImpl<$Res>; + _$PlansStateImpl value, + $Res Function(_$PlansStateImpl) then, + ) = __$$PlansStateImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {bool isLoading, - List plans, - String? errorMessage, - PlansFilterState filterState, - int minPlanPrice, - int maxPlanPrice}); + $Res call({ + bool isLoading, + List plans, + String? errorMessage, + PlansFilterState filterState, + int minPlanPrice, + int maxPlanPrice, + }); @override $PlansFilterStateCopyWith<$Res> get filterState; @@ -133,8 +147,9 @@ class __$$PlansStateImplCopyWithImpl<$Res> extends _$PlansStateCopyWithImpl<$Res, _$PlansStateImpl> implements _$$PlansStateImplCopyWith<$Res> { __$$PlansStateImplCopyWithImpl( - _$PlansStateImpl _value, $Res Function(_$PlansStateImpl) _then) - : super(_value, _then); + _$PlansStateImpl _value, + $Res Function(_$PlansStateImpl) _then, + ) : super(_value, _then); /// Create a copy of PlansState /// with the given fields replaced by the non-null parameter values. @@ -148,46 +163,54 @@ class __$$PlansStateImplCopyWithImpl<$Res> Object? minPlanPrice = null, Object? maxPlanPrice = null, }) { - return _then(_$PlansStateImpl( - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - plans: null == plans - ? _value._plans - : plans // ignore: cast_nullable_to_non_nullable - as List, - errorMessage: freezed == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String?, - filterState: null == filterState - ? _value.filterState - : filterState // ignore: cast_nullable_to_non_nullable - as PlansFilterState, - minPlanPrice: null == minPlanPrice - ? _value.minPlanPrice - : minPlanPrice // ignore: cast_nullable_to_non_nullable - as int, - maxPlanPrice: null == maxPlanPrice - ? _value.maxPlanPrice - : maxPlanPrice // ignore: cast_nullable_to_non_nullable - as int, - )); + return _then( + _$PlansStateImpl( + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + plans: + null == plans + ? _value._plans + : plans // ignore: cast_nullable_to_non_nullable + as List, + errorMessage: + freezed == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String?, + filterState: + null == filterState + ? _value.filterState + : filterState // ignore: cast_nullable_to_non_nullable + as PlansFilterState, + minPlanPrice: + null == minPlanPrice + ? _value.minPlanPrice + : minPlanPrice // ignore: cast_nullable_to_non_nullable + as int, + maxPlanPrice: + null == maxPlanPrice + ? _value.maxPlanPrice + : maxPlanPrice // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } /// @nodoc class _$PlansStateImpl implements _PlansState { - const _$PlansStateImpl( - {required this.isLoading, - required final List plans, - required this.errorMessage, - required this.filterState, - this.minPlanPrice = 0, - this.maxPlanPrice = 0}) - : _plans = plans; + const _$PlansStateImpl({ + required this.isLoading, + required final List plans, + required this.errorMessage, + required this.filterState, + this.minPlanPrice = 0, + this.maxPlanPrice = 0, + }) : _plans = plans; @override final bool isLoading; @@ -235,13 +258,14 @@ class _$PlansStateImpl implements _PlansState { @override int get hashCode => Object.hash( - runtimeType, - isLoading, - const DeepCollectionEquality().hash(_plans), - errorMessage, - filterState, - minPlanPrice, - maxPlanPrice); + runtimeType, + isLoading, + const DeepCollectionEquality().hash(_plans), + errorMessage, + filterState, + minPlanPrice, + maxPlanPrice, + ); /// Create a copy of PlansState /// with the given fields replaced by the non-null parameter values. @@ -253,13 +277,14 @@ class _$PlansStateImpl implements _PlansState { } abstract class _PlansState implements PlansState { - const factory _PlansState( - {required final bool isLoading, - required final List plans, - required final String? errorMessage, - required final PlansFilterState filterState, - final int minPlanPrice, - final int maxPlanPrice}) = _$PlansStateImpl; + const factory _PlansState({ + required final bool isLoading, + required final List plans, + required final String? errorMessage, + required final PlansFilterState filterState, + final int minPlanPrice, + final int maxPlanPrice, + }) = _$PlansStateImpl; @override bool get isLoading; @@ -298,8 +323,9 @@ mixin _$PlansFilterState { /// @nodoc abstract class $PlansFilterStateCopyWith<$Res> { factory $PlansFilterStateCopyWith( - PlansFilterState value, $Res Function(PlansFilterState) then) = - _$PlansFilterStateCopyWithImpl<$Res, PlansFilterState>; + PlansFilterState value, + $Res Function(PlansFilterState) then, + ) = _$PlansFilterStateCopyWithImpl<$Res, PlansFilterState>; @useResult $Res call({(int?, int?) priceFilter, int durationIndex, int typeIndex}); } @@ -323,29 +349,36 @@ class _$PlansFilterStateCopyWithImpl<$Res, $Val extends PlansFilterState> Object? durationIndex = null, Object? typeIndex = null, }) { - return _then(_value.copyWith( - priceFilter: null == priceFilter - ? _value.priceFilter - : priceFilter // ignore: cast_nullable_to_non_nullable - as (int?, int?), - durationIndex: null == durationIndex - ? _value.durationIndex - : durationIndex // ignore: cast_nullable_to_non_nullable - as int, - typeIndex: null == typeIndex - ? _value.typeIndex - : typeIndex // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + return _then( + _value.copyWith( + priceFilter: + null == priceFilter + ? _value.priceFilter + : priceFilter // ignore: cast_nullable_to_non_nullable + as (int?, int?), + durationIndex: + null == durationIndex + ? _value.durationIndex + : durationIndex // ignore: cast_nullable_to_non_nullable + as int, + typeIndex: + null == typeIndex + ? _value.typeIndex + : typeIndex // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } } /// @nodoc abstract class _$$PlansFilterStateImplCopyWith<$Res> implements $PlansFilterStateCopyWith<$Res> { - factory _$$PlansFilterStateImplCopyWith(_$PlansFilterStateImpl value, - $Res Function(_$PlansFilterStateImpl) then) = - __$$PlansFilterStateImplCopyWithImpl<$Res>; + factory _$$PlansFilterStateImplCopyWith( + _$PlansFilterStateImpl value, + $Res Function(_$PlansFilterStateImpl) then, + ) = __$$PlansFilterStateImplCopyWithImpl<$Res>; @override @useResult $Res call({(int?, int?) priceFilter, int durationIndex, int typeIndex}); @@ -355,9 +388,10 @@ abstract class _$$PlansFilterStateImplCopyWith<$Res> class __$$PlansFilterStateImplCopyWithImpl<$Res> extends _$PlansFilterStateCopyWithImpl<$Res, _$PlansFilterStateImpl> implements _$$PlansFilterStateImplCopyWith<$Res> { - __$$PlansFilterStateImplCopyWithImpl(_$PlansFilterStateImpl _value, - $Res Function(_$PlansFilterStateImpl) _then) - : super(_value, _then); + __$$PlansFilterStateImplCopyWithImpl( + _$PlansFilterStateImpl _value, + $Res Function(_$PlansFilterStateImpl) _then, + ) : super(_value, _then); /// Create a copy of PlansFilterState /// with the given fields replaced by the non-null parameter values. @@ -368,30 +402,36 @@ class __$$PlansFilterStateImplCopyWithImpl<$Res> Object? durationIndex = null, Object? typeIndex = null, }) { - return _then(_$PlansFilterStateImpl( - priceFilter: null == priceFilter - ? _value.priceFilter - : priceFilter // ignore: cast_nullable_to_non_nullable - as (int?, int?), - durationIndex: null == durationIndex - ? _value.durationIndex - : durationIndex // ignore: cast_nullable_to_non_nullable - as int, - typeIndex: null == typeIndex - ? _value.typeIndex - : typeIndex // ignore: cast_nullable_to_non_nullable - as int, - )); + return _then( + _$PlansFilterStateImpl( + priceFilter: + null == priceFilter + ? _value.priceFilter + : priceFilter // ignore: cast_nullable_to_non_nullable + as (int?, int?), + durationIndex: + null == durationIndex + ? _value.durationIndex + : durationIndex // ignore: cast_nullable_to_non_nullable + as int, + typeIndex: + null == typeIndex + ? _value.typeIndex + : typeIndex // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } /// @nodoc class _$PlansFilterStateImpl implements _PlansFilterState { - const _$PlansFilterStateImpl( - {required this.priceFilter, - required this.durationIndex, - required this.typeIndex}); + const _$PlansFilterStateImpl({ + required this.priceFilter, + required this.durationIndex, + required this.typeIndex, + }); @override final (int?, int?) priceFilter; @@ -429,14 +469,17 @@ class _$PlansFilterStateImpl implements _PlansFilterState { @pragma('vm:prefer-inline') _$$PlansFilterStateImplCopyWith<_$PlansFilterStateImpl> get copyWith => __$$PlansFilterStateImplCopyWithImpl<_$PlansFilterStateImpl>( - this, _$identity); + this, + _$identity, + ); } abstract class _PlansFilterState implements PlansFilterState { - const factory _PlansFilterState( - {required final (int?, int?) priceFilter, - required final int durationIndex, - required final int typeIndex}) = _$PlansFilterStateImpl; + const factory _PlansFilterState({ + required final (int?, int?) priceFilter, + required final int durationIndex, + required final int typeIndex, + }) = _$PlansFilterStateImpl; @override (int?, int?) get priceFilter; diff --git a/lib/features/feed/presentation/bloc/profile_cubit/profile_state.freezed.dart b/lib/features/feed/presentation/bloc/profile_cubit/profile_state.freezed.dart index 05007d71..ee9fc6b4 100644 --- a/lib/features/feed/presentation/bloc/profile_cubit/profile_state.freezed.dart +++ b/lib/features/feed/presentation/bloc/profile_cubit/profile_state.freezed.dart @@ -12,7 +12,8 @@ part of 'profile_state.dart'; 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'); + '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 _$ProfileState { @@ -28,8 +29,9 @@ mixin _$ProfileState { /// @nodoc abstract class $ProfileStateCopyWith<$Res> { factory $ProfileStateCopyWith( - ProfileState value, $Res Function(ProfileState) then) = - _$ProfileStateCopyWithImpl<$Res, ProfileState>; + ProfileState value, + $Res Function(ProfileState) then, + ) = _$ProfileStateCopyWithImpl<$Res, ProfileState>; @useResult $Res call({ProfileModel? profile}); @@ -50,15 +52,17 @@ class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? profile = freezed, - }) { - return _then(_value.copyWith( - profile: freezed == profile - ? _value.profile - : profile // ignore: cast_nullable_to_non_nullable - as ProfileModel?, - ) as $Val); + $Res call({Object? profile = freezed}) { + return _then( + _value.copyWith( + profile: + freezed == profile + ? _value.profile + : profile // ignore: cast_nullable_to_non_nullable + as ProfileModel?, + ) + as $Val, + ); } /// Create a copy of ProfileState @@ -80,8 +84,9 @@ class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState> abstract class _$$ProfileStateImplCopyWith<$Res> implements $ProfileStateCopyWith<$Res> { factory _$$ProfileStateImplCopyWith( - _$ProfileStateImpl value, $Res Function(_$ProfileStateImpl) then) = - __$$ProfileStateImplCopyWithImpl<$Res>; + _$ProfileStateImpl value, + $Res Function(_$ProfileStateImpl) then, + ) = __$$ProfileStateImplCopyWithImpl<$Res>; @override @useResult $Res call({ProfileModel? profile}); @@ -95,22 +100,24 @@ class __$$ProfileStateImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateImpl> implements _$$ProfileStateImplCopyWith<$Res> { __$$ProfileStateImplCopyWithImpl( - _$ProfileStateImpl _value, $Res Function(_$ProfileStateImpl) _then) - : super(_value, _then); + _$ProfileStateImpl _value, + $Res Function(_$ProfileStateImpl) _then, + ) : super(_value, _then); /// Create a copy of ProfileState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? profile = freezed, - }) { - return _then(_$ProfileStateImpl( - profile: freezed == profile - ? _value.profile - : profile // ignore: cast_nullable_to_non_nullable - as ProfileModel?, - )); + $Res call({Object? profile = freezed}) { + return _then( + _$ProfileStateImpl( + profile: + freezed == profile + ? _value.profile + : profile // ignore: cast_nullable_to_non_nullable + as ProfileModel?, + ), + ); } } 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 b5afc8b1..c61f7253 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 @@ -12,7 +12,8 @@ part of 'recipes_state.dart'; 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'); + '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 _$RecipesState { @@ -33,16 +34,18 @@ mixin _$RecipesState { /// @nodoc abstract class $RecipesStateCopyWith<$Res> { factory $RecipesStateCopyWith( - RecipesState value, $Res Function(RecipesState) then) = - _$RecipesStateCopyWithImpl<$Res, RecipesState>; + RecipesState value, + $Res Function(RecipesState) then, + ) = _$RecipesStateCopyWithImpl<$Res, RecipesState>; @useResult - $Res call( - {List recipesList, - List recipesTags, - Set selectedTags, - int selectedTagsCounter, - bool isLoading, - String? errorMessage}); + $Res call({ + List recipesList, + List recipesTags, + Set selectedTags, + int selectedTagsCounter, + bool isLoading, + String? errorMessage, + }); } /// @nodoc @@ -67,32 +70,41 @@ class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState> Object? isLoading = null, Object? errorMessage = freezed, }) { - return _then(_value.copyWith( - recipesList: null == recipesList - ? _value.recipesList - : recipesList // ignore: cast_nullable_to_non_nullable - as List, - recipesTags: null == recipesTags - ? _value.recipesTags - : recipesTags // ignore: cast_nullable_to_non_nullable - as List, - selectedTags: null == selectedTags - ? _value.selectedTags - : selectedTags // ignore: cast_nullable_to_non_nullable - as Set, - selectedTagsCounter: null == selectedTagsCounter - ? _value.selectedTagsCounter - : selectedTagsCounter // ignore: cast_nullable_to_non_nullable - as int, - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - errorMessage: freezed == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + recipesList: + null == recipesList + ? _value.recipesList + : recipesList // ignore: cast_nullable_to_non_nullable + as List, + recipesTags: + null == recipesTags + ? _value.recipesTags + : recipesTags // ignore: cast_nullable_to_non_nullable + as List, + selectedTags: + null == selectedTags + ? _value.selectedTags + : selectedTags // ignore: cast_nullable_to_non_nullable + as Set, + selectedTagsCounter: + null == selectedTagsCounter + ? _value.selectedTagsCounter + : selectedTagsCounter // ignore: cast_nullable_to_non_nullable + as int, + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + errorMessage: + freezed == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } @@ -100,17 +112,19 @@ class _$RecipesStateCopyWithImpl<$Res, $Val extends RecipesState> abstract class _$$RecipesStateImplCopyWith<$Res> implements $RecipesStateCopyWith<$Res> { factory _$$RecipesStateImplCopyWith( - _$RecipesStateImpl value, $Res Function(_$RecipesStateImpl) then) = - __$$RecipesStateImplCopyWithImpl<$Res>; + _$RecipesStateImpl value, + $Res Function(_$RecipesStateImpl) then, + ) = __$$RecipesStateImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {List recipesList, - List recipesTags, - Set selectedTags, - int selectedTagsCounter, - bool isLoading, - String? errorMessage}); + $Res call({ + List recipesList, + List recipesTags, + Set selectedTags, + int selectedTagsCounter, + bool isLoading, + String? errorMessage, + }); } /// @nodoc @@ -118,8 +132,9 @@ class __$$RecipesStateImplCopyWithImpl<$Res> extends _$RecipesStateCopyWithImpl<$Res, _$RecipesStateImpl> implements _$$RecipesStateImplCopyWith<$Res> { __$$RecipesStateImplCopyWithImpl( - _$RecipesStateImpl _value, $Res Function(_$RecipesStateImpl) _then) - : super(_value, _then); + _$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. @@ -133,48 +148,56 @@ class __$$RecipesStateImplCopyWithImpl<$Res> Object? isLoading = null, Object? errorMessage = freezed, }) { - return _then(_$RecipesStateImpl( - recipesList: null == recipesList - ? _value._recipesList - : recipesList // ignore: cast_nullable_to_non_nullable - as List, - recipesTags: null == recipesTags - ? _value._recipesTags - : recipesTags // ignore: cast_nullable_to_non_nullable - as List, - selectedTags: null == selectedTags - ? _value._selectedTags - : selectedTags // ignore: cast_nullable_to_non_nullable - as Set, - selectedTagsCounter: null == selectedTagsCounter - ? _value.selectedTagsCounter - : selectedTagsCounter // ignore: cast_nullable_to_non_nullable - as int, - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - errorMessage: freezed == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$RecipesStateImpl( + recipesList: + null == recipesList + ? _value._recipesList + : recipesList // ignore: cast_nullable_to_non_nullable + as List, + recipesTags: + null == recipesTags + ? _value._recipesTags + : recipesTags // ignore: cast_nullable_to_non_nullable + as List, + selectedTags: + null == selectedTags + ? _value._selectedTags + : selectedTags // ignore: cast_nullable_to_non_nullable + as Set, + selectedTagsCounter: + null == selectedTagsCounter + ? _value.selectedTagsCounter + : selectedTagsCounter // ignore: cast_nullable_to_non_nullable + as int, + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + errorMessage: + freezed == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } /// @nodoc class _$RecipesStateImpl implements _RecipesState { - const _$RecipesStateImpl( - {required final List recipesList, - required final List recipesTags, - required final Set selectedTags, - required this.selectedTagsCounter, - required this.isLoading, - this.errorMessage}) - : _recipesList = recipesList, - _recipesTags = recipesTags, - _selectedTags = selectedTags; + const _$RecipesStateImpl({ + required final List recipesList, + required final List recipesTags, + required final Set selectedTags, + required this.selectedTagsCounter, + required this.isLoading, + this.errorMessage, + }) : _recipesList = recipesList, + _recipesTags = recipesTags, + _selectedTags = selectedTags; final List _recipesList; @override @@ -217,12 +240,18 @@ class _$RecipesStateImpl implements _RecipesState { return identical(this, other) || (other.runtimeType == runtimeType && other is _$RecipesStateImpl && - const DeepCollectionEquality() - .equals(other._recipesList, _recipesList) && - const DeepCollectionEquality() - .equals(other._recipesTags, _recipesTags) && - const DeepCollectionEquality() - .equals(other._selectedTags, _selectedTags) && + const DeepCollectionEquality().equals( + other._recipesList, + _recipesList, + ) && + const DeepCollectionEquality().equals( + other._recipesTags, + _recipesTags, + ) && + const DeepCollectionEquality().equals( + other._selectedTags, + _selectedTags, + ) && (identical(other.selectedTagsCounter, selectedTagsCounter) || other.selectedTagsCounter == selectedTagsCounter) && (identical(other.isLoading, isLoading) || @@ -233,13 +262,14 @@ class _$RecipesStateImpl implements _RecipesState { @override int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_recipesList), - const DeepCollectionEquality().hash(_recipesTags), - const DeepCollectionEquality().hash(_selectedTags), - selectedTagsCounter, - isLoading, - errorMessage); + runtimeType, + const DeepCollectionEquality().hash(_recipesList), + const DeepCollectionEquality().hash(_recipesTags), + const DeepCollectionEquality().hash(_selectedTags), + selectedTagsCounter, + isLoading, + errorMessage, + ); /// Create a copy of RecipesState /// with the given fields replaced by the non-null parameter values. @@ -251,13 +281,14 @@ class _$RecipesStateImpl implements _RecipesState { } abstract class _RecipesState implements RecipesState { - const factory _RecipesState( - {required final List recipesList, - required final List recipesTags, - required final Set selectedTags, - required final int selectedTagsCounter, - required final bool isLoading, - final String? errorMessage}) = _$RecipesStateImpl; + const factory _RecipesState({ + required final List recipesList, + required final List recipesTags, + required final Set selectedTags, + required final int selectedTagsCounter, + required final bool isLoading, + final String? errorMessage, + }) = _$RecipesStateImpl; @override List get recipesList; diff --git a/lib/features/glossary/models/glossary_model.freezed.dart b/lib/features/glossary/models/glossary_model.freezed.dart index ababa94f..67994490 100644 --- a/lib/features/glossary/models/glossary_model.freezed.dart +++ b/lib/features/glossary/models/glossary_model.freezed.dart @@ -12,10 +12,12 @@ part of 'glossary_model.dart'; 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'); + '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', +); GlossaryPaginationModel _$GlossaryPaginationModelFromJson( - Map json) { + Map json, +) { return _GlossaryPaginationModel.fromJson(json); } @@ -36,16 +38,19 @@ mixin _$GlossaryPaginationModel { /// @nodoc abstract class $GlossaryPaginationModelCopyWith<$Res> { - factory $GlossaryPaginationModelCopyWith(GlossaryPaginationModel value, - $Res Function(GlossaryPaginationModel) then) = - _$GlossaryPaginationModelCopyWithImpl<$Res, GlossaryPaginationModel>; + factory $GlossaryPaginationModelCopyWith( + GlossaryPaginationModel value, + $Res Function(GlossaryPaginationModel) then, + ) = _$GlossaryPaginationModelCopyWithImpl<$Res, GlossaryPaginationModel>; @useResult $Res call({@JsonKey(name: 'data') List glossariesList}); } /// @nodoc -class _$GlossaryPaginationModelCopyWithImpl<$Res, - $Val extends GlossaryPaginationModel> +class _$GlossaryPaginationModelCopyWithImpl< + $Res, + $Val extends GlossaryPaginationModel +> implements $GlossaryPaginationModelCopyWith<$Res> { _$GlossaryPaginationModelCopyWithImpl(this._value, this._then); @@ -58,15 +63,17 @@ class _$GlossaryPaginationModelCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? glossariesList = null, - }) { - return _then(_value.copyWith( - glossariesList: null == glossariesList - ? _value.glossariesList - : glossariesList // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? glossariesList = null}) { + return _then( + _value.copyWith( + glossariesList: + null == glossariesList + ? _value.glossariesList + : glossariesList // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } @@ -74,9 +81,9 @@ class _$GlossaryPaginationModelCopyWithImpl<$Res, abstract class _$$GlossaryPaginationModelImplCopyWith<$Res> implements $GlossaryPaginationModelCopyWith<$Res> { factory _$$GlossaryPaginationModelImplCopyWith( - _$GlossaryPaginationModelImpl value, - $Res Function(_$GlossaryPaginationModelImpl) then) = - __$$GlossaryPaginationModelImplCopyWithImpl<$Res>; + _$GlossaryPaginationModelImpl value, + $Res Function(_$GlossaryPaginationModelImpl) then, + ) = __$$GlossaryPaginationModelImplCopyWithImpl<$Res>; @override @useResult $Res call({@JsonKey(name: 'data') List glossariesList}); @@ -84,37 +91,40 @@ abstract class _$$GlossaryPaginationModelImplCopyWith<$Res> /// @nodoc class __$$GlossaryPaginationModelImplCopyWithImpl<$Res> - extends _$GlossaryPaginationModelCopyWithImpl<$Res, - _$GlossaryPaginationModelImpl> + extends + _$GlossaryPaginationModelCopyWithImpl< + $Res, + _$GlossaryPaginationModelImpl + > implements _$$GlossaryPaginationModelImplCopyWith<$Res> { __$$GlossaryPaginationModelImplCopyWithImpl( - _$GlossaryPaginationModelImpl _value, - $Res Function(_$GlossaryPaginationModelImpl) _then) - : super(_value, _then); + _$GlossaryPaginationModelImpl _value, + $Res Function(_$GlossaryPaginationModelImpl) _then, + ) : super(_value, _then); /// Create a copy of GlossaryPaginationModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? glossariesList = null, - }) { - return _then(_$GlossaryPaginationModelImpl( - glossariesList: null == glossariesList - ? _value._glossariesList - : glossariesList // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? glossariesList = null}) { + return _then( + _$GlossaryPaginationModelImpl( + glossariesList: + null == glossariesList + ? _value._glossariesList + : glossariesList // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } /// @nodoc @JsonSerializable() class _$GlossaryPaginationModelImpl implements _GlossaryPaginationModel { - const _$GlossaryPaginationModelImpl( - {@JsonKey(name: 'data') - required final List glossariesList}) - : _glossariesList = glossariesList; + const _$GlossaryPaginationModelImpl({ + @JsonKey(name: 'data') required final List glossariesList, + }) : _glossariesList = glossariesList; factory _$GlossaryPaginationModelImpl.fromJson(Map json) => _$$GlossaryPaginationModelImplFromJson(json); @@ -138,14 +148,18 @@ class _$GlossaryPaginationModelImpl implements _GlossaryPaginationModel { return identical(this, other) || (other.runtimeType == runtimeType && other is _$GlossaryPaginationModelImpl && - const DeepCollectionEquality() - .equals(other._glossariesList, _glossariesList)); + const DeepCollectionEquality().equals( + other._glossariesList, + _glossariesList, + )); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_glossariesList)); + runtimeType, + const DeepCollectionEquality().hash(_glossariesList), + ); /// Create a copy of GlossaryPaginationModel /// with the given fields replaced by the non-null parameter values. @@ -153,22 +167,20 @@ class _$GlossaryPaginationModelImpl implements _GlossaryPaginationModel { @override @pragma('vm:prefer-inline') _$$GlossaryPaginationModelImplCopyWith<_$GlossaryPaginationModelImpl> - get copyWith => __$$GlossaryPaginationModelImplCopyWithImpl< - _$GlossaryPaginationModelImpl>(this, _$identity); + get copyWith => __$$GlossaryPaginationModelImplCopyWithImpl< + _$GlossaryPaginationModelImpl + >(this, _$identity); @override Map toJson() { - return _$$GlossaryPaginationModelImplToJson( - this, - ); + return _$$GlossaryPaginationModelImplToJson(this); } } abstract class _GlossaryPaginationModel implements GlossaryPaginationModel { - const factory _GlossaryPaginationModel( - {@JsonKey(name: 'data') - required final List glossariesList}) = - _$GlossaryPaginationModelImpl; + const factory _GlossaryPaginationModel({ + @JsonKey(name: 'data') required final List glossariesList, + }) = _$GlossaryPaginationModelImpl; factory _GlossaryPaginationModel.fromJson(Map json) = _$GlossaryPaginationModelImpl.fromJson; @@ -182,11 +194,12 @@ abstract class _GlossaryPaginationModel implements GlossaryPaginationModel { @override @JsonKey(includeFromJson: false, includeToJson: false) _$$GlossaryPaginationModelImplCopyWith<_$GlossaryPaginationModelImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } GlossaryModerationModel _$GlossaryModerationModelFromJson( - Map json) { + Map json, +) { return _GlossaryModerationModel.fromJson(json); } @@ -207,19 +220,23 @@ mixin _$GlossaryModerationModel { /// @nodoc abstract class $GlossaryModerationModelCopyWith<$Res> { - factory $GlossaryModerationModelCopyWith(GlossaryModerationModel value, - $Res Function(GlossaryModerationModel) then) = - _$GlossaryModerationModelCopyWithImpl<$Res, GlossaryModerationModel>; + factory $GlossaryModerationModelCopyWith( + GlossaryModerationModel value, + $Res Function(GlossaryModerationModel) then, + ) = _$GlossaryModerationModelCopyWithImpl<$Res, GlossaryModerationModel>; @useResult - $Res call( - {@JsonKey(name: 'product_nutritional_value') GlossaryModel glossary}); + $Res call({ + @JsonKey(name: 'product_nutritional_value') GlossaryModel glossary, + }); $GlossaryModelCopyWith<$Res> get glossary; } /// @nodoc -class _$GlossaryModerationModelCopyWithImpl<$Res, - $Val extends GlossaryModerationModel> +class _$GlossaryModerationModelCopyWithImpl< + $Res, + $Val extends GlossaryModerationModel +> implements $GlossaryModerationModelCopyWith<$Res> { _$GlossaryModerationModelCopyWithImpl(this._value, this._then); @@ -232,15 +249,17 @@ class _$GlossaryModerationModelCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? glossary = null, - }) { - return _then(_value.copyWith( - glossary: null == glossary - ? _value.glossary - : glossary // ignore: cast_nullable_to_non_nullable - as GlossaryModel, - ) as $Val); + $Res call({Object? glossary = null}) { + return _then( + _value.copyWith( + glossary: + null == glossary + ? _value.glossary + : glossary // ignore: cast_nullable_to_non_nullable + as GlossaryModel, + ) + as $Val, + ); } /// Create a copy of GlossaryModerationModel @@ -258,13 +277,14 @@ class _$GlossaryModerationModelCopyWithImpl<$Res, abstract class _$$GlossaryModerationModelImplCopyWith<$Res> implements $GlossaryModerationModelCopyWith<$Res> { factory _$$GlossaryModerationModelImplCopyWith( - _$GlossaryModerationModelImpl value, - $Res Function(_$GlossaryModerationModelImpl) then) = - __$$GlossaryModerationModelImplCopyWithImpl<$Res>; + _$GlossaryModerationModelImpl value, + $Res Function(_$GlossaryModerationModelImpl) then, + ) = __$$GlossaryModerationModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: 'product_nutritional_value') GlossaryModel glossary}); + $Res call({ + @JsonKey(name: 'product_nutritional_value') GlossaryModel glossary, + }); @override $GlossaryModelCopyWith<$Res> get glossary; @@ -272,35 +292,40 @@ abstract class _$$GlossaryModerationModelImplCopyWith<$Res> /// @nodoc class __$$GlossaryModerationModelImplCopyWithImpl<$Res> - extends _$GlossaryModerationModelCopyWithImpl<$Res, - _$GlossaryModerationModelImpl> + extends + _$GlossaryModerationModelCopyWithImpl< + $Res, + _$GlossaryModerationModelImpl + > implements _$$GlossaryModerationModelImplCopyWith<$Res> { __$$GlossaryModerationModelImplCopyWithImpl( - _$GlossaryModerationModelImpl _value, - $Res Function(_$GlossaryModerationModelImpl) _then) - : super(_value, _then); + _$GlossaryModerationModelImpl _value, + $Res Function(_$GlossaryModerationModelImpl) _then, + ) : super(_value, _then); /// Create a copy of GlossaryModerationModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? glossary = null, - }) { - return _then(_$GlossaryModerationModelImpl( - glossary: null == glossary - ? _value.glossary - : glossary // ignore: cast_nullable_to_non_nullable - as GlossaryModel, - )); + $Res call({Object? glossary = null}) { + return _then( + _$GlossaryModerationModelImpl( + glossary: + null == glossary + ? _value.glossary + : glossary // ignore: cast_nullable_to_non_nullable + as GlossaryModel, + ), + ); } } /// @nodoc @JsonSerializable() class _$GlossaryModerationModelImpl implements _GlossaryModerationModel { - const _$GlossaryModerationModelImpl( - {@JsonKey(name: 'product_nutritional_value') required this.glossary}); + const _$GlossaryModerationModelImpl({ + @JsonKey(name: 'product_nutritional_value') required this.glossary, + }); factory _$GlossaryModerationModelImpl.fromJson(Map json) => _$$GlossaryModerationModelImplFromJson(json); @@ -333,21 +358,21 @@ class _$GlossaryModerationModelImpl implements _GlossaryModerationModel { @override @pragma('vm:prefer-inline') _$$GlossaryModerationModelImplCopyWith<_$GlossaryModerationModelImpl> - get copyWith => __$$GlossaryModerationModelImplCopyWithImpl< - _$GlossaryModerationModelImpl>(this, _$identity); + get copyWith => __$$GlossaryModerationModelImplCopyWithImpl< + _$GlossaryModerationModelImpl + >(this, _$identity); @override Map toJson() { - return _$$GlossaryModerationModelImplToJson( - this, - ); + return _$$GlossaryModerationModelImplToJson(this); } } abstract class _GlossaryModerationModel implements GlossaryModerationModel { - const factory _GlossaryModerationModel( - {@JsonKey(name: 'product_nutritional_value') - required final GlossaryModel glossary}) = _$GlossaryModerationModelImpl; + const factory _GlossaryModerationModel({ + @JsonKey(name: 'product_nutritional_value') + required final GlossaryModel glossary, + }) = _$GlossaryModerationModelImpl; factory _GlossaryModerationModel.fromJson(Map json) = _$GlossaryModerationModelImpl.fromJson; @@ -361,7 +386,7 @@ abstract class _GlossaryModerationModel implements GlossaryModerationModel { @override @JsonKey(includeFromJson: false, includeToJson: false) _$$GlossaryModerationModelImplCopyWith<_$GlossaryModerationModelImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } GlossaryModel _$GlossaryModelFromJson(Map json) { @@ -404,22 +429,23 @@ mixin _$GlossaryModel { /// @nodoc abstract class $GlossaryModelCopyWith<$Res> { factory $GlossaryModelCopyWith( - GlossaryModel value, $Res Function(GlossaryModel) then) = - _$GlossaryModelCopyWithImpl<$Res, GlossaryModel>; + GlossaryModel value, + $Res Function(GlossaryModel) then, + ) = _$GlossaryModelCopyWithImpl<$Res, GlossaryModel>; @useResult - $Res call( - {int id, - String name, - @JsonKey(name: 'portion_mass_gr') int grInPortion, - @JsonKey(name: 'energy_on_100gr') double energyOn100Gr, - @JsonKey(name: 'proteins_on_100gr') double proteinsOn100Gr, - @JsonKey(name: 'fats_on_100gr') double fatsOn100Gr, - @JsonKey(name: 'carbohydrates_on_100gr') double carbohydratesOn100Gr, - @JsonKey(name: 'energy_on_portion') double energyOnPortion, - @JsonKey(name: 'proteins_on_portion') double proteinsOnPortion, - @JsonKey(name: 'fats_on_portion') double fatsOnPortion, - @JsonKey(name: 'carbohydrates_on_portion') - double carbohydratesOnPortion}); + $Res call({ + int id, + String name, + @JsonKey(name: 'portion_mass_gr') int grInPortion, + @JsonKey(name: 'energy_on_100gr') double energyOn100Gr, + @JsonKey(name: 'proteins_on_100gr') double proteinsOn100Gr, + @JsonKey(name: 'fats_on_100gr') double fatsOn100Gr, + @JsonKey(name: 'carbohydrates_on_100gr') double carbohydratesOn100Gr, + @JsonKey(name: 'energy_on_portion') double energyOnPortion, + @JsonKey(name: 'proteins_on_portion') double proteinsOnPortion, + @JsonKey(name: 'fats_on_portion') double fatsOnPortion, + @JsonKey(name: 'carbohydrates_on_portion') double carbohydratesOnPortion, + }); } /// @nodoc @@ -449,52 +475,66 @@ class _$GlossaryModelCopyWithImpl<$Res, $Val extends GlossaryModel> Object? fatsOnPortion = null, Object? carbohydratesOnPortion = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - grInPortion: null == grInPortion - ? _value.grInPortion - : grInPortion // ignore: cast_nullable_to_non_nullable - as int, - energyOn100Gr: null == energyOn100Gr - ? _value.energyOn100Gr - : energyOn100Gr // ignore: cast_nullable_to_non_nullable - as double, - proteinsOn100Gr: null == proteinsOn100Gr - ? _value.proteinsOn100Gr - : proteinsOn100Gr // ignore: cast_nullable_to_non_nullable - as double, - fatsOn100Gr: null == fatsOn100Gr - ? _value.fatsOn100Gr - : fatsOn100Gr // ignore: cast_nullable_to_non_nullable - as double, - carbohydratesOn100Gr: null == carbohydratesOn100Gr - ? _value.carbohydratesOn100Gr - : carbohydratesOn100Gr // ignore: cast_nullable_to_non_nullable - as double, - energyOnPortion: null == energyOnPortion - ? _value.energyOnPortion - : energyOnPortion // ignore: cast_nullable_to_non_nullable - as double, - proteinsOnPortion: null == proteinsOnPortion - ? _value.proteinsOnPortion - : proteinsOnPortion // ignore: cast_nullable_to_non_nullable - as double, - fatsOnPortion: null == fatsOnPortion - ? _value.fatsOnPortion - : fatsOnPortion // ignore: cast_nullable_to_non_nullable - as double, - carbohydratesOnPortion: null == carbohydratesOnPortion - ? _value.carbohydratesOnPortion - : carbohydratesOnPortion // ignore: cast_nullable_to_non_nullable - as double, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + grInPortion: + null == grInPortion + ? _value.grInPortion + : grInPortion // ignore: cast_nullable_to_non_nullable + as int, + energyOn100Gr: + null == energyOn100Gr + ? _value.energyOn100Gr + : energyOn100Gr // ignore: cast_nullable_to_non_nullable + as double, + proteinsOn100Gr: + null == proteinsOn100Gr + ? _value.proteinsOn100Gr + : proteinsOn100Gr // ignore: cast_nullable_to_non_nullable + as double, + fatsOn100Gr: + null == fatsOn100Gr + ? _value.fatsOn100Gr + : fatsOn100Gr // ignore: cast_nullable_to_non_nullable + as double, + carbohydratesOn100Gr: + null == carbohydratesOn100Gr + ? _value.carbohydratesOn100Gr + : carbohydratesOn100Gr // ignore: cast_nullable_to_non_nullable + as double, + energyOnPortion: + null == energyOnPortion + ? _value.energyOnPortion + : energyOnPortion // ignore: cast_nullable_to_non_nullable + as double, + proteinsOnPortion: + null == proteinsOnPortion + ? _value.proteinsOnPortion + : proteinsOnPortion // ignore: cast_nullable_to_non_nullable + as double, + fatsOnPortion: + null == fatsOnPortion + ? _value.fatsOnPortion + : fatsOnPortion // ignore: cast_nullable_to_non_nullable + as double, + carbohydratesOnPortion: + null == carbohydratesOnPortion + ? _value.carbohydratesOnPortion + : carbohydratesOnPortion // ignore: cast_nullable_to_non_nullable + as double, + ) + as $Val, + ); } } @@ -502,23 +542,24 @@ class _$GlossaryModelCopyWithImpl<$Res, $Val extends GlossaryModel> abstract class _$$GlossaryModelImplCopyWith<$Res> implements $GlossaryModelCopyWith<$Res> { factory _$$GlossaryModelImplCopyWith( - _$GlossaryModelImpl value, $Res Function(_$GlossaryModelImpl) then) = - __$$GlossaryModelImplCopyWithImpl<$Res>; + _$GlossaryModelImpl value, + $Res Function(_$GlossaryModelImpl) then, + ) = __$$GlossaryModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - String name, - @JsonKey(name: 'portion_mass_gr') int grInPortion, - @JsonKey(name: 'energy_on_100gr') double energyOn100Gr, - @JsonKey(name: 'proteins_on_100gr') double proteinsOn100Gr, - @JsonKey(name: 'fats_on_100gr') double fatsOn100Gr, - @JsonKey(name: 'carbohydrates_on_100gr') double carbohydratesOn100Gr, - @JsonKey(name: 'energy_on_portion') double energyOnPortion, - @JsonKey(name: 'proteins_on_portion') double proteinsOnPortion, - @JsonKey(name: 'fats_on_portion') double fatsOnPortion, - @JsonKey(name: 'carbohydrates_on_portion') - double carbohydratesOnPortion}); + $Res call({ + int id, + String name, + @JsonKey(name: 'portion_mass_gr') int grInPortion, + @JsonKey(name: 'energy_on_100gr') double energyOn100Gr, + @JsonKey(name: 'proteins_on_100gr') double proteinsOn100Gr, + @JsonKey(name: 'fats_on_100gr') double fatsOn100Gr, + @JsonKey(name: 'carbohydrates_on_100gr') double carbohydratesOn100Gr, + @JsonKey(name: 'energy_on_portion') double energyOnPortion, + @JsonKey(name: 'proteins_on_portion') double proteinsOnPortion, + @JsonKey(name: 'fats_on_portion') double fatsOnPortion, + @JsonKey(name: 'carbohydrates_on_portion') double carbohydratesOnPortion, + }); } /// @nodoc @@ -526,8 +567,9 @@ class __$$GlossaryModelImplCopyWithImpl<$Res> extends _$GlossaryModelCopyWithImpl<$Res, _$GlossaryModelImpl> implements _$$GlossaryModelImplCopyWith<$Res> { __$$GlossaryModelImplCopyWithImpl( - _$GlossaryModelImpl _value, $Res Function(_$GlossaryModelImpl) _then) - : super(_value, _then); + _$GlossaryModelImpl _value, + $Res Function(_$GlossaryModelImpl) _then, + ) : super(_value, _then); /// Create a copy of GlossaryModel /// with the given fields replaced by the non-null parameter values. @@ -546,72 +588,85 @@ class __$$GlossaryModelImplCopyWithImpl<$Res> Object? fatsOnPortion = null, Object? carbohydratesOnPortion = null, }) { - return _then(_$GlossaryModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - grInPortion: null == grInPortion - ? _value.grInPortion - : grInPortion // ignore: cast_nullable_to_non_nullable - as int, - energyOn100Gr: null == energyOn100Gr - ? _value.energyOn100Gr - : energyOn100Gr // ignore: cast_nullable_to_non_nullable - as double, - proteinsOn100Gr: null == proteinsOn100Gr - ? _value.proteinsOn100Gr - : proteinsOn100Gr // ignore: cast_nullable_to_non_nullable - as double, - fatsOn100Gr: null == fatsOn100Gr - ? _value.fatsOn100Gr - : fatsOn100Gr // ignore: cast_nullable_to_non_nullable - as double, - carbohydratesOn100Gr: null == carbohydratesOn100Gr - ? _value.carbohydratesOn100Gr - : carbohydratesOn100Gr // ignore: cast_nullable_to_non_nullable - as double, - energyOnPortion: null == energyOnPortion - ? _value.energyOnPortion - : energyOnPortion // ignore: cast_nullable_to_non_nullable - as double, - proteinsOnPortion: null == proteinsOnPortion - ? _value.proteinsOnPortion - : proteinsOnPortion // ignore: cast_nullable_to_non_nullable - as double, - fatsOnPortion: null == fatsOnPortion - ? _value.fatsOnPortion - : fatsOnPortion // ignore: cast_nullable_to_non_nullable - as double, - carbohydratesOnPortion: null == carbohydratesOnPortion - ? _value.carbohydratesOnPortion - : carbohydratesOnPortion // ignore: cast_nullable_to_non_nullable - as double, - )); + return _then( + _$GlossaryModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + grInPortion: + null == grInPortion + ? _value.grInPortion + : grInPortion // ignore: cast_nullable_to_non_nullable + as int, + energyOn100Gr: + null == energyOn100Gr + ? _value.energyOn100Gr + : energyOn100Gr // ignore: cast_nullable_to_non_nullable + as double, + proteinsOn100Gr: + null == proteinsOn100Gr + ? _value.proteinsOn100Gr + : proteinsOn100Gr // ignore: cast_nullable_to_non_nullable + as double, + fatsOn100Gr: + null == fatsOn100Gr + ? _value.fatsOn100Gr + : fatsOn100Gr // ignore: cast_nullable_to_non_nullable + as double, + carbohydratesOn100Gr: + null == carbohydratesOn100Gr + ? _value.carbohydratesOn100Gr + : carbohydratesOn100Gr // ignore: cast_nullable_to_non_nullable + as double, + energyOnPortion: + null == energyOnPortion + ? _value.energyOnPortion + : energyOnPortion // ignore: cast_nullable_to_non_nullable + as double, + proteinsOnPortion: + null == proteinsOnPortion + ? _value.proteinsOnPortion + : proteinsOnPortion // ignore: cast_nullable_to_non_nullable + as double, + fatsOnPortion: + null == fatsOnPortion + ? _value.fatsOnPortion + : fatsOnPortion // ignore: cast_nullable_to_non_nullable + as double, + carbohydratesOnPortion: + null == carbohydratesOnPortion + ? _value.carbohydratesOnPortion + : carbohydratesOnPortion // ignore: cast_nullable_to_non_nullable + as double, + ), + ); } } /// @nodoc @JsonSerializable() class _$GlossaryModelImpl implements _GlossaryModel { - const _$GlossaryModelImpl( - {required this.id, - required this.name, - @JsonKey(name: 'portion_mass_gr') required this.grInPortion, - @JsonKey(name: 'energy_on_100gr') required this.energyOn100Gr, - @JsonKey(name: 'proteins_on_100gr') required this.proteinsOn100Gr, - @JsonKey(name: 'fats_on_100gr') required this.fatsOn100Gr, - @JsonKey(name: 'carbohydrates_on_100gr') - required this.carbohydratesOn100Gr, - @JsonKey(name: 'energy_on_portion') required this.energyOnPortion, - @JsonKey(name: 'proteins_on_portion') required this.proteinsOnPortion, - @JsonKey(name: 'fats_on_portion') required this.fatsOnPortion, - @JsonKey(name: 'carbohydrates_on_portion') - required this.carbohydratesOnPortion}); + const _$GlossaryModelImpl({ + required this.id, + required this.name, + @JsonKey(name: 'portion_mass_gr') required this.grInPortion, + @JsonKey(name: 'energy_on_100gr') required this.energyOn100Gr, + @JsonKey(name: 'proteins_on_100gr') required this.proteinsOn100Gr, + @JsonKey(name: 'fats_on_100gr') required this.fatsOn100Gr, + @JsonKey(name: 'carbohydrates_on_100gr') required this.carbohydratesOn100Gr, + @JsonKey(name: 'energy_on_portion') required this.energyOnPortion, + @JsonKey(name: 'proteins_on_portion') required this.proteinsOnPortion, + @JsonKey(name: 'fats_on_portion') required this.fatsOnPortion, + @JsonKey(name: 'carbohydrates_on_portion') + required this.carbohydratesOnPortion, + }); factory _$GlossaryModelImpl.fromJson(Map json) => _$$GlossaryModelImplFromJson(json); @@ -683,18 +738,19 @@ class _$GlossaryModelImpl implements _GlossaryModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - id, - name, - grInPortion, - energyOn100Gr, - proteinsOn100Gr, - fatsOn100Gr, - carbohydratesOn100Gr, - energyOnPortion, - proteinsOnPortion, - fatsOnPortion, - carbohydratesOnPortion); + runtimeType, + id, + name, + grInPortion, + energyOn100Gr, + proteinsOn100Gr, + fatsOn100Gr, + carbohydratesOn100Gr, + energyOnPortion, + proteinsOnPortion, + fatsOnPortion, + carbohydratesOnPortion, + ); /// Create a copy of GlossaryModel /// with the given fields replaced by the non-null parameter values. @@ -706,28 +762,27 @@ class _$GlossaryModelImpl implements _GlossaryModel { @override Map toJson() { - return _$$GlossaryModelImplToJson( - this, - ); + return _$$GlossaryModelImplToJson(this); } } abstract class _GlossaryModel implements GlossaryModel { - const factory _GlossaryModel( - {required final int id, - required final String name, - @JsonKey(name: 'portion_mass_gr') required final int grInPortion, - @JsonKey(name: 'energy_on_100gr') required final double energyOn100Gr, - @JsonKey(name: 'proteins_on_100gr') required final double proteinsOn100Gr, - @JsonKey(name: 'fats_on_100gr') required final double fatsOn100Gr, - @JsonKey(name: 'carbohydrates_on_100gr') - required final double carbohydratesOn100Gr, - @JsonKey(name: 'energy_on_portion') required final double energyOnPortion, - @JsonKey(name: 'proteins_on_portion') - required final double proteinsOnPortion, - @JsonKey(name: 'fats_on_portion') required final double fatsOnPortion, - @JsonKey(name: 'carbohydrates_on_portion') - required final double carbohydratesOnPortion}) = _$GlossaryModelImpl; + const factory _GlossaryModel({ + required final int id, + required final String name, + @JsonKey(name: 'portion_mass_gr') required final int grInPortion, + @JsonKey(name: 'energy_on_100gr') required final double energyOn100Gr, + @JsonKey(name: 'proteins_on_100gr') required final double proteinsOn100Gr, + @JsonKey(name: 'fats_on_100gr') required final double fatsOn100Gr, + @JsonKey(name: 'carbohydrates_on_100gr') + required final double carbohydratesOn100Gr, + @JsonKey(name: 'energy_on_portion') required final double energyOnPortion, + @JsonKey(name: 'proteins_on_portion') + required final double proteinsOnPortion, + @JsonKey(name: 'fats_on_portion') required final double fatsOnPortion, + @JsonKey(name: 'carbohydrates_on_portion') + required final double carbohydratesOnPortion, + }) = _$GlossaryModelImpl; factory _GlossaryModel.fromJson(Map json) = _$GlossaryModelImpl.fromJson; diff --git a/lib/features/glossary/models/glossary_model.g.dart b/lib/features/glossary/models/glossary_model.g.dart index cd3214b4..f76fd71c 100644 --- a/lib/features/glossary/models/glossary_model.g.dart +++ b/lib/features/glossary/models/glossary_model.g.dart @@ -7,31 +7,29 @@ part of 'glossary_model.dart'; // ************************************************************************** _$GlossaryPaginationModelImpl _$$GlossaryPaginationModelImplFromJson( - Map json) => - _$GlossaryPaginationModelImpl( - glossariesList: (json['data'] as List) + Map json, +) => _$GlossaryPaginationModelImpl( + glossariesList: + (json['data'] as List) .map((e) => GlossaryModel.fromJson(e as Map)) .toList(), - ); +); Map _$$GlossaryPaginationModelImplToJson( - _$GlossaryPaginationModelImpl instance) => - { - 'data': instance.glossariesList, - }; + _$GlossaryPaginationModelImpl instance, +) => {'data': instance.glossariesList}; _$GlossaryModerationModelImpl _$$GlossaryModerationModelImplFromJson( - Map json) => - _$GlossaryModerationModelImpl( - glossary: GlossaryModel.fromJson( - json['product_nutritional_value'] as Map), - ); + Map json, +) => _$GlossaryModerationModelImpl( + glossary: GlossaryModel.fromJson( + json['product_nutritional_value'] as Map, + ), +); Map _$$GlossaryModerationModelImplToJson( - _$GlossaryModerationModelImpl instance) => - { - 'product_nutritional_value': instance.glossary, - }; + _$GlossaryModerationModelImpl instance, +) => {'product_nutritional_value': instance.glossary}; _$GlossaryModelImpl _$$GlossaryModelImplFromJson(Map json) => _$GlossaryModelImpl( diff --git a/lib/features/my_diets/presentation/cubit/my_diets_state.freezed.dart b/lib/features/my_diets/presentation/cubit/my_diets_state.freezed.dart index 91782100..c4de0cdf 100644 --- a/lib/features/my_diets/presentation/cubit/my_diets_state.freezed.dart +++ b/lib/features/my_diets/presentation/cubit/my_diets_state.freezed.dart @@ -12,7 +12,8 @@ part of 'my_diets_state.dart'; 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'); + '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 _$MyDietsState { @@ -40,22 +41,24 @@ mixin _$MyDietsState { /// @nodoc abstract class $MyDietsStateCopyWith<$Res> { factory $MyDietsStateCopyWith( - MyDietsState value, $Res Function(MyDietsState) then) = - _$MyDietsStateCopyWithImpl<$Res, MyDietsState>; + MyDietsState value, + $Res Function(MyDietsState) then, + ) = _$MyDietsStateCopyWithImpl<$Res, MyDietsState>; @useResult - $Res call( - {List activeDiets, - List draftDiets, - List personalDiets, - bool isLoading, - String? activeDietsError, - String? draftDietsError, - String? personalDietsError, - String? error, - int selectedStateIndex, - DietsFilterState activeFilterState, - DietsFilterState draftFilterState, - DietsFilterState personalFilterState}); + $Res call({ + List activeDiets, + List draftDiets, + List personalDiets, + bool isLoading, + String? activeDietsError, + String? draftDietsError, + String? personalDietsError, + String? error, + int selectedStateIndex, + DietsFilterState activeFilterState, + DietsFilterState draftFilterState, + DietsFilterState personalFilterState, + }); $DietsFilterStateCopyWith<$Res> get activeFilterState; $DietsFilterStateCopyWith<$Res> get draftFilterState; @@ -90,56 +93,71 @@ class _$MyDietsStateCopyWithImpl<$Res, $Val extends MyDietsState> Object? draftFilterState = null, Object? personalFilterState = null, }) { - return _then(_value.copyWith( - activeDiets: null == activeDiets - ? _value.activeDiets - : activeDiets // ignore: cast_nullable_to_non_nullable - as List, - draftDiets: null == draftDiets - ? _value.draftDiets - : draftDiets // ignore: cast_nullable_to_non_nullable - as List, - personalDiets: null == personalDiets - ? _value.personalDiets - : personalDiets // ignore: cast_nullable_to_non_nullable - as List, - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - activeDietsError: freezed == activeDietsError - ? _value.activeDietsError - : activeDietsError // ignore: cast_nullable_to_non_nullable - as String?, - draftDietsError: freezed == draftDietsError - ? _value.draftDietsError - : draftDietsError // ignore: cast_nullable_to_non_nullable - as String?, - personalDietsError: freezed == personalDietsError - ? _value.personalDietsError - : personalDietsError // ignore: cast_nullable_to_non_nullable - as String?, - error: freezed == error - ? _value.error - : error // ignore: cast_nullable_to_non_nullable - as String?, - selectedStateIndex: null == selectedStateIndex - ? _value.selectedStateIndex - : selectedStateIndex // ignore: cast_nullable_to_non_nullable - as int, - activeFilterState: null == activeFilterState - ? _value.activeFilterState - : activeFilterState // ignore: cast_nullable_to_non_nullable - as DietsFilterState, - draftFilterState: null == draftFilterState - ? _value.draftFilterState - : draftFilterState // ignore: cast_nullable_to_non_nullable - as DietsFilterState, - personalFilterState: null == personalFilterState - ? _value.personalFilterState - : personalFilterState // ignore: cast_nullable_to_non_nullable - as DietsFilterState, - ) as $Val); + return _then( + _value.copyWith( + activeDiets: + null == activeDiets + ? _value.activeDiets + : activeDiets // ignore: cast_nullable_to_non_nullable + as List, + draftDiets: + null == draftDiets + ? _value.draftDiets + : draftDiets // ignore: cast_nullable_to_non_nullable + as List, + personalDiets: + null == personalDiets + ? _value.personalDiets + : personalDiets // ignore: cast_nullable_to_non_nullable + as List, + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + activeDietsError: + freezed == activeDietsError + ? _value.activeDietsError + : activeDietsError // ignore: cast_nullable_to_non_nullable + as String?, + draftDietsError: + freezed == draftDietsError + ? _value.draftDietsError + : draftDietsError // ignore: cast_nullable_to_non_nullable + as String?, + personalDietsError: + freezed == personalDietsError + ? _value.personalDietsError + : personalDietsError // ignore: cast_nullable_to_non_nullable + as String?, + error: + freezed == error + ? _value.error + : error // ignore: cast_nullable_to_non_nullable + as String?, + selectedStateIndex: + null == selectedStateIndex + ? _value.selectedStateIndex + : selectedStateIndex // ignore: cast_nullable_to_non_nullable + as int, + activeFilterState: + null == activeFilterState + ? _value.activeFilterState + : activeFilterState // ignore: cast_nullable_to_non_nullable + as DietsFilterState, + draftFilterState: + null == draftFilterState + ? _value.draftFilterState + : draftFilterState // ignore: cast_nullable_to_non_nullable + as DietsFilterState, + personalFilterState: + null == personalFilterState + ? _value.personalFilterState + : personalFilterState // ignore: cast_nullable_to_non_nullable + as DietsFilterState, + ) + as $Val, + ); } /// Create a copy of MyDietsState @@ -177,23 +195,25 @@ class _$MyDietsStateCopyWithImpl<$Res, $Val extends MyDietsState> abstract class _$$MyDietsStateImplCopyWith<$Res> implements $MyDietsStateCopyWith<$Res> { factory _$$MyDietsStateImplCopyWith( - _$MyDietsStateImpl value, $Res Function(_$MyDietsStateImpl) then) = - __$$MyDietsStateImplCopyWithImpl<$Res>; + _$MyDietsStateImpl value, + $Res Function(_$MyDietsStateImpl) then, + ) = __$$MyDietsStateImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {List activeDiets, - List draftDiets, - List personalDiets, - bool isLoading, - String? activeDietsError, - String? draftDietsError, - String? personalDietsError, - String? error, - int selectedStateIndex, - DietsFilterState activeFilterState, - DietsFilterState draftFilterState, - DietsFilterState personalFilterState}); + $Res call({ + List activeDiets, + List draftDiets, + List personalDiets, + bool isLoading, + String? activeDietsError, + String? draftDietsError, + String? personalDietsError, + String? error, + int selectedStateIndex, + DietsFilterState activeFilterState, + DietsFilterState draftFilterState, + DietsFilterState personalFilterState, + }); @override $DietsFilterStateCopyWith<$Res> get activeFilterState; @@ -208,8 +228,9 @@ class __$$MyDietsStateImplCopyWithImpl<$Res> extends _$MyDietsStateCopyWithImpl<$Res, _$MyDietsStateImpl> implements _$$MyDietsStateImplCopyWith<$Res> { __$$MyDietsStateImplCopyWithImpl( - _$MyDietsStateImpl _value, $Res Function(_$MyDietsStateImpl) _then) - : super(_value, _then); + _$MyDietsStateImpl _value, + $Res Function(_$MyDietsStateImpl) _then, + ) : super(_value, _then); /// Create a copy of MyDietsState /// with the given fields replaced by the non-null parameter values. @@ -229,81 +250,104 @@ class __$$MyDietsStateImplCopyWithImpl<$Res> Object? draftFilterState = null, Object? personalFilterState = null, }) { - return _then(_$MyDietsStateImpl( - activeDiets: null == activeDiets - ? _value._activeDiets - : activeDiets // ignore: cast_nullable_to_non_nullable - as List, - draftDiets: null == draftDiets - ? _value._draftDiets - : draftDiets // ignore: cast_nullable_to_non_nullable - as List, - personalDiets: null == personalDiets - ? _value._personalDiets - : personalDiets // ignore: cast_nullable_to_non_nullable - as List, - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - activeDietsError: freezed == activeDietsError - ? _value.activeDietsError - : activeDietsError // ignore: cast_nullable_to_non_nullable - as String?, - draftDietsError: freezed == draftDietsError - ? _value.draftDietsError - : draftDietsError // ignore: cast_nullable_to_non_nullable - as String?, - personalDietsError: freezed == personalDietsError - ? _value.personalDietsError - : personalDietsError // ignore: cast_nullable_to_non_nullable - as String?, - error: freezed == error - ? _value.error - : error // ignore: cast_nullable_to_non_nullable - as String?, - selectedStateIndex: null == selectedStateIndex - ? _value.selectedStateIndex - : selectedStateIndex // ignore: cast_nullable_to_non_nullable - as int, - activeFilterState: null == activeFilterState - ? _value.activeFilterState - : activeFilterState // ignore: cast_nullable_to_non_nullable - as DietsFilterState, - draftFilterState: null == draftFilterState - ? _value.draftFilterState - : draftFilterState // ignore: cast_nullable_to_non_nullable - as DietsFilterState, - personalFilterState: null == personalFilterState - ? _value.personalFilterState - : personalFilterState // ignore: cast_nullable_to_non_nullable - as DietsFilterState, - )); + return _then( + _$MyDietsStateImpl( + activeDiets: + null == activeDiets + ? _value._activeDiets + : activeDiets // ignore: cast_nullable_to_non_nullable + as List, + draftDiets: + null == draftDiets + ? _value._draftDiets + : draftDiets // ignore: cast_nullable_to_non_nullable + as List, + personalDiets: + null == personalDiets + ? _value._personalDiets + : personalDiets // ignore: cast_nullable_to_non_nullable + as List, + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + activeDietsError: + freezed == activeDietsError + ? _value.activeDietsError + : activeDietsError // ignore: cast_nullable_to_non_nullable + as String?, + draftDietsError: + freezed == draftDietsError + ? _value.draftDietsError + : draftDietsError // ignore: cast_nullable_to_non_nullable + as String?, + personalDietsError: + freezed == personalDietsError + ? _value.personalDietsError + : personalDietsError // ignore: cast_nullable_to_non_nullable + as String?, + error: + freezed == error + ? _value.error + : error // ignore: cast_nullable_to_non_nullable + as String?, + selectedStateIndex: + null == selectedStateIndex + ? _value.selectedStateIndex + : selectedStateIndex // ignore: cast_nullable_to_non_nullable + as int, + activeFilterState: + null == activeFilterState + ? _value.activeFilterState + : activeFilterState // ignore: cast_nullable_to_non_nullable + as DietsFilterState, + draftFilterState: + null == draftFilterState + ? _value.draftFilterState + : draftFilterState // ignore: cast_nullable_to_non_nullable + as DietsFilterState, + personalFilterState: + null == personalFilterState + ? _value.personalFilterState + : personalFilterState // ignore: cast_nullable_to_non_nullable + as DietsFilterState, + ), + ); } } /// @nodoc class _$MyDietsStateImpl implements _MyDietsState { - _$MyDietsStateImpl( - {final List activeDiets = const [], - final List draftDiets = const [], - final List personalDiets = const [], - this.isLoading = false, - this.activeDietsError = null, - this.draftDietsError = null, - this.personalDietsError = null, - this.error = null, - this.selectedStateIndex = 0, - this.activeFilterState = const DietsFilterState( - durationIndex: 0, sortingIndex: 0, typeIndex: 0), - this.draftFilterState = const DietsFilterState( - durationIndex: 0, sortingIndex: 0, typeIndex: 0), - this.personalFilterState = const DietsFilterState( - durationIndex: 0, sortingIndex: 0, typeIndex: 0)}) - : _activeDiets = activeDiets, - _draftDiets = draftDiets, - _personalDiets = personalDiets; + _$MyDietsStateImpl({ + final List activeDiets = const [], + final List draftDiets = const [], + final List personalDiets = const [], + this.isLoading = false, + this.activeDietsError = null, + this.draftDietsError = null, + this.personalDietsError = null, + this.error = null, + this.selectedStateIndex = 0, + this.activeFilterState = const DietsFilterState( + durationIndex: 0, + sortingIndex: 0, + typeIndex: 0, + ), + this.draftFilterState = const DietsFilterState( + durationIndex: 0, + sortingIndex: 0, + typeIndex: 0, + ), + this.personalFilterState = const DietsFilterState( + durationIndex: 0, + sortingIndex: 0, + typeIndex: 0, + ), + }) : _activeDiets = activeDiets, + _draftDiets = draftDiets, + _personalDiets = personalDiets; final List _activeDiets; @override @@ -370,12 +414,18 @@ class _$MyDietsStateImpl implements _MyDietsState { return identical(this, other) || (other.runtimeType == runtimeType && other is _$MyDietsStateImpl && - const DeepCollectionEquality() - .equals(other._activeDiets, _activeDiets) && - const DeepCollectionEquality() - .equals(other._draftDiets, _draftDiets) && - const DeepCollectionEquality() - .equals(other._personalDiets, _personalDiets) && + const DeepCollectionEquality().equals( + other._activeDiets, + _activeDiets, + ) && + const DeepCollectionEquality().equals( + other._draftDiets, + _draftDiets, + ) && + const DeepCollectionEquality().equals( + other._personalDiets, + _personalDiets, + ) && (identical(other.isLoading, isLoading) || other.isLoading == isLoading) && (identical(other.activeDietsError, activeDietsError) || @@ -397,19 +447,20 @@ class _$MyDietsStateImpl implements _MyDietsState { @override int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_activeDiets), - const DeepCollectionEquality().hash(_draftDiets), - const DeepCollectionEquality().hash(_personalDiets), - isLoading, - activeDietsError, - draftDietsError, - personalDietsError, - error, - selectedStateIndex, - activeFilterState, - draftFilterState, - personalFilterState); + runtimeType, + const DeepCollectionEquality().hash(_activeDiets), + const DeepCollectionEquality().hash(_draftDiets), + const DeepCollectionEquality().hash(_personalDiets), + isLoading, + activeDietsError, + draftDietsError, + personalDietsError, + error, + selectedStateIndex, + activeFilterState, + draftFilterState, + personalFilterState, + ); /// Create a copy of MyDietsState /// with the given fields replaced by the non-null parameter values. @@ -421,19 +472,20 @@ class _$MyDietsStateImpl implements _MyDietsState { } abstract class _MyDietsState implements MyDietsState { - factory _MyDietsState( - {final List activeDiets, - final List draftDiets, - final List personalDiets, - final bool isLoading, - final String? activeDietsError, - final String? draftDietsError, - final String? personalDietsError, - final String? error, - final int selectedStateIndex, - final DietsFilterState activeFilterState, - final DietsFilterState draftFilterState, - final DietsFilterState personalFilterState}) = _$MyDietsStateImpl; + factory _MyDietsState({ + final List activeDiets, + final List draftDiets, + final List personalDiets, + final bool isLoading, + final String? activeDietsError, + final String? draftDietsError, + final String? personalDietsError, + final String? error, + final int selectedStateIndex, + final DietsFilterState activeFilterState, + final DietsFilterState draftFilterState, + final DietsFilterState personalFilterState, + }) = _$MyDietsStateImpl; @override List get activeDiets; diff --git a/lib/features/my_plans/presentation/cubit/my_plans_state.freezed.dart b/lib/features/my_plans/presentation/cubit/my_plans_state.freezed.dart index ea5d960b..b7512af2 100644 --- a/lib/features/my_plans/presentation/cubit/my_plans_state.freezed.dart +++ b/lib/features/my_plans/presentation/cubit/my_plans_state.freezed.dart @@ -12,7 +12,8 @@ part of 'my_plans_state.dart'; 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'); + '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 _$MyPlansState { @@ -38,21 +39,23 @@ mixin _$MyPlansState { /// @nodoc abstract class $MyPlansStateCopyWith<$Res> { factory $MyPlansStateCopyWith( - MyPlansState value, $Res Function(MyPlansState) then) = - _$MyPlansStateCopyWithImpl<$Res, MyPlansState>; + MyPlansState value, + $Res Function(MyPlansState) then, + ) = _$MyPlansStateCopyWithImpl<$Res, MyPlansState>; @useResult - $Res call( - {List activePlans, - List draftPlans, - bool isLoading, - String? error, - int selectedStateIndex, - int minActivePlanPrice, - int maxActivePlanPrice, - int minDraftPlanPrice, - int maxDraftPlanPrice, - PlansFilterState activeFilterState, - PlansFilterState draftFilterState}); + $Res call({ + List activePlans, + List draftPlans, + bool isLoading, + String? error, + int selectedStateIndex, + int minActivePlanPrice, + int maxActivePlanPrice, + int minDraftPlanPrice, + int maxDraftPlanPrice, + PlansFilterState activeFilterState, + PlansFilterState draftFilterState, + }); $PlansFilterStateCopyWith<$Res> get activeFilterState; $PlansFilterStateCopyWith<$Res> get draftFilterState; @@ -85,52 +88,66 @@ class _$MyPlansStateCopyWithImpl<$Res, $Val extends MyPlansState> Object? activeFilterState = null, Object? draftFilterState = null, }) { - return _then(_value.copyWith( - activePlans: null == activePlans - ? _value.activePlans - : activePlans // ignore: cast_nullable_to_non_nullable - as List, - draftPlans: null == draftPlans - ? _value.draftPlans - : draftPlans // ignore: cast_nullable_to_non_nullable - as List, - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - error: freezed == error - ? _value.error - : error // ignore: cast_nullable_to_non_nullable - as String?, - selectedStateIndex: null == selectedStateIndex - ? _value.selectedStateIndex - : selectedStateIndex // ignore: cast_nullable_to_non_nullable - as int, - minActivePlanPrice: null == minActivePlanPrice - ? _value.minActivePlanPrice - : minActivePlanPrice // ignore: cast_nullable_to_non_nullable - as int, - maxActivePlanPrice: null == maxActivePlanPrice - ? _value.maxActivePlanPrice - : maxActivePlanPrice // ignore: cast_nullable_to_non_nullable - as int, - minDraftPlanPrice: null == minDraftPlanPrice - ? _value.minDraftPlanPrice - : minDraftPlanPrice // ignore: cast_nullable_to_non_nullable - as int, - maxDraftPlanPrice: null == maxDraftPlanPrice - ? _value.maxDraftPlanPrice - : maxDraftPlanPrice // ignore: cast_nullable_to_non_nullable - as int, - activeFilterState: null == activeFilterState - ? _value.activeFilterState - : activeFilterState // ignore: cast_nullable_to_non_nullable - as PlansFilterState, - draftFilterState: null == draftFilterState - ? _value.draftFilterState - : draftFilterState // ignore: cast_nullable_to_non_nullable - as PlansFilterState, - ) as $Val); + return _then( + _value.copyWith( + activePlans: + null == activePlans + ? _value.activePlans + : activePlans // ignore: cast_nullable_to_non_nullable + as List, + draftPlans: + null == draftPlans + ? _value.draftPlans + : draftPlans // ignore: cast_nullable_to_non_nullable + as List, + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + error: + freezed == error + ? _value.error + : error // ignore: cast_nullable_to_non_nullable + as String?, + selectedStateIndex: + null == selectedStateIndex + ? _value.selectedStateIndex + : selectedStateIndex // ignore: cast_nullable_to_non_nullable + as int, + minActivePlanPrice: + null == minActivePlanPrice + ? _value.minActivePlanPrice + : minActivePlanPrice // ignore: cast_nullable_to_non_nullable + as int, + maxActivePlanPrice: + null == maxActivePlanPrice + ? _value.maxActivePlanPrice + : maxActivePlanPrice // ignore: cast_nullable_to_non_nullable + as int, + minDraftPlanPrice: + null == minDraftPlanPrice + ? _value.minDraftPlanPrice + : minDraftPlanPrice // ignore: cast_nullable_to_non_nullable + as int, + maxDraftPlanPrice: + null == maxDraftPlanPrice + ? _value.maxDraftPlanPrice + : maxDraftPlanPrice // ignore: cast_nullable_to_non_nullable + as int, + activeFilterState: + null == activeFilterState + ? _value.activeFilterState + : activeFilterState // ignore: cast_nullable_to_non_nullable + as PlansFilterState, + draftFilterState: + null == draftFilterState + ? _value.draftFilterState + : draftFilterState // ignore: cast_nullable_to_non_nullable + as PlansFilterState, + ) + as $Val, + ); } /// Create a copy of MyPlansState @@ -158,22 +175,24 @@ class _$MyPlansStateCopyWithImpl<$Res, $Val extends MyPlansState> abstract class _$$MyPlansStateImplCopyWith<$Res> implements $MyPlansStateCopyWith<$Res> { factory _$$MyPlansStateImplCopyWith( - _$MyPlansStateImpl value, $Res Function(_$MyPlansStateImpl) then) = - __$$MyPlansStateImplCopyWithImpl<$Res>; + _$MyPlansStateImpl value, + $Res Function(_$MyPlansStateImpl) then, + ) = __$$MyPlansStateImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {List activePlans, - List draftPlans, - bool isLoading, - String? error, - int selectedStateIndex, - int minActivePlanPrice, - int maxActivePlanPrice, - int minDraftPlanPrice, - int maxDraftPlanPrice, - PlansFilterState activeFilterState, - PlansFilterState draftFilterState}); + $Res call({ + List activePlans, + List draftPlans, + bool isLoading, + String? error, + int selectedStateIndex, + int minActivePlanPrice, + int maxActivePlanPrice, + int minDraftPlanPrice, + int maxDraftPlanPrice, + PlansFilterState activeFilterState, + PlansFilterState draftFilterState, + }); @override $PlansFilterStateCopyWith<$Res> get activeFilterState; @@ -186,8 +205,9 @@ class __$$MyPlansStateImplCopyWithImpl<$Res> extends _$MyPlansStateCopyWithImpl<$Res, _$MyPlansStateImpl> implements _$$MyPlansStateImplCopyWith<$Res> { __$$MyPlansStateImplCopyWithImpl( - _$MyPlansStateImpl _value, $Res Function(_$MyPlansStateImpl) _then) - : super(_value, _then); + _$MyPlansStateImpl _value, + $Res Function(_$MyPlansStateImpl) _then, + ) : super(_value, _then); /// Create a copy of MyPlansState /// with the given fields replaced by the non-null parameter values. @@ -206,74 +226,93 @@ class __$$MyPlansStateImplCopyWithImpl<$Res> Object? activeFilterState = null, Object? draftFilterState = null, }) { - return _then(_$MyPlansStateImpl( - activePlans: null == activePlans - ? _value._activePlans - : activePlans // ignore: cast_nullable_to_non_nullable - as List, - draftPlans: null == draftPlans - ? _value._draftPlans - : draftPlans // ignore: cast_nullable_to_non_nullable - as List, - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - error: freezed == error - ? _value.error - : error // ignore: cast_nullable_to_non_nullable - as String?, - selectedStateIndex: null == selectedStateIndex - ? _value.selectedStateIndex - : selectedStateIndex // ignore: cast_nullable_to_non_nullable - as int, - minActivePlanPrice: null == minActivePlanPrice - ? _value.minActivePlanPrice - : minActivePlanPrice // ignore: cast_nullable_to_non_nullable - as int, - maxActivePlanPrice: null == maxActivePlanPrice - ? _value.maxActivePlanPrice - : maxActivePlanPrice // ignore: cast_nullable_to_non_nullable - as int, - minDraftPlanPrice: null == minDraftPlanPrice - ? _value.minDraftPlanPrice - : minDraftPlanPrice // ignore: cast_nullable_to_non_nullable - as int, - maxDraftPlanPrice: null == maxDraftPlanPrice - ? _value.maxDraftPlanPrice - : maxDraftPlanPrice // ignore: cast_nullable_to_non_nullable - as int, - activeFilterState: null == activeFilterState - ? _value.activeFilterState - : activeFilterState // ignore: cast_nullable_to_non_nullable - as PlansFilterState, - draftFilterState: null == draftFilterState - ? _value.draftFilterState - : draftFilterState // ignore: cast_nullable_to_non_nullable - as PlansFilterState, - )); + return _then( + _$MyPlansStateImpl( + activePlans: + null == activePlans + ? _value._activePlans + : activePlans // ignore: cast_nullable_to_non_nullable + as List, + draftPlans: + null == draftPlans + ? _value._draftPlans + : draftPlans // ignore: cast_nullable_to_non_nullable + as List, + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + error: + freezed == error + ? _value.error + : error // ignore: cast_nullable_to_non_nullable + as String?, + selectedStateIndex: + null == selectedStateIndex + ? _value.selectedStateIndex + : selectedStateIndex // ignore: cast_nullable_to_non_nullable + as int, + minActivePlanPrice: + null == minActivePlanPrice + ? _value.minActivePlanPrice + : minActivePlanPrice // ignore: cast_nullable_to_non_nullable + as int, + maxActivePlanPrice: + null == maxActivePlanPrice + ? _value.maxActivePlanPrice + : maxActivePlanPrice // ignore: cast_nullable_to_non_nullable + as int, + minDraftPlanPrice: + null == minDraftPlanPrice + ? _value.minDraftPlanPrice + : minDraftPlanPrice // ignore: cast_nullable_to_non_nullable + as int, + maxDraftPlanPrice: + null == maxDraftPlanPrice + ? _value.maxDraftPlanPrice + : maxDraftPlanPrice // ignore: cast_nullable_to_non_nullable + as int, + activeFilterState: + null == activeFilterState + ? _value.activeFilterState + : activeFilterState // ignore: cast_nullable_to_non_nullable + as PlansFilterState, + draftFilterState: + null == draftFilterState + ? _value.draftFilterState + : draftFilterState // ignore: cast_nullable_to_non_nullable + as PlansFilterState, + ), + ); } } /// @nodoc class _$MyPlansStateImpl implements _MyPlansState { - _$MyPlansStateImpl( - {final List activePlans = const [], - final List draftPlans = const [], - this.isLoading = false, - this.error = null, - this.selectedStateIndex = 0, - this.minActivePlanPrice = 0, - this.maxActivePlanPrice = 0, - this.minDraftPlanPrice = 0, - this.maxDraftPlanPrice = 0, - this.activeFilterState = const PlansFilterState( - priceFilter: (null, null), durationIndex: 0, typeIndex: 0), - this.draftFilterState = const PlansFilterState( - priceFilter: (null, null), durationIndex: 0, typeIndex: 0)}) - : _activePlans = activePlans, - _draftPlans = draftPlans; + _$MyPlansStateImpl({ + final List activePlans = const [], + final List draftPlans = const [], + this.isLoading = false, + this.error = null, + this.selectedStateIndex = 0, + this.minActivePlanPrice = 0, + this.maxActivePlanPrice = 0, + this.minDraftPlanPrice = 0, + this.maxDraftPlanPrice = 0, + this.activeFilterState = const PlansFilterState( + priceFilter: (null, null), + durationIndex: 0, + typeIndex: 0, + ), + this.draftFilterState = const PlansFilterState( + priceFilter: (null, null), + durationIndex: 0, + typeIndex: 0, + ), + }) : _activePlans = activePlans, + _draftPlans = draftPlans; final List _activePlans; @override @@ -331,10 +370,14 @@ class _$MyPlansStateImpl implements _MyPlansState { return identical(this, other) || (other.runtimeType == runtimeType && other is _$MyPlansStateImpl && - const DeepCollectionEquality() - .equals(other._activePlans, _activePlans) && - const DeepCollectionEquality() - .equals(other._draftPlans, _draftPlans) && + const DeepCollectionEquality().equals( + other._activePlans, + _activePlans, + ) && + const DeepCollectionEquality().equals( + other._draftPlans, + _draftPlans, + ) && (identical(other.isLoading, isLoading) || other.isLoading == isLoading) && (identical(other.error, error) || other.error == error) && @@ -356,18 +399,19 @@ class _$MyPlansStateImpl implements _MyPlansState { @override int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(_activePlans), - const DeepCollectionEquality().hash(_draftPlans), - isLoading, - error, - selectedStateIndex, - minActivePlanPrice, - maxActivePlanPrice, - minDraftPlanPrice, - maxDraftPlanPrice, - activeFilterState, - draftFilterState); + runtimeType, + const DeepCollectionEquality().hash(_activePlans), + const DeepCollectionEquality().hash(_draftPlans), + isLoading, + error, + selectedStateIndex, + minActivePlanPrice, + maxActivePlanPrice, + minDraftPlanPrice, + maxDraftPlanPrice, + activeFilterState, + draftFilterState, + ); /// Create a copy of MyPlansState /// with the given fields replaced by the non-null parameter values. @@ -379,18 +423,19 @@ class _$MyPlansStateImpl implements _MyPlansState { } abstract class _MyPlansState implements MyPlansState { - factory _MyPlansState( - {final List activePlans, - final List draftPlans, - final bool isLoading, - final String? error, - final int selectedStateIndex, - final int minActivePlanPrice, - final int maxActivePlanPrice, - final int minDraftPlanPrice, - final int maxDraftPlanPrice, - final PlansFilterState activeFilterState, - final PlansFilterState draftFilterState}) = _$MyPlansStateImpl; + factory _MyPlansState({ + final List activePlans, + final List draftPlans, + final bool isLoading, + final String? error, + final int selectedStateIndex, + final int minActivePlanPrice, + final int maxActivePlanPrice, + final int minDraftPlanPrice, + final int maxDraftPlanPrice, + final PlansFilterState activeFilterState, + final PlansFilterState draftFilterState, + }) = _$MyPlansStateImpl; @override List get activePlans; diff --git a/lib/features/plans/models/chosen_plan_model.freezed.dart b/lib/features/plans/models/chosen_plan_model.freezed.dart index 859c9ad6..f8e09287 100644 --- a/lib/features/plans/models/chosen_plan_model.freezed.dart +++ b/lib/features/plans/models/chosen_plan_model.freezed.dart @@ -12,7 +12,8 @@ part of 'chosen_plan_model.dart'; 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'); + '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', +); ChosenPlanModel _$ChosenPlanModelFromJson(Map json) { return _ChosenPlanModel.fromJson(json); @@ -48,17 +49,19 @@ mixin _$ChosenPlanModel { /// @nodoc abstract class $ChosenPlanModelCopyWith<$Res> { factory $ChosenPlanModelCopyWith( - ChosenPlanModel value, $Res Function(ChosenPlanModel) then) = - _$ChosenPlanModelCopyWithImpl<$Res, ChosenPlanModel>; + ChosenPlanModel value, + $Res Function(ChosenPlanModel) then, + ) = _$ChosenPlanModelCopyWithImpl<$Res, ChosenPlanModel>; @useResult - $Res call( - {@JsonKey() int id, - @JsonKey(name: 'option_type') String optionType, - @JsonKey(name: 'start_date') DateTime startDate, - @JsonKey(name: 'last_state') ChosenPlanStateEnum chosenPlanState, - @JsonKey(name: 'chat_id') String chatId, - @JsonKey(name: 'consultant_id') int consultantId, - @JsonKey(name: 'plan') PlanModel plan}); + $Res call({ + @JsonKey() int id, + @JsonKey(name: 'option_type') String optionType, + @JsonKey(name: 'start_date') DateTime startDate, + @JsonKey(name: 'last_state') ChosenPlanStateEnum chosenPlanState, + @JsonKey(name: 'chat_id') String chatId, + @JsonKey(name: 'consultant_id') int consultantId, + @JsonKey(name: 'plan') PlanModel plan, + }); $PlanModelCopyWith<$Res> get plan; } @@ -86,36 +89,46 @@ class _$ChosenPlanModelCopyWithImpl<$Res, $Val extends ChosenPlanModel> Object? consultantId = null, Object? plan = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - optionType: null == optionType - ? _value.optionType - : optionType // ignore: cast_nullable_to_non_nullable - as String, - startDate: null == startDate - ? _value.startDate - : startDate // ignore: cast_nullable_to_non_nullable - as DateTime, - chosenPlanState: null == chosenPlanState - ? _value.chosenPlanState - : chosenPlanState // ignore: cast_nullable_to_non_nullable - as ChosenPlanStateEnum, - chatId: null == chatId - ? _value.chatId - : chatId // ignore: cast_nullable_to_non_nullable - as String, - consultantId: null == consultantId - ? _value.consultantId - : consultantId // ignore: cast_nullable_to_non_nullable - as int, - plan: null == plan - ? _value.plan - : plan // ignore: cast_nullable_to_non_nullable - as PlanModel, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + optionType: + null == optionType + ? _value.optionType + : optionType // ignore: cast_nullable_to_non_nullable + as String, + startDate: + null == startDate + ? _value.startDate + : startDate // ignore: cast_nullable_to_non_nullable + as DateTime, + chosenPlanState: + null == chosenPlanState + ? _value.chosenPlanState + : chosenPlanState // ignore: cast_nullable_to_non_nullable + as ChosenPlanStateEnum, + chatId: + null == chatId + ? _value.chatId + : chatId // ignore: cast_nullable_to_non_nullable + as String, + consultantId: + null == consultantId + ? _value.consultantId + : consultantId // ignore: cast_nullable_to_non_nullable + as int, + plan: + null == plan + ? _value.plan + : plan // ignore: cast_nullable_to_non_nullable + as PlanModel, + ) + as $Val, + ); } /// Create a copy of ChosenPlanModel @@ -132,19 +145,21 @@ class _$ChosenPlanModelCopyWithImpl<$Res, $Val extends ChosenPlanModel> /// @nodoc abstract class _$$ChosenPlanModelImplCopyWith<$Res> implements $ChosenPlanModelCopyWith<$Res> { - factory _$$ChosenPlanModelImplCopyWith(_$ChosenPlanModelImpl value, - $Res Function(_$ChosenPlanModelImpl) then) = - __$$ChosenPlanModelImplCopyWithImpl<$Res>; + factory _$$ChosenPlanModelImplCopyWith( + _$ChosenPlanModelImpl value, + $Res Function(_$ChosenPlanModelImpl) then, + ) = __$$ChosenPlanModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey() int id, - @JsonKey(name: 'option_type') String optionType, - @JsonKey(name: 'start_date') DateTime startDate, - @JsonKey(name: 'last_state') ChosenPlanStateEnum chosenPlanState, - @JsonKey(name: 'chat_id') String chatId, - @JsonKey(name: 'consultant_id') int consultantId, - @JsonKey(name: 'plan') PlanModel plan}); + $Res call({ + @JsonKey() int id, + @JsonKey(name: 'option_type') String optionType, + @JsonKey(name: 'start_date') DateTime startDate, + @JsonKey(name: 'last_state') ChosenPlanStateEnum chosenPlanState, + @JsonKey(name: 'chat_id') String chatId, + @JsonKey(name: 'consultant_id') int consultantId, + @JsonKey(name: 'plan') PlanModel plan, + }); @override $PlanModelCopyWith<$Res> get plan; @@ -155,8 +170,9 @@ class __$$ChosenPlanModelImplCopyWithImpl<$Res> extends _$ChosenPlanModelCopyWithImpl<$Res, _$ChosenPlanModelImpl> implements _$$ChosenPlanModelImplCopyWith<$Res> { __$$ChosenPlanModelImplCopyWithImpl( - _$ChosenPlanModelImpl _value, $Res Function(_$ChosenPlanModelImpl) _then) - : super(_value, _then); + _$ChosenPlanModelImpl _value, + $Res Function(_$ChosenPlanModelImpl) _then, + ) : super(_value, _then); /// Create a copy of ChosenPlanModel /// with the given fields replaced by the non-null parameter values. @@ -171,50 +187,60 @@ class __$$ChosenPlanModelImplCopyWithImpl<$Res> Object? consultantId = null, Object? plan = null, }) { - return _then(_$ChosenPlanModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - optionType: null == optionType - ? _value.optionType - : optionType // ignore: cast_nullable_to_non_nullable - as String, - startDate: null == startDate - ? _value.startDate - : startDate // ignore: cast_nullable_to_non_nullable - as DateTime, - chosenPlanState: null == chosenPlanState - ? _value.chosenPlanState - : chosenPlanState // ignore: cast_nullable_to_non_nullable - as ChosenPlanStateEnum, - chatId: null == chatId - ? _value.chatId - : chatId // ignore: cast_nullable_to_non_nullable - as String, - consultantId: null == consultantId - ? _value.consultantId - : consultantId // ignore: cast_nullable_to_non_nullable - as int, - plan: null == plan - ? _value.plan - : plan // ignore: cast_nullable_to_non_nullable - as PlanModel, - )); + return _then( + _$ChosenPlanModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + optionType: + null == optionType + ? _value.optionType + : optionType // ignore: cast_nullable_to_non_nullable + as String, + startDate: + null == startDate + ? _value.startDate + : startDate // ignore: cast_nullable_to_non_nullable + as DateTime, + chosenPlanState: + null == chosenPlanState + ? _value.chosenPlanState + : chosenPlanState // ignore: cast_nullable_to_non_nullable + as ChosenPlanStateEnum, + chatId: + null == chatId + ? _value.chatId + : chatId // ignore: cast_nullable_to_non_nullable + as String, + consultantId: + null == consultantId + ? _value.consultantId + : consultantId // ignore: cast_nullable_to_non_nullable + as int, + plan: + null == plan + ? _value.plan + : plan // ignore: cast_nullable_to_non_nullable + as PlanModel, + ), + ); } } /// @nodoc @JsonSerializable() class _$ChosenPlanModelImpl implements _ChosenPlanModel { - _$ChosenPlanModelImpl( - {@JsonKey() required this.id, - @JsonKey(name: 'option_type') required this.optionType, - @JsonKey(name: 'start_date') required this.startDate, - @JsonKey(name: 'last_state') required this.chosenPlanState, - @JsonKey(name: 'chat_id') required this.chatId, - @JsonKey(name: 'consultant_id') required this.consultantId, - @JsonKey(name: 'plan') required this.plan}); + _$ChosenPlanModelImpl({ + @JsonKey() required this.id, + @JsonKey(name: 'option_type') required this.optionType, + @JsonKey(name: 'start_date') required this.startDate, + @JsonKey(name: 'last_state') required this.chosenPlanState, + @JsonKey(name: 'chat_id') required this.chatId, + @JsonKey(name: 'consultant_id') required this.consultantId, + @JsonKey(name: 'plan') required this.plan, + }); factory _$ChosenPlanModelImpl.fromJson(Map json) => _$$ChosenPlanModelImplFromJson(json); @@ -266,8 +292,16 @@ class _$ChosenPlanModelImpl implements _ChosenPlanModel { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, optionType, startDate, - chosenPlanState, chatId, consultantId, plan); + int get hashCode => Object.hash( + runtimeType, + id, + optionType, + startDate, + chosenPlanState, + chatId, + consultantId, + plan, + ); /// Create a copy of ChosenPlanModel /// with the given fields replaced by the non-null parameter values. @@ -276,27 +310,27 @@ class _$ChosenPlanModelImpl implements _ChosenPlanModel { @pragma('vm:prefer-inline') _$$ChosenPlanModelImplCopyWith<_$ChosenPlanModelImpl> get copyWith => __$$ChosenPlanModelImplCopyWithImpl<_$ChosenPlanModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$ChosenPlanModelImplToJson( - this, - ); + return _$$ChosenPlanModelImplToJson(this); } } abstract class _ChosenPlanModel implements ChosenPlanModel { - factory _ChosenPlanModel( - {@JsonKey() required final int id, - @JsonKey(name: 'option_type') required final String optionType, - @JsonKey(name: 'start_date') required final DateTime startDate, - @JsonKey(name: 'last_state') - required final ChosenPlanStateEnum chosenPlanState, - @JsonKey(name: 'chat_id') required final String chatId, - @JsonKey(name: 'consultant_id') required final int consultantId, - @JsonKey(name: 'plan') required final PlanModel plan}) = - _$ChosenPlanModelImpl; + factory _ChosenPlanModel({ + @JsonKey() required final int id, + @JsonKey(name: 'option_type') required final String optionType, + @JsonKey(name: 'start_date') required final DateTime startDate, + @JsonKey(name: 'last_state') + required final ChosenPlanStateEnum chosenPlanState, + @JsonKey(name: 'chat_id') required final String chatId, + @JsonKey(name: 'consultant_id') required final int consultantId, + @JsonKey(name: 'plan') required final PlanModel plan, + }) = _$ChosenPlanModelImpl; factory _ChosenPlanModel.fromJson(Map json) = _$ChosenPlanModelImpl.fromJson; diff --git a/lib/features/plans/models/chosen_plan_model.g.dart b/lib/features/plans/models/chosen_plan_model.g.dart index d3e8613c..6705fc9b 100644 --- a/lib/features/plans/models/chosen_plan_model.g.dart +++ b/lib/features/plans/models/chosen_plan_model.g.dart @@ -7,29 +7,31 @@ part of 'chosen_plan_model.dart'; // ************************************************************************** _$ChosenPlanModelImpl _$$ChosenPlanModelImplFromJson( - Map json) => - _$ChosenPlanModelImpl( - id: (json['id'] as num).toInt(), - optionType: json['option_type'] as String, - startDate: DateTime.parse(json['start_date'] as String), - chosenPlanState: - $enumDecode(_$ChosenPlanStateEnumEnumMap, json['last_state']), - chatId: json['chat_id'] as String, - consultantId: (json['consultant_id'] as num).toInt(), - plan: PlanModel.fromJson(json['plan'] as Map), - ); + Map json, +) => _$ChosenPlanModelImpl( + id: (json['id'] as num).toInt(), + optionType: json['option_type'] as String, + startDate: DateTime.parse(json['start_date'] as String), + chosenPlanState: $enumDecode( + _$ChosenPlanStateEnumEnumMap, + json['last_state'], + ), + chatId: json['chat_id'] as String, + consultantId: (json['consultant_id'] as num).toInt(), + plan: PlanModel.fromJson(json['plan'] as Map), +); Map _$$ChosenPlanModelImplToJson( - _$ChosenPlanModelImpl instance) => - { - 'id': instance.id, - 'option_type': instance.optionType, - 'start_date': instance.startDate.toIso8601String(), - 'last_state': _$ChosenPlanStateEnumEnumMap[instance.chosenPlanState]!, - 'chat_id': instance.chatId, - 'consultant_id': instance.consultantId, - 'plan': instance.plan, - }; + _$ChosenPlanModelImpl instance, +) => { + 'id': instance.id, + 'option_type': instance.optionType, + 'start_date': instance.startDate.toIso8601String(), + 'last_state': _$ChosenPlanStateEnumEnumMap[instance.chosenPlanState]!, + 'chat_id': instance.chatId, + 'consultant_id': instance.consultantId, + 'plan': instance.plan, +}; const _$ChosenPlanStateEnumEnumMap = { ChosenPlanStateEnum.stateInited: 'initied', diff --git a/lib/features/plans/presentation/cubit/about_plan_state.freezed.dart b/lib/features/plans/presentation/cubit/about_plan_state.freezed.dart index fb0613ca..3533a506 100644 --- a/lib/features/plans/presentation/cubit/about_plan_state.freezed.dart +++ b/lib/features/plans/presentation/cubit/about_plan_state.freezed.dart @@ -12,7 +12,8 @@ part of 'about_plan_state.dart'; 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'); + '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 _$AboutPlanState { @@ -31,14 +32,16 @@ mixin _$AboutPlanState { /// @nodoc abstract class $AboutPlanStateCopyWith<$Res> { factory $AboutPlanStateCopyWith( - AboutPlanState value, $Res Function(AboutPlanState) then) = - _$AboutPlanStateCopyWithImpl<$Res, AboutPlanState>; + AboutPlanState value, + $Res Function(AboutPlanState) then, + ) = _$AboutPlanStateCopyWithImpl<$Res, AboutPlanState>; @useResult - $Res call( - {bool isLoading, - String? error, - PlanModel? planModel, - int chosenOptionIndex}); + $Res call({ + bool isLoading, + String? error, + PlanModel? planModel, + int chosenOptionIndex, + }); $PlanModelCopyWith<$Res>? get planModel; } @@ -63,24 +66,31 @@ class _$AboutPlanStateCopyWithImpl<$Res, $Val extends AboutPlanState> Object? planModel = freezed, Object? chosenOptionIndex = null, }) { - return _then(_value.copyWith( - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - error: freezed == error - ? _value.error - : error // ignore: cast_nullable_to_non_nullable - as String?, - planModel: freezed == planModel - ? _value.planModel - : planModel // ignore: cast_nullable_to_non_nullable - as PlanModel?, - chosenOptionIndex: null == chosenOptionIndex - ? _value.chosenOptionIndex - : chosenOptionIndex // ignore: cast_nullable_to_non_nullable - as int, - ) as $Val); + return _then( + _value.copyWith( + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + error: + freezed == error + ? _value.error + : error // ignore: cast_nullable_to_non_nullable + as String?, + planModel: + freezed == planModel + ? _value.planModel + : planModel // ignore: cast_nullable_to_non_nullable + as PlanModel?, + chosenOptionIndex: + null == chosenOptionIndex + ? _value.chosenOptionIndex + : chosenOptionIndex // ignore: cast_nullable_to_non_nullable + as int, + ) + as $Val, + ); } /// Create a copy of AboutPlanState @@ -101,16 +111,18 @@ class _$AboutPlanStateCopyWithImpl<$Res, $Val extends AboutPlanState> /// @nodoc abstract class _$$AboutPlanStateImplCopyWith<$Res> implements $AboutPlanStateCopyWith<$Res> { - factory _$$AboutPlanStateImplCopyWith(_$AboutPlanStateImpl value, - $Res Function(_$AboutPlanStateImpl) then) = - __$$AboutPlanStateImplCopyWithImpl<$Res>; + factory _$$AboutPlanStateImplCopyWith( + _$AboutPlanStateImpl value, + $Res Function(_$AboutPlanStateImpl) then, + ) = __$$AboutPlanStateImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {bool isLoading, - String? error, - PlanModel? planModel, - int chosenOptionIndex}); + $Res call({ + bool isLoading, + String? error, + PlanModel? planModel, + int chosenOptionIndex, + }); @override $PlanModelCopyWith<$Res>? get planModel; @@ -121,8 +133,9 @@ class __$$AboutPlanStateImplCopyWithImpl<$Res> extends _$AboutPlanStateCopyWithImpl<$Res, _$AboutPlanStateImpl> implements _$$AboutPlanStateImplCopyWith<$Res> { __$$AboutPlanStateImplCopyWithImpl( - _$AboutPlanStateImpl _value, $Res Function(_$AboutPlanStateImpl) _then) - : super(_value, _then); + _$AboutPlanStateImpl _value, + $Res Function(_$AboutPlanStateImpl) _then, + ) : super(_value, _then); /// Create a copy of AboutPlanState /// with the given fields replaced by the non-null parameter values. @@ -134,35 +147,42 @@ class __$$AboutPlanStateImplCopyWithImpl<$Res> Object? planModel = freezed, Object? chosenOptionIndex = null, }) { - return _then(_$AboutPlanStateImpl( - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - error: freezed == error - ? _value.error - : error // ignore: cast_nullable_to_non_nullable - as String?, - planModel: freezed == planModel - ? _value.planModel - : planModel // ignore: cast_nullable_to_non_nullable - as PlanModel?, - chosenOptionIndex: null == chosenOptionIndex - ? _value.chosenOptionIndex - : chosenOptionIndex // ignore: cast_nullable_to_non_nullable - as int, - )); + return _then( + _$AboutPlanStateImpl( + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + error: + freezed == error + ? _value.error + : error // ignore: cast_nullable_to_non_nullable + as String?, + planModel: + freezed == planModel + ? _value.planModel + : planModel // ignore: cast_nullable_to_non_nullable + as PlanModel?, + chosenOptionIndex: + null == chosenOptionIndex + ? _value.chosenOptionIndex + : chosenOptionIndex // ignore: cast_nullable_to_non_nullable + as int, + ), + ); } } /// @nodoc class _$AboutPlanStateImpl implements _AboutPlanState { - const _$AboutPlanStateImpl( - {required this.isLoading, - required this.error, - required this.planModel, - required this.chosenOptionIndex}); + const _$AboutPlanStateImpl({ + required this.isLoading, + required this.error, + required this.planModel, + required this.chosenOptionIndex, + }); @override final bool isLoading; @@ -203,15 +223,18 @@ class _$AboutPlanStateImpl implements _AboutPlanState { @pragma('vm:prefer-inline') _$$AboutPlanStateImplCopyWith<_$AboutPlanStateImpl> get copyWith => __$$AboutPlanStateImplCopyWithImpl<_$AboutPlanStateImpl>( - this, _$identity); + this, + _$identity, + ); } abstract class _AboutPlanState implements AboutPlanState { - const factory _AboutPlanState( - {required final bool isLoading, - required final String? error, - required final PlanModel? planModel, - required final int chosenOptionIndex}) = _$AboutPlanStateImpl; + const factory _AboutPlanState({ + required final bool isLoading, + required final String? error, + required final PlanModel? planModel, + required final int chosenOptionIndex, + }) = _$AboutPlanStateImpl; @override bool get isLoading; diff --git a/lib/features/profile/models/badge_model.freezed.dart b/lib/features/profile/models/badge_model.freezed.dart index e71a7072..22dee85e 100644 --- a/lib/features/profile/models/badge_model.freezed.dart +++ b/lib/features/profile/models/badge_model.freezed.dart @@ -12,7 +12,8 @@ part of 'badge_model.dart'; 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'); + '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', +); BadgeModel _$BadgeModelFromJson(Map json) { return _BadgeModel.fromJson(json); @@ -39,11 +40,17 @@ mixin _$BadgeModel { /// @nodoc abstract class $BadgeModelCopyWith<$Res> { factory $BadgeModelCopyWith( - BadgeModel value, $Res Function(BadgeModel) then) = - _$BadgeModelCopyWithImpl<$Res, BadgeModel>; + BadgeModel value, + $Res Function(BadgeModel) then, + ) = _$BadgeModelCopyWithImpl<$Res, BadgeModel>; @useResult - $Res call( - {int id, String title, String description, String image, String type}); + $Res call({ + int id, + String title, + String description, + String image, + String type, + }); } /// @nodoc @@ -67,28 +74,36 @@ class _$BadgeModelCopyWithImpl<$Res, $Val extends BadgeModel> Object? image = null, Object? type = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - image: null == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + description: + null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + image: + null == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String, + type: + null == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } @@ -96,12 +111,18 @@ class _$BadgeModelCopyWithImpl<$Res, $Val extends BadgeModel> abstract class _$$BadgeModelImplCopyWith<$Res> implements $BadgeModelCopyWith<$Res> { factory _$$BadgeModelImplCopyWith( - _$BadgeModelImpl value, $Res Function(_$BadgeModelImpl) then) = - __$$BadgeModelImplCopyWithImpl<$Res>; + _$BadgeModelImpl value, + $Res Function(_$BadgeModelImpl) then, + ) = __$$BadgeModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, String title, String description, String image, String type}); + $Res call({ + int id, + String title, + String description, + String image, + String type, + }); } /// @nodoc @@ -109,8 +130,9 @@ class __$$BadgeModelImplCopyWithImpl<$Res> extends _$BadgeModelCopyWithImpl<$Res, _$BadgeModelImpl> implements _$$BadgeModelImplCopyWith<$Res> { __$$BadgeModelImplCopyWithImpl( - _$BadgeModelImpl _value, $Res Function(_$BadgeModelImpl) _then) - : super(_value, _then); + _$BadgeModelImpl _value, + $Res Function(_$BadgeModelImpl) _then, + ) : super(_value, _then); /// Create a copy of BadgeModel /// with the given fields replaced by the non-null parameter values. @@ -123,40 +145,48 @@ class __$$BadgeModelImplCopyWithImpl<$Res> Object? image = null, Object? type = null, }) { - return _then(_$BadgeModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - description: null == description - ? _value.description - : description // ignore: cast_nullable_to_non_nullable - as String, - image: null == image - ? _value.image - : image // ignore: cast_nullable_to_non_nullable - as String, - type: null == type - ? _value.type - : type // ignore: cast_nullable_to_non_nullable - as String, - )); + return _then( + _$BadgeModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + description: + null == description + ? _value.description + : description // ignore: cast_nullable_to_non_nullable + as String, + image: + null == image + ? _value.image + : image // ignore: cast_nullable_to_non_nullable + as String, + type: + null == type + ? _value.type + : type // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } /// @nodoc @JsonSerializable() class _$BadgeModelImpl implements _BadgeModel { - const _$BadgeModelImpl( - {required this.id, - required this.title, - required this.description, - required this.image, - required this.type}); + const _$BadgeModelImpl({ + required this.id, + required this.title, + required this.description, + required this.image, + required this.type, + }); factory _$BadgeModelImpl.fromJson(Map json) => _$$BadgeModelImplFromJson(json); @@ -205,19 +235,18 @@ class _$BadgeModelImpl implements _BadgeModel { @override Map toJson() { - return _$$BadgeModelImplToJson( - this, - ); + return _$$BadgeModelImplToJson(this); } } abstract class _BadgeModel implements BadgeModel { - const factory _BadgeModel( - {required final int id, - required final String title, - required final String description, - required final String image, - required final String type}) = _$BadgeModelImpl; + const factory _BadgeModel({ + required final int id, + required final String title, + required final String description, + required final String image, + required final String type, + }) = _$BadgeModelImpl; factory _BadgeModel.fromJson(Map json) = _$BadgeModelImpl.fromJson; diff --git a/lib/features/profile/models/chosen_diets_pagination_model.freezed.dart b/lib/features/profile/models/chosen_diets_pagination_model.freezed.dart index 3514c6a3..110934d1 100644 --- a/lib/features/profile/models/chosen_diets_pagination_model.freezed.dart +++ b/lib/features/profile/models/chosen_diets_pagination_model.freezed.dart @@ -12,10 +12,12 @@ part of 'chosen_diets_pagination_model.dart'; 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'); + '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', +); ChosenDietsPaginationModel _$ChosenDietsPaginationModelFromJson( - Map json) { + Map json, +) { return _ChosenDietsPaginationModel.fromJson(json); } @@ -31,22 +33,28 @@ mixin _$ChosenDietsPaginationModel { /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) $ChosenDietsPaginationModelCopyWith - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $ChosenDietsPaginationModelCopyWith<$Res> { - factory $ChosenDietsPaginationModelCopyWith(ChosenDietsPaginationModel value, - $Res Function(ChosenDietsPaginationModel) then) = - _$ChosenDietsPaginationModelCopyWithImpl<$Res, - ChosenDietsPaginationModel>; + factory $ChosenDietsPaginationModelCopyWith( + ChosenDietsPaginationModel value, + $Res Function(ChosenDietsPaginationModel) then, + ) = + _$ChosenDietsPaginationModelCopyWithImpl< + $Res, + ChosenDietsPaginationModel + >; @useResult $Res call({@JsonKey(name: 'data') List diets}); } /// @nodoc -class _$ChosenDietsPaginationModelCopyWithImpl<$Res, - $Val extends ChosenDietsPaginationModel> +class _$ChosenDietsPaginationModelCopyWithImpl< + $Res, + $Val extends ChosenDietsPaginationModel +> implements $ChosenDietsPaginationModelCopyWith<$Res> { _$ChosenDietsPaginationModelCopyWithImpl(this._value, this._then); @@ -59,15 +67,17 @@ class _$ChosenDietsPaginationModelCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? diets = null, - }) { - return _then(_value.copyWith( - diets: null == diets - ? _value.diets - : diets // ignore: cast_nullable_to_non_nullable - as List, - ) as $Val); + $Res call({Object? diets = null}) { + return _then( + _value.copyWith( + diets: + null == diets + ? _value.diets + : diets // ignore: cast_nullable_to_non_nullable + as List, + ) + as $Val, + ); } } @@ -75,9 +85,9 @@ class _$ChosenDietsPaginationModelCopyWithImpl<$Res, abstract class _$$ChosenDietsPaginationModelImplCopyWith<$Res> implements $ChosenDietsPaginationModelCopyWith<$Res> { factory _$$ChosenDietsPaginationModelImplCopyWith( - _$ChosenDietsPaginationModelImpl value, - $Res Function(_$ChosenDietsPaginationModelImpl) then) = - __$$ChosenDietsPaginationModelImplCopyWithImpl<$Res>; + _$ChosenDietsPaginationModelImpl value, + $Res Function(_$ChosenDietsPaginationModelImpl) then, + ) = __$$ChosenDietsPaginationModelImplCopyWithImpl<$Res>; @override @useResult $Res call({@JsonKey(name: 'data') List diets}); @@ -85,40 +95,44 @@ abstract class _$$ChosenDietsPaginationModelImplCopyWith<$Res> /// @nodoc class __$$ChosenDietsPaginationModelImplCopyWithImpl<$Res> - extends _$ChosenDietsPaginationModelCopyWithImpl<$Res, - _$ChosenDietsPaginationModelImpl> + extends + _$ChosenDietsPaginationModelCopyWithImpl< + $Res, + _$ChosenDietsPaginationModelImpl + > implements _$$ChosenDietsPaginationModelImplCopyWith<$Res> { __$$ChosenDietsPaginationModelImplCopyWithImpl( - _$ChosenDietsPaginationModelImpl _value, - $Res Function(_$ChosenDietsPaginationModelImpl) _then) - : super(_value, _then); + _$ChosenDietsPaginationModelImpl _value, + $Res Function(_$ChosenDietsPaginationModelImpl) _then, + ) : super(_value, _then); /// Create a copy of ChosenDietsPaginationModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? diets = null, - }) { - return _then(_$ChosenDietsPaginationModelImpl( - diets: null == diets - ? _value._diets - : diets // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? diets = null}) { + return _then( + _$ChosenDietsPaginationModelImpl( + diets: + null == diets + ? _value._diets + : diets // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } /// @nodoc @JsonSerializable() class _$ChosenDietsPaginationModelImpl implements _ChosenDietsPaginationModel { - _$ChosenDietsPaginationModelImpl( - {@JsonKey(name: 'data') required final List diets}) - : _diets = diets; + _$ChosenDietsPaginationModelImpl({ + @JsonKey(name: 'data') required final List diets, + }) : _diets = diets; factory _$ChosenDietsPaginationModelImpl.fromJson( - Map json) => - _$$ChosenDietsPaginationModelImplFromJson(json); + Map json, + ) => _$$ChosenDietsPaginationModelImplFromJson(json); final List _diets; @override @@ -153,22 +167,21 @@ class _$ChosenDietsPaginationModelImpl implements _ChosenDietsPaginationModel { @override @pragma('vm:prefer-inline') _$$ChosenDietsPaginationModelImplCopyWith<_$ChosenDietsPaginationModelImpl> - get copyWith => __$$ChosenDietsPaginationModelImplCopyWithImpl< - _$ChosenDietsPaginationModelImpl>(this, _$identity); + get copyWith => __$$ChosenDietsPaginationModelImplCopyWithImpl< + _$ChosenDietsPaginationModelImpl + >(this, _$identity); @override Map toJson() { - return _$$ChosenDietsPaginationModelImplToJson( - this, - ); + return _$$ChosenDietsPaginationModelImplToJson(this); } } abstract class _ChosenDietsPaginationModel implements ChosenDietsPaginationModel { - factory _ChosenDietsPaginationModel( - {@JsonKey(name: 'data') required final List diets}) = - _$ChosenDietsPaginationModelImpl; + factory _ChosenDietsPaginationModel({ + @JsonKey(name: 'data') required final List diets, + }) = _$ChosenDietsPaginationModelImpl; factory _ChosenDietsPaginationModel.fromJson(Map json) = _$ChosenDietsPaginationModelImpl.fromJson; @@ -182,7 +195,7 @@ abstract class _ChosenDietsPaginationModel @override @JsonKey(includeFromJson: false, includeToJson: false) _$$ChosenDietsPaginationModelImplCopyWith<_$ChosenDietsPaginationModelImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } ChosenDietModel _$ChosenDietModelFromJson(Map json) { @@ -215,15 +228,17 @@ mixin _$ChosenDietModel { /// @nodoc abstract class $ChosenDietModelCopyWith<$Res> { factory $ChosenDietModelCopyWith( - ChosenDietModel value, $Res Function(ChosenDietModel) then) = - _$ChosenDietModelCopyWithImpl<$Res, ChosenDietModel>; + ChosenDietModel value, + $Res Function(ChosenDietModel) then, + ) = _$ChosenDietModelCopyWithImpl<$Res, ChosenDietModel>; @useResult - $Res call( - {@JsonKey(name: 'id') int chosenDietID, - @JsonKey(name: 'chosen_plan_id') int chosenPlanId, - @JsonKey() String state, - @JsonKey(name: 'start_date', fromJson: parseDate) DateTime startDate, - @JsonKey(name: 'diet', fromJson: _parseDietId) int? dietId}); + $Res call({ + @JsonKey(name: 'id') int chosenDietID, + @JsonKey(name: 'chosen_plan_id') int chosenPlanId, + @JsonKey() String state, + @JsonKey(name: 'start_date', fromJson: parseDate) DateTime startDate, + @JsonKey(name: 'diet', fromJson: _parseDietId) int? dietId, + }); } /// @nodoc @@ -247,45 +262,55 @@ class _$ChosenDietModelCopyWithImpl<$Res, $Val extends ChosenDietModel> Object? startDate = null, Object? dietId = freezed, }) { - return _then(_value.copyWith( - chosenDietID: null == chosenDietID - ? _value.chosenDietID - : chosenDietID // ignore: cast_nullable_to_non_nullable - as int, - chosenPlanId: null == chosenPlanId - ? _value.chosenPlanId - : chosenPlanId // ignore: cast_nullable_to_non_nullable - as int, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String, - startDate: null == startDate - ? _value.startDate - : startDate // ignore: cast_nullable_to_non_nullable - as DateTime, - dietId: freezed == dietId - ? _value.dietId - : dietId // ignore: cast_nullable_to_non_nullable - as int?, - ) as $Val); + return _then( + _value.copyWith( + chosenDietID: + null == chosenDietID + ? _value.chosenDietID + : chosenDietID // ignore: cast_nullable_to_non_nullable + as int, + chosenPlanId: + null == chosenPlanId + ? _value.chosenPlanId + : chosenPlanId // ignore: cast_nullable_to_non_nullable + as int, + state: + null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String, + startDate: + null == startDate + ? _value.startDate + : startDate // ignore: cast_nullable_to_non_nullable + as DateTime, + dietId: + freezed == dietId + ? _value.dietId + : dietId // ignore: cast_nullable_to_non_nullable + as int?, + ) + as $Val, + ); } } /// @nodoc abstract class _$$ChosenDietModelImplCopyWith<$Res> implements $ChosenDietModelCopyWith<$Res> { - factory _$$ChosenDietModelImplCopyWith(_$ChosenDietModelImpl value, - $Res Function(_$ChosenDietModelImpl) then) = - __$$ChosenDietModelImplCopyWithImpl<$Res>; + factory _$$ChosenDietModelImplCopyWith( + _$ChosenDietModelImpl value, + $Res Function(_$ChosenDietModelImpl) then, + ) = __$$ChosenDietModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: 'id') int chosenDietID, - @JsonKey(name: 'chosen_plan_id') int chosenPlanId, - @JsonKey() String state, - @JsonKey(name: 'start_date', fromJson: parseDate) DateTime startDate, - @JsonKey(name: 'diet', fromJson: _parseDietId) int? dietId}); + $Res call({ + @JsonKey(name: 'id') int chosenDietID, + @JsonKey(name: 'chosen_plan_id') int chosenPlanId, + @JsonKey() String state, + @JsonKey(name: 'start_date', fromJson: parseDate) DateTime startDate, + @JsonKey(name: 'diet', fromJson: _parseDietId) int? dietId, + }); } /// @nodoc @@ -293,8 +318,9 @@ class __$$ChosenDietModelImplCopyWithImpl<$Res> extends _$ChosenDietModelCopyWithImpl<$Res, _$ChosenDietModelImpl> implements _$$ChosenDietModelImplCopyWith<$Res> { __$$ChosenDietModelImplCopyWithImpl( - _$ChosenDietModelImpl _value, $Res Function(_$ChosenDietModelImpl) _then) - : super(_value, _then); + _$ChosenDietModelImpl _value, + $Res Function(_$ChosenDietModelImpl) _then, + ) : super(_value, _then); /// Create a copy of ChosenDietModel /// with the given fields replaced by the non-null parameter values. @@ -307,40 +333,48 @@ class __$$ChosenDietModelImplCopyWithImpl<$Res> Object? startDate = null, Object? dietId = freezed, }) { - return _then(_$ChosenDietModelImpl( - chosenDietID: null == chosenDietID - ? _value.chosenDietID - : chosenDietID // ignore: cast_nullable_to_non_nullable - as int, - chosenPlanId: null == chosenPlanId - ? _value.chosenPlanId - : chosenPlanId // ignore: cast_nullable_to_non_nullable - as int, - state: null == state - ? _value.state - : state // ignore: cast_nullable_to_non_nullable - as String, - startDate: null == startDate - ? _value.startDate - : startDate // ignore: cast_nullable_to_non_nullable - as DateTime, - dietId: freezed == dietId - ? _value.dietId - : dietId // ignore: cast_nullable_to_non_nullable - as int?, - )); + return _then( + _$ChosenDietModelImpl( + chosenDietID: + null == chosenDietID + ? _value.chosenDietID + : chosenDietID // ignore: cast_nullable_to_non_nullable + as int, + chosenPlanId: + null == chosenPlanId + ? _value.chosenPlanId + : chosenPlanId // ignore: cast_nullable_to_non_nullable + as int, + state: + null == state + ? _value.state + : state // ignore: cast_nullable_to_non_nullable + as String, + startDate: + null == startDate + ? _value.startDate + : startDate // ignore: cast_nullable_to_non_nullable + as DateTime, + dietId: + freezed == dietId + ? _value.dietId + : dietId // ignore: cast_nullable_to_non_nullable + as int?, + ), + ); } } /// @nodoc @JsonSerializable() class _$ChosenDietModelImpl implements _ChosenDietModel { - _$ChosenDietModelImpl( - {@JsonKey(name: 'id') required this.chosenDietID, - @JsonKey(name: 'chosen_plan_id') required this.chosenPlanId, - @JsonKey() required this.state, - @JsonKey(name: 'start_date', fromJson: parseDate) required this.startDate, - @JsonKey(name: 'diet', fromJson: _parseDietId) required this.dietId}); + _$ChosenDietModelImpl({ + @JsonKey(name: 'id') required this.chosenDietID, + @JsonKey(name: 'chosen_plan_id') required this.chosenPlanId, + @JsonKey() required this.state, + @JsonKey(name: 'start_date', fromJson: parseDate) required this.startDate, + @JsonKey(name: 'diet', fromJson: _parseDietId) required this.dietId, + }); factory _$ChosenDietModelImpl.fromJson(Map json) => _$$ChosenDietModelImplFromJson(json); @@ -384,7 +418,13 @@ class _$ChosenDietModelImpl implements _ChosenDietModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, chosenDietID, chosenPlanId, state, startDate, dietId); + runtimeType, + chosenDietID, + chosenPlanId, + state, + startDate, + dietId, + ); /// Create a copy of ChosenDietModel /// with the given fields replaced by the non-null parameter values. @@ -393,25 +433,25 @@ class _$ChosenDietModelImpl implements _ChosenDietModel { @pragma('vm:prefer-inline') _$$ChosenDietModelImplCopyWith<_$ChosenDietModelImpl> get copyWith => __$$ChosenDietModelImplCopyWithImpl<_$ChosenDietModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$ChosenDietModelImplToJson( - this, - ); + return _$$ChosenDietModelImplToJson(this); } } abstract class _ChosenDietModel implements ChosenDietModel { - factory _ChosenDietModel( - {@JsonKey(name: 'id') required final int chosenDietID, - @JsonKey(name: 'chosen_plan_id') required final int chosenPlanId, - @JsonKey() required final String state, - @JsonKey(name: 'start_date', fromJson: parseDate) - required final DateTime startDate, - @JsonKey(name: 'diet', fromJson: _parseDietId) - required final int? dietId}) = _$ChosenDietModelImpl; + factory _ChosenDietModel({ + @JsonKey(name: 'id') required final int chosenDietID, + @JsonKey(name: 'chosen_plan_id') required final int chosenPlanId, + @JsonKey() required final String state, + @JsonKey(name: 'start_date', fromJson: parseDate) + required final DateTime startDate, + @JsonKey(name: 'diet', fromJson: _parseDietId) required final int? dietId, + }) = _$ChosenDietModelImpl; factory _ChosenDietModel.fromJson(Map json) = _$ChosenDietModelImpl.fromJson; diff --git a/lib/features/profile/models/chosen_diets_pagination_model.g.dart b/lib/features/profile/models/chosen_diets_pagination_model.g.dart index 75d8ffa1..8205bb38 100644 --- a/lib/features/profile/models/chosen_diets_pagination_model.g.dart +++ b/lib/features/profile/models/chosen_diets_pagination_model.g.dart @@ -7,35 +7,34 @@ part of 'chosen_diets_pagination_model.dart'; // ************************************************************************** _$ChosenDietsPaginationModelImpl _$$ChosenDietsPaginationModelImplFromJson( - Map json) => - _$ChosenDietsPaginationModelImpl( - diets: (json['data'] as List) + Map json, +) => _$ChosenDietsPaginationModelImpl( + diets: + (json['data'] as List) .map((e) => ChosenDietModel.fromJson(e as Map)) .toList(), - ); +); Map _$$ChosenDietsPaginationModelImplToJson( - _$ChosenDietsPaginationModelImpl instance) => - { - 'data': instance.diets, - }; + _$ChosenDietsPaginationModelImpl instance, +) => {'data': instance.diets}; _$ChosenDietModelImpl _$$ChosenDietModelImplFromJson( - Map json) => - _$ChosenDietModelImpl( - chosenDietID: (json['id'] as num).toInt(), - chosenPlanId: (json['chosen_plan_id'] as num).toInt(), - state: json['state'] as String, - startDate: parseDate(json['start_date'] as String), - dietId: _parseDietId(json['diet']), - ); + Map json, +) => _$ChosenDietModelImpl( + chosenDietID: (json['id'] as num).toInt(), + chosenPlanId: (json['chosen_plan_id'] as num).toInt(), + state: json['state'] as String, + startDate: parseDate(json['start_date'] as String), + dietId: _parseDietId(json['diet']), +); Map _$$ChosenDietModelImplToJson( - _$ChosenDietModelImpl instance) => - { - 'id': instance.chosenDietID, - 'chosen_plan_id': instance.chosenPlanId, - 'state': instance.state, - 'start_date': instance.startDate.toIso8601String(), - 'diet': instance.dietId, - }; + _$ChosenDietModelImpl instance, +) => { + 'id': instance.chosenDietID, + 'chosen_plan_id': instance.chosenPlanId, + 'state': instance.state, + 'start_date': instance.startDate.toIso8601String(), + 'diet': instance.dietId, +}; diff --git a/lib/features/profile/models/circumference_model.freezed.dart b/lib/features/profile/models/circumference_model.freezed.dart index 870620f3..f782ab75 100644 --- a/lib/features/profile/models/circumference_model.freezed.dart +++ b/lib/features/profile/models/circumference_model.freezed.dart @@ -12,7 +12,8 @@ part of 'circumference_model.dart'; 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'); + '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', +); CircumferenceModel _$CircumferenceModelFromJson(Map json) { return _CircumferenceModel.fromJson(json); @@ -48,17 +49,19 @@ mixin _$CircumferenceModel { /// @nodoc abstract class $CircumferenceModelCopyWith<$Res> { factory $CircumferenceModelCopyWith( - CircumferenceModel value, $Res Function(CircumferenceModel) then) = - _$CircumferenceModelCopyWithImpl<$Res, CircumferenceModel>; + CircumferenceModel value, + $Res Function(CircumferenceModel) then, + ) = _$CircumferenceModelCopyWithImpl<$Res, CircumferenceModel>; @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "user_id") int userId, - @JsonKey(name: "chest_circumference") int chestCircumference, - @JsonKey(name: "waist_circumference") int waistCircumference, - @JsonKey(name: "hip_circumference") int hipCircumference, - @JsonKey(name: "created_at") DateTime createdAt, - @JsonKey(name: "updated_at") DateTime updatedAt}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "user_id") int userId, + @JsonKey(name: "chest_circumference") int chestCircumference, + @JsonKey(name: "waist_circumference") int waistCircumference, + @JsonKey(name: "hip_circumference") int hipCircumference, + @JsonKey(name: "created_at") DateTime createdAt, + @JsonKey(name: "updated_at") DateTime updatedAt, + }); } /// @nodoc @@ -84,64 +87,77 @@ class _$CircumferenceModelCopyWithImpl<$Res, $Val extends CircumferenceModel> Object? createdAt = null, Object? updatedAt = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - userId: null == userId - ? _value.userId - : userId // ignore: cast_nullable_to_non_nullable - as int, - chestCircumference: null == chestCircumference - ? _value.chestCircumference - : chestCircumference // ignore: cast_nullable_to_non_nullable - as int, - waistCircumference: null == waistCircumference - ? _value.waistCircumference - : waistCircumference // ignore: cast_nullable_to_non_nullable - as int, - hipCircumference: null == hipCircumference - ? _value.hipCircumference - : hipCircumference // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + userId: + null == userId + ? _value.userId + : userId // ignore: cast_nullable_to_non_nullable + as int, + chestCircumference: + null == chestCircumference + ? _value.chestCircumference + : chestCircumference // ignore: cast_nullable_to_non_nullable + as int, + waistCircumference: + null == waistCircumference + ? _value.waistCircumference + : waistCircumference // ignore: cast_nullable_to_non_nullable + as int, + hipCircumference: + null == hipCircumference + ? _value.hipCircumference + : hipCircumference // ignore: cast_nullable_to_non_nullable + as int, + createdAt: + null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: + null == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + ) + as $Val, + ); } } /// @nodoc abstract class _$$CircumferenceModelImplCopyWith<$Res> implements $CircumferenceModelCopyWith<$Res> { - factory _$$CircumferenceModelImplCopyWith(_$CircumferenceModelImpl value, - $Res Function(_$CircumferenceModelImpl) then) = - __$$CircumferenceModelImplCopyWithImpl<$Res>; + factory _$$CircumferenceModelImplCopyWith( + _$CircumferenceModelImpl value, + $Res Function(_$CircumferenceModelImpl) then, + ) = __$$CircumferenceModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "user_id") int userId, - @JsonKey(name: "chest_circumference") int chestCircumference, - @JsonKey(name: "waist_circumference") int waistCircumference, - @JsonKey(name: "hip_circumference") int hipCircumference, - @JsonKey(name: "created_at") DateTime createdAt, - @JsonKey(name: "updated_at") DateTime updatedAt}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "user_id") int userId, + @JsonKey(name: "chest_circumference") int chestCircumference, + @JsonKey(name: "waist_circumference") int waistCircumference, + @JsonKey(name: "hip_circumference") int hipCircumference, + @JsonKey(name: "created_at") DateTime createdAt, + @JsonKey(name: "updated_at") DateTime updatedAt, + }); } /// @nodoc class __$$CircumferenceModelImplCopyWithImpl<$Res> extends _$CircumferenceModelCopyWithImpl<$Res, _$CircumferenceModelImpl> implements _$$CircumferenceModelImplCopyWith<$Res> { - __$$CircumferenceModelImplCopyWithImpl(_$CircumferenceModelImpl _value, - $Res Function(_$CircumferenceModelImpl) _then) - : super(_value, _then); + __$$CircumferenceModelImplCopyWithImpl( + _$CircumferenceModelImpl _value, + $Res Function(_$CircumferenceModelImpl) _then, + ) : super(_value, _then); /// Create a copy of CircumferenceModel /// with the given fields replaced by the non-null parameter values. @@ -156,50 +172,60 @@ class __$$CircumferenceModelImplCopyWithImpl<$Res> Object? createdAt = null, Object? updatedAt = null, }) { - return _then(_$CircumferenceModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - userId: null == userId - ? _value.userId - : userId // ignore: cast_nullable_to_non_nullable - as int, - chestCircumference: null == chestCircumference - ? _value.chestCircumference - : chestCircumference // ignore: cast_nullable_to_non_nullable - as int, - waistCircumference: null == waistCircumference - ? _value.waistCircumference - : waistCircumference // ignore: cast_nullable_to_non_nullable - as int, - hipCircumference: null == hipCircumference - ? _value.hipCircumference - : hipCircumference // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - )); + return _then( + _$CircumferenceModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + userId: + null == userId + ? _value.userId + : userId // ignore: cast_nullable_to_non_nullable + as int, + chestCircumference: + null == chestCircumference + ? _value.chestCircumference + : chestCircumference // ignore: cast_nullable_to_non_nullable + as int, + waistCircumference: + null == waistCircumference + ? _value.waistCircumference + : waistCircumference // ignore: cast_nullable_to_non_nullable + as int, + hipCircumference: + null == hipCircumference + ? _value.hipCircumference + : hipCircumference // ignore: cast_nullable_to_non_nullable + as int, + createdAt: + null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: + null == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + ), + ); } } /// @nodoc @JsonSerializable() class _$CircumferenceModelImpl implements _CircumferenceModel { - const _$CircumferenceModelImpl( - {@JsonKey(name: "id") required this.id, - @JsonKey(name: "user_id") required this.userId, - @JsonKey(name: "chest_circumference") required this.chestCircumference, - @JsonKey(name: "waist_circumference") required this.waistCircumference, - @JsonKey(name: "hip_circumference") required this.hipCircumference, - @JsonKey(name: "created_at") required this.createdAt, - @JsonKey(name: "updated_at") required this.updatedAt}); + const _$CircumferenceModelImpl({ + @JsonKey(name: "id") required this.id, + @JsonKey(name: "user_id") required this.userId, + @JsonKey(name: "chest_circumference") required this.chestCircumference, + @JsonKey(name: "waist_circumference") required this.waistCircumference, + @JsonKey(name: "hip_circumference") required this.hipCircumference, + @JsonKey(name: "created_at") required this.createdAt, + @JsonKey(name: "updated_at") required this.updatedAt, + }); factory _$CircumferenceModelImpl.fromJson(Map json) => _$$CircumferenceModelImplFromJson(json); @@ -252,8 +278,16 @@ class _$CircumferenceModelImpl implements _CircumferenceModel { @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, id, userId, chestCircumference, - waistCircumference, hipCircumference, createdAt, updatedAt); + int get hashCode => Object.hash( + runtimeType, + id, + userId, + chestCircumference, + waistCircumference, + hipCircumference, + createdAt, + updatedAt, + ); /// Create a copy of CircumferenceModel /// with the given fields replaced by the non-null parameter values. @@ -262,28 +296,26 @@ class _$CircumferenceModelImpl implements _CircumferenceModel { @pragma('vm:prefer-inline') _$$CircumferenceModelImplCopyWith<_$CircumferenceModelImpl> get copyWith => __$$CircumferenceModelImplCopyWithImpl<_$CircumferenceModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$CircumferenceModelImplToJson( - this, - ); + return _$$CircumferenceModelImplToJson(this); } } abstract class _CircumferenceModel implements CircumferenceModel { - const factory _CircumferenceModel( - {@JsonKey(name: "id") required final int id, - @JsonKey(name: "user_id") required final int userId, - @JsonKey(name: "chest_circumference") - required final int chestCircumference, - @JsonKey(name: "waist_circumference") - required final int waistCircumference, - @JsonKey(name: "hip_circumference") required final int hipCircumference, - @JsonKey(name: "created_at") required final DateTime createdAt, - @JsonKey(name: "updated_at") - required final DateTime updatedAt}) = _$CircumferenceModelImpl; + const factory _CircumferenceModel({ + @JsonKey(name: "id") required final int id, + @JsonKey(name: "user_id") required final int userId, + @JsonKey(name: "chest_circumference") required final int chestCircumference, + @JsonKey(name: "waist_circumference") required final int waistCircumference, + @JsonKey(name: "hip_circumference") required final int hipCircumference, + @JsonKey(name: "created_at") required final DateTime createdAt, + @JsonKey(name: "updated_at") required final DateTime updatedAt, + }) = _$CircumferenceModelImpl; factory _CircumferenceModel.fromJson(Map json) = _$CircumferenceModelImpl.fromJson; diff --git a/lib/features/profile/models/circumference_model.g.dart b/lib/features/profile/models/circumference_model.g.dart index 07a10f71..7ae8597b 100644 --- a/lib/features/profile/models/circumference_model.g.dart +++ b/lib/features/profile/models/circumference_model.g.dart @@ -7,25 +7,25 @@ part of 'circumference_model.dart'; // ************************************************************************** _$CircumferenceModelImpl _$$CircumferenceModelImplFromJson( - Map json) => - _$CircumferenceModelImpl( - id: (json['id'] as num).toInt(), - userId: (json['user_id'] as num).toInt(), - chestCircumference: (json['chest_circumference'] as num).toInt(), - waistCircumference: (json['waist_circumference'] as num).toInt(), - hipCircumference: (json['hip_circumference'] as num).toInt(), - createdAt: DateTime.parse(json['created_at'] as String), - updatedAt: DateTime.parse(json['updated_at'] as String), - ); + Map json, +) => _$CircumferenceModelImpl( + id: (json['id'] as num).toInt(), + userId: (json['user_id'] as num).toInt(), + chestCircumference: (json['chest_circumference'] as num).toInt(), + waistCircumference: (json['waist_circumference'] as num).toInt(), + hipCircumference: (json['hip_circumference'] as num).toInt(), + createdAt: DateTime.parse(json['created_at'] as String), + updatedAt: DateTime.parse(json['updated_at'] as String), +); Map _$$CircumferenceModelImplToJson( - _$CircumferenceModelImpl instance) => - { - 'id': instance.id, - 'user_id': instance.userId, - 'chest_circumference': instance.chestCircumference, - 'waist_circumference': instance.waistCircumference, - 'hip_circumference': instance.hipCircumference, - 'created_at': instance.createdAt.toIso8601String(), - 'updated_at': instance.updatedAt.toIso8601String(), - }; + _$CircumferenceModelImpl instance, +) => { + 'id': instance.id, + 'user_id': instance.userId, + 'chest_circumference': instance.chestCircumference, + 'waist_circumference': instance.waistCircumference, + 'hip_circumference': instance.hipCircumference, + 'created_at': instance.createdAt.toIso8601String(), + 'updated_at': instance.updatedAt.toIso8601String(), +}; diff --git a/lib/features/profile/models/profile_model.freezed.dart b/lib/features/profile/models/profile_model.freezed.dart index 0f3eee2c..d459ad34 100644 --- a/lib/features/profile/models/profile_model.freezed.dart +++ b/lib/features/profile/models/profile_model.freezed.dart @@ -12,7 +12,8 @@ part of 'profile_model.dart'; 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'); + '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', +); ProfileModel _$ProfileModelFromJson(Map json) { return _ProfileModel.fromJson(json); @@ -71,28 +72,30 @@ mixin _$ProfileModel { /// @nodoc abstract class $ProfileModelCopyWith<$Res> { factory $ProfileModelCopyWith( - ProfileModel value, $Res Function(ProfileModel) then) = - _$ProfileModelCopyWithImpl<$Res, ProfileModel>; + ProfileModel value, + $Res Function(ProfileModel) then, + ) = _$ProfileModelCopyWithImpl<$Res, ProfileModel>; @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "name") String name, - @JsonKey(name: "email") String email, - @JsonKey(name: "rating_place") int? ratingPlace, - @JsonKey(name: "email_verified_at") DateTime? emailVerifiedAt, - @JsonKey(name: "created_at") DateTime? createdAt, - @JsonKey(name: "updated_at") DateTime? updatedAt, - @JsonKey(name: "is_public_profile") bool isPublicProfile, - @JsonKey(name: 'is_entity_subscribed_by_me') bool isEntitySubscribedByMe, - @JsonKey(name: "slug") String slug, - @JsonKey(name: "profile_photo_url") String profilePhotoUrl, - @JsonKey(name: "roles") List roles, - @JsonKey(name: "badges") List badges, - @JsonKey(name: "subscriptions") List subscriptions, - @JsonKey(name: "subscribers") List subscribers, - @JsonKey(name: "education_resource") EducationModel? educationResource, - @JsonKey(name: "cert_photos") - List? diplomasAndCertificates}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "name") String name, + @JsonKey(name: "email") String email, + @JsonKey(name: "rating_place") int? ratingPlace, + @JsonKey(name: "email_verified_at") DateTime? emailVerifiedAt, + @JsonKey(name: "created_at") DateTime? createdAt, + @JsonKey(name: "updated_at") DateTime? updatedAt, + @JsonKey(name: "is_public_profile") bool isPublicProfile, + @JsonKey(name: 'is_entity_subscribed_by_me') bool isEntitySubscribedByMe, + @JsonKey(name: "slug") String slug, + @JsonKey(name: "profile_photo_url") String profilePhotoUrl, + @JsonKey(name: "roles") List roles, + @JsonKey(name: "badges") List badges, + @JsonKey(name: "subscriptions") List subscriptions, + @JsonKey(name: "subscribers") List subscribers, + @JsonKey(name: "education_resource") EducationModel? educationResource, + @JsonKey(name: "cert_photos") + List? diplomasAndCertificates, + }); $EducationModelCopyWith<$Res>? get educationResource; } @@ -130,76 +133,96 @@ class _$ProfileModelCopyWithImpl<$Res, $Val extends ProfileModel> Object? educationResource = freezed, Object? diplomasAndCertificates = freezed, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - email: null == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String, - ratingPlace: freezed == ratingPlace - ? _value.ratingPlace - : ratingPlace // ignore: cast_nullable_to_non_nullable - as int?, - emailVerifiedAt: freezed == emailVerifiedAt - ? _value.emailVerifiedAt - : emailVerifiedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - createdAt: freezed == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - updatedAt: freezed == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - isPublicProfile: null == isPublicProfile - ? _value.isPublicProfile - : isPublicProfile // ignore: cast_nullable_to_non_nullable - as bool, - isEntitySubscribedByMe: null == isEntitySubscribedByMe - ? _value.isEntitySubscribedByMe - : isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable - as bool, - slug: null == slug - ? _value.slug - : slug // ignore: cast_nullable_to_non_nullable - as String, - profilePhotoUrl: null == profilePhotoUrl - ? _value.profilePhotoUrl - : profilePhotoUrl // ignore: cast_nullable_to_non_nullable - as String, - roles: null == roles - ? _value.roles - : roles // ignore: cast_nullable_to_non_nullable - as List, - badges: null == badges - ? _value.badges - : badges // ignore: cast_nullable_to_non_nullable - as List, - subscriptions: null == subscriptions - ? _value.subscriptions - : subscriptions // ignore: cast_nullable_to_non_nullable - as List, - subscribers: null == subscribers - ? _value.subscribers - : subscribers // ignore: cast_nullable_to_non_nullable - as List, - educationResource: freezed == educationResource - ? _value.educationResource - : educationResource // ignore: cast_nullable_to_non_nullable - as EducationModel?, - diplomasAndCertificates: freezed == diplomasAndCertificates - ? _value.diplomasAndCertificates - : diplomasAndCertificates // ignore: cast_nullable_to_non_nullable - as List?, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + email: + null == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as String, + ratingPlace: + freezed == ratingPlace + ? _value.ratingPlace + : ratingPlace // ignore: cast_nullable_to_non_nullable + as int?, + emailVerifiedAt: + freezed == emailVerifiedAt + ? _value.emailVerifiedAt + : emailVerifiedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + createdAt: + freezed == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + updatedAt: + freezed == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + isPublicProfile: + null == isPublicProfile + ? _value.isPublicProfile + : isPublicProfile // ignore: cast_nullable_to_non_nullable + as bool, + isEntitySubscribedByMe: + null == isEntitySubscribedByMe + ? _value.isEntitySubscribedByMe + : isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable + as bool, + slug: + null == slug + ? _value.slug + : slug // ignore: cast_nullable_to_non_nullable + as String, + profilePhotoUrl: + null == profilePhotoUrl + ? _value.profilePhotoUrl + : profilePhotoUrl // ignore: cast_nullable_to_non_nullable + as String, + roles: + null == roles + ? _value.roles + : roles // ignore: cast_nullable_to_non_nullable + as List, + badges: + null == badges + ? _value.badges + : badges // ignore: cast_nullable_to_non_nullable + as List, + subscriptions: + null == subscriptions + ? _value.subscriptions + : subscriptions // ignore: cast_nullable_to_non_nullable + as List, + subscribers: + null == subscribers + ? _value.subscribers + : subscribers // ignore: cast_nullable_to_non_nullable + as List, + educationResource: + freezed == educationResource + ? _value.educationResource + : educationResource // ignore: cast_nullable_to_non_nullable + as EducationModel?, + diplomasAndCertificates: + freezed == diplomasAndCertificates + ? _value.diplomasAndCertificates + : diplomasAndCertificates // ignore: cast_nullable_to_non_nullable + as List?, + ) + as $Val, + ); } /// Create a copy of ProfileModel @@ -221,29 +244,31 @@ class _$ProfileModelCopyWithImpl<$Res, $Val extends ProfileModel> abstract class _$$ProfileModelImplCopyWith<$Res> implements $ProfileModelCopyWith<$Res> { factory _$$ProfileModelImplCopyWith( - _$ProfileModelImpl value, $Res Function(_$ProfileModelImpl) then) = - __$$ProfileModelImplCopyWithImpl<$Res>; + _$ProfileModelImpl value, + $Res Function(_$ProfileModelImpl) then, + ) = __$$ProfileModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "name") String name, - @JsonKey(name: "email") String email, - @JsonKey(name: "rating_place") int? ratingPlace, - @JsonKey(name: "email_verified_at") DateTime? emailVerifiedAt, - @JsonKey(name: "created_at") DateTime? createdAt, - @JsonKey(name: "updated_at") DateTime? updatedAt, - @JsonKey(name: "is_public_profile") bool isPublicProfile, - @JsonKey(name: 'is_entity_subscribed_by_me') bool isEntitySubscribedByMe, - @JsonKey(name: "slug") String slug, - @JsonKey(name: "profile_photo_url") String profilePhotoUrl, - @JsonKey(name: "roles") List roles, - @JsonKey(name: "badges") List badges, - @JsonKey(name: "subscriptions") List subscriptions, - @JsonKey(name: "subscribers") List subscribers, - @JsonKey(name: "education_resource") EducationModel? educationResource, - @JsonKey(name: "cert_photos") - List? diplomasAndCertificates}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "name") String name, + @JsonKey(name: "email") String email, + @JsonKey(name: "rating_place") int? ratingPlace, + @JsonKey(name: "email_verified_at") DateTime? emailVerifiedAt, + @JsonKey(name: "created_at") DateTime? createdAt, + @JsonKey(name: "updated_at") DateTime? updatedAt, + @JsonKey(name: "is_public_profile") bool isPublicProfile, + @JsonKey(name: 'is_entity_subscribed_by_me') bool isEntitySubscribedByMe, + @JsonKey(name: "slug") String slug, + @JsonKey(name: "profile_photo_url") String profilePhotoUrl, + @JsonKey(name: "roles") List roles, + @JsonKey(name: "badges") List badges, + @JsonKey(name: "subscriptions") List subscriptions, + @JsonKey(name: "subscribers") List subscribers, + @JsonKey(name: "education_resource") EducationModel? educationResource, + @JsonKey(name: "cert_photos") + List? diplomasAndCertificates, + }); @override $EducationModelCopyWith<$Res>? get educationResource; @@ -254,8 +279,9 @@ class __$$ProfileModelImplCopyWithImpl<$Res> extends _$ProfileModelCopyWithImpl<$Res, _$ProfileModelImpl> implements _$$ProfileModelImplCopyWith<$Res> { __$$ProfileModelImplCopyWithImpl( - _$ProfileModelImpl _value, $Res Function(_$ProfileModelImpl) _then) - : super(_value, _then); + _$ProfileModelImpl _value, + $Res Function(_$ProfileModelImpl) _then, + ) : super(_value, _then); /// Create a copy of ProfileModel /// with the given fields replaced by the non-null parameter values. @@ -280,109 +306,128 @@ class __$$ProfileModelImplCopyWithImpl<$Res> Object? educationResource = freezed, Object? diplomasAndCertificates = freezed, }) { - return _then(_$ProfileModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - email: null == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String, - ratingPlace: freezed == ratingPlace - ? _value.ratingPlace - : ratingPlace // ignore: cast_nullable_to_non_nullable - as int?, - emailVerifiedAt: freezed == emailVerifiedAt - ? _value.emailVerifiedAt - : emailVerifiedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - createdAt: freezed == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - updatedAt: freezed == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - isPublicProfile: null == isPublicProfile - ? _value.isPublicProfile - : isPublicProfile // ignore: cast_nullable_to_non_nullable - as bool, - isEntitySubscribedByMe: null == isEntitySubscribedByMe - ? _value.isEntitySubscribedByMe - : isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable - as bool, - slug: null == slug - ? _value.slug - : slug // ignore: cast_nullable_to_non_nullable - as String, - profilePhotoUrl: null == profilePhotoUrl - ? _value.profilePhotoUrl - : profilePhotoUrl // ignore: cast_nullable_to_non_nullable - as String, - roles: null == roles - ? _value._roles - : roles // ignore: cast_nullable_to_non_nullable - as List, - badges: null == badges - ? _value._badges - : badges // ignore: cast_nullable_to_non_nullable - as List, - subscriptions: null == subscriptions - ? _value._subscriptions - : subscriptions // ignore: cast_nullable_to_non_nullable - as List, - subscribers: null == subscribers - ? _value._subscribers - : subscribers // ignore: cast_nullable_to_non_nullable - as List, - educationResource: freezed == educationResource - ? _value.educationResource - : educationResource // ignore: cast_nullable_to_non_nullable - as EducationModel?, - diplomasAndCertificates: freezed == diplomasAndCertificates - ? _value._diplomasAndCertificates - : diplomasAndCertificates // ignore: cast_nullable_to_non_nullable - as List?, - )); + return _then( + _$ProfileModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + email: + null == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as String, + ratingPlace: + freezed == ratingPlace + ? _value.ratingPlace + : ratingPlace // ignore: cast_nullable_to_non_nullable + as int?, + emailVerifiedAt: + freezed == emailVerifiedAt + ? _value.emailVerifiedAt + : emailVerifiedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + createdAt: + freezed == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + updatedAt: + freezed == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + isPublicProfile: + null == isPublicProfile + ? _value.isPublicProfile + : isPublicProfile // ignore: cast_nullable_to_non_nullable + as bool, + isEntitySubscribedByMe: + null == isEntitySubscribedByMe + ? _value.isEntitySubscribedByMe + : isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable + as bool, + slug: + null == slug + ? _value.slug + : slug // ignore: cast_nullable_to_non_nullable + as String, + profilePhotoUrl: + null == profilePhotoUrl + ? _value.profilePhotoUrl + : profilePhotoUrl // ignore: cast_nullable_to_non_nullable + as String, + roles: + null == roles + ? _value._roles + : roles // ignore: cast_nullable_to_non_nullable + as List, + badges: + null == badges + ? _value._badges + : badges // ignore: cast_nullable_to_non_nullable + as List, + subscriptions: + null == subscriptions + ? _value._subscriptions + : subscriptions // ignore: cast_nullable_to_non_nullable + as List, + subscribers: + null == subscribers + ? _value._subscribers + : subscribers // ignore: cast_nullable_to_non_nullable + as List, + educationResource: + freezed == educationResource + ? _value.educationResource + : educationResource // ignore: cast_nullable_to_non_nullable + as EducationModel?, + diplomasAndCertificates: + freezed == diplomasAndCertificates + ? _value._diplomasAndCertificates + : diplomasAndCertificates // ignore: cast_nullable_to_non_nullable + as List?, + ), + ); } } /// @nodoc @JsonSerializable() class _$ProfileModelImpl implements _ProfileModel { - const _$ProfileModelImpl( - {@JsonKey(name: "id") required this.id, - @JsonKey(name: "name") required this.name, - @JsonKey(name: "email") required this.email, - @JsonKey(name: "rating_place") this.ratingPlace, - @JsonKey(name: "email_verified_at") this.emailVerifiedAt, - @JsonKey(name: "created_at") this.createdAt, - @JsonKey(name: "updated_at") this.updatedAt, - @JsonKey(name: "is_public_profile") required this.isPublicProfile, - @JsonKey(name: 'is_entity_subscribed_by_me') - required this.isEntitySubscribedByMe, - @JsonKey(name: "slug") required this.slug, - @JsonKey(name: "profile_photo_url") required this.profilePhotoUrl, - @JsonKey(name: "roles") required final List roles, - @JsonKey(name: "badges") required final List badges, - @JsonKey(name: "subscriptions") - required final List subscriptions, - @JsonKey(name: "subscribers") - required final List subscribers, - @JsonKey(name: "education_resource") this.educationResource, - @JsonKey(name: "cert_photos") - final List? diplomasAndCertificates}) - : _roles = roles, - _badges = badges, - _subscriptions = subscriptions, - _subscribers = subscribers, - _diplomasAndCertificates = diplomasAndCertificates; + const _$ProfileModelImpl({ + @JsonKey(name: "id") required this.id, + @JsonKey(name: "name") required this.name, + @JsonKey(name: "email") required this.email, + @JsonKey(name: "rating_place") this.ratingPlace, + @JsonKey(name: "email_verified_at") this.emailVerifiedAt, + @JsonKey(name: "created_at") this.createdAt, + @JsonKey(name: "updated_at") this.updatedAt, + @JsonKey(name: "is_public_profile") required this.isPublicProfile, + @JsonKey(name: 'is_entity_subscribed_by_me') + required this.isEntitySubscribedByMe, + @JsonKey(name: "slug") required this.slug, + @JsonKey(name: "profile_photo_url") required this.profilePhotoUrl, + @JsonKey(name: "roles") required final List roles, + @JsonKey(name: "badges") required final List badges, + @JsonKey(name: "subscriptions") + required final List subscriptions, + @JsonKey(name: "subscribers") + required final List subscribers, + @JsonKey(name: "education_resource") this.educationResource, + @JsonKey(name: "cert_photos") + final List? diplomasAndCertificates, + }) : _roles = roles, + _badges = badges, + _subscriptions = subscriptions, + _subscribers = subscribers, + _diplomasAndCertificates = diplomasAndCertificates; factory _$ProfileModelImpl.fromJson(Map json) => _$$ProfileModelImplFromJson(json); @@ -501,37 +546,44 @@ class _$ProfileModelImpl implements _ProfileModel { other.profilePhotoUrl == profilePhotoUrl) && const DeepCollectionEquality().equals(other._roles, _roles) && const DeepCollectionEquality().equals(other._badges, _badges) && - const DeepCollectionEquality() - .equals(other._subscriptions, _subscriptions) && - const DeepCollectionEquality() - .equals(other._subscribers, _subscribers) && + const DeepCollectionEquality().equals( + other._subscriptions, + _subscriptions, + ) && + const DeepCollectionEquality().equals( + other._subscribers, + _subscribers, + ) && (identical(other.educationResource, educationResource) || other.educationResource == educationResource) && const DeepCollectionEquality().equals( - other._diplomasAndCertificates, _diplomasAndCertificates)); + other._diplomasAndCertificates, + _diplomasAndCertificates, + )); } @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - id, - name, - email, - ratingPlace, - emailVerifiedAt, - createdAt, - updatedAt, - isPublicProfile, - isEntitySubscribedByMe, - slug, - profilePhotoUrl, - const DeepCollectionEquality().hash(_roles), - const DeepCollectionEquality().hash(_badges), - const DeepCollectionEquality().hash(_subscriptions), - const DeepCollectionEquality().hash(_subscribers), - educationResource, - const DeepCollectionEquality().hash(_diplomasAndCertificates)); + runtimeType, + id, + name, + email, + ratingPlace, + emailVerifiedAt, + createdAt, + updatedAt, + isPublicProfile, + isEntitySubscribedByMe, + slug, + profilePhotoUrl, + const DeepCollectionEquality().hash(_roles), + const DeepCollectionEquality().hash(_badges), + const DeepCollectionEquality().hash(_subscriptions), + const DeepCollectionEquality().hash(_subscribers), + educationResource, + const DeepCollectionEquality().hash(_diplomasAndCertificates), + ); /// Create a copy of ProfileModel /// with the given fields replaced by the non-null parameter values. @@ -543,37 +595,35 @@ class _$ProfileModelImpl implements _ProfileModel { @override Map toJson() { - return _$$ProfileModelImplToJson( - this, - ); + return _$$ProfileModelImplToJson(this); } } abstract class _ProfileModel implements ProfileModel { - const factory _ProfileModel( - {@JsonKey(name: "id") required final int id, - @JsonKey(name: "name") required final String name, - @JsonKey(name: "email") required final String email, - @JsonKey(name: "rating_place") final int? ratingPlace, - @JsonKey(name: "email_verified_at") final DateTime? emailVerifiedAt, - @JsonKey(name: "created_at") final DateTime? createdAt, - @JsonKey(name: "updated_at") final DateTime? updatedAt, - @JsonKey(name: "is_public_profile") required final bool isPublicProfile, - @JsonKey(name: 'is_entity_subscribed_by_me') - required final bool isEntitySubscribedByMe, - @JsonKey(name: "slug") required final String slug, - @JsonKey(name: "profile_photo_url") required final String profilePhotoUrl, - @JsonKey(name: "roles") required final List roles, - @JsonKey(name: "badges") required final List badges, - @JsonKey(name: "subscriptions") - required final List subscriptions, - @JsonKey(name: "subscribers") - required final List subscribers, - @JsonKey(name: "education_resource") - final EducationModel? educationResource, - @JsonKey(name: "cert_photos") - final List? - diplomasAndCertificates}) = _$ProfileModelImpl; + const factory _ProfileModel({ + @JsonKey(name: "id") required final int id, + @JsonKey(name: "name") required final String name, + @JsonKey(name: "email") required final String email, + @JsonKey(name: "rating_place") final int? ratingPlace, + @JsonKey(name: "email_verified_at") final DateTime? emailVerifiedAt, + @JsonKey(name: "created_at") final DateTime? createdAt, + @JsonKey(name: "updated_at") final DateTime? updatedAt, + @JsonKey(name: "is_public_profile") required final bool isPublicProfile, + @JsonKey(name: 'is_entity_subscribed_by_me') + required final bool isEntitySubscribedByMe, + @JsonKey(name: "slug") required final String slug, + @JsonKey(name: "profile_photo_url") required final String profilePhotoUrl, + @JsonKey(name: "roles") required final List roles, + @JsonKey(name: "badges") required final List badges, + @JsonKey(name: "subscriptions") + required final List subscriptions, + @JsonKey(name: "subscribers") + required final List subscribers, + @JsonKey(name: "education_resource") + final EducationModel? educationResource, + @JsonKey(name: "cert_photos") + final List? diplomasAndCertificates, + }) = _$ProfileModelImpl; factory _ProfileModel.fromJson(Map json) = _$ProfileModelImpl.fromJson; @@ -639,7 +689,8 @@ abstract class _ProfileModel implements ProfileModel { } DiplomasAndCertificatesModel _$DiplomasAndCertificatesModelFromJson( - Map json) { + Map json, +) { return _DiplomasAndCertificatesModel.fromJson(json); } @@ -655,23 +706,28 @@ mixin _$DiplomasAndCertificatesModel { /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) $DiplomasAndCertificatesModelCopyWith - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class $DiplomasAndCertificatesModelCopyWith<$Res> { factory $DiplomasAndCertificatesModelCopyWith( - DiplomasAndCertificatesModel value, - $Res Function(DiplomasAndCertificatesModel) then) = - _$DiplomasAndCertificatesModelCopyWithImpl<$Res, - DiplomasAndCertificatesModel>; + DiplomasAndCertificatesModel value, + $Res Function(DiplomasAndCertificatesModel) then, + ) = + _$DiplomasAndCertificatesModelCopyWithImpl< + $Res, + DiplomasAndCertificatesModel + >; @useResult $Res call({int id, String path}); } /// @nodoc -class _$DiplomasAndCertificatesModelCopyWithImpl<$Res, - $Val extends DiplomasAndCertificatesModel> +class _$DiplomasAndCertificatesModelCopyWithImpl< + $Res, + $Val extends DiplomasAndCertificatesModel +> implements $DiplomasAndCertificatesModelCopyWith<$Res> { _$DiplomasAndCertificatesModelCopyWithImpl(this._value, this._then); @@ -684,20 +740,22 @@ class _$DiplomasAndCertificatesModelCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? path = null, - }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - path: null == path - ? _value.path - : path // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? id = null, Object? path = null}) { + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + path: + null == path + ? _value.path + : path // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } @@ -705,9 +763,9 @@ class _$DiplomasAndCertificatesModelCopyWithImpl<$Res, abstract class _$$DiplomasAndCertificatesModelImplCopyWith<$Res> implements $DiplomasAndCertificatesModelCopyWith<$Res> { factory _$$DiplomasAndCertificatesModelImplCopyWith( - _$DiplomasAndCertificatesModelImpl value, - $Res Function(_$DiplomasAndCertificatesModelImpl) then) = - __$$DiplomasAndCertificatesModelImplCopyWithImpl<$Res>; + _$DiplomasAndCertificatesModelImpl value, + $Res Function(_$DiplomasAndCertificatesModelImpl) then, + ) = __$$DiplomasAndCertificatesModelImplCopyWithImpl<$Res>; @override @useResult $Res call({int id, String path}); @@ -715,32 +773,36 @@ abstract class _$$DiplomasAndCertificatesModelImplCopyWith<$Res> /// @nodoc class __$$DiplomasAndCertificatesModelImplCopyWithImpl<$Res> - extends _$DiplomasAndCertificatesModelCopyWithImpl<$Res, - _$DiplomasAndCertificatesModelImpl> + extends + _$DiplomasAndCertificatesModelCopyWithImpl< + $Res, + _$DiplomasAndCertificatesModelImpl + > implements _$$DiplomasAndCertificatesModelImplCopyWith<$Res> { __$$DiplomasAndCertificatesModelImplCopyWithImpl( - _$DiplomasAndCertificatesModelImpl _value, - $Res Function(_$DiplomasAndCertificatesModelImpl) _then) - : super(_value, _then); + _$DiplomasAndCertificatesModelImpl _value, + $Res Function(_$DiplomasAndCertificatesModelImpl) _then, + ) : super(_value, _then); /// Create a copy of DiplomasAndCertificatesModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? id = null, - Object? path = null, - }) { - return _then(_$DiplomasAndCertificatesModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - path: null == path - ? _value.path - : path // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? id = null, Object? path = null}) { + return _then( + _$DiplomasAndCertificatesModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + path: + null == path + ? _value.path + : path // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -748,12 +810,14 @@ class __$$DiplomasAndCertificatesModelImplCopyWithImpl<$Res> @JsonSerializable() class _$DiplomasAndCertificatesModelImpl implements _DiplomasAndCertificatesModel { - const _$DiplomasAndCertificatesModelImpl( - {required this.id, required this.path}); + const _$DiplomasAndCertificatesModelImpl({ + required this.id, + required this.path, + }); factory _$DiplomasAndCertificatesModelImpl.fromJson( - Map json) => - _$$DiplomasAndCertificatesModelImplFromJson(json); + Map json, + ) => _$$DiplomasAndCertificatesModelImplFromJson(json); @override final int id; @@ -784,23 +848,24 @@ class _$DiplomasAndCertificatesModelImpl @override @pragma('vm:prefer-inline') _$$DiplomasAndCertificatesModelImplCopyWith< - _$DiplomasAndCertificatesModelImpl> - get copyWith => __$$DiplomasAndCertificatesModelImplCopyWithImpl< - _$DiplomasAndCertificatesModelImpl>(this, _$identity); + _$DiplomasAndCertificatesModelImpl + > + get copyWith => __$$DiplomasAndCertificatesModelImplCopyWithImpl< + _$DiplomasAndCertificatesModelImpl + >(this, _$identity); @override Map toJson() { - return _$$DiplomasAndCertificatesModelImplToJson( - this, - ); + return _$$DiplomasAndCertificatesModelImplToJson(this); } } abstract class _DiplomasAndCertificatesModel implements DiplomasAndCertificatesModel { - const factory _DiplomasAndCertificatesModel( - {required final int id, - required final String path}) = _$DiplomasAndCertificatesModelImpl; + const factory _DiplomasAndCertificatesModel({ + required final int id, + required final String path, + }) = _$DiplomasAndCertificatesModelImpl; factory _DiplomasAndCertificatesModel.fromJson(Map json) = _$DiplomasAndCertificatesModelImpl.fromJson; @@ -815,8 +880,9 @@ abstract class _DiplomasAndCertificatesModel @override @JsonKey(includeFromJson: false, includeToJson: false) _$$DiplomasAndCertificatesModelImplCopyWith< - _$DiplomasAndCertificatesModelImpl> - get copyWith => throw _privateConstructorUsedError; + _$DiplomasAndCertificatesModelImpl + > + get copyWith => throw _privateConstructorUsedError; } EducationModel _$EducationModelFromJson(Map json) { @@ -856,19 +922,21 @@ mixin _$EducationModel { /// @nodoc abstract class $EducationModelCopyWith<$Res> { factory $EducationModelCopyWith( - EducationModel value, $Res Function(EducationModel) then) = - _$EducationModelCopyWithImpl<$Res, EducationModel>; + EducationModel value, + $Res Function(EducationModel) then, + ) = _$EducationModelCopyWithImpl<$Res, EducationModel>; @useResult - $Res call( - {@JsonKey(name: "has_medical_education") int? hasMedicalEducation, - @JsonKey(name: "completed_cources") - List>? completedCourses, - @JsonKey(name: "vk_link") String? vkLink, - @JsonKey(name: "insta_link") String? instaLink, - @JsonKey(name: "fb_link") String? fbLink, - @JsonKey(name: "tg_link") String? tgLink, - @JsonKey(name: "personal_site_link") String? personalSiteLink, - @JsonKey(name: "request_state") String? requestState}); + $Res call({ + @JsonKey(name: "has_medical_education") int? hasMedicalEducation, + @JsonKey(name: "completed_cources") + List>? completedCourses, + @JsonKey(name: "vk_link") String? vkLink, + @JsonKey(name: "insta_link") String? instaLink, + @JsonKey(name: "fb_link") String? fbLink, + @JsonKey(name: "tg_link") String? tgLink, + @JsonKey(name: "personal_site_link") String? personalSiteLink, + @JsonKey(name: "request_state") String? requestState, + }); } /// @nodoc @@ -895,61 +963,74 @@ class _$EducationModelCopyWithImpl<$Res, $Val extends EducationModel> Object? personalSiteLink = freezed, Object? requestState = freezed, }) { - return _then(_value.copyWith( - hasMedicalEducation: freezed == hasMedicalEducation - ? _value.hasMedicalEducation - : hasMedicalEducation // ignore: cast_nullable_to_non_nullable - as int?, - completedCourses: freezed == completedCourses - ? _value.completedCourses - : completedCourses // ignore: cast_nullable_to_non_nullable - as List>?, - vkLink: freezed == vkLink - ? _value.vkLink - : vkLink // ignore: cast_nullable_to_non_nullable - as String?, - instaLink: freezed == instaLink - ? _value.instaLink - : instaLink // ignore: cast_nullable_to_non_nullable - as String?, - fbLink: freezed == fbLink - ? _value.fbLink - : fbLink // ignore: cast_nullable_to_non_nullable - as String?, - tgLink: freezed == tgLink - ? _value.tgLink - : tgLink // ignore: cast_nullable_to_non_nullable - as String?, - personalSiteLink: freezed == personalSiteLink - ? _value.personalSiteLink - : personalSiteLink // ignore: cast_nullable_to_non_nullable - as String?, - requestState: freezed == requestState - ? _value.requestState - : requestState // ignore: cast_nullable_to_non_nullable - as String?, - ) as $Val); + return _then( + _value.copyWith( + hasMedicalEducation: + freezed == hasMedicalEducation + ? _value.hasMedicalEducation + : hasMedicalEducation // ignore: cast_nullable_to_non_nullable + as int?, + completedCourses: + freezed == completedCourses + ? _value.completedCourses + : completedCourses // ignore: cast_nullable_to_non_nullable + as List>?, + vkLink: + freezed == vkLink + ? _value.vkLink + : vkLink // ignore: cast_nullable_to_non_nullable + as String?, + instaLink: + freezed == instaLink + ? _value.instaLink + : instaLink // ignore: cast_nullable_to_non_nullable + as String?, + fbLink: + freezed == fbLink + ? _value.fbLink + : fbLink // ignore: cast_nullable_to_non_nullable + as String?, + tgLink: + freezed == tgLink + ? _value.tgLink + : tgLink // ignore: cast_nullable_to_non_nullable + as String?, + personalSiteLink: + freezed == personalSiteLink + ? _value.personalSiteLink + : personalSiteLink // ignore: cast_nullable_to_non_nullable + as String?, + requestState: + freezed == requestState + ? _value.requestState + : requestState // ignore: cast_nullable_to_non_nullable + as String?, + ) + as $Val, + ); } } /// @nodoc abstract class _$$EducationModelImplCopyWith<$Res> implements $EducationModelCopyWith<$Res> { - factory _$$EducationModelImplCopyWith(_$EducationModelImpl value, - $Res Function(_$EducationModelImpl) then) = - __$$EducationModelImplCopyWithImpl<$Res>; + factory _$$EducationModelImplCopyWith( + _$EducationModelImpl value, + $Res Function(_$EducationModelImpl) then, + ) = __$$EducationModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "has_medical_education") int? hasMedicalEducation, - @JsonKey(name: "completed_cources") - List>? completedCourses, - @JsonKey(name: "vk_link") String? vkLink, - @JsonKey(name: "insta_link") String? instaLink, - @JsonKey(name: "fb_link") String? fbLink, - @JsonKey(name: "tg_link") String? tgLink, - @JsonKey(name: "personal_site_link") String? personalSiteLink, - @JsonKey(name: "request_state") String? requestState}); + $Res call({ + @JsonKey(name: "has_medical_education") int? hasMedicalEducation, + @JsonKey(name: "completed_cources") + List>? completedCourses, + @JsonKey(name: "vk_link") String? vkLink, + @JsonKey(name: "insta_link") String? instaLink, + @JsonKey(name: "fb_link") String? fbLink, + @JsonKey(name: "tg_link") String? tgLink, + @JsonKey(name: "personal_site_link") String? personalSiteLink, + @JsonKey(name: "request_state") String? requestState, + }); } /// @nodoc @@ -957,8 +1038,9 @@ class __$$EducationModelImplCopyWithImpl<$Res> extends _$EducationModelCopyWithImpl<$Res, _$EducationModelImpl> implements _$$EducationModelImplCopyWith<$Res> { __$$EducationModelImplCopyWithImpl( - _$EducationModelImpl _value, $Res Function(_$EducationModelImpl) _then) - : super(_value, _then); + _$EducationModelImpl _value, + $Res Function(_$EducationModelImpl) _then, + ) : super(_value, _then); /// Create a copy of EducationModel /// with the given fields replaced by the non-null parameter values. @@ -974,57 +1056,67 @@ class __$$EducationModelImplCopyWithImpl<$Res> Object? personalSiteLink = freezed, Object? requestState = freezed, }) { - return _then(_$EducationModelImpl( - hasMedicalEducation: freezed == hasMedicalEducation - ? _value.hasMedicalEducation - : hasMedicalEducation // ignore: cast_nullable_to_non_nullable - as int?, - completedCourses: freezed == completedCourses - ? _value._completedCourses - : completedCourses // ignore: cast_nullable_to_non_nullable - as List>?, - vkLink: freezed == vkLink - ? _value.vkLink - : vkLink // ignore: cast_nullable_to_non_nullable - as String?, - instaLink: freezed == instaLink - ? _value.instaLink - : instaLink // ignore: cast_nullable_to_non_nullable - as String?, - fbLink: freezed == fbLink - ? _value.fbLink - : fbLink // ignore: cast_nullable_to_non_nullable - as String?, - tgLink: freezed == tgLink - ? _value.tgLink - : tgLink // ignore: cast_nullable_to_non_nullable - as String?, - personalSiteLink: freezed == personalSiteLink - ? _value.personalSiteLink - : personalSiteLink // ignore: cast_nullable_to_non_nullable - as String?, - requestState: freezed == requestState - ? _value.requestState - : requestState // ignore: cast_nullable_to_non_nullable - as String?, - )); + return _then( + _$EducationModelImpl( + hasMedicalEducation: + freezed == hasMedicalEducation + ? _value.hasMedicalEducation + : hasMedicalEducation // ignore: cast_nullable_to_non_nullable + as int?, + completedCourses: + freezed == completedCourses + ? _value._completedCourses + : completedCourses // ignore: cast_nullable_to_non_nullable + as List>?, + vkLink: + freezed == vkLink + ? _value.vkLink + : vkLink // ignore: cast_nullable_to_non_nullable + as String?, + instaLink: + freezed == instaLink + ? _value.instaLink + : instaLink // ignore: cast_nullable_to_non_nullable + as String?, + fbLink: + freezed == fbLink + ? _value.fbLink + : fbLink // ignore: cast_nullable_to_non_nullable + as String?, + tgLink: + freezed == tgLink + ? _value.tgLink + : tgLink // ignore: cast_nullable_to_non_nullable + as String?, + personalSiteLink: + freezed == personalSiteLink + ? _value.personalSiteLink + : personalSiteLink // ignore: cast_nullable_to_non_nullable + as String?, + requestState: + freezed == requestState + ? _value.requestState + : requestState // ignore: cast_nullable_to_non_nullable + as String?, + ), + ); } } /// @nodoc @JsonSerializable() class _$EducationModelImpl implements _EducationModel { - const _$EducationModelImpl( - {@JsonKey(name: "has_medical_education") this.hasMedicalEducation, - @JsonKey(name: "completed_cources") - final List>? completedCourses, - @JsonKey(name: "vk_link") this.vkLink, - @JsonKey(name: "insta_link") this.instaLink, - @JsonKey(name: "fb_link") this.fbLink, - @JsonKey(name: "tg_link") this.tgLink, - @JsonKey(name: "personal_site_link") this.personalSiteLink, - @JsonKey(name: "request_state") this.requestState}) - : _completedCourses = completedCourses; + const _$EducationModelImpl({ + @JsonKey(name: "has_medical_education") this.hasMedicalEducation, + @JsonKey(name: "completed_cources") + final List>? completedCourses, + @JsonKey(name: "vk_link") this.vkLink, + @JsonKey(name: "insta_link") this.instaLink, + @JsonKey(name: "fb_link") this.fbLink, + @JsonKey(name: "tg_link") this.tgLink, + @JsonKey(name: "personal_site_link") this.personalSiteLink, + @JsonKey(name: "request_state") this.requestState, + }) : _completedCourses = completedCourses; factory _$EducationModelImpl.fromJson(Map json) => _$$EducationModelImplFromJson(json); @@ -1075,8 +1167,10 @@ class _$EducationModelImpl implements _EducationModel { other is _$EducationModelImpl && (identical(other.hasMedicalEducation, hasMedicalEducation) || other.hasMedicalEducation == hasMedicalEducation) && - const DeepCollectionEquality() - .equals(other._completedCourses, _completedCourses) && + const DeepCollectionEquality().equals( + other._completedCourses, + _completedCourses, + ) && (identical(other.vkLink, vkLink) || other.vkLink == vkLink) && (identical(other.instaLink, instaLink) || other.instaLink == instaLink) && @@ -1091,15 +1185,16 @@ class _$EducationModelImpl implements _EducationModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - hasMedicalEducation, - const DeepCollectionEquality().hash(_completedCourses), - vkLink, - instaLink, - fbLink, - tgLink, - personalSiteLink, - requestState); + runtimeType, + hasMedicalEducation, + const DeepCollectionEquality().hash(_completedCourses), + vkLink, + instaLink, + fbLink, + tgLink, + personalSiteLink, + requestState, + ); /// Create a copy of EducationModel /// with the given fields replaced by the non-null parameter values. @@ -1108,28 +1203,28 @@ class _$EducationModelImpl implements _EducationModel { @pragma('vm:prefer-inline') _$$EducationModelImplCopyWith<_$EducationModelImpl> get copyWith => __$$EducationModelImplCopyWithImpl<_$EducationModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$EducationModelImplToJson( - this, - ); + return _$$EducationModelImplToJson(this); } } abstract class _EducationModel implements EducationModel { - const factory _EducationModel( - {@JsonKey(name: "has_medical_education") final int? hasMedicalEducation, - @JsonKey(name: "completed_cources") - final List>? completedCourses, - @JsonKey(name: "vk_link") final String? vkLink, - @JsonKey(name: "insta_link") final String? instaLink, - @JsonKey(name: "fb_link") final String? fbLink, - @JsonKey(name: "tg_link") final String? tgLink, - @JsonKey(name: "personal_site_link") final String? personalSiteLink, - @JsonKey(name: "request_state") - final String? requestState}) = _$EducationModelImpl; + const factory _EducationModel({ + @JsonKey(name: "has_medical_education") final int? hasMedicalEducation, + @JsonKey(name: "completed_cources") + final List>? completedCourses, + @JsonKey(name: "vk_link") final String? vkLink, + @JsonKey(name: "insta_link") final String? instaLink, + @JsonKey(name: "fb_link") final String? fbLink, + @JsonKey(name: "tg_link") final String? tgLink, + @JsonKey(name: "personal_site_link") final String? personalSiteLink, + @JsonKey(name: "request_state") final String? requestState, + }) = _$EducationModelImpl; factory _EducationModel.fromJson(Map json) = _$EducationModelImpl.fromJson; @@ -1168,7 +1263,8 @@ abstract class _EducationModel implements EducationModel { } CompletedCoursesModel _$CompletedCoursesModelFromJson( - Map json) { + Map json, +) { return _CompletedCoursesModel.fromJson(json); } @@ -1189,16 +1285,19 @@ mixin _$CompletedCoursesModel { /// @nodoc abstract class $CompletedCoursesModelCopyWith<$Res> { - factory $CompletedCoursesModelCopyWith(CompletedCoursesModel value, - $Res Function(CompletedCoursesModel) then) = - _$CompletedCoursesModelCopyWithImpl<$Res, CompletedCoursesModel>; + factory $CompletedCoursesModelCopyWith( + CompletedCoursesModel value, + $Res Function(CompletedCoursesModel) then, + ) = _$CompletedCoursesModelCopyWithImpl<$Res, CompletedCoursesModel>; @useResult $Res call({String date, String title}); } /// @nodoc -class _$CompletedCoursesModelCopyWithImpl<$Res, - $Val extends CompletedCoursesModel> +class _$CompletedCoursesModelCopyWithImpl< + $Res, + $Val extends CompletedCoursesModel +> implements $CompletedCoursesModelCopyWith<$Res> { _$CompletedCoursesModelCopyWithImpl(this._value, this._then); @@ -1211,20 +1310,22 @@ class _$CompletedCoursesModelCopyWithImpl<$Res, /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? date = null, - Object? title = null, - }) { - return _then(_value.copyWith( - date: null == date - ? _value.date - : date // ignore: cast_nullable_to_non_nullable - as String, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? date = null, Object? title = null}) { + return _then( + _value.copyWith( + date: + null == date + ? _value.date + : date // ignore: cast_nullable_to_non_nullable + as String, + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } @@ -1232,9 +1333,9 @@ class _$CompletedCoursesModelCopyWithImpl<$Res, abstract class _$$CompletedCoursesModelImplCopyWith<$Res> implements $CompletedCoursesModelCopyWith<$Res> { factory _$$CompletedCoursesModelImplCopyWith( - _$CompletedCoursesModelImpl value, - $Res Function(_$CompletedCoursesModelImpl) then) = - __$$CompletedCoursesModelImplCopyWithImpl<$Res>; + _$CompletedCoursesModelImpl value, + $Res Function(_$CompletedCoursesModelImpl) then, + ) = __$$CompletedCoursesModelImplCopyWithImpl<$Res>; @override @useResult $Res call({String date, String title}); @@ -1242,31 +1343,33 @@ abstract class _$$CompletedCoursesModelImplCopyWith<$Res> /// @nodoc class __$$CompletedCoursesModelImplCopyWithImpl<$Res> - extends _$CompletedCoursesModelCopyWithImpl<$Res, - _$CompletedCoursesModelImpl> + extends + _$CompletedCoursesModelCopyWithImpl<$Res, _$CompletedCoursesModelImpl> implements _$$CompletedCoursesModelImplCopyWith<$Res> { - __$$CompletedCoursesModelImplCopyWithImpl(_$CompletedCoursesModelImpl _value, - $Res Function(_$CompletedCoursesModelImpl) _then) - : super(_value, _then); + __$$CompletedCoursesModelImplCopyWithImpl( + _$CompletedCoursesModelImpl _value, + $Res Function(_$CompletedCoursesModelImpl) _then, + ) : super(_value, _then); /// Create a copy of CompletedCoursesModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? date = null, - Object? title = null, - }) { - return _then(_$CompletedCoursesModelImpl( - date: null == date - ? _value.date - : date // ignore: cast_nullable_to_non_nullable - as String, - title: null == title - ? _value.title - : title // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? date = null, Object? title = null}) { + return _then( + _$CompletedCoursesModelImpl( + date: + null == date + ? _value.date + : date // ignore: cast_nullable_to_non_nullable + as String, + title: + null == title + ? _value.title + : title // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -1307,21 +1410,23 @@ class _$CompletedCoursesModelImpl implements _CompletedCoursesModel { @override @pragma('vm:prefer-inline') _$$CompletedCoursesModelImplCopyWith<_$CompletedCoursesModelImpl> - get copyWith => __$$CompletedCoursesModelImplCopyWithImpl< - _$CompletedCoursesModelImpl>(this, _$identity); + get copyWith => + __$$CompletedCoursesModelImplCopyWithImpl<_$CompletedCoursesModelImpl>( + this, + _$identity, + ); @override Map toJson() { - return _$$CompletedCoursesModelImplToJson( - this, - ); + return _$$CompletedCoursesModelImplToJson(this); } } abstract class _CompletedCoursesModel implements CompletedCoursesModel { - const factory _CompletedCoursesModel( - {required final String date, - required final String title}) = _$CompletedCoursesModelImpl; + const factory _CompletedCoursesModel({ + required final String date, + required final String title, + }) = _$CompletedCoursesModelImpl; factory _CompletedCoursesModel.fromJson(Map json) = _$CompletedCoursesModelImpl.fromJson; @@ -1336,7 +1441,7 @@ abstract class _CompletedCoursesModel implements CompletedCoursesModel { @override @JsonKey(includeFromJson: false, includeToJson: false) _$$CompletedCoursesModelImplCopyWith<_$CompletedCoursesModelImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } ProfileDetailsModel _$ProfileDetailsModelFromJson(Map json) { @@ -1413,37 +1518,39 @@ mixin _$ProfileDetailsModel { /// @nodoc abstract class $ProfileDetailsModelCopyWith<$Res> { factory $ProfileDetailsModelCopyWith( - ProfileDetailsModel value, $Res Function(ProfileDetailsModel) then) = - _$ProfileDetailsModelCopyWithImpl<$Res, ProfileDetailsModel>; + ProfileDetailsModel value, + $Res Function(ProfileDetailsModel) then, + ) = _$ProfileDetailsModelCopyWithImpl<$Res, ProfileDetailsModel>; @useResult - $Res call( - {@JsonKey(name: "first_name") String firstName, - @JsonKey(name: "last_name") String lastName, - @JsonKey(name: "birthdate") String birthdate, - @JsonKey(name: "gender") String gender, - @JsonKey(name: "country") String country, - @JsonKey(name: "city") String city, - @JsonKey(name: "lang") String lang, - @JsonKey(name: "weight") double weight, - @JsonKey(name: "height") int height, - @JsonKey(name: "chest_circumference") int chestCircumference, - @JsonKey(name: "waist_circumference") int waistCircumference, - @JsonKey(name: "hip_circumference") int hipCircumference, - @JsonKey(name: "blood_pressure_up") int bloodPressureUp, - @JsonKey(name: "blood_pressure_down") int bloodPressureDown, - @JsonKey(name: "has_hypo") bool hasHypo, - @JsonKey(name: "has_hyper") bool hasHyper, - @JsonKey(name: "about_alergy") String aboutAlergy, - @JsonKey(name: "about_taking_pils") String aboutTakingPils, - @JsonKey(name: "about_sport_hobbies") String aboutSportHobbies, - @JsonKey(name: "favorite_foods") String favoriteFoods, - @JsonKey(name: "unfavorite_foods") String unfavoriteFoods, - @JsonKey(name: "additional_info") String additionalInfo, - @JsonKey(name: "created_at") DateTime? createdAt, - @JsonKey(name: "updated_at") DateTime? updatedAt, - @JsonKey(name: "is_mood_fillable") bool isMoodFillable, - @JsonKey(name: "is_bedtime_fillable") bool isBedtimeFillable, - @JsonKey(name: "activity_coefficient") double activityCoefficient}); + $Res call({ + @JsonKey(name: "first_name") String firstName, + @JsonKey(name: "last_name") String lastName, + @JsonKey(name: "birthdate") String birthdate, + @JsonKey(name: "gender") String gender, + @JsonKey(name: "country") String country, + @JsonKey(name: "city") String city, + @JsonKey(name: "lang") String lang, + @JsonKey(name: "weight") double weight, + @JsonKey(name: "height") int height, + @JsonKey(name: "chest_circumference") int chestCircumference, + @JsonKey(name: "waist_circumference") int waistCircumference, + @JsonKey(name: "hip_circumference") int hipCircumference, + @JsonKey(name: "blood_pressure_up") int bloodPressureUp, + @JsonKey(name: "blood_pressure_down") int bloodPressureDown, + @JsonKey(name: "has_hypo") bool hasHypo, + @JsonKey(name: "has_hyper") bool hasHyper, + @JsonKey(name: "about_alergy") String aboutAlergy, + @JsonKey(name: "about_taking_pils") String aboutTakingPils, + @JsonKey(name: "about_sport_hobbies") String aboutSportHobbies, + @JsonKey(name: "favorite_foods") String favoriteFoods, + @JsonKey(name: "unfavorite_foods") String unfavoriteFoods, + @JsonKey(name: "additional_info") String additionalInfo, + @JsonKey(name: "created_at") DateTime? createdAt, + @JsonKey(name: "updated_at") DateTime? updatedAt, + @JsonKey(name: "is_mood_fillable") bool isMoodFillable, + @JsonKey(name: "is_bedtime_fillable") bool isBedtimeFillable, + @JsonKey(name: "activity_coefficient") double activityCoefficient, + }); } /// @nodoc @@ -1489,164 +1596,197 @@ class _$ProfileDetailsModelCopyWithImpl<$Res, $Val extends ProfileDetailsModel> Object? isBedtimeFillable = null, Object? activityCoefficient = null, }) { - return _then(_value.copyWith( - firstName: null == firstName - ? _value.firstName - : firstName // ignore: cast_nullable_to_non_nullable - as String, - lastName: null == lastName - ? _value.lastName - : lastName // ignore: cast_nullable_to_non_nullable - as String, - birthdate: null == birthdate - ? _value.birthdate - : birthdate // ignore: cast_nullable_to_non_nullable - as String, - gender: null == gender - ? _value.gender - : gender // ignore: cast_nullable_to_non_nullable - as String, - country: null == country - ? _value.country - : country // ignore: cast_nullable_to_non_nullable - as String, - city: null == city - ? _value.city - : city // ignore: cast_nullable_to_non_nullable - as String, - lang: null == lang - ? _value.lang - : lang // ignore: cast_nullable_to_non_nullable - as String, - weight: null == weight - ? _value.weight - : weight // ignore: cast_nullable_to_non_nullable - as double, - height: null == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as int, - chestCircumference: null == chestCircumference - ? _value.chestCircumference - : chestCircumference // ignore: cast_nullable_to_non_nullable - as int, - waistCircumference: null == waistCircumference - ? _value.waistCircumference - : waistCircumference // ignore: cast_nullable_to_non_nullable - as int, - hipCircumference: null == hipCircumference - ? _value.hipCircumference - : hipCircumference // ignore: cast_nullable_to_non_nullable - as int, - bloodPressureUp: null == bloodPressureUp - ? _value.bloodPressureUp - : bloodPressureUp // ignore: cast_nullable_to_non_nullable - as int, - bloodPressureDown: null == bloodPressureDown - ? _value.bloodPressureDown - : bloodPressureDown // ignore: cast_nullable_to_non_nullable - as int, - hasHypo: null == hasHypo - ? _value.hasHypo - : hasHypo // ignore: cast_nullable_to_non_nullable - as bool, - hasHyper: null == hasHyper - ? _value.hasHyper - : hasHyper // ignore: cast_nullable_to_non_nullable - as bool, - aboutAlergy: null == aboutAlergy - ? _value.aboutAlergy - : aboutAlergy // ignore: cast_nullable_to_non_nullable - as String, - aboutTakingPils: null == aboutTakingPils - ? _value.aboutTakingPils - : aboutTakingPils // ignore: cast_nullable_to_non_nullable - as String, - aboutSportHobbies: null == aboutSportHobbies - ? _value.aboutSportHobbies - : aboutSportHobbies // ignore: cast_nullable_to_non_nullable - as String, - favoriteFoods: null == favoriteFoods - ? _value.favoriteFoods - : favoriteFoods // ignore: cast_nullable_to_non_nullable - as String, - unfavoriteFoods: null == unfavoriteFoods - ? _value.unfavoriteFoods - : unfavoriteFoods // ignore: cast_nullable_to_non_nullable - as String, - additionalInfo: null == additionalInfo - ? _value.additionalInfo - : additionalInfo // ignore: cast_nullable_to_non_nullable - as String, - createdAt: freezed == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - updatedAt: freezed == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - isMoodFillable: null == isMoodFillable - ? _value.isMoodFillable - : isMoodFillable // ignore: cast_nullable_to_non_nullable - as bool, - isBedtimeFillable: null == isBedtimeFillable - ? _value.isBedtimeFillable - : isBedtimeFillable // ignore: cast_nullable_to_non_nullable - as bool, - activityCoefficient: null == activityCoefficient - ? _value.activityCoefficient - : activityCoefficient // ignore: cast_nullable_to_non_nullable - as double, - ) as $Val); + return _then( + _value.copyWith( + firstName: + null == firstName + ? _value.firstName + : firstName // ignore: cast_nullable_to_non_nullable + as String, + lastName: + null == lastName + ? _value.lastName + : lastName // ignore: cast_nullable_to_non_nullable + as String, + birthdate: + null == birthdate + ? _value.birthdate + : birthdate // ignore: cast_nullable_to_non_nullable + as String, + gender: + null == gender + ? _value.gender + : gender // ignore: cast_nullable_to_non_nullable + as String, + country: + null == country + ? _value.country + : country // ignore: cast_nullable_to_non_nullable + as String, + city: + null == city + ? _value.city + : city // ignore: cast_nullable_to_non_nullable + as String, + lang: + null == lang + ? _value.lang + : lang // ignore: cast_nullable_to_non_nullable + as String, + weight: + null == weight + ? _value.weight + : weight // ignore: cast_nullable_to_non_nullable + as double, + height: + null == height + ? _value.height + : height // ignore: cast_nullable_to_non_nullable + as int, + chestCircumference: + null == chestCircumference + ? _value.chestCircumference + : chestCircumference // ignore: cast_nullable_to_non_nullable + as int, + waistCircumference: + null == waistCircumference + ? _value.waistCircumference + : waistCircumference // ignore: cast_nullable_to_non_nullable + as int, + hipCircumference: + null == hipCircumference + ? _value.hipCircumference + : hipCircumference // ignore: cast_nullable_to_non_nullable + as int, + bloodPressureUp: + null == bloodPressureUp + ? _value.bloodPressureUp + : bloodPressureUp // ignore: cast_nullable_to_non_nullable + as int, + bloodPressureDown: + null == bloodPressureDown + ? _value.bloodPressureDown + : bloodPressureDown // ignore: cast_nullable_to_non_nullable + as int, + hasHypo: + null == hasHypo + ? _value.hasHypo + : hasHypo // ignore: cast_nullable_to_non_nullable + as bool, + hasHyper: + null == hasHyper + ? _value.hasHyper + : hasHyper // ignore: cast_nullable_to_non_nullable + as bool, + aboutAlergy: + null == aboutAlergy + ? _value.aboutAlergy + : aboutAlergy // ignore: cast_nullable_to_non_nullable + as String, + aboutTakingPils: + null == aboutTakingPils + ? _value.aboutTakingPils + : aboutTakingPils // ignore: cast_nullable_to_non_nullable + as String, + aboutSportHobbies: + null == aboutSportHobbies + ? _value.aboutSportHobbies + : aboutSportHobbies // ignore: cast_nullable_to_non_nullable + as String, + favoriteFoods: + null == favoriteFoods + ? _value.favoriteFoods + : favoriteFoods // ignore: cast_nullable_to_non_nullable + as String, + unfavoriteFoods: + null == unfavoriteFoods + ? _value.unfavoriteFoods + : unfavoriteFoods // ignore: cast_nullable_to_non_nullable + as String, + additionalInfo: + null == additionalInfo + ? _value.additionalInfo + : additionalInfo // ignore: cast_nullable_to_non_nullable + as String, + createdAt: + freezed == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + updatedAt: + freezed == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + isMoodFillable: + null == isMoodFillable + ? _value.isMoodFillable + : isMoodFillable // ignore: cast_nullable_to_non_nullable + as bool, + isBedtimeFillable: + null == isBedtimeFillable + ? _value.isBedtimeFillable + : isBedtimeFillable // ignore: cast_nullable_to_non_nullable + as bool, + activityCoefficient: + null == activityCoefficient + ? _value.activityCoefficient + : activityCoefficient // ignore: cast_nullable_to_non_nullable + as double, + ) + as $Val, + ); } } /// @nodoc abstract class _$$ProfileDetailsModelImplCopyWith<$Res> implements $ProfileDetailsModelCopyWith<$Res> { - factory _$$ProfileDetailsModelImplCopyWith(_$ProfileDetailsModelImpl value, - $Res Function(_$ProfileDetailsModelImpl) then) = - __$$ProfileDetailsModelImplCopyWithImpl<$Res>; + factory _$$ProfileDetailsModelImplCopyWith( + _$ProfileDetailsModelImpl value, + $Res Function(_$ProfileDetailsModelImpl) then, + ) = __$$ProfileDetailsModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "first_name") String firstName, - @JsonKey(name: "last_name") String lastName, - @JsonKey(name: "birthdate") String birthdate, - @JsonKey(name: "gender") String gender, - @JsonKey(name: "country") String country, - @JsonKey(name: "city") String city, - @JsonKey(name: "lang") String lang, - @JsonKey(name: "weight") double weight, - @JsonKey(name: "height") int height, - @JsonKey(name: "chest_circumference") int chestCircumference, - @JsonKey(name: "waist_circumference") int waistCircumference, - @JsonKey(name: "hip_circumference") int hipCircumference, - @JsonKey(name: "blood_pressure_up") int bloodPressureUp, - @JsonKey(name: "blood_pressure_down") int bloodPressureDown, - @JsonKey(name: "has_hypo") bool hasHypo, - @JsonKey(name: "has_hyper") bool hasHyper, - @JsonKey(name: "about_alergy") String aboutAlergy, - @JsonKey(name: "about_taking_pils") String aboutTakingPils, - @JsonKey(name: "about_sport_hobbies") String aboutSportHobbies, - @JsonKey(name: "favorite_foods") String favoriteFoods, - @JsonKey(name: "unfavorite_foods") String unfavoriteFoods, - @JsonKey(name: "additional_info") String additionalInfo, - @JsonKey(name: "created_at") DateTime? createdAt, - @JsonKey(name: "updated_at") DateTime? updatedAt, - @JsonKey(name: "is_mood_fillable") bool isMoodFillable, - @JsonKey(name: "is_bedtime_fillable") bool isBedtimeFillable, - @JsonKey(name: "activity_coefficient") double activityCoefficient}); + $Res call({ + @JsonKey(name: "first_name") String firstName, + @JsonKey(name: "last_name") String lastName, + @JsonKey(name: "birthdate") String birthdate, + @JsonKey(name: "gender") String gender, + @JsonKey(name: "country") String country, + @JsonKey(name: "city") String city, + @JsonKey(name: "lang") String lang, + @JsonKey(name: "weight") double weight, + @JsonKey(name: "height") int height, + @JsonKey(name: "chest_circumference") int chestCircumference, + @JsonKey(name: "waist_circumference") int waistCircumference, + @JsonKey(name: "hip_circumference") int hipCircumference, + @JsonKey(name: "blood_pressure_up") int bloodPressureUp, + @JsonKey(name: "blood_pressure_down") int bloodPressureDown, + @JsonKey(name: "has_hypo") bool hasHypo, + @JsonKey(name: "has_hyper") bool hasHyper, + @JsonKey(name: "about_alergy") String aboutAlergy, + @JsonKey(name: "about_taking_pils") String aboutTakingPils, + @JsonKey(name: "about_sport_hobbies") String aboutSportHobbies, + @JsonKey(name: "favorite_foods") String favoriteFoods, + @JsonKey(name: "unfavorite_foods") String unfavoriteFoods, + @JsonKey(name: "additional_info") String additionalInfo, + @JsonKey(name: "created_at") DateTime? createdAt, + @JsonKey(name: "updated_at") DateTime? updatedAt, + @JsonKey(name: "is_mood_fillable") bool isMoodFillable, + @JsonKey(name: "is_bedtime_fillable") bool isBedtimeFillable, + @JsonKey(name: "activity_coefficient") double activityCoefficient, + }); } /// @nodoc class __$$ProfileDetailsModelImplCopyWithImpl<$Res> extends _$ProfileDetailsModelCopyWithImpl<$Res, _$ProfileDetailsModelImpl> implements _$$ProfileDetailsModelImplCopyWith<$Res> { - __$$ProfileDetailsModelImplCopyWithImpl(_$ProfileDetailsModelImpl _value, - $Res Function(_$ProfileDetailsModelImpl) _then) - : super(_value, _then); + __$$ProfileDetailsModelImplCopyWithImpl( + _$ProfileDetailsModelImpl _value, + $Res Function(_$ProfileDetailsModelImpl) _then, + ) : super(_value, _then); /// Create a copy of ProfileDetailsModel /// with the given fields replaced by the non-null parameter values. @@ -1681,151 +1821,180 @@ class __$$ProfileDetailsModelImplCopyWithImpl<$Res> Object? isBedtimeFillable = null, Object? activityCoefficient = null, }) { - return _then(_$ProfileDetailsModelImpl( - firstName: null == firstName - ? _value.firstName - : firstName // ignore: cast_nullable_to_non_nullable - as String, - lastName: null == lastName - ? _value.lastName - : lastName // ignore: cast_nullable_to_non_nullable - as String, - birthdate: null == birthdate - ? _value.birthdate - : birthdate // ignore: cast_nullable_to_non_nullable - as String, - gender: null == gender - ? _value.gender - : gender // ignore: cast_nullable_to_non_nullable - as String, - country: null == country - ? _value.country - : country // ignore: cast_nullable_to_non_nullable - as String, - city: null == city - ? _value.city - : city // ignore: cast_nullable_to_non_nullable - as String, - lang: null == lang - ? _value.lang - : lang // ignore: cast_nullable_to_non_nullable - as String, - weight: null == weight - ? _value.weight - : weight // ignore: cast_nullable_to_non_nullable - as double, - height: null == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as int, - chestCircumference: null == chestCircumference - ? _value.chestCircumference - : chestCircumference // ignore: cast_nullable_to_non_nullable - as int, - waistCircumference: null == waistCircumference - ? _value.waistCircumference - : waistCircumference // ignore: cast_nullable_to_non_nullable - as int, - hipCircumference: null == hipCircumference - ? _value.hipCircumference - : hipCircumference // ignore: cast_nullable_to_non_nullable - as int, - bloodPressureUp: null == bloodPressureUp - ? _value.bloodPressureUp - : bloodPressureUp // ignore: cast_nullable_to_non_nullable - as int, - bloodPressureDown: null == bloodPressureDown - ? _value.bloodPressureDown - : bloodPressureDown // ignore: cast_nullable_to_non_nullable - as int, - hasHypo: null == hasHypo - ? _value.hasHypo - : hasHypo // ignore: cast_nullable_to_non_nullable - as bool, - hasHyper: null == hasHyper - ? _value.hasHyper - : hasHyper // ignore: cast_nullable_to_non_nullable - as bool, - aboutAlergy: null == aboutAlergy - ? _value.aboutAlergy - : aboutAlergy // ignore: cast_nullable_to_non_nullable - as String, - aboutTakingPils: null == aboutTakingPils - ? _value.aboutTakingPils - : aboutTakingPils // ignore: cast_nullable_to_non_nullable - as String, - aboutSportHobbies: null == aboutSportHobbies - ? _value.aboutSportHobbies - : aboutSportHobbies // ignore: cast_nullable_to_non_nullable - as String, - favoriteFoods: null == favoriteFoods - ? _value.favoriteFoods - : favoriteFoods // ignore: cast_nullable_to_non_nullable - as String, - unfavoriteFoods: null == unfavoriteFoods - ? _value.unfavoriteFoods - : unfavoriteFoods // ignore: cast_nullable_to_non_nullable - as String, - additionalInfo: null == additionalInfo - ? _value.additionalInfo - : additionalInfo // ignore: cast_nullable_to_non_nullable - as String, - createdAt: freezed == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - updatedAt: freezed == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime?, - isMoodFillable: null == isMoodFillable - ? _value.isMoodFillable - : isMoodFillable // ignore: cast_nullable_to_non_nullable - as bool, - isBedtimeFillable: null == isBedtimeFillable - ? _value.isBedtimeFillable - : isBedtimeFillable // ignore: cast_nullable_to_non_nullable - as bool, - activityCoefficient: null == activityCoefficient - ? _value.activityCoefficient - : activityCoefficient // ignore: cast_nullable_to_non_nullable - as double, - )); + return _then( + _$ProfileDetailsModelImpl( + firstName: + null == firstName + ? _value.firstName + : firstName // ignore: cast_nullable_to_non_nullable + as String, + lastName: + null == lastName + ? _value.lastName + : lastName // ignore: cast_nullable_to_non_nullable + as String, + birthdate: + null == birthdate + ? _value.birthdate + : birthdate // ignore: cast_nullable_to_non_nullable + as String, + gender: + null == gender + ? _value.gender + : gender // ignore: cast_nullable_to_non_nullable + as String, + country: + null == country + ? _value.country + : country // ignore: cast_nullable_to_non_nullable + as String, + city: + null == city + ? _value.city + : city // ignore: cast_nullable_to_non_nullable + as String, + lang: + null == lang + ? _value.lang + : lang // ignore: cast_nullable_to_non_nullable + as String, + weight: + null == weight + ? _value.weight + : weight // ignore: cast_nullable_to_non_nullable + as double, + height: + null == height + ? _value.height + : height // ignore: cast_nullable_to_non_nullable + as int, + chestCircumference: + null == chestCircumference + ? _value.chestCircumference + : chestCircumference // ignore: cast_nullable_to_non_nullable + as int, + waistCircumference: + null == waistCircumference + ? _value.waistCircumference + : waistCircumference // ignore: cast_nullable_to_non_nullable + as int, + hipCircumference: + null == hipCircumference + ? _value.hipCircumference + : hipCircumference // ignore: cast_nullable_to_non_nullable + as int, + bloodPressureUp: + null == bloodPressureUp + ? _value.bloodPressureUp + : bloodPressureUp // ignore: cast_nullable_to_non_nullable + as int, + bloodPressureDown: + null == bloodPressureDown + ? _value.bloodPressureDown + : bloodPressureDown // ignore: cast_nullable_to_non_nullable + as int, + hasHypo: + null == hasHypo + ? _value.hasHypo + : hasHypo // ignore: cast_nullable_to_non_nullable + as bool, + hasHyper: + null == hasHyper + ? _value.hasHyper + : hasHyper // ignore: cast_nullable_to_non_nullable + as bool, + aboutAlergy: + null == aboutAlergy + ? _value.aboutAlergy + : aboutAlergy // ignore: cast_nullable_to_non_nullable + as String, + aboutTakingPils: + null == aboutTakingPils + ? _value.aboutTakingPils + : aboutTakingPils // ignore: cast_nullable_to_non_nullable + as String, + aboutSportHobbies: + null == aboutSportHobbies + ? _value.aboutSportHobbies + : aboutSportHobbies // ignore: cast_nullable_to_non_nullable + as String, + favoriteFoods: + null == favoriteFoods + ? _value.favoriteFoods + : favoriteFoods // ignore: cast_nullable_to_non_nullable + as String, + unfavoriteFoods: + null == unfavoriteFoods + ? _value.unfavoriteFoods + : unfavoriteFoods // ignore: cast_nullable_to_non_nullable + as String, + additionalInfo: + null == additionalInfo + ? _value.additionalInfo + : additionalInfo // ignore: cast_nullable_to_non_nullable + as String, + createdAt: + freezed == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + updatedAt: + freezed == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime?, + isMoodFillable: + null == isMoodFillable + ? _value.isMoodFillable + : isMoodFillable // ignore: cast_nullable_to_non_nullable + as bool, + isBedtimeFillable: + null == isBedtimeFillable + ? _value.isBedtimeFillable + : isBedtimeFillable // ignore: cast_nullable_to_non_nullable + as bool, + activityCoefficient: + null == activityCoefficient + ? _value.activityCoefficient + : activityCoefficient // ignore: cast_nullable_to_non_nullable + as double, + ), + ); } } /// @nodoc @JsonSerializable() class _$ProfileDetailsModelImpl implements _ProfileDetailsModel { - const _$ProfileDetailsModelImpl( - {@JsonKey(name: "first_name") required this.firstName, - @JsonKey(name: "last_name") required this.lastName, - @JsonKey(name: "birthdate") required this.birthdate, - @JsonKey(name: "gender") required this.gender, - @JsonKey(name: "country") required this.country, - @JsonKey(name: "city") required this.city, - @JsonKey(name: "lang") required this.lang, - @JsonKey(name: "weight") required this.weight, - @JsonKey(name: "height") required this.height, - @JsonKey(name: "chest_circumference") required this.chestCircumference, - @JsonKey(name: "waist_circumference") required this.waistCircumference, - @JsonKey(name: "hip_circumference") required this.hipCircumference, - @JsonKey(name: "blood_pressure_up") required this.bloodPressureUp, - @JsonKey(name: "blood_pressure_down") required this.bloodPressureDown, - @JsonKey(name: "has_hypo") required this.hasHypo, - @JsonKey(name: "has_hyper") required this.hasHyper, - @JsonKey(name: "about_alergy") required this.aboutAlergy, - @JsonKey(name: "about_taking_pils") required this.aboutTakingPils, - @JsonKey(name: "about_sport_hobbies") required this.aboutSportHobbies, - @JsonKey(name: "favorite_foods") required this.favoriteFoods, - @JsonKey(name: "unfavorite_foods") required this.unfavoriteFoods, - @JsonKey(name: "additional_info") required this.additionalInfo, - @JsonKey(name: "created_at") this.createdAt, - @JsonKey(name: "updated_at") this.updatedAt, - @JsonKey(name: "is_mood_fillable") required this.isMoodFillable, - @JsonKey(name: "is_bedtime_fillable") required this.isBedtimeFillable, - @JsonKey(name: "activity_coefficient") - required this.activityCoefficient}); + const _$ProfileDetailsModelImpl({ + @JsonKey(name: "first_name") required this.firstName, + @JsonKey(name: "last_name") required this.lastName, + @JsonKey(name: "birthdate") required this.birthdate, + @JsonKey(name: "gender") required this.gender, + @JsonKey(name: "country") required this.country, + @JsonKey(name: "city") required this.city, + @JsonKey(name: "lang") required this.lang, + @JsonKey(name: "weight") required this.weight, + @JsonKey(name: "height") required this.height, + @JsonKey(name: "chest_circumference") required this.chestCircumference, + @JsonKey(name: "waist_circumference") required this.waistCircumference, + @JsonKey(name: "hip_circumference") required this.hipCircumference, + @JsonKey(name: "blood_pressure_up") required this.bloodPressureUp, + @JsonKey(name: "blood_pressure_down") required this.bloodPressureDown, + @JsonKey(name: "has_hypo") required this.hasHypo, + @JsonKey(name: "has_hyper") required this.hasHyper, + @JsonKey(name: "about_alergy") required this.aboutAlergy, + @JsonKey(name: "about_taking_pils") required this.aboutTakingPils, + @JsonKey(name: "about_sport_hobbies") required this.aboutSportHobbies, + @JsonKey(name: "favorite_foods") required this.favoriteFoods, + @JsonKey(name: "unfavorite_foods") required this.unfavoriteFoods, + @JsonKey(name: "additional_info") required this.additionalInfo, + @JsonKey(name: "created_at") this.createdAt, + @JsonKey(name: "updated_at") this.updatedAt, + @JsonKey(name: "is_mood_fillable") required this.isMoodFillable, + @JsonKey(name: "is_bedtime_fillable") required this.isBedtimeFillable, + @JsonKey(name: "activity_coefficient") required this.activityCoefficient, + }); factory _$ProfileDetailsModelImpl.fromJson(Map json) => _$$ProfileDetailsModelImplFromJson(json); @@ -1974,35 +2143,35 @@ class _$ProfileDetailsModelImpl implements _ProfileDetailsModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hashAll([ - runtimeType, - firstName, - lastName, - birthdate, - gender, - country, - city, - lang, - weight, - height, - chestCircumference, - waistCircumference, - hipCircumference, - bloodPressureUp, - bloodPressureDown, - hasHypo, - hasHyper, - aboutAlergy, - aboutTakingPils, - aboutSportHobbies, - favoriteFoods, - unfavoriteFoods, - additionalInfo, - createdAt, - updatedAt, - isMoodFillable, - isBedtimeFillable, - activityCoefficient - ]); + runtimeType, + firstName, + lastName, + birthdate, + gender, + country, + city, + lang, + weight, + height, + chestCircumference, + waistCircumference, + hipCircumference, + bloodPressureUp, + bloodPressureDown, + hasHypo, + hasHyper, + aboutAlergy, + aboutTakingPils, + aboutSportHobbies, + favoriteFoods, + unfavoriteFoods, + additionalInfo, + createdAt, + updatedAt, + isMoodFillable, + isBedtimeFillable, + activityCoefficient, + ]); /// Create a copy of ProfileDetailsModel /// with the given fields replaced by the non-null parameter values. @@ -2011,51 +2180,48 @@ class _$ProfileDetailsModelImpl implements _ProfileDetailsModel { @pragma('vm:prefer-inline') _$$ProfileDetailsModelImplCopyWith<_$ProfileDetailsModelImpl> get copyWith => __$$ProfileDetailsModelImplCopyWithImpl<_$ProfileDetailsModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$ProfileDetailsModelImplToJson( - this, - ); + return _$$ProfileDetailsModelImplToJson(this); } } abstract class _ProfileDetailsModel implements ProfileDetailsModel { - const factory _ProfileDetailsModel( - {@JsonKey(name: "first_name") required final String firstName, - @JsonKey(name: "last_name") required final String lastName, - @JsonKey(name: "birthdate") required final String birthdate, - @JsonKey(name: "gender") required final String gender, - @JsonKey(name: "country") required final String country, - @JsonKey(name: "city") required final String city, - @JsonKey(name: "lang") required final String lang, - @JsonKey(name: "weight") required final double weight, - @JsonKey(name: "height") required final int height, - @JsonKey(name: "chest_circumference") - required final int chestCircumference, - @JsonKey(name: "waist_circumference") - required final int waistCircumference, - @JsonKey(name: "hip_circumference") required final int hipCircumference, - @JsonKey(name: "blood_pressure_up") required final int bloodPressureUp, - @JsonKey(name: "blood_pressure_down") - required final int bloodPressureDown, - @JsonKey(name: "has_hypo") required final bool hasHypo, - @JsonKey(name: "has_hyper") required final bool hasHyper, - @JsonKey(name: "about_alergy") required final String aboutAlergy, - @JsonKey(name: "about_taking_pils") required final String aboutTakingPils, - @JsonKey(name: "about_sport_hobbies") - required final String aboutSportHobbies, - @JsonKey(name: "favorite_foods") required final String favoriteFoods, - @JsonKey(name: "unfavorite_foods") required final String unfavoriteFoods, - @JsonKey(name: "additional_info") required final String additionalInfo, - @JsonKey(name: "created_at") final DateTime? createdAt, - @JsonKey(name: "updated_at") final DateTime? updatedAt, - @JsonKey(name: "is_mood_fillable") required final bool isMoodFillable, - @JsonKey(name: "is_bedtime_fillable") - required final bool isBedtimeFillable, - @JsonKey(name: "activity_coefficient") - required final double activityCoefficient}) = _$ProfileDetailsModelImpl; + const factory _ProfileDetailsModel({ + @JsonKey(name: "first_name") required final String firstName, + @JsonKey(name: "last_name") required final String lastName, + @JsonKey(name: "birthdate") required final String birthdate, + @JsonKey(name: "gender") required final String gender, + @JsonKey(name: "country") required final String country, + @JsonKey(name: "city") required final String city, + @JsonKey(name: "lang") required final String lang, + @JsonKey(name: "weight") required final double weight, + @JsonKey(name: "height") required final int height, + @JsonKey(name: "chest_circumference") required final int chestCircumference, + @JsonKey(name: "waist_circumference") required final int waistCircumference, + @JsonKey(name: "hip_circumference") required final int hipCircumference, + @JsonKey(name: "blood_pressure_up") required final int bloodPressureUp, + @JsonKey(name: "blood_pressure_down") required final int bloodPressureDown, + @JsonKey(name: "has_hypo") required final bool hasHypo, + @JsonKey(name: "has_hyper") required final bool hasHyper, + @JsonKey(name: "about_alergy") required final String aboutAlergy, + @JsonKey(name: "about_taking_pils") required final String aboutTakingPils, + @JsonKey(name: "about_sport_hobbies") + required final String aboutSportHobbies, + @JsonKey(name: "favorite_foods") required final String favoriteFoods, + @JsonKey(name: "unfavorite_foods") required final String unfavoriteFoods, + @JsonKey(name: "additional_info") required final String additionalInfo, + @JsonKey(name: "created_at") final DateTime? createdAt, + @JsonKey(name: "updated_at") final DateTime? updatedAt, + @JsonKey(name: "is_mood_fillable") required final bool isMoodFillable, + @JsonKey(name: "is_bedtime_fillable") required final bool isBedtimeFillable, + @JsonKey(name: "activity_coefficient") + required final double activityCoefficient, + }) = _$ProfileDetailsModelImpl; factory _ProfileDetailsModel.fromJson(Map json) = _$ProfileDetailsModelImpl.fromJson; @@ -2172,8 +2338,9 @@ mixin _$ProfilePreviewModel { /// @nodoc abstract class $ProfilePreviewModelCopyWith<$Res> { factory $ProfilePreviewModelCopyWith( - ProfilePreviewModel value, $Res Function(ProfilePreviewModel) then) = - _$ProfilePreviewModelCopyWithImpl<$Res, ProfilePreviewModel>; + ProfilePreviewModel value, + $Res Function(ProfilePreviewModel) then, + ) = _$ProfilePreviewModelCopyWithImpl<$Res, ProfilePreviewModel>; @useResult $Res call({@JsonKey(name: "profile_photo_url") String profilePhotoUrl}); } @@ -2192,24 +2359,27 @@ class _$ProfilePreviewModelCopyWithImpl<$Res, $Val extends ProfilePreviewModel> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? profilePhotoUrl = null, - }) { - return _then(_value.copyWith( - profilePhotoUrl: null == profilePhotoUrl - ? _value.profilePhotoUrl - : profilePhotoUrl // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? profilePhotoUrl = null}) { + return _then( + _value.copyWith( + profilePhotoUrl: + null == profilePhotoUrl + ? _value.profilePhotoUrl + : profilePhotoUrl // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } /// @nodoc abstract class _$$ProfilePreviewModelImplCopyWith<$Res> implements $ProfilePreviewModelCopyWith<$Res> { - factory _$$ProfilePreviewModelImplCopyWith(_$ProfilePreviewModelImpl value, - $Res Function(_$ProfilePreviewModelImpl) then) = - __$$ProfilePreviewModelImplCopyWithImpl<$Res>; + factory _$$ProfilePreviewModelImplCopyWith( + _$ProfilePreviewModelImpl value, + $Res Function(_$ProfilePreviewModelImpl) then, + ) = __$$ProfilePreviewModelImplCopyWithImpl<$Res>; @override @useResult $Res call({@JsonKey(name: "profile_photo_url") String profilePhotoUrl}); @@ -2219,31 +2389,34 @@ abstract class _$$ProfilePreviewModelImplCopyWith<$Res> class __$$ProfilePreviewModelImplCopyWithImpl<$Res> extends _$ProfilePreviewModelCopyWithImpl<$Res, _$ProfilePreviewModelImpl> implements _$$ProfilePreviewModelImplCopyWith<$Res> { - __$$ProfilePreviewModelImplCopyWithImpl(_$ProfilePreviewModelImpl _value, - $Res Function(_$ProfilePreviewModelImpl) _then) - : super(_value, _then); + __$$ProfilePreviewModelImplCopyWithImpl( + _$ProfilePreviewModelImpl _value, + $Res Function(_$ProfilePreviewModelImpl) _then, + ) : super(_value, _then); /// Create a copy of ProfilePreviewModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? profilePhotoUrl = null, - }) { - return _then(_$ProfilePreviewModelImpl( - profilePhotoUrl: null == profilePhotoUrl - ? _value.profilePhotoUrl - : profilePhotoUrl // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? profilePhotoUrl = null}) { + return _then( + _$ProfilePreviewModelImpl( + profilePhotoUrl: + null == profilePhotoUrl + ? _value.profilePhotoUrl + : profilePhotoUrl // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } /// @nodoc @JsonSerializable() class _$ProfilePreviewModelImpl implements _ProfilePreviewModel { - const _$ProfilePreviewModelImpl( - {@JsonKey(name: "profile_photo_url") required this.profilePhotoUrl}); + const _$ProfilePreviewModelImpl({ + @JsonKey(name: "profile_photo_url") required this.profilePhotoUrl, + }); factory _$ProfilePreviewModelImpl.fromJson(Map json) => _$$ProfilePreviewModelImplFromJson(json); @@ -2277,20 +2450,20 @@ class _$ProfilePreviewModelImpl implements _ProfilePreviewModel { @pragma('vm:prefer-inline') _$$ProfilePreviewModelImplCopyWith<_$ProfilePreviewModelImpl> get copyWith => __$$ProfilePreviewModelImplCopyWithImpl<_$ProfilePreviewModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$ProfilePreviewModelImplToJson( - this, - ); + return _$$ProfilePreviewModelImplToJson(this); } } abstract class _ProfilePreviewModel implements ProfilePreviewModel { - const factory _ProfilePreviewModel( - {@JsonKey(name: "profile_photo_url") - required final String profilePhotoUrl}) = _$ProfilePreviewModelImpl; + const factory _ProfilePreviewModel({ + @JsonKey(name: "profile_photo_url") required final String profilePhotoUrl, + }) = _$ProfilePreviewModelImpl; factory _ProfilePreviewModel.fromJson(Map json) = _$ProfilePreviewModelImpl.fromJson; diff --git a/lib/features/profile/models/profile_model.g.dart b/lib/features/profile/models/profile_model.g.dart index e07e74c6..596ea47e 100644 --- a/lib/features/profile/models/profile_model.g.dart +++ b/lib/features/profile/models/profile_model.g.dart @@ -6,44 +6,57 @@ part of 'profile_model.dart'; // JsonSerializableGenerator // ************************************************************************** -_$ProfileModelImpl _$$ProfileModelImplFromJson(Map json) => - _$ProfileModelImpl( - id: (json['id'] as num).toInt(), - name: json['name'] as String, - email: json['email'] as String, - ratingPlace: (json['rating_place'] as num?)?.toInt(), - emailVerifiedAt: json['email_verified_at'] == null +_$ProfileModelImpl _$$ProfileModelImplFromJson( + Map json, +) => _$ProfileModelImpl( + id: (json['id'] as num).toInt(), + name: json['name'] as String, + email: json['email'] as String, + ratingPlace: (json['rating_place'] as num?)?.toInt(), + emailVerifiedAt: + json['email_verified_at'] == null ? null : DateTime.parse(json['email_verified_at'] as String), - createdAt: json['created_at'] == null + createdAt: + json['created_at'] == null ? null : DateTime.parse(json['created_at'] as String), - updatedAt: json['updated_at'] == null + updatedAt: + json['updated_at'] == null ? null : DateTime.parse(json['updated_at'] as String), - isPublicProfile: json['is_public_profile'] as bool, - isEntitySubscribedByMe: json['is_entity_subscribed_by_me'] as bool, - slug: json['slug'] as String, - profilePhotoUrl: json['profile_photo_url'] as String, - roles: (json['roles'] as List).map((e) => e as String).toList(), - badges: (json['badges'] as List) + isPublicProfile: json['is_public_profile'] as bool, + isEntitySubscribedByMe: json['is_entity_subscribed_by_me'] as bool, + slug: json['slug'] as String, + profilePhotoUrl: json['profile_photo_url'] as String, + roles: (json['roles'] as List).map((e) => e as String).toList(), + badges: + (json['badges'] as List) .map((e) => BadgeModel.fromJson(e as Map)) .toList(), - subscriptions: (json['subscriptions'] as List) + subscriptions: + (json['subscriptions'] as List) .map((e) => ProfilePreviewModel.fromJson(e as Map)) .toList(), - subscribers: (json['subscribers'] as List) + subscribers: + (json['subscribers'] as List) .map((e) => ProfilePreviewModel.fromJson(e as Map)) .toList(), - educationResource: json['education_resource'] == null + educationResource: + json['education_resource'] == null ? null : EducationModel.fromJson( - json['education_resource'] as Map), - diplomasAndCertificates: (json['cert_photos'] as List?) - ?.map((e) => - DiplomasAndCertificatesModel.fromJson(e as Map)) + json['education_resource'] as Map, + ), + diplomasAndCertificates: + (json['cert_photos'] as List?) + ?.map( + (e) => DiplomasAndCertificatesModel.fromJson( + e as Map, + ), + ) .toList(), - ); +); Map _$$ProfileModelImplToJson(_$ProfileModelImpl instance) => { @@ -67,28 +80,30 @@ Map _$$ProfileModelImplToJson(_$ProfileModelImpl instance) => }; _$DiplomasAndCertificatesModelImpl _$$DiplomasAndCertificatesModelImplFromJson( - Map json) => - _$DiplomasAndCertificatesModelImpl( - id: (json['id'] as num).toInt(), - path: json['path'] as String, - ); + Map json, +) => _$DiplomasAndCertificatesModelImpl( + id: (json['id'] as num).toInt(), + path: json['path'] as String, +); Map _$$DiplomasAndCertificatesModelImplToJson( - _$DiplomasAndCertificatesModelImpl instance) => - { - 'id': instance.id, - 'path': instance.path, - }; + _$DiplomasAndCertificatesModelImpl instance, +) => {'id': instance.id, 'path': instance.path}; _$EducationModelImpl _$$EducationModelImplFromJson(Map json) => _$EducationModelImpl( hasMedicalEducation: (json['has_medical_education'] as num?)?.toInt(), - completedCourses: (json['completed_cources'] as List?) - ?.map((e) => (e as Map).map( - (k, e) => MapEntry(k, - CompletedCoursesModel.fromJson(e as Map)), - )) - .toList(), + completedCourses: + (json['completed_cources'] as List?) + ?.map( + (e) => (e as Map).map( + (k, e) => MapEntry( + k, + CompletedCoursesModel.fromJson(e as Map), + ), + ), + ) + .toList(), vkLink: json['vk_link'] as String?, instaLink: json['insta_link'] as String?, fbLink: json['fb_link'] as String?, @@ -98,108 +113,105 @@ _$EducationModelImpl _$$EducationModelImplFromJson(Map json) => ); Map _$$EducationModelImplToJson( - _$EducationModelImpl instance) => - { - 'has_medical_education': instance.hasMedicalEducation, - 'completed_cources': instance.completedCourses, - 'vk_link': instance.vkLink, - 'insta_link': instance.instaLink, - 'fb_link': instance.fbLink, - 'tg_link': instance.tgLink, - 'personal_site_link': instance.personalSiteLink, - 'request_state': instance.requestState, - }; + _$EducationModelImpl instance, +) => { + 'has_medical_education': instance.hasMedicalEducation, + 'completed_cources': instance.completedCourses, + 'vk_link': instance.vkLink, + 'insta_link': instance.instaLink, + 'fb_link': instance.fbLink, + 'tg_link': instance.tgLink, + 'personal_site_link': instance.personalSiteLink, + 'request_state': instance.requestState, +}; _$CompletedCoursesModelImpl _$$CompletedCoursesModelImplFromJson( - Map json) => - _$CompletedCoursesModelImpl( - date: json['date'] as String, - title: json['title'] as String, - ); + Map json, +) => _$CompletedCoursesModelImpl( + date: json['date'] as String, + title: json['title'] as String, +); Map _$$CompletedCoursesModelImplToJson( - _$CompletedCoursesModelImpl instance) => - { - 'date': instance.date, - 'title': instance.title, - }; + _$CompletedCoursesModelImpl instance, +) => {'date': instance.date, 'title': instance.title}; _$ProfileDetailsModelImpl _$$ProfileDetailsModelImplFromJson( - Map json) => - _$ProfileDetailsModelImpl( - firstName: json['first_name'] as String, - lastName: json['last_name'] as String, - birthdate: json['birthdate'] as String, - gender: json['gender'] as String, - country: json['country'] as String, - city: json['city'] as String, - lang: json['lang'] as String, - weight: (json['weight'] as num).toDouble(), - height: (json['height'] as num).toInt(), - chestCircumference: (json['chest_circumference'] as num).toInt(), - waistCircumference: (json['waist_circumference'] as num).toInt(), - hipCircumference: (json['hip_circumference'] as num).toInt(), - bloodPressureUp: (json['blood_pressure_up'] as num).toInt(), - bloodPressureDown: (json['blood_pressure_down'] as num).toInt(), - hasHypo: json['has_hypo'] as bool, - hasHyper: json['has_hyper'] as bool, - aboutAlergy: json['about_alergy'] as String, - aboutTakingPils: json['about_taking_pils'] as String, - aboutSportHobbies: json['about_sport_hobbies'] as String, - favoriteFoods: json['favorite_foods'] as String, - unfavoriteFoods: json['unfavorite_foods'] as String, - additionalInfo: json['additional_info'] as String, - createdAt: json['created_at'] == null + Map json, +) => _$ProfileDetailsModelImpl( + firstName: json['first_name'] as String, + lastName: json['last_name'] as String, + birthdate: json['birthdate'] as String, + gender: json['gender'] as String, + country: json['country'] as String, + city: json['city'] as String, + lang: json['lang'] as String, + weight: (json['weight'] as num).toDouble(), + height: (json['height'] as num).toInt(), + chestCircumference: (json['chest_circumference'] as num).toInt(), + waistCircumference: (json['waist_circumference'] as num).toInt(), + hipCircumference: (json['hip_circumference'] as num).toInt(), + bloodPressureUp: (json['blood_pressure_up'] as num).toInt(), + bloodPressureDown: (json['blood_pressure_down'] as num).toInt(), + hasHypo: json['has_hypo'] as bool, + hasHyper: json['has_hyper'] as bool, + aboutAlergy: json['about_alergy'] as String, + aboutTakingPils: json['about_taking_pils'] as String, + aboutSportHobbies: json['about_sport_hobbies'] as String, + favoriteFoods: json['favorite_foods'] as String, + unfavoriteFoods: json['unfavorite_foods'] as String, + additionalInfo: json['additional_info'] as String, + createdAt: + json['created_at'] == null ? null : DateTime.parse(json['created_at'] as String), - updatedAt: json['updated_at'] == null + updatedAt: + json['updated_at'] == null ? null : DateTime.parse(json['updated_at'] as String), - isMoodFillable: json['is_mood_fillable'] as bool, - isBedtimeFillable: json['is_bedtime_fillable'] as bool, - activityCoefficient: (json['activity_coefficient'] as num).toDouble(), - ); + isMoodFillable: json['is_mood_fillable'] as bool, + isBedtimeFillable: json['is_bedtime_fillable'] as bool, + activityCoefficient: (json['activity_coefficient'] as num).toDouble(), +); Map _$$ProfileDetailsModelImplToJson( - _$ProfileDetailsModelImpl instance) => - { - 'first_name': instance.firstName, - 'last_name': instance.lastName, - 'birthdate': instance.birthdate, - 'gender': instance.gender, - 'country': instance.country, - 'city': instance.city, - 'lang': instance.lang, - 'weight': instance.weight, - 'height': instance.height, - 'chest_circumference': instance.chestCircumference, - 'waist_circumference': instance.waistCircumference, - 'hip_circumference': instance.hipCircumference, - 'blood_pressure_up': instance.bloodPressureUp, - 'blood_pressure_down': instance.bloodPressureDown, - 'has_hypo': instance.hasHypo, - 'has_hyper': instance.hasHyper, - 'about_alergy': instance.aboutAlergy, - 'about_taking_pils': instance.aboutTakingPils, - 'about_sport_hobbies': instance.aboutSportHobbies, - 'favorite_foods': instance.favoriteFoods, - 'unfavorite_foods': instance.unfavoriteFoods, - 'additional_info': instance.additionalInfo, - 'created_at': instance.createdAt?.toIso8601String(), - 'updated_at': instance.updatedAt?.toIso8601String(), - 'is_mood_fillable': instance.isMoodFillable, - 'is_bedtime_fillable': instance.isBedtimeFillable, - 'activity_coefficient': instance.activityCoefficient, - }; + _$ProfileDetailsModelImpl instance, +) => { + 'first_name': instance.firstName, + 'last_name': instance.lastName, + 'birthdate': instance.birthdate, + 'gender': instance.gender, + 'country': instance.country, + 'city': instance.city, + 'lang': instance.lang, + 'weight': instance.weight, + 'height': instance.height, + 'chest_circumference': instance.chestCircumference, + 'waist_circumference': instance.waistCircumference, + 'hip_circumference': instance.hipCircumference, + 'blood_pressure_up': instance.bloodPressureUp, + 'blood_pressure_down': instance.bloodPressureDown, + 'has_hypo': instance.hasHypo, + 'has_hyper': instance.hasHyper, + 'about_alergy': instance.aboutAlergy, + 'about_taking_pils': instance.aboutTakingPils, + 'about_sport_hobbies': instance.aboutSportHobbies, + 'favorite_foods': instance.favoriteFoods, + 'unfavorite_foods': instance.unfavoriteFoods, + 'additional_info': instance.additionalInfo, + 'created_at': instance.createdAt?.toIso8601String(), + 'updated_at': instance.updatedAt?.toIso8601String(), + 'is_mood_fillable': instance.isMoodFillable, + 'is_bedtime_fillable': instance.isBedtimeFillable, + 'activity_coefficient': instance.activityCoefficient, +}; _$ProfilePreviewModelImpl _$$ProfilePreviewModelImplFromJson( - Map json) => - _$ProfilePreviewModelImpl( - profilePhotoUrl: json['profile_photo_url'] as String, - ); + Map json, +) => _$ProfilePreviewModelImpl( + profilePhotoUrl: json['profile_photo_url'] as String, +); Map _$$ProfilePreviewModelImplToJson( - _$ProfilePreviewModelImpl instance) => - { - 'profile_photo_url': instance.profilePhotoUrl, - }; + _$ProfilePreviewModelImpl instance, +) => {'profile_photo_url': instance.profilePhotoUrl}; diff --git a/lib/features/profile/models/sub_model.freezed.dart b/lib/features/profile/models/sub_model.freezed.dart index 34d6ae49..995abca9 100644 --- a/lib/features/profile/models/sub_model.freezed.dart +++ b/lib/features/profile/models/sub_model.freezed.dart @@ -12,7 +12,8 @@ part of 'sub_model.dart'; 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'); + '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', +); SubPaginationModel _$SubPaginationModelFromJson(Map json) { return _SubPaginationModel.fromJson(json); @@ -37,8 +38,9 @@ mixin _$SubPaginationModel { /// @nodoc abstract class $SubPaginationModelCopyWith<$Res> { factory $SubPaginationModelCopyWith( - SubPaginationModel value, $Res Function(SubPaginationModel) then) = - _$SubPaginationModelCopyWithImpl<$Res, SubPaginationModel>; + SubPaginationModel value, + $Res Function(SubPaginationModel) then, + ) = _$SubPaginationModelCopyWithImpl<$Res, SubPaginationModel>; @useResult $Res call({List data, Links links, Meta meta}); @@ -60,25 +62,27 @@ class _$SubPaginationModelCopyWithImpl<$Res, $Val extends SubPaginationModel> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? data = null, - Object? links = null, - Object? meta = null, - }) { - return _then(_value.copyWith( - data: null == data - ? _value.data - : data // ignore: cast_nullable_to_non_nullable - as List, - links: null == links - ? _value.links - : links // ignore: cast_nullable_to_non_nullable - as Links, - meta: null == meta - ? _value.meta - : meta // ignore: cast_nullable_to_non_nullable - as Meta, - ) as $Val); + $Res call({Object? data = null, Object? links = null, Object? meta = null}) { + return _then( + _value.copyWith( + data: + null == data + ? _value.data + : data // ignore: cast_nullable_to_non_nullable + as List, + links: + null == links + ? _value.links + : links // ignore: cast_nullable_to_non_nullable + as Links, + meta: + null == meta + ? _value.meta + : meta // ignore: cast_nullable_to_non_nullable + as Meta, + ) + as $Val, + ); } /// Create a copy of SubPaginationModel @@ -105,9 +109,10 @@ class _$SubPaginationModelCopyWithImpl<$Res, $Val extends SubPaginationModel> /// @nodoc abstract class _$$SubPaginationModelImplCopyWith<$Res> implements $SubPaginationModelCopyWith<$Res> { - factory _$$SubPaginationModelImplCopyWith(_$SubPaginationModelImpl value, - $Res Function(_$SubPaginationModelImpl) then) = - __$$SubPaginationModelImplCopyWithImpl<$Res>; + factory _$$SubPaginationModelImplCopyWith( + _$SubPaginationModelImpl value, + $Res Function(_$SubPaginationModelImpl) then, + ) = __$$SubPaginationModelImplCopyWithImpl<$Res>; @override @useResult $Res call({List data, Links links, Meta meta}); @@ -122,44 +127,46 @@ abstract class _$$SubPaginationModelImplCopyWith<$Res> class __$$SubPaginationModelImplCopyWithImpl<$Res> extends _$SubPaginationModelCopyWithImpl<$Res, _$SubPaginationModelImpl> implements _$$SubPaginationModelImplCopyWith<$Res> { - __$$SubPaginationModelImplCopyWithImpl(_$SubPaginationModelImpl _value, - $Res Function(_$SubPaginationModelImpl) _then) - : super(_value, _then); + __$$SubPaginationModelImplCopyWithImpl( + _$SubPaginationModelImpl _value, + $Res Function(_$SubPaginationModelImpl) _then, + ) : super(_value, _then); /// Create a copy of SubPaginationModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? data = null, - Object? links = null, - Object? meta = null, - }) { - return _then(_$SubPaginationModelImpl( - data: null == data - ? _value._data - : data // ignore: cast_nullable_to_non_nullable - as List, - links: null == links - ? _value.links - : links // ignore: cast_nullable_to_non_nullable - as Links, - meta: null == meta - ? _value.meta - : meta // ignore: cast_nullable_to_non_nullable - as Meta, - )); + $Res call({Object? data = null, Object? links = null, Object? meta = null}) { + return _then( + _$SubPaginationModelImpl( + data: + null == data + ? _value._data + : data // ignore: cast_nullable_to_non_nullable + as List, + links: + null == links + ? _value.links + : links // ignore: cast_nullable_to_non_nullable + as Links, + meta: + null == meta + ? _value.meta + : meta // ignore: cast_nullable_to_non_nullable + as Meta, + ), + ); } } /// @nodoc @JsonSerializable() class _$SubPaginationModelImpl implements _SubPaginationModel { - const _$SubPaginationModelImpl( - {required final List data, - required this.links, - required this.meta}) - : _data = data; + const _$SubPaginationModelImpl({ + required final List data, + required this.links, + required this.meta, + }) : _data = data; factory _$SubPaginationModelImpl.fromJson(Map json) => _$$SubPaginationModelImplFromJson(json); @@ -195,7 +202,11 @@ class _$SubPaginationModelImpl implements _SubPaginationModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, const DeepCollectionEquality().hash(_data), links, meta); + runtimeType, + const DeepCollectionEquality().hash(_data), + links, + meta, + ); /// Create a copy of SubPaginationModel /// with the given fields replaced by the non-null parameter values. @@ -204,21 +215,22 @@ class _$SubPaginationModelImpl implements _SubPaginationModel { @pragma('vm:prefer-inline') _$$SubPaginationModelImplCopyWith<_$SubPaginationModelImpl> get copyWith => __$$SubPaginationModelImplCopyWithImpl<_$SubPaginationModelImpl>( - this, _$identity); + this, + _$identity, + ); @override Map toJson() { - return _$$SubPaginationModelImplToJson( - this, - ); + return _$$SubPaginationModelImplToJson(this); } } abstract class _SubPaginationModel implements SubPaginationModel { - const factory _SubPaginationModel( - {required final List data, - required final Links links, - required final Meta meta}) = _$SubPaginationModelImpl; + const factory _SubPaginationModel({ + required final List data, + required final Links links, + required final Meta meta, + }) = _$SubPaginationModelImpl; factory _SubPaginationModel.fromJson(Map json) = _$SubPaginationModelImpl.fromJson; @@ -277,19 +289,20 @@ abstract class $SubModelCopyWith<$Res> { factory $SubModelCopyWith(SubModel value, $Res Function(SubModel) then) = _$SubModelCopyWithImpl<$Res, SubModel>; @useResult - $Res call( - {int id, - String slug, - String name, - String city, - DateTime birthdate, - @JsonKey(name: 'is_entity_subscribed_by_me') bool isEntitySubscribedByMe, - String email, - @JsonKey(name: 'profile_photo_url') String profilePhotoUrl, - String role, - @JsonKey(name: 'is_public_profile') bool isPublicProfile, - @JsonKey(name: 'created_at') DateTime createdAt, - @JsonKey(name: 'updated_at') DateTime updatedAt}); + $Res call({ + int id, + String slug, + String name, + String city, + DateTime birthdate, + @JsonKey(name: 'is_entity_subscribed_by_me') bool isEntitySubscribedByMe, + String email, + @JsonKey(name: 'profile_photo_url') String profilePhotoUrl, + String role, + @JsonKey(name: 'is_public_profile') bool isPublicProfile, + @JsonKey(name: 'created_at') DateTime createdAt, + @JsonKey(name: 'updated_at') DateTime updatedAt, + }); } /// @nodoc @@ -320,56 +333,71 @@ class _$SubModelCopyWithImpl<$Res, $Val extends SubModel> Object? createdAt = null, Object? updatedAt = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - slug: null == slug - ? _value.slug - : slug // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - city: null == city - ? _value.city - : city // ignore: cast_nullable_to_non_nullable - as String, - birthdate: null == birthdate - ? _value.birthdate - : birthdate // ignore: cast_nullable_to_non_nullable - as DateTime, - isEntitySubscribedByMe: null == isEntitySubscribedByMe - ? _value.isEntitySubscribedByMe - : isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable - as bool, - email: null == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String, - profilePhotoUrl: null == profilePhotoUrl - ? _value.profilePhotoUrl - : profilePhotoUrl // ignore: cast_nullable_to_non_nullable - as String, - role: null == role - ? _value.role - : role // ignore: cast_nullable_to_non_nullable - as String, - isPublicProfile: null == isPublicProfile - ? _value.isPublicProfile - : isPublicProfile // ignore: cast_nullable_to_non_nullable - as bool, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + slug: + null == slug + ? _value.slug + : slug // ignore: cast_nullable_to_non_nullable + as String, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + city: + null == city + ? _value.city + : city // ignore: cast_nullable_to_non_nullable + as String, + birthdate: + null == birthdate + ? _value.birthdate + : birthdate // ignore: cast_nullable_to_non_nullable + as DateTime, + isEntitySubscribedByMe: + null == isEntitySubscribedByMe + ? _value.isEntitySubscribedByMe + : isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable + as bool, + email: + null == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as String, + profilePhotoUrl: + null == profilePhotoUrl + ? _value.profilePhotoUrl + : profilePhotoUrl // ignore: cast_nullable_to_non_nullable + as String, + role: + null == role + ? _value.role + : role // ignore: cast_nullable_to_non_nullable + as String, + isPublicProfile: + null == isPublicProfile + ? _value.isPublicProfile + : isPublicProfile // ignore: cast_nullable_to_non_nullable + as bool, + createdAt: + null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: + null == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + ) + as $Val, + ); } } @@ -377,23 +405,25 @@ class _$SubModelCopyWithImpl<$Res, $Val extends SubModel> abstract class _$$SubModelImplCopyWith<$Res> implements $SubModelCopyWith<$Res> { factory _$$SubModelImplCopyWith( - _$SubModelImpl value, $Res Function(_$SubModelImpl) then) = - __$$SubModelImplCopyWithImpl<$Res>; + _$SubModelImpl value, + $Res Function(_$SubModelImpl) then, + ) = __$$SubModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {int id, - String slug, - String name, - String city, - DateTime birthdate, - @JsonKey(name: 'is_entity_subscribed_by_me') bool isEntitySubscribedByMe, - String email, - @JsonKey(name: 'profile_photo_url') String profilePhotoUrl, - String role, - @JsonKey(name: 'is_public_profile') bool isPublicProfile, - @JsonKey(name: 'created_at') DateTime createdAt, - @JsonKey(name: 'updated_at') DateTime updatedAt}); + $Res call({ + int id, + String slug, + String name, + String city, + DateTime birthdate, + @JsonKey(name: 'is_entity_subscribed_by_me') bool isEntitySubscribedByMe, + String email, + @JsonKey(name: 'profile_photo_url') String profilePhotoUrl, + String role, + @JsonKey(name: 'is_public_profile') bool isPublicProfile, + @JsonKey(name: 'created_at') DateTime createdAt, + @JsonKey(name: 'updated_at') DateTime updatedAt, + }); } /// @nodoc @@ -401,8 +431,9 @@ class __$$SubModelImplCopyWithImpl<$Res> extends _$SubModelCopyWithImpl<$Res, _$SubModelImpl> implements _$$SubModelImplCopyWith<$Res> { __$$SubModelImplCopyWithImpl( - _$SubModelImpl _value, $Res Function(_$SubModelImpl) _then) - : super(_value, _then); + _$SubModelImpl _value, + $Res Function(_$SubModelImpl) _then, + ) : super(_value, _then); /// Create a copy of SubModel /// with the given fields replaced by the non-null parameter values. @@ -422,76 +453,91 @@ class __$$SubModelImplCopyWithImpl<$Res> Object? createdAt = null, Object? updatedAt = null, }) { - return _then(_$SubModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - slug: null == slug - ? _value.slug - : slug // ignore: cast_nullable_to_non_nullable - as String, - name: null == name - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - city: null == city - ? _value.city - : city // ignore: cast_nullable_to_non_nullable - as String, - birthdate: null == birthdate - ? _value.birthdate - : birthdate // ignore: cast_nullable_to_non_nullable - as DateTime, - isEntitySubscribedByMe: null == isEntitySubscribedByMe - ? _value.isEntitySubscribedByMe - : isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable - as bool, - email: null == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String, - profilePhotoUrl: null == profilePhotoUrl - ? _value.profilePhotoUrl - : profilePhotoUrl // ignore: cast_nullable_to_non_nullable - as String, - role: null == role - ? _value.role - : role // ignore: cast_nullable_to_non_nullable - as String, - isPublicProfile: null == isPublicProfile - ? _value.isPublicProfile - : isPublicProfile // ignore: cast_nullable_to_non_nullable - as bool, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - )); + return _then( + _$SubModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + slug: + null == slug + ? _value.slug + : slug // ignore: cast_nullable_to_non_nullable + as String, + name: + null == name + ? _value.name + : name // ignore: cast_nullable_to_non_nullable + as String, + city: + null == city + ? _value.city + : city // ignore: cast_nullable_to_non_nullable + as String, + birthdate: + null == birthdate + ? _value.birthdate + : birthdate // ignore: cast_nullable_to_non_nullable + as DateTime, + isEntitySubscribedByMe: + null == isEntitySubscribedByMe + ? _value.isEntitySubscribedByMe + : isEntitySubscribedByMe // ignore: cast_nullable_to_non_nullable + as bool, + email: + null == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as String, + profilePhotoUrl: + null == profilePhotoUrl + ? _value.profilePhotoUrl + : profilePhotoUrl // ignore: cast_nullable_to_non_nullable + as String, + role: + null == role + ? _value.role + : role // ignore: cast_nullable_to_non_nullable + as String, + isPublicProfile: + null == isPublicProfile + ? _value.isPublicProfile + : isPublicProfile // ignore: cast_nullable_to_non_nullable + as bool, + createdAt: + null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: + null == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + ), + ); } } /// @nodoc @JsonSerializable() class _$SubModelImpl implements _SubModel { - const _$SubModelImpl( - {required this.id, - required this.slug, - required this.name, - required this.city, - required this.birthdate, - @JsonKey(name: 'is_entity_subscribed_by_me') - required this.isEntitySubscribedByMe, - required this.email, - @JsonKey(name: 'profile_photo_url') required this.profilePhotoUrl, - required this.role, - @JsonKey(name: 'is_public_profile') required this.isPublicProfile, - @JsonKey(name: 'created_at') required this.createdAt, - @JsonKey(name: 'updated_at') required this.updatedAt}); + const _$SubModelImpl({ + required this.id, + required this.slug, + required this.name, + required this.city, + required this.birthdate, + @JsonKey(name: 'is_entity_subscribed_by_me') + required this.isEntitySubscribedByMe, + required this.email, + @JsonKey(name: 'profile_photo_url') required this.profilePhotoUrl, + required this.role, + @JsonKey(name: 'is_public_profile') required this.isPublicProfile, + @JsonKey(name: 'created_at') required this.createdAt, + @JsonKey(name: 'updated_at') required this.updatedAt, + }); factory _$SubModelImpl.fromJson(Map json) => _$$SubModelImplFromJson(json); @@ -559,19 +605,20 @@ class _$SubModelImpl implements _SubModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - id, - slug, - name, - city, - birthdate, - isEntitySubscribedByMe, - email, - profilePhotoUrl, - role, - isPublicProfile, - createdAt, - updatedAt); + runtimeType, + id, + slug, + name, + city, + birthdate, + isEntitySubscribedByMe, + email, + profilePhotoUrl, + role, + isPublicProfile, + createdAt, + updatedAt, + ); /// Create a copy of SubModel /// with the given fields replaced by the non-null parameter values. @@ -583,28 +630,26 @@ class _$SubModelImpl implements _SubModel { @override Map toJson() { - return _$$SubModelImplToJson( - this, - ); + return _$$SubModelImplToJson(this); } } abstract class _SubModel implements SubModel { - const factory _SubModel( - {required final int id, - required final String slug, - required final String name, - required final String city, - required final DateTime birthdate, - @JsonKey(name: 'is_entity_subscribed_by_me') - required final bool isEntitySubscribedByMe, - required final String email, - @JsonKey(name: 'profile_photo_url') required final String profilePhotoUrl, - required final String role, - @JsonKey(name: 'is_public_profile') required final bool isPublicProfile, - @JsonKey(name: 'created_at') required final DateTime createdAt, - @JsonKey(name: 'updated_at') - required final DateTime updatedAt}) = _$SubModelImpl; + const factory _SubModel({ + required final int id, + required final String slug, + required final String name, + required final String city, + required final DateTime birthdate, + @JsonKey(name: 'is_entity_subscribed_by_me') + required final bool isEntitySubscribedByMe, + required final String email, + @JsonKey(name: 'profile_photo_url') required final String profilePhotoUrl, + required final String role, + @JsonKey(name: 'is_public_profile') required final bool isPublicProfile, + @JsonKey(name: 'created_at') required final DateTime createdAt, + @JsonKey(name: 'updated_at') required final DateTime updatedAt, + }) = _$SubModelImpl; factory _SubModel.fromJson(Map json) = _$SubModelImpl.fromJson; diff --git a/lib/features/profile/models/sub_model.g.dart b/lib/features/profile/models/sub_model.g.dart index e3c9397e..f4efe774 100644 --- a/lib/features/profile/models/sub_model.g.dart +++ b/lib/features/profile/models/sub_model.g.dart @@ -7,22 +7,23 @@ part of 'sub_model.dart'; // ************************************************************************** _$SubPaginationModelImpl _$$SubPaginationModelImplFromJson( - Map json) => - _$SubPaginationModelImpl( - data: (json['data'] as List) + Map json, +) => _$SubPaginationModelImpl( + data: + (json['data'] as List) .map((e) => SubModel.fromJson(e as Map)) .toList(), - links: Links.fromJson(json['links'] as Map), - meta: Meta.fromJson(json['meta'] as Map), - ); + links: Links.fromJson(json['links'] as Map), + meta: Meta.fromJson(json['meta'] as Map), +); Map _$$SubPaginationModelImplToJson( - _$SubPaginationModelImpl instance) => - { - 'data': instance.data, - 'links': instance.links, - 'meta': instance.meta, - }; + _$SubPaginationModelImpl instance, +) => { + 'data': instance.data, + 'links': instance.links, + 'meta': instance.meta, +}; _$SubModelImpl _$$SubModelImplFromJson(Map json) => _$SubModelImpl( diff --git a/lib/features/profile/models/weight_model.freezed.dart b/lib/features/profile/models/weight_model.freezed.dart index 3ca65637..59e2ae3e 100644 --- a/lib/features/profile/models/weight_model.freezed.dart +++ b/lib/features/profile/models/weight_model.freezed.dart @@ -12,7 +12,8 @@ part of 'weight_model.dart'; 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'); + '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', +); WeightModel _$WeightModelFromJson(Map json) { return _WeightModel.fromJson(json); @@ -46,16 +47,18 @@ mixin _$WeightModel { /// @nodoc abstract class $WeightModelCopyWith<$Res> { factory $WeightModelCopyWith( - WeightModel value, $Res Function(WeightModel) then) = - _$WeightModelCopyWithImpl<$Res, WeightModel>; + WeightModel value, + $Res Function(WeightModel) then, + ) = _$WeightModelCopyWithImpl<$Res, WeightModel>; @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "user_id") int userId, - @JsonKey(name: "weight") int weight, - @JsonKey(name: "created_at") DateTime createdAt, - @JsonKey(name: "updated_at") DateTime updatedAt, - @JsonKey(name: "bmi") double bmi}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "user_id") int userId, + @JsonKey(name: "weight") int weight, + @JsonKey(name: "created_at") DateTime createdAt, + @JsonKey(name: "updated_at") DateTime updatedAt, + @JsonKey(name: "bmi") double bmi, + }); } /// @nodoc @@ -80,32 +83,41 @@ class _$WeightModelCopyWithImpl<$Res, $Val extends WeightModel> Object? updatedAt = null, Object? bmi = null, }) { - return _then(_value.copyWith( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - userId: null == userId - ? _value.userId - : userId // ignore: cast_nullable_to_non_nullable - as int, - weight: null == weight - ? _value.weight - : weight // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - bmi: null == bmi - ? _value.bmi - : bmi // ignore: cast_nullable_to_non_nullable - as double, - ) as $Val); + return _then( + _value.copyWith( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + userId: + null == userId + ? _value.userId + : userId // ignore: cast_nullable_to_non_nullable + as int, + weight: + null == weight + ? _value.weight + : weight // ignore: cast_nullable_to_non_nullable + as int, + createdAt: + null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: + null == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + bmi: + null == bmi + ? _value.bmi + : bmi // ignore: cast_nullable_to_non_nullable + as double, + ) + as $Val, + ); } } @@ -113,17 +125,19 @@ class _$WeightModelCopyWithImpl<$Res, $Val extends WeightModel> abstract class _$$WeightModelImplCopyWith<$Res> implements $WeightModelCopyWith<$Res> { factory _$$WeightModelImplCopyWith( - _$WeightModelImpl value, $Res Function(_$WeightModelImpl) then) = - __$$WeightModelImplCopyWithImpl<$Res>; + _$WeightModelImpl value, + $Res Function(_$WeightModelImpl) then, + ) = __$$WeightModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "id") int id, - @JsonKey(name: "user_id") int userId, - @JsonKey(name: "weight") int weight, - @JsonKey(name: "created_at") DateTime createdAt, - @JsonKey(name: "updated_at") DateTime updatedAt, - @JsonKey(name: "bmi") double bmi}); + $Res call({ + @JsonKey(name: "id") int id, + @JsonKey(name: "user_id") int userId, + @JsonKey(name: "weight") int weight, + @JsonKey(name: "created_at") DateTime createdAt, + @JsonKey(name: "updated_at") DateTime updatedAt, + @JsonKey(name: "bmi") double bmi, + }); } /// @nodoc @@ -131,8 +145,9 @@ class __$$WeightModelImplCopyWithImpl<$Res> extends _$WeightModelCopyWithImpl<$Res, _$WeightModelImpl> implements _$$WeightModelImplCopyWith<$Res> { __$$WeightModelImplCopyWithImpl( - _$WeightModelImpl _value, $Res Function(_$WeightModelImpl) _then) - : super(_value, _then); + _$WeightModelImpl _value, + $Res Function(_$WeightModelImpl) _then, + ) : super(_value, _then); /// Create a copy of WeightModel /// with the given fields replaced by the non-null parameter values. @@ -146,45 +161,54 @@ class __$$WeightModelImplCopyWithImpl<$Res> Object? updatedAt = null, Object? bmi = null, }) { - return _then(_$WeightModelImpl( - id: null == id - ? _value.id - : id // ignore: cast_nullable_to_non_nullable - as int, - userId: null == userId - ? _value.userId - : userId // ignore: cast_nullable_to_non_nullable - as int, - weight: null == weight - ? _value.weight - : weight // ignore: cast_nullable_to_non_nullable - as int, - createdAt: null == createdAt - ? _value.createdAt - : createdAt // ignore: cast_nullable_to_non_nullable - as DateTime, - updatedAt: null == updatedAt - ? _value.updatedAt - : updatedAt // ignore: cast_nullable_to_non_nullable - as DateTime, - bmi: null == bmi - ? _value.bmi - : bmi // ignore: cast_nullable_to_non_nullable - as double, - )); + return _then( + _$WeightModelImpl( + id: + null == id + ? _value.id + : id // ignore: cast_nullable_to_non_nullable + as int, + userId: + null == userId + ? _value.userId + : userId // ignore: cast_nullable_to_non_nullable + as int, + weight: + null == weight + ? _value.weight + : weight // ignore: cast_nullable_to_non_nullable + as int, + createdAt: + null == createdAt + ? _value.createdAt + : createdAt // ignore: cast_nullable_to_non_nullable + as DateTime, + updatedAt: + null == updatedAt + ? _value.updatedAt + : updatedAt // ignore: cast_nullable_to_non_nullable + as DateTime, + bmi: + null == bmi + ? _value.bmi + : bmi // ignore: cast_nullable_to_non_nullable + as double, + ), + ); } } /// @nodoc @JsonSerializable() class _$WeightModelImpl implements _WeightModel { - const _$WeightModelImpl( - {@JsonKey(name: "id") required this.id, - @JsonKey(name: "user_id") required this.userId, - @JsonKey(name: "weight") required this.weight, - @JsonKey(name: "created_at") required this.createdAt, - @JsonKey(name: "updated_at") required this.updatedAt, - @JsonKey(name: "bmi") required this.bmi}); + const _$WeightModelImpl({ + @JsonKey(name: "id") required this.id, + @JsonKey(name: "user_id") required this.userId, + @JsonKey(name: "weight") required this.weight, + @JsonKey(name: "created_at") required this.createdAt, + @JsonKey(name: "updated_at") required this.updatedAt, + @JsonKey(name: "bmi") required this.bmi, + }); factory _$WeightModelImpl.fromJson(Map json) => _$$WeightModelImplFromJson(json); @@ -243,20 +267,19 @@ class _$WeightModelImpl implements _WeightModel { @override Map toJson() { - return _$$WeightModelImplToJson( - this, - ); + return _$$WeightModelImplToJson(this); } } abstract class _WeightModel implements WeightModel { - const factory _WeightModel( - {@JsonKey(name: "id") required final int id, - @JsonKey(name: "user_id") required final int userId, - @JsonKey(name: "weight") required final int weight, - @JsonKey(name: "created_at") required final DateTime createdAt, - @JsonKey(name: "updated_at") required final DateTime updatedAt, - @JsonKey(name: "bmi") required final double bmi}) = _$WeightModelImpl; + const factory _WeightModel({ + @JsonKey(name: "id") required final int id, + @JsonKey(name: "user_id") required final int userId, + @JsonKey(name: "weight") required final int weight, + @JsonKey(name: "created_at") required final DateTime createdAt, + @JsonKey(name: "updated_at") required final DateTime updatedAt, + @JsonKey(name: "bmi") required final double bmi, + }) = _$WeightModelImpl; factory _WeightModel.fromJson(Map json) = _$WeightModelImpl.fromJson; diff --git a/lib/features/profile/presentation/bloc/plans_cubit/plans_state.freezed.dart b/lib/features/profile/presentation/bloc/plans_cubit/plans_state.freezed.dart index 9230dbdf..b9e153e6 100644 --- a/lib/features/profile/presentation/bloc/plans_cubit/plans_state.freezed.dart +++ b/lib/features/profile/presentation/bloc/plans_cubit/plans_state.freezed.dart @@ -12,7 +12,8 @@ part of 'plans_state.dart'; 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'); + '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 _$PlansState { @@ -22,16 +23,14 @@ mixin _$PlansState { required TResult Function() loading, required TResult Function(List plansList) loaded, required TResult Function(String errorMessage) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, TResult? Function(List plansList)? loaded, TResult? Function(String errorMessage)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { @@ -39,24 +38,21 @@ mixin _$PlansState { TResult Function(List plansList)? loaded, TResult Function(String errorMessage)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult map( TResult Function(_PlansState value) $default, { required TResult Function(PlansStateLoading value) loading, required TResult Function(PlansStateLoaded value) loaded, required TResult Function(PlansStateError value) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull( TResult? Function(_PlansState value)? $default, { TResult? Function(PlansStateLoading value)? loading, TResult? Function(PlansStateLoaded value)? loaded, TResult? Function(PlansStateError value)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_PlansState value)? $default, { @@ -64,15 +60,15 @@ mixin _$PlansState { TResult Function(PlansStateLoaded value)? loaded, TResult Function(PlansStateError value)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc abstract class $PlansStateCopyWith<$Res> { factory $PlansStateCopyWith( - PlansState value, $Res Function(PlansState) then) = - _$PlansStateCopyWithImpl<$Res, PlansState>; + PlansState value, + $Res Function(PlansState) then, + ) = _$PlansStateCopyWithImpl<$Res, PlansState>; } /// @nodoc @@ -92,8 +88,9 @@ class _$PlansStateCopyWithImpl<$Res, $Val extends PlansState> /// @nodoc abstract class _$$PlansStateImplCopyWith<$Res> { factory _$$PlansStateImplCopyWith( - _$PlansStateImpl value, $Res Function(_$PlansStateImpl) then) = - __$$PlansStateImplCopyWithImpl<$Res>; + _$PlansStateImpl value, + $Res Function(_$PlansStateImpl) then, + ) = __$$PlansStateImplCopyWithImpl<$Res>; } /// @nodoc @@ -101,8 +98,9 @@ class __$$PlansStateImplCopyWithImpl<$Res> extends _$PlansStateCopyWithImpl<$Res, _$PlansStateImpl> implements _$$PlansStateImplCopyWith<$Res> { __$$PlansStateImplCopyWithImpl( - _$PlansStateImpl _value, $Res Function(_$PlansStateImpl) _then) - : super(_value, _then); + _$PlansStateImpl _value, + $Res Function(_$PlansStateImpl) _then, + ) : super(_value, _then); /// Create a copy of PlansState /// with the given fields replaced by the non-null parameter values. @@ -208,18 +206,20 @@ abstract class _PlansState implements PlansState { /// @nodoc abstract class _$$PlansStateLoadingImplCopyWith<$Res> { - factory _$$PlansStateLoadingImplCopyWith(_$PlansStateLoadingImpl value, - $Res Function(_$PlansStateLoadingImpl) then) = - __$$PlansStateLoadingImplCopyWithImpl<$Res>; + factory _$$PlansStateLoadingImplCopyWith( + _$PlansStateLoadingImpl value, + $Res Function(_$PlansStateLoadingImpl) then, + ) = __$$PlansStateLoadingImplCopyWithImpl<$Res>; } /// @nodoc class __$$PlansStateLoadingImplCopyWithImpl<$Res> extends _$PlansStateCopyWithImpl<$Res, _$PlansStateLoadingImpl> implements _$$PlansStateLoadingImplCopyWith<$Res> { - __$$PlansStateLoadingImplCopyWithImpl(_$PlansStateLoadingImpl _value, - $Res Function(_$PlansStateLoadingImpl) _then) - : super(_value, _then); + __$$PlansStateLoadingImplCopyWithImpl( + _$PlansStateLoadingImpl _value, + $Res Function(_$PlansStateLoadingImpl) _then, + ) : super(_value, _then); /// Create a copy of PlansState /// with the given fields replaced by the non-null parameter values. @@ -325,9 +325,10 @@ abstract class PlansStateLoading implements PlansState { /// @nodoc abstract class _$$PlansStateLoadedImplCopyWith<$Res> { - factory _$$PlansStateLoadedImplCopyWith(_$PlansStateLoadedImpl value, - $Res Function(_$PlansStateLoadedImpl) then) = - __$$PlansStateLoadedImplCopyWithImpl<$Res>; + factory _$$PlansStateLoadedImplCopyWith( + _$PlansStateLoadedImpl value, + $Res Function(_$PlansStateLoadedImpl) then, + ) = __$$PlansStateLoadedImplCopyWithImpl<$Res>; @useResult $Res call({List plansList}); } @@ -336,23 +337,25 @@ abstract class _$$PlansStateLoadedImplCopyWith<$Res> { class __$$PlansStateLoadedImplCopyWithImpl<$Res> extends _$PlansStateCopyWithImpl<$Res, _$PlansStateLoadedImpl> implements _$$PlansStateLoadedImplCopyWith<$Res> { - __$$PlansStateLoadedImplCopyWithImpl(_$PlansStateLoadedImpl _value, - $Res Function(_$PlansStateLoadedImpl) _then) - : super(_value, _then); + __$$PlansStateLoadedImplCopyWithImpl( + _$PlansStateLoadedImpl _value, + $Res Function(_$PlansStateLoadedImpl) _then, + ) : super(_value, _then); /// Create a copy of PlansState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? plansList = null, - }) { - return _then(_$PlansStateLoadedImpl( - plansList: null == plansList - ? _value._plansList - : plansList // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? plansList = null}) { + return _then( + _$PlansStateLoadedImpl( + plansList: + null == plansList + ? _value._plansList + : plansList // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -360,7 +363,7 @@ class __$$PlansStateLoadedImplCopyWithImpl<$Res> class _$PlansStateLoadedImpl implements PlansStateLoaded { const _$PlansStateLoadedImpl({required final List plansList}) - : _plansList = plansList; + : _plansList = plansList; final List _plansList; @override @@ -380,8 +383,10 @@ class _$PlansStateLoadedImpl implements PlansStateLoaded { return identical(this, other) || (other.runtimeType == runtimeType && other is _$PlansStateLoadedImpl && - const DeepCollectionEquality() - .equals(other._plansList, _plansList)); + const DeepCollectionEquality().equals( + other._plansList, + _plansList, + )); } @override @@ -395,7 +400,9 @@ class _$PlansStateLoadedImpl implements PlansStateLoaded { @pragma('vm:prefer-inline') _$$PlansStateLoadedImplCopyWith<_$PlansStateLoadedImpl> get copyWith => __$$PlansStateLoadedImplCopyWithImpl<_$PlansStateLoadedImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs @@ -487,9 +494,10 @@ abstract class PlansStateLoaded implements PlansState { /// @nodoc abstract class _$$PlansStateErrorImplCopyWith<$Res> { - factory _$$PlansStateErrorImplCopyWith(_$PlansStateErrorImpl value, - $Res Function(_$PlansStateErrorImpl) then) = - __$$PlansStateErrorImplCopyWithImpl<$Res>; + factory _$$PlansStateErrorImplCopyWith( + _$PlansStateErrorImpl value, + $Res Function(_$PlansStateErrorImpl) then, + ) = __$$PlansStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String errorMessage}); } @@ -499,22 +507,24 @@ class __$$PlansStateErrorImplCopyWithImpl<$Res> extends _$PlansStateCopyWithImpl<$Res, _$PlansStateErrorImpl> implements _$$PlansStateErrorImplCopyWith<$Res> { __$$PlansStateErrorImplCopyWithImpl( - _$PlansStateErrorImpl _value, $Res Function(_$PlansStateErrorImpl) _then) - : super(_value, _then); + _$PlansStateErrorImpl _value, + $Res Function(_$PlansStateErrorImpl) _then, + ) : super(_value, _then); /// Create a copy of PlansState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? errorMessage = null, - }) { - return _then(_$PlansStateErrorImpl( - errorMessage: null == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? errorMessage = null}) { + return _then( + _$PlansStateErrorImpl( + errorMessage: + null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -550,7 +560,9 @@ class _$PlansStateErrorImpl implements PlansStateError { @pragma('vm:prefer-inline') _$$PlansStateErrorImplCopyWith<_$PlansStateErrorImpl> get copyWith => __$$PlansStateErrorImplCopyWithImpl<_$PlansStateErrorImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs diff --git a/lib/features/profile/presentation/bloc/profile_cubit/profile_state.freezed.dart b/lib/features/profile/presentation/bloc/profile_cubit/profile_state.freezed.dart index 8919e36f..13b0de4d 100644 --- a/lib/features/profile/presentation/bloc/profile_cubit/profile_state.freezed.dart +++ b/lib/features/profile/presentation/bloc/profile_cubit/profile_state.freezed.dart @@ -12,7 +12,8 @@ part of 'profile_state.dart'; 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'); + '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 _$ProfileState { @@ -21,60 +22,58 @@ mixin _$ProfileState { TResult Function() $default, { required TResult Function() loading, required TResult Function( - ProfileModel profile, - ProfileDetailsModel profileDetails, - List blogPosts, - List? weightPoints, - List? circumferencePoints) - loaded, + ProfileModel profile, + ProfileDetailsModel profileDetails, + List blogPosts, + List? weightPoints, + List? circumferencePoints, + ) + loaded, required TResult Function(String errorMessage) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, TResult? Function( - ProfileModel profile, - ProfileDetailsModel profileDetails, - List blogPosts, - List? weightPoints, - List? circumferencePoints)? - loaded, + ProfileModel profile, + ProfileDetailsModel profileDetails, + List blogPosts, + List? weightPoints, + List? circumferencePoints, + )? + loaded, TResult? Function(String errorMessage)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, TResult Function( - ProfileModel profile, - ProfileDetailsModel profileDetails, - List blogPosts, - List? weightPoints, - List? circumferencePoints)? - loaded, + ProfileModel profile, + ProfileDetailsModel profileDetails, + List blogPosts, + List? weightPoints, + List? circumferencePoints, + )? + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult map( TResult Function(_ProfileState value) $default, { required TResult Function(ProfileStateLoading value) loading, required TResult Function(ProfileStateLoaded value) loaded, required TResult Function(ProfileStateError value) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull( TResult? Function(_ProfileState value)? $default, { TResult? Function(ProfileStateLoading value)? loading, TResult? Function(ProfileStateLoaded value)? loaded, TResult? Function(ProfileStateError value)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_ProfileState value)? $default, { @@ -82,15 +81,15 @@ mixin _$ProfileState { TResult Function(ProfileStateLoaded value)? loaded, TResult Function(ProfileStateError value)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc abstract class $ProfileStateCopyWith<$Res> { factory $ProfileStateCopyWith( - ProfileState value, $Res Function(ProfileState) then) = - _$ProfileStateCopyWithImpl<$Res, ProfileState>; + ProfileState value, + $Res Function(ProfileState) then, + ) = _$ProfileStateCopyWithImpl<$Res, ProfileState>; } /// @nodoc @@ -110,8 +109,9 @@ class _$ProfileStateCopyWithImpl<$Res, $Val extends ProfileState> /// @nodoc abstract class _$$ProfileStateImplCopyWith<$Res> { factory _$$ProfileStateImplCopyWith( - _$ProfileStateImpl value, $Res Function(_$ProfileStateImpl) then) = - __$$ProfileStateImplCopyWithImpl<$Res>; + _$ProfileStateImpl value, + $Res Function(_$ProfileStateImpl) then, + ) = __$$ProfileStateImplCopyWithImpl<$Res>; } /// @nodoc @@ -119,8 +119,9 @@ class __$$ProfileStateImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateImpl> implements _$$ProfileStateImplCopyWith<$Res> { __$$ProfileStateImplCopyWithImpl( - _$ProfileStateImpl _value, $Res Function(_$ProfileStateImpl) _then) - : super(_value, _then); + _$ProfileStateImpl _value, + $Res Function(_$ProfileStateImpl) _then, + ) : super(_value, _then); /// Create a copy of ProfileState /// with the given fields replaced by the non-null parameter values. @@ -151,12 +152,13 @@ class _$ProfileStateImpl implements _ProfileState { TResult Function() $default, { required TResult Function() loading, required TResult Function( - ProfileModel profile, - ProfileDetailsModel profileDetails, - List blogPosts, - List? weightPoints, - List? circumferencePoints) - loaded, + ProfileModel profile, + ProfileDetailsModel profileDetails, + List blogPosts, + List? weightPoints, + List? circumferencePoints, + ) + loaded, required TResult Function(String errorMessage) error, }) { return $default(); @@ -168,12 +170,13 @@ class _$ProfileStateImpl implements _ProfileState { TResult? Function()? $default, { TResult? Function()? loading, TResult? Function( - ProfileModel profile, - ProfileDetailsModel profileDetails, - List blogPosts, - List? weightPoints, - List? circumferencePoints)? - loaded, + ProfileModel profile, + ProfileDetailsModel profileDetails, + List blogPosts, + List? weightPoints, + List? circumferencePoints, + )? + loaded, TResult? Function(String errorMessage)? error, }) { return $default?.call(); @@ -185,12 +188,13 @@ class _$ProfileStateImpl implements _ProfileState { TResult Function()? $default, { TResult Function()? loading, TResult Function( - ProfileModel profile, - ProfileDetailsModel profileDetails, - List blogPosts, - List? weightPoints, - List? circumferencePoints)? - loaded, + ProfileModel profile, + ProfileDetailsModel profileDetails, + List blogPosts, + List? weightPoints, + List? circumferencePoints, + )? + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -244,18 +248,20 @@ abstract class _ProfileState implements ProfileState { /// @nodoc abstract class _$$ProfileStateLoadingImplCopyWith<$Res> { - factory _$$ProfileStateLoadingImplCopyWith(_$ProfileStateLoadingImpl value, - $Res Function(_$ProfileStateLoadingImpl) then) = - __$$ProfileStateLoadingImplCopyWithImpl<$Res>; + factory _$$ProfileStateLoadingImplCopyWith( + _$ProfileStateLoadingImpl value, + $Res Function(_$ProfileStateLoadingImpl) then, + ) = __$$ProfileStateLoadingImplCopyWithImpl<$Res>; } /// @nodoc class __$$ProfileStateLoadingImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateLoadingImpl> implements _$$ProfileStateLoadingImplCopyWith<$Res> { - __$$ProfileStateLoadingImplCopyWithImpl(_$ProfileStateLoadingImpl _value, - $Res Function(_$ProfileStateLoadingImpl) _then) - : super(_value, _then); + __$$ProfileStateLoadingImplCopyWithImpl( + _$ProfileStateLoadingImpl _value, + $Res Function(_$ProfileStateLoadingImpl) _then, + ) : super(_value, _then); /// Create a copy of ProfileState /// with the given fields replaced by the non-null parameter values. @@ -287,12 +293,13 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading { TResult Function() $default, { required TResult Function() loading, required TResult Function( - ProfileModel profile, - ProfileDetailsModel profileDetails, - List blogPosts, - List? weightPoints, - List? circumferencePoints) - loaded, + ProfileModel profile, + ProfileDetailsModel profileDetails, + List blogPosts, + List? weightPoints, + List? circumferencePoints, + ) + loaded, required TResult Function(String errorMessage) error, }) { return loading(); @@ -304,12 +311,13 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading { TResult? Function()? $default, { TResult? Function()? loading, TResult? Function( - ProfileModel profile, - ProfileDetailsModel profileDetails, - List blogPosts, - List? weightPoints, - List? circumferencePoints)? - loaded, + ProfileModel profile, + ProfileDetailsModel profileDetails, + List blogPosts, + List? weightPoints, + List? circumferencePoints, + )? + loaded, TResult? Function(String errorMessage)? error, }) { return loading?.call(); @@ -321,12 +329,13 @@ class _$ProfileStateLoadingImpl implements ProfileStateLoading { TResult Function()? $default, { TResult Function()? loading, TResult Function( - ProfileModel profile, - ProfileDetailsModel profileDetails, - List blogPosts, - List? weightPoints, - List? circumferencePoints)? - loaded, + ProfileModel profile, + ProfileDetailsModel profileDetails, + List blogPosts, + List? weightPoints, + List? circumferencePoints, + )? + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -380,16 +389,18 @@ abstract class ProfileStateLoading implements ProfileState { /// @nodoc abstract class _$$ProfileStateLoadedImplCopyWith<$Res> { - factory _$$ProfileStateLoadedImplCopyWith(_$ProfileStateLoadedImpl value, - $Res Function(_$ProfileStateLoadedImpl) then) = - __$$ProfileStateLoadedImplCopyWithImpl<$Res>; + factory _$$ProfileStateLoadedImplCopyWith( + _$ProfileStateLoadedImpl value, + $Res Function(_$ProfileStateLoadedImpl) then, + ) = __$$ProfileStateLoadedImplCopyWithImpl<$Res>; @useResult - $Res call( - {ProfileModel profile, - ProfileDetailsModel profileDetails, - List blogPosts, - List? weightPoints, - List? circumferencePoints}); + $Res call({ + ProfileModel profile, + ProfileDetailsModel profileDetails, + List blogPosts, + List? weightPoints, + List? circumferencePoints, + }); $ProfileModelCopyWith<$Res> get profile; $ProfileDetailsModelCopyWith<$Res> get profileDetails; @@ -399,9 +410,10 @@ abstract class _$$ProfileStateLoadedImplCopyWith<$Res> { class __$$ProfileStateLoadedImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateLoadedImpl> implements _$$ProfileStateLoadedImplCopyWith<$Res> { - __$$ProfileStateLoadedImplCopyWithImpl(_$ProfileStateLoadedImpl _value, - $Res Function(_$ProfileStateLoadedImpl) _then) - : super(_value, _then); + __$$ProfileStateLoadedImplCopyWithImpl( + _$ProfileStateLoadedImpl _value, + $Res Function(_$ProfileStateLoadedImpl) _then, + ) : super(_value, _then); /// Create a copy of ProfileState /// with the given fields replaced by the non-null parameter values. @@ -414,28 +426,35 @@ class __$$ProfileStateLoadedImplCopyWithImpl<$Res> Object? weightPoints = freezed, Object? circumferencePoints = freezed, }) { - return _then(_$ProfileStateLoadedImpl( - profile: null == profile - ? _value.profile - : profile // ignore: cast_nullable_to_non_nullable - as ProfileModel, - profileDetails: null == profileDetails - ? _value.profileDetails - : profileDetails // ignore: cast_nullable_to_non_nullable - as ProfileDetailsModel, - blogPosts: null == blogPosts - ? _value._blogPosts - : blogPosts // ignore: cast_nullable_to_non_nullable - as List, - weightPoints: freezed == weightPoints - ? _value._weightPoints - : weightPoints // ignore: cast_nullable_to_non_nullable - as List?, - circumferencePoints: freezed == circumferencePoints - ? _value._circumferencePoints - : circumferencePoints // ignore: cast_nullable_to_non_nullable - as List?, - )); + return _then( + _$ProfileStateLoadedImpl( + profile: + null == profile + ? _value.profile + : profile // ignore: cast_nullable_to_non_nullable + as ProfileModel, + profileDetails: + null == profileDetails + ? _value.profileDetails + : profileDetails // ignore: cast_nullable_to_non_nullable + as ProfileDetailsModel, + blogPosts: + null == blogPosts + ? _value._blogPosts + : blogPosts // ignore: cast_nullable_to_non_nullable + as List, + weightPoints: + freezed == weightPoints + ? _value._weightPoints + : weightPoints // ignore: cast_nullable_to_non_nullable + as List?, + circumferencePoints: + freezed == circumferencePoints + ? _value._circumferencePoints + : circumferencePoints // ignore: cast_nullable_to_non_nullable + as List?, + ), + ); } /// Create a copy of ProfileState @@ -462,15 +481,15 @@ class __$$ProfileStateLoadedImplCopyWithImpl<$Res> /// @nodoc class _$ProfileStateLoadedImpl implements ProfileStateLoaded { - const _$ProfileStateLoadedImpl( - {required this.profile, - required this.profileDetails, - required final List blogPosts, - final List? weightPoints, - final List? circumferencePoints}) - : _blogPosts = blogPosts, - _weightPoints = weightPoints, - _circumferencePoints = circumferencePoints; + const _$ProfileStateLoadedImpl({ + required this.profile, + required this.profileDetails, + required final List blogPosts, + final List? weightPoints, + final List? circumferencePoints, + }) : _blogPosts = blogPosts, + _weightPoints = weightPoints, + _circumferencePoints = circumferencePoints; @override final ProfileModel profile; @@ -518,22 +537,29 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded { (identical(other.profile, profile) || other.profile == profile) && (identical(other.profileDetails, profileDetails) || other.profileDetails == profileDetails) && - const DeepCollectionEquality() - .equals(other._blogPosts, _blogPosts) && - const DeepCollectionEquality() - .equals(other._weightPoints, _weightPoints) && - const DeepCollectionEquality() - .equals(other._circumferencePoints, _circumferencePoints)); + const DeepCollectionEquality().equals( + other._blogPosts, + _blogPosts, + ) && + const DeepCollectionEquality().equals( + other._weightPoints, + _weightPoints, + ) && + const DeepCollectionEquality().equals( + other._circumferencePoints, + _circumferencePoints, + )); } @override int get hashCode => Object.hash( - runtimeType, - profile, - profileDetails, - const DeepCollectionEquality().hash(_blogPosts), - const DeepCollectionEquality().hash(_weightPoints), - const DeepCollectionEquality().hash(_circumferencePoints)); + runtimeType, + profile, + profileDetails, + const DeepCollectionEquality().hash(_blogPosts), + const DeepCollectionEquality().hash(_weightPoints), + const DeepCollectionEquality().hash(_circumferencePoints), + ); /// Create a copy of ProfileState /// with the given fields replaced by the non-null parameter values. @@ -542,7 +568,9 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded { @pragma('vm:prefer-inline') _$$ProfileStateLoadedImplCopyWith<_$ProfileStateLoadedImpl> get copyWith => __$$ProfileStateLoadedImplCopyWithImpl<_$ProfileStateLoadedImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs @@ -550,16 +578,22 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded { TResult Function() $default, { required TResult Function() loading, required TResult Function( - ProfileModel profile, - ProfileDetailsModel profileDetails, - List blogPosts, - List? weightPoints, - List? circumferencePoints) - loaded, + ProfileModel profile, + ProfileDetailsModel profileDetails, + List blogPosts, + List? weightPoints, + List? circumferencePoints, + ) + loaded, required TResult Function(String errorMessage) error, }) { return loaded( - profile, profileDetails, blogPosts, weightPoints, circumferencePoints); + profile, + profileDetails, + blogPosts, + weightPoints, + circumferencePoints, + ); } @override @@ -568,16 +602,22 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded { TResult? Function()? $default, { TResult? Function()? loading, TResult? Function( - ProfileModel profile, - ProfileDetailsModel profileDetails, - List blogPosts, - List? weightPoints, - List? circumferencePoints)? - loaded, + ProfileModel profile, + ProfileDetailsModel profileDetails, + List blogPosts, + List? weightPoints, + List? circumferencePoints, + )? + loaded, TResult? Function(String errorMessage)? error, }) { return loaded?.call( - profile, profileDetails, blogPosts, weightPoints, circumferencePoints); + profile, + profileDetails, + blogPosts, + weightPoints, + circumferencePoints, + ); } @override @@ -586,18 +626,24 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded { TResult Function()? $default, { TResult Function()? loading, TResult Function( - ProfileModel profile, - ProfileDetailsModel profileDetails, - List blogPosts, - List? weightPoints, - List? circumferencePoints)? - loaded, + ProfileModel profile, + ProfileDetailsModel profileDetails, + List blogPosts, + List? weightPoints, + List? circumferencePoints, + )? + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { if (loaded != null) { - return loaded(profile, profileDetails, blogPosts, weightPoints, - circumferencePoints); + return loaded( + profile, + profileDetails, + blogPosts, + weightPoints, + circumferencePoints, + ); } return orElse(); } @@ -641,13 +687,13 @@ class _$ProfileStateLoadedImpl implements ProfileStateLoaded { } abstract class ProfileStateLoaded implements ProfileState { - const factory ProfileStateLoaded( - {required final ProfileModel profile, - required final ProfileDetailsModel profileDetails, - required final List blogPosts, - final List? weightPoints, - final List? circumferencePoints}) = - _$ProfileStateLoadedImpl; + const factory ProfileStateLoaded({ + required final ProfileModel profile, + required final ProfileDetailsModel profileDetails, + required final List blogPosts, + final List? weightPoints, + final List? circumferencePoints, + }) = _$ProfileStateLoadedImpl; ProfileModel get profile; ProfileDetailsModel get profileDetails; @@ -664,9 +710,10 @@ abstract class ProfileStateLoaded implements ProfileState { /// @nodoc abstract class _$$ProfileStateErrorImplCopyWith<$Res> { - factory _$$ProfileStateErrorImplCopyWith(_$ProfileStateErrorImpl value, - $Res Function(_$ProfileStateErrorImpl) then) = - __$$ProfileStateErrorImplCopyWithImpl<$Res>; + factory _$$ProfileStateErrorImplCopyWith( + _$ProfileStateErrorImpl value, + $Res Function(_$ProfileStateErrorImpl) then, + ) = __$$ProfileStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String errorMessage}); } @@ -675,23 +722,25 @@ abstract class _$$ProfileStateErrorImplCopyWith<$Res> { class __$$ProfileStateErrorImplCopyWithImpl<$Res> extends _$ProfileStateCopyWithImpl<$Res, _$ProfileStateErrorImpl> implements _$$ProfileStateErrorImplCopyWith<$Res> { - __$$ProfileStateErrorImplCopyWithImpl(_$ProfileStateErrorImpl _value, - $Res Function(_$ProfileStateErrorImpl) _then) - : super(_value, _then); + __$$ProfileStateErrorImplCopyWithImpl( + _$ProfileStateErrorImpl _value, + $Res Function(_$ProfileStateErrorImpl) _then, + ) : super(_value, _then); /// Create a copy of ProfileState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? errorMessage = null, - }) { - return _then(_$ProfileStateErrorImpl( - errorMessage: null == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? errorMessage = null}) { + return _then( + _$ProfileStateErrorImpl( + errorMessage: + null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -727,7 +776,9 @@ class _$ProfileStateErrorImpl implements ProfileStateError { @pragma('vm:prefer-inline') _$$ProfileStateErrorImplCopyWith<_$ProfileStateErrorImpl> get copyWith => __$$ProfileStateErrorImplCopyWithImpl<_$ProfileStateErrorImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs @@ -735,12 +786,13 @@ class _$ProfileStateErrorImpl implements ProfileStateError { TResult Function() $default, { required TResult Function() loading, required TResult Function( - ProfileModel profile, - ProfileDetailsModel profileDetails, - List blogPosts, - List? weightPoints, - List? circumferencePoints) - loaded, + ProfileModel profile, + ProfileDetailsModel profileDetails, + List blogPosts, + List? weightPoints, + List? circumferencePoints, + ) + loaded, required TResult Function(String errorMessage) error, }) { return error(errorMessage); @@ -752,12 +804,13 @@ class _$ProfileStateErrorImpl implements ProfileStateError { TResult? Function()? $default, { TResult? Function()? loading, TResult? Function( - ProfileModel profile, - ProfileDetailsModel profileDetails, - List blogPosts, - List? weightPoints, - List? circumferencePoints)? - loaded, + ProfileModel profile, + ProfileDetailsModel profileDetails, + List blogPosts, + List? weightPoints, + List? circumferencePoints, + )? + loaded, TResult? Function(String errorMessage)? error, }) { return error?.call(errorMessage); @@ -769,12 +822,13 @@ class _$ProfileStateErrorImpl implements ProfileStateError { TResult Function()? $default, { TResult Function()? loading, TResult Function( - ProfileModel profile, - ProfileDetailsModel profileDetails, - List blogPosts, - List? weightPoints, - List? circumferencePoints)? - loaded, + ProfileModel profile, + ProfileDetailsModel profileDetails, + List blogPosts, + List? weightPoints, + List? circumferencePoints, + )? + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { diff --git a/lib/features/profile/presentation/bloc/sub_cubit/sub_state.freezed.dart b/lib/features/profile/presentation/bloc/sub_cubit/sub_state.freezed.dart index f811921a..ffa284ec 100644 --- a/lib/features/profile/presentation/bloc/sub_cubit/sub_state.freezed.dart +++ b/lib/features/profile/presentation/bloc/sub_cubit/sub_state.freezed.dart @@ -12,7 +12,8 @@ part of 'sub_state.dart'; 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'); + '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 _$SubState { @@ -22,16 +23,14 @@ mixin _$SubState { required TResult Function() loading, required TResult Function(List subList) loaded, required TResult Function(String errorMessage) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, TResult? Function(List subList)? loaded, TResult? Function(String errorMessage)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { @@ -39,24 +38,21 @@ mixin _$SubState { TResult Function(List subList)? loaded, TResult Function(String errorMessage)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult map( TResult Function(_SubState value) $default, { required TResult Function(SubStateLoading value) loading, required TResult Function(SubStateLoaded value) loaded, required TResult Function(SubStateError value) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull( TResult? Function(_SubState value)? $default, { TResult? Function(SubStateLoading value)? loading, TResult? Function(SubStateLoaded value)? loaded, TResult? Function(SubStateError value)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_SubState value)? $default, { @@ -64,8 +60,7 @@ mixin _$SubState { TResult Function(SubStateLoaded value)? loaded, TResult Function(SubStateError value)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc @@ -91,8 +86,9 @@ class _$SubStateCopyWithImpl<$Res, $Val extends SubState> /// @nodoc abstract class _$$SubStateImplCopyWith<$Res> { factory _$$SubStateImplCopyWith( - _$SubStateImpl value, $Res Function(_$SubStateImpl) then) = - __$$SubStateImplCopyWithImpl<$Res>; + _$SubStateImpl value, + $Res Function(_$SubStateImpl) then, + ) = __$$SubStateImplCopyWithImpl<$Res>; } /// @nodoc @@ -100,8 +96,9 @@ class __$$SubStateImplCopyWithImpl<$Res> extends _$SubStateCopyWithImpl<$Res, _$SubStateImpl> implements _$$SubStateImplCopyWith<$Res> { __$$SubStateImplCopyWithImpl( - _$SubStateImpl _value, $Res Function(_$SubStateImpl) _then) - : super(_value, _then); + _$SubStateImpl _value, + $Res Function(_$SubStateImpl) _then, + ) : super(_value, _then); /// Create a copy of SubState /// with the given fields replaced by the non-null parameter values. @@ -207,9 +204,10 @@ abstract class _SubState implements SubState { /// @nodoc abstract class _$$SubStateLoadingImplCopyWith<$Res> { - factory _$$SubStateLoadingImplCopyWith(_$SubStateLoadingImpl value, - $Res Function(_$SubStateLoadingImpl) then) = - __$$SubStateLoadingImplCopyWithImpl<$Res>; + factory _$$SubStateLoadingImplCopyWith( + _$SubStateLoadingImpl value, + $Res Function(_$SubStateLoadingImpl) then, + ) = __$$SubStateLoadingImplCopyWithImpl<$Res>; } /// @nodoc @@ -217,8 +215,9 @@ class __$$SubStateLoadingImplCopyWithImpl<$Res> extends _$SubStateCopyWithImpl<$Res, _$SubStateLoadingImpl> implements _$$SubStateLoadingImplCopyWith<$Res> { __$$SubStateLoadingImplCopyWithImpl( - _$SubStateLoadingImpl _value, $Res Function(_$SubStateLoadingImpl) _then) - : super(_value, _then); + _$SubStateLoadingImpl _value, + $Res Function(_$SubStateLoadingImpl) _then, + ) : super(_value, _then); /// Create a copy of SubState /// with the given fields replaced by the non-null parameter values. @@ -324,9 +323,10 @@ abstract class SubStateLoading implements SubState { /// @nodoc abstract class _$$SubStateLoadedImplCopyWith<$Res> { - factory _$$SubStateLoadedImplCopyWith(_$SubStateLoadedImpl value, - $Res Function(_$SubStateLoadedImpl) then) = - __$$SubStateLoadedImplCopyWithImpl<$Res>; + factory _$$SubStateLoadedImplCopyWith( + _$SubStateLoadedImpl value, + $Res Function(_$SubStateLoadedImpl) then, + ) = __$$SubStateLoadedImplCopyWithImpl<$Res>; @useResult $Res call({List subList}); } @@ -336,22 +336,24 @@ class __$$SubStateLoadedImplCopyWithImpl<$Res> extends _$SubStateCopyWithImpl<$Res, _$SubStateLoadedImpl> implements _$$SubStateLoadedImplCopyWith<$Res> { __$$SubStateLoadedImplCopyWithImpl( - _$SubStateLoadedImpl _value, $Res Function(_$SubStateLoadedImpl) _then) - : super(_value, _then); + _$SubStateLoadedImpl _value, + $Res Function(_$SubStateLoadedImpl) _then, + ) : super(_value, _then); /// Create a copy of SubState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? subList = null, - }) { - return _then(_$SubStateLoadedImpl( - subList: null == subList - ? _value._subList - : subList // ignore: cast_nullable_to_non_nullable - as List, - )); + $Res call({Object? subList = null}) { + return _then( + _$SubStateLoadedImpl( + subList: + null == subList + ? _value._subList + : subList // ignore: cast_nullable_to_non_nullable + as List, + ), + ); } } @@ -359,7 +361,7 @@ class __$$SubStateLoadedImplCopyWithImpl<$Res> class _$SubStateLoadedImpl implements SubStateLoaded { const _$SubStateLoadedImpl({required final List subList}) - : _subList = subList; + : _subList = subList; final List _subList; @override @@ -393,7 +395,9 @@ class _$SubStateLoadedImpl implements SubStateLoaded { @pragma('vm:prefer-inline') _$$SubStateLoadedImplCopyWith<_$SubStateLoadedImpl> get copyWith => __$$SubStateLoadedImplCopyWithImpl<_$SubStateLoadedImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs @@ -486,8 +490,9 @@ abstract class SubStateLoaded implements SubState { /// @nodoc abstract class _$$SubStateErrorImplCopyWith<$Res> { factory _$$SubStateErrorImplCopyWith( - _$SubStateErrorImpl value, $Res Function(_$SubStateErrorImpl) then) = - __$$SubStateErrorImplCopyWithImpl<$Res>; + _$SubStateErrorImpl value, + $Res Function(_$SubStateErrorImpl) then, + ) = __$$SubStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String errorMessage}); } @@ -497,22 +502,24 @@ class __$$SubStateErrorImplCopyWithImpl<$Res> extends _$SubStateCopyWithImpl<$Res, _$SubStateErrorImpl> implements _$$SubStateErrorImplCopyWith<$Res> { __$$SubStateErrorImplCopyWithImpl( - _$SubStateErrorImpl _value, $Res Function(_$SubStateErrorImpl) _then) - : super(_value, _then); + _$SubStateErrorImpl _value, + $Res Function(_$SubStateErrorImpl) _then, + ) : super(_value, _then); /// Create a copy of SubState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? errorMessage = null, - }) { - return _then(_$SubStateErrorImpl( - errorMessage: null == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? errorMessage = null}) { + return _then( + _$SubStateErrorImpl( + errorMessage: + null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } diff --git a/lib/features/profile/services/profile_service.g.dart b/lib/features/profile/services/profile_service.g.dart index 1ac6c499..2cec0b5a 100644 --- a/lib/features/profile/services/profile_service.g.dart +++ b/lib/features/profile/services/profile_service.g.dart @@ -200,12 +200,13 @@ class _ProfileService implements ProfileService { final _result = await _dio.fetch>(_options); late List _value; try { - _value = _result.data! - .map( - (dynamic i) => - FeedBlogPostModel.fromJson(i as Map), - ) - .toList(); + _value = + _result.data! + .map( + (dynamic i) => + FeedBlogPostModel.fromJson(i as Map), + ) + .toList(); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; @@ -232,11 +233,12 @@ class _ProfileService implements ProfileService { final _result = await _dio.fetch>(_options); late List _value; try { - _value = _result.data! - .map( - (dynamic i) => WeightModel.fromJson(i as Map), - ) - .toList(); + _value = + _result.data! + .map( + (dynamic i) => WeightModel.fromJson(i as Map), + ) + .toList(); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; @@ -266,11 +268,12 @@ class _ProfileService implements ProfileService { final _result = await _dio.fetch>(_options); late List _value; try { - _value = _result.data! - .map( - (dynamic i) => WeightModel.fromJson(i as Map), - ) - .toList(); + _value = + _result.data! + .map( + (dynamic i) => WeightModel.fromJson(i as Map), + ) + .toList(); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; @@ -299,12 +302,13 @@ class _ProfileService implements ProfileService { final _result = await _dio.fetch>(_options); late List _value; try { - _value = _result.data! - .map( - (dynamic i) => - CircumferenceModel.fromJson(i as Map), - ) - .toList(); + _value = + _result.data! + .map( + (dynamic i) => + CircumferenceModel.fromJson(i as Map), + ) + .toList(); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; @@ -334,12 +338,13 @@ class _ProfileService implements ProfileService { final _result = await _dio.fetch>(_options); late List _value; try { - _value = _result.data! - .map( - (dynamic i) => - CircumferenceModel.fromJson(i as Map), - ) - .toList(); + _value = + _result.data! + .map( + (dynamic i) => + CircumferenceModel.fromJson(i as Map), + ) + .toList(); } on Object catch (e, s) { errorLogger?.logError(e, s, _options); rethrow; @@ -468,11 +473,11 @@ class _ProfileService implements ProfileService { ); final _options = _setStreamType( Options( - method: 'POST', - headers: _headers, - extra: _extra, - contentType: 'multipart/form-data', - ) + method: 'POST', + headers: _headers, + extra: _extra, + contentType: 'multipart/form-data', + ) .compose( _dio.options, '/api/profile/photo/upload', diff --git a/lib/features/recipe/presentation/cubit/about_recipe_state.freezed.dart b/lib/features/recipe/presentation/cubit/about_recipe_state.freezed.dart index 850c5386..4d6d3375 100644 --- a/lib/features/recipe/presentation/cubit/about_recipe_state.freezed.dart +++ b/lib/features/recipe/presentation/cubit/about_recipe_state.freezed.dart @@ -12,7 +12,8 @@ part of 'about_recipe_state.dart'; 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'); + '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 _$AboutRecipeState { @@ -23,8 +24,7 @@ mixin _$AboutRecipeState { required TResult Function() loading, required TResult Function(Recipe recipe) loaded, required TResult Function(String message) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { @@ -32,8 +32,7 @@ mixin _$AboutRecipeState { TResult? Function()? loading, TResult? Function(Recipe recipe)? loaded, TResult? Function(String message)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { @@ -42,8 +41,7 @@ mixin _$AboutRecipeState { TResult Function(Recipe recipe)? loaded, TResult Function(String message)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult map( TResult Function(_AboutRecipeState value) $default, { @@ -51,8 +49,7 @@ mixin _$AboutRecipeState { required TResult Function(AboutRecipeStateLoading value) loading, required TResult Function(AboutRecipeStateLoaded value) loaded, required TResult Function(RecipeStateError value) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull( TResult? Function(_AboutRecipeState value)? $default, { @@ -60,8 +57,7 @@ mixin _$AboutRecipeState { TResult? Function(AboutRecipeStateLoading value)? loading, TResult? Function(AboutRecipeStateLoaded value)? loaded, TResult? Function(RecipeStateError value)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_AboutRecipeState value)? $default, { @@ -70,15 +66,15 @@ mixin _$AboutRecipeState { TResult Function(AboutRecipeStateLoaded value)? loaded, TResult Function(RecipeStateError value)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc abstract class $AboutRecipeStateCopyWith<$Res> { factory $AboutRecipeStateCopyWith( - AboutRecipeState value, $Res Function(AboutRecipeState) then) = - _$AboutRecipeStateCopyWithImpl<$Res, AboutRecipeState>; + AboutRecipeState value, + $Res Function(AboutRecipeState) then, + ) = _$AboutRecipeStateCopyWithImpl<$Res, AboutRecipeState>; } /// @nodoc @@ -97,18 +93,20 @@ class _$AboutRecipeStateCopyWithImpl<$Res, $Val extends AboutRecipeState> /// @nodoc abstract class _$$AboutRecipeStateImplCopyWith<$Res> { - factory _$$AboutRecipeStateImplCopyWith(_$AboutRecipeStateImpl value, - $Res Function(_$AboutRecipeStateImpl) then) = - __$$AboutRecipeStateImplCopyWithImpl<$Res>; + factory _$$AboutRecipeStateImplCopyWith( + _$AboutRecipeStateImpl value, + $Res Function(_$AboutRecipeStateImpl) then, + ) = __$$AboutRecipeStateImplCopyWithImpl<$Res>; } /// @nodoc class __$$AboutRecipeStateImplCopyWithImpl<$Res> extends _$AboutRecipeStateCopyWithImpl<$Res, _$AboutRecipeStateImpl> implements _$$AboutRecipeStateImplCopyWith<$Res> { - __$$AboutRecipeStateImplCopyWithImpl(_$AboutRecipeStateImpl _value, - $Res Function(_$AboutRecipeStateImpl) _then) - : super(_value, _then); + __$$AboutRecipeStateImplCopyWithImpl( + _$AboutRecipeStateImpl _value, + $Res Function(_$AboutRecipeStateImpl) _then, + ) : super(_value, _then); /// Create a copy of AboutRecipeState /// with the given fields replaced by the non-null parameter values. @@ -221,9 +219,9 @@ abstract class _AboutRecipeState implements AboutRecipeState { /// @nodoc abstract class _$$AboutRecipeStateInitialImplCopyWith<$Res> { factory _$$AboutRecipeStateInitialImplCopyWith( - _$AboutRecipeStateInitialImpl value, - $Res Function(_$AboutRecipeStateInitialImpl) then) = - __$$AboutRecipeStateInitialImplCopyWithImpl<$Res>; + _$AboutRecipeStateInitialImpl value, + $Res Function(_$AboutRecipeStateInitialImpl) then, + ) = __$$AboutRecipeStateInitialImplCopyWithImpl<$Res>; } /// @nodoc @@ -231,9 +229,9 @@ class __$$AboutRecipeStateInitialImplCopyWithImpl<$Res> extends _$AboutRecipeStateCopyWithImpl<$Res, _$AboutRecipeStateInitialImpl> implements _$$AboutRecipeStateInitialImplCopyWith<$Res> { __$$AboutRecipeStateInitialImplCopyWithImpl( - _$AboutRecipeStateInitialImpl _value, - $Res Function(_$AboutRecipeStateInitialImpl) _then) - : super(_value, _then); + _$AboutRecipeStateInitialImpl _value, + $Res Function(_$AboutRecipeStateInitialImpl) _then, + ) : super(_value, _then); /// Create a copy of AboutRecipeState /// with the given fields replaced by the non-null parameter values. @@ -347,9 +345,9 @@ abstract class AboutRecipeStateInitial implements AboutRecipeState { /// @nodoc abstract class _$$AboutRecipeStateLoadingImplCopyWith<$Res> { factory _$$AboutRecipeStateLoadingImplCopyWith( - _$AboutRecipeStateLoadingImpl value, - $Res Function(_$AboutRecipeStateLoadingImpl) then) = - __$$AboutRecipeStateLoadingImplCopyWithImpl<$Res>; + _$AboutRecipeStateLoadingImpl value, + $Res Function(_$AboutRecipeStateLoadingImpl) then, + ) = __$$AboutRecipeStateLoadingImplCopyWithImpl<$Res>; } /// @nodoc @@ -357,9 +355,9 @@ class __$$AboutRecipeStateLoadingImplCopyWithImpl<$Res> extends _$AboutRecipeStateCopyWithImpl<$Res, _$AboutRecipeStateLoadingImpl> implements _$$AboutRecipeStateLoadingImplCopyWith<$Res> { __$$AboutRecipeStateLoadingImplCopyWithImpl( - _$AboutRecipeStateLoadingImpl _value, - $Res Function(_$AboutRecipeStateLoadingImpl) _then) - : super(_value, _then); + _$AboutRecipeStateLoadingImpl _value, + $Res Function(_$AboutRecipeStateLoadingImpl) _then, + ) : super(_value, _then); /// Create a copy of AboutRecipeState /// with the given fields replaced by the non-null parameter values. @@ -473,9 +471,9 @@ abstract class AboutRecipeStateLoading implements AboutRecipeState { /// @nodoc abstract class _$$AboutRecipeStateLoadedImplCopyWith<$Res> { factory _$$AboutRecipeStateLoadedImplCopyWith( - _$AboutRecipeStateLoadedImpl value, - $Res Function(_$AboutRecipeStateLoadedImpl) then) = - __$$AboutRecipeStateLoadedImplCopyWithImpl<$Res>; + _$AboutRecipeStateLoadedImpl value, + $Res Function(_$AboutRecipeStateLoadedImpl) then, + ) = __$$AboutRecipeStateLoadedImplCopyWithImpl<$Res>; @useResult $Res call({Recipe recipe}); @@ -487,23 +485,24 @@ class __$$AboutRecipeStateLoadedImplCopyWithImpl<$Res> extends _$AboutRecipeStateCopyWithImpl<$Res, _$AboutRecipeStateLoadedImpl> implements _$$AboutRecipeStateLoadedImplCopyWith<$Res> { __$$AboutRecipeStateLoadedImplCopyWithImpl( - _$AboutRecipeStateLoadedImpl _value, - $Res Function(_$AboutRecipeStateLoadedImpl) _then) - : super(_value, _then); + _$AboutRecipeStateLoadedImpl _value, + $Res Function(_$AboutRecipeStateLoadedImpl) _then, + ) : super(_value, _then); /// Create a copy of AboutRecipeState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? recipe = null, - }) { - return _then(_$AboutRecipeStateLoadedImpl( - recipe: null == recipe - ? _value.recipe - : recipe // ignore: cast_nullable_to_non_nullable - as Recipe, - )); + $Res call({Object? recipe = null}) { + return _then( + _$AboutRecipeStateLoadedImpl( + recipe: + null == recipe + ? _value.recipe + : recipe // ignore: cast_nullable_to_non_nullable + as Recipe, + ), + ); } /// Create a copy of AboutRecipeState @@ -547,8 +546,11 @@ class _$AboutRecipeStateLoadedImpl implements AboutRecipeStateLoaded { @override @pragma('vm:prefer-inline') _$$AboutRecipeStateLoadedImplCopyWith<_$AboutRecipeStateLoadedImpl> - get copyWith => __$$AboutRecipeStateLoadedImplCopyWithImpl< - _$AboutRecipeStateLoadedImpl>(this, _$identity); + get copyWith => + __$$AboutRecipeStateLoadedImplCopyWithImpl<_$AboutRecipeStateLoadedImpl>( + this, + _$identity, + ); @override @optionalTypeArgs @@ -641,14 +643,15 @@ abstract class AboutRecipeStateLoaded implements AboutRecipeState { /// with the given fields replaced by the non-null parameter values. @JsonKey(includeFromJson: false, includeToJson: false) _$$AboutRecipeStateLoadedImplCopyWith<_$AboutRecipeStateLoadedImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } /// @nodoc abstract class _$$RecipeStateErrorImplCopyWith<$Res> { - factory _$$RecipeStateErrorImplCopyWith(_$RecipeStateErrorImpl value, - $Res Function(_$RecipeStateErrorImpl) then) = - __$$RecipeStateErrorImplCopyWithImpl<$Res>; + factory _$$RecipeStateErrorImplCopyWith( + _$RecipeStateErrorImpl value, + $Res Function(_$RecipeStateErrorImpl) then, + ) = __$$RecipeStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String message}); } @@ -657,23 +660,25 @@ abstract class _$$RecipeStateErrorImplCopyWith<$Res> { class __$$RecipeStateErrorImplCopyWithImpl<$Res> extends _$AboutRecipeStateCopyWithImpl<$Res, _$RecipeStateErrorImpl> implements _$$RecipeStateErrorImplCopyWith<$Res> { - __$$RecipeStateErrorImplCopyWithImpl(_$RecipeStateErrorImpl _value, - $Res Function(_$RecipeStateErrorImpl) _then) - : super(_value, _then); + __$$RecipeStateErrorImplCopyWithImpl( + _$RecipeStateErrorImpl _value, + $Res Function(_$RecipeStateErrorImpl) _then, + ) : super(_value, _then); /// Create a copy of AboutRecipeState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? message = null, - }) { - return _then(_$RecipeStateErrorImpl( - message: null == message - ? _value.message - : message // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? message = null}) { + return _then( + _$RecipeStateErrorImpl( + message: + null == message + ? _value.message + : message // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -708,7 +713,9 @@ class _$RecipeStateErrorImpl implements RecipeStateError { @pragma('vm:prefer-inline') _$$RecipeStateErrorImplCopyWith<_$RecipeStateErrorImpl> get copyWith => __$$RecipeStateErrorImplCopyWithImpl<_$RecipeStateErrorImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs diff --git a/lib/features/registration/models/location_model.freezed.dart b/lib/features/registration/models/location_model.freezed.dart index 95f81d60..05810e6f 100644 --- a/lib/features/registration/models/location_model.freezed.dart +++ b/lib/features/registration/models/location_model.freezed.dart @@ -12,7 +12,8 @@ part of 'location_model.dart'; 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'); + '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', +); LocationModel _$LocationModelFromJson(Map json) { return _LocationModel.fromJson(json); @@ -37,12 +38,14 @@ mixin _$LocationModel { /// @nodoc abstract class $LocationModelCopyWith<$Res> { factory $LocationModelCopyWith( - LocationModel value, $Res Function(LocationModel) then) = - _$LocationModelCopyWithImpl<$Res, LocationModel>; + LocationModel value, + $Res Function(LocationModel) then, + ) = _$LocationModelCopyWithImpl<$Res, LocationModel>; @useResult - $Res call( - {List locations, - @JsonKey(name: 'response_body') String responseBody}); + $Res call({ + List locations, + @JsonKey(name: 'response_body') String responseBody, + }); } /// @nodoc @@ -59,20 +62,22 @@ class _$LocationModelCopyWithImpl<$Res, $Val extends LocationModel> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? locations = null, - Object? responseBody = null, - }) { - return _then(_value.copyWith( - locations: null == locations - ? _value.locations - : locations // ignore: cast_nullable_to_non_nullable - as List, - responseBody: null == responseBody - ? _value.responseBody - : responseBody // ignore: cast_nullable_to_non_nullable - as String, - ) as $Val); + $Res call({Object? locations = null, Object? responseBody = null}) { + return _then( + _value.copyWith( + locations: + null == locations + ? _value.locations + : locations // ignore: cast_nullable_to_non_nullable + as List, + responseBody: + null == responseBody + ? _value.responseBody + : responseBody // ignore: cast_nullable_to_non_nullable + as String, + ) + as $Val, + ); } } @@ -80,13 +85,15 @@ class _$LocationModelCopyWithImpl<$Res, $Val extends LocationModel> abstract class _$$LocationModelImplCopyWith<$Res> implements $LocationModelCopyWith<$Res> { factory _$$LocationModelImplCopyWith( - _$LocationModelImpl value, $Res Function(_$LocationModelImpl) then) = - __$$LocationModelImplCopyWithImpl<$Res>; + _$LocationModelImpl value, + $Res Function(_$LocationModelImpl) then, + ) = __$$LocationModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {List locations, - @JsonKey(name: 'response_body') String responseBody}); + $Res call({ + List locations, + @JsonKey(name: 'response_body') String responseBody, + }); } /// @nodoc @@ -94,37 +101,39 @@ class __$$LocationModelImplCopyWithImpl<$Res> extends _$LocationModelCopyWithImpl<$Res, _$LocationModelImpl> implements _$$LocationModelImplCopyWith<$Res> { __$$LocationModelImplCopyWithImpl( - _$LocationModelImpl _value, $Res Function(_$LocationModelImpl) _then) - : super(_value, _then); + _$LocationModelImpl _value, + $Res Function(_$LocationModelImpl) _then, + ) : super(_value, _then); /// Create a copy of LocationModel /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? locations = null, - Object? responseBody = null, - }) { - return _then(_$LocationModelImpl( - locations: null == locations - ? _value._locations - : locations // ignore: cast_nullable_to_non_nullable - as List, - responseBody: null == responseBody - ? _value.responseBody - : responseBody // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? locations = null, Object? responseBody = null}) { + return _then( + _$LocationModelImpl( + locations: + null == locations + ? _value._locations + : locations // ignore: cast_nullable_to_non_nullable + as List, + responseBody: + null == responseBody + ? _value.responseBody + : responseBody // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } /// @nodoc @JsonSerializable() class _$LocationModelImpl implements _LocationModel { - const _$LocationModelImpl( - {required final List locations, - @JsonKey(name: 'response_body') required this.responseBody}) - : _locations = locations; + const _$LocationModelImpl({ + required final List locations, + @JsonKey(name: 'response_body') required this.responseBody, + }) : _locations = locations; factory _$LocationModelImpl.fromJson(Map json) => _$$LocationModelImplFromJson(json); @@ -151,16 +160,21 @@ class _$LocationModelImpl implements _LocationModel { return identical(this, other) || (other.runtimeType == runtimeType && other is _$LocationModelImpl && - const DeepCollectionEquality() - .equals(other._locations, _locations) && + const DeepCollectionEquality().equals( + other._locations, + _locations, + ) && (identical(other.responseBody, responseBody) || other.responseBody == responseBody)); } @JsonKey(includeFromJson: false, includeToJson: false) @override - int get hashCode => Object.hash(runtimeType, - const DeepCollectionEquality().hash(_locations), responseBody); + int get hashCode => Object.hash( + runtimeType, + const DeepCollectionEquality().hash(_locations), + responseBody, + ); /// Create a copy of LocationModel /// with the given fields replaced by the non-null parameter values. @@ -172,17 +186,15 @@ class _$LocationModelImpl implements _LocationModel { @override Map toJson() { - return _$$LocationModelImplToJson( - this, - ); + return _$$LocationModelImplToJson(this); } } abstract class _LocationModel implements LocationModel { - const factory _LocationModel( - {required final List locations, - @JsonKey(name: 'response_body') required final String responseBody}) = - _$LocationModelImpl; + const factory _LocationModel({ + required final List locations, + @JsonKey(name: 'response_body') required final String responseBody, + }) = _$LocationModelImpl; factory _LocationModel.fromJson(Map json) = _$LocationModelImpl.fromJson; diff --git a/lib/features/registration/models/user_registration_model.freezed.dart b/lib/features/registration/models/user_registration_model.freezed.dart index aed86670..a75a4bdb 100644 --- a/lib/features/registration/models/user_registration_model.freezed.dart +++ b/lib/features/registration/models/user_registration_model.freezed.dart @@ -12,10 +12,12 @@ part of 'user_registration_model.dart'; 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'); + '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', +); UserRegistrationSheet _$UserRegistrationSheetFromJson( - Map json) { + Map json, +) { return _UserRegistrationSheet.fromJson(json); } @@ -81,44 +83,48 @@ mixin _$UserRegistrationSheet { /// @nodoc abstract class $UserRegistrationSheetCopyWith<$Res> { - factory $UserRegistrationSheetCopyWith(UserRegistrationSheet value, - $Res Function(UserRegistrationSheet) then) = - _$UserRegistrationSheetCopyWithImpl<$Res, UserRegistrationSheet>; + factory $UserRegistrationSheetCopyWith( + UserRegistrationSheet value, + $Res Function(UserRegistrationSheet) then, + ) = _$UserRegistrationSheetCopyWithImpl<$Res, UserRegistrationSheet>; @useResult - $Res call( - {@JsonKey(name: 'first_name') String firstName, - @JsonKey(name: 'last_name') String lastName, - String email, - String password, - @JsonKey(name: 'password_confirmation') String passwordConfirmation, - @JsonKey(name: 'terms') String termsAccepted, - String birthdate, - String gender, - String location, - @JsonKey(name: 'response_body') String responseBody, - String lang, - int weight, - int height, - String phone, - @JsonKey(name: 'chest_circumference') int chestCircumference, - @JsonKey(name: 'waist_circumference') int waistCircumference, - @JsonKey(name: 'hip_circumference') int hipCircumference, - @JsonKey(name: 'blood_pressure_up') int bloodPressureUp, - @JsonKey(name: 'blood_pressure_down') int bloodPressureDown, - @JsonKey(name: 'has_hypo') int hasHypo, - @JsonKey(name: 'has_hyper') int hasHyper, - @JsonKey(name: 'about_alergy') String aboutAllergy, - @JsonKey(name: 'about_taking_pils') String aboutTakingPils, - @JsonKey(name: 'about_sport_hobbies') String aboutSportHobbies, - @JsonKey(name: 'favorite_foods') String favoriteFoods, - @JsonKey(name: 'unfavorite_foods') String unfavoriteFoods, - @JsonKey(name: 'additional_info') String additionalInfo, - @JsonKey(name: 'activity_coefficient') double activityCoefficient}); + $Res call({ + @JsonKey(name: 'first_name') String firstName, + @JsonKey(name: 'last_name') String lastName, + String email, + String password, + @JsonKey(name: 'password_confirmation') String passwordConfirmation, + @JsonKey(name: 'terms') String termsAccepted, + String birthdate, + String gender, + String location, + @JsonKey(name: 'response_body') String responseBody, + String lang, + int weight, + int height, + String phone, + @JsonKey(name: 'chest_circumference') int chestCircumference, + @JsonKey(name: 'waist_circumference') int waistCircumference, + @JsonKey(name: 'hip_circumference') int hipCircumference, + @JsonKey(name: 'blood_pressure_up') int bloodPressureUp, + @JsonKey(name: 'blood_pressure_down') int bloodPressureDown, + @JsonKey(name: 'has_hypo') int hasHypo, + @JsonKey(name: 'has_hyper') int hasHyper, + @JsonKey(name: 'about_alergy') String aboutAllergy, + @JsonKey(name: 'about_taking_pils') String aboutTakingPils, + @JsonKey(name: 'about_sport_hobbies') String aboutSportHobbies, + @JsonKey(name: 'favorite_foods') String favoriteFoods, + @JsonKey(name: 'unfavorite_foods') String unfavoriteFoods, + @JsonKey(name: 'additional_info') String additionalInfo, + @JsonKey(name: 'activity_coefficient') double activityCoefficient, + }); } /// @nodoc -class _$UserRegistrationSheetCopyWithImpl<$Res, - $Val extends UserRegistrationSheet> +class _$UserRegistrationSheetCopyWithImpl< + $Res, + $Val extends UserRegistrationSheet +> implements $UserRegistrationSheetCopyWith<$Res> { _$UserRegistrationSheetCopyWithImpl(this._value, this._then); @@ -161,120 +167,151 @@ class _$UserRegistrationSheetCopyWithImpl<$Res, Object? additionalInfo = null, Object? activityCoefficient = null, }) { - return _then(_value.copyWith( - firstName: null == firstName - ? _value.firstName - : firstName // ignore: cast_nullable_to_non_nullable - as String, - lastName: null == lastName - ? _value.lastName - : lastName // ignore: cast_nullable_to_non_nullable - as String, - email: null == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String, - passwordConfirmation: null == passwordConfirmation - ? _value.passwordConfirmation - : passwordConfirmation // ignore: cast_nullable_to_non_nullable - as String, - termsAccepted: null == termsAccepted - ? _value.termsAccepted - : termsAccepted // ignore: cast_nullable_to_non_nullable - as String, - birthdate: null == birthdate - ? _value.birthdate - : birthdate // ignore: cast_nullable_to_non_nullable - as String, - gender: null == gender - ? _value.gender - : gender // ignore: cast_nullable_to_non_nullable - as String, - location: null == location - ? _value.location - : location // ignore: cast_nullable_to_non_nullable - as String, - responseBody: null == responseBody - ? _value.responseBody - : responseBody // ignore: cast_nullable_to_non_nullable - as String, - lang: null == lang - ? _value.lang - : lang // ignore: cast_nullable_to_non_nullable - as String, - weight: null == weight - ? _value.weight - : weight // ignore: cast_nullable_to_non_nullable - as int, - height: null == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as int, - phone: null == phone - ? _value.phone - : phone // ignore: cast_nullable_to_non_nullable - as String, - chestCircumference: null == chestCircumference - ? _value.chestCircumference - : chestCircumference // ignore: cast_nullable_to_non_nullable - as int, - waistCircumference: null == waistCircumference - ? _value.waistCircumference - : waistCircumference // ignore: cast_nullable_to_non_nullable - as int, - hipCircumference: null == hipCircumference - ? _value.hipCircumference - : hipCircumference // ignore: cast_nullable_to_non_nullable - as int, - bloodPressureUp: null == bloodPressureUp - ? _value.bloodPressureUp - : bloodPressureUp // ignore: cast_nullable_to_non_nullable - as int, - bloodPressureDown: null == bloodPressureDown - ? _value.bloodPressureDown - : bloodPressureDown // ignore: cast_nullable_to_non_nullable - as int, - hasHypo: null == hasHypo - ? _value.hasHypo - : hasHypo // ignore: cast_nullable_to_non_nullable - as int, - hasHyper: null == hasHyper - ? _value.hasHyper - : hasHyper // ignore: cast_nullable_to_non_nullable - as int, - aboutAllergy: null == aboutAllergy - ? _value.aboutAllergy - : aboutAllergy // ignore: cast_nullable_to_non_nullable - as String, - aboutTakingPils: null == aboutTakingPils - ? _value.aboutTakingPils - : aboutTakingPils // ignore: cast_nullable_to_non_nullable - as String, - aboutSportHobbies: null == aboutSportHobbies - ? _value.aboutSportHobbies - : aboutSportHobbies // ignore: cast_nullable_to_non_nullable - as String, - favoriteFoods: null == favoriteFoods - ? _value.favoriteFoods - : favoriteFoods // ignore: cast_nullable_to_non_nullable - as String, - unfavoriteFoods: null == unfavoriteFoods - ? _value.unfavoriteFoods - : unfavoriteFoods // ignore: cast_nullable_to_non_nullable - as String, - additionalInfo: null == additionalInfo - ? _value.additionalInfo - : additionalInfo // ignore: cast_nullable_to_non_nullable - as String, - activityCoefficient: null == activityCoefficient - ? _value.activityCoefficient - : activityCoefficient // ignore: cast_nullable_to_non_nullable - as double, - ) as $Val); + return _then( + _value.copyWith( + firstName: + null == firstName + ? _value.firstName + : firstName // ignore: cast_nullable_to_non_nullable + as String, + lastName: + null == lastName + ? _value.lastName + : lastName // ignore: cast_nullable_to_non_nullable + as String, + email: + null == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as String, + password: + null == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable + as String, + passwordConfirmation: + null == passwordConfirmation + ? _value.passwordConfirmation + : passwordConfirmation // ignore: cast_nullable_to_non_nullable + as String, + termsAccepted: + null == termsAccepted + ? _value.termsAccepted + : termsAccepted // ignore: cast_nullable_to_non_nullable + as String, + birthdate: + null == birthdate + ? _value.birthdate + : birthdate // ignore: cast_nullable_to_non_nullable + as String, + gender: + null == gender + ? _value.gender + : gender // ignore: cast_nullable_to_non_nullable + as String, + location: + null == location + ? _value.location + : location // ignore: cast_nullable_to_non_nullable + as String, + responseBody: + null == responseBody + ? _value.responseBody + : responseBody // ignore: cast_nullable_to_non_nullable + as String, + lang: + null == lang + ? _value.lang + : lang // ignore: cast_nullable_to_non_nullable + as String, + weight: + null == weight + ? _value.weight + : weight // ignore: cast_nullable_to_non_nullable + as int, + height: + null == height + ? _value.height + : height // ignore: cast_nullable_to_non_nullable + as int, + phone: + null == phone + ? _value.phone + : phone // ignore: cast_nullable_to_non_nullable + as String, + chestCircumference: + null == chestCircumference + ? _value.chestCircumference + : chestCircumference // ignore: cast_nullable_to_non_nullable + as int, + waistCircumference: + null == waistCircumference + ? _value.waistCircumference + : waistCircumference // ignore: cast_nullable_to_non_nullable + as int, + hipCircumference: + null == hipCircumference + ? _value.hipCircumference + : hipCircumference // ignore: cast_nullable_to_non_nullable + as int, + bloodPressureUp: + null == bloodPressureUp + ? _value.bloodPressureUp + : bloodPressureUp // ignore: cast_nullable_to_non_nullable + as int, + bloodPressureDown: + null == bloodPressureDown + ? _value.bloodPressureDown + : bloodPressureDown // ignore: cast_nullable_to_non_nullable + as int, + hasHypo: + null == hasHypo + ? _value.hasHypo + : hasHypo // ignore: cast_nullable_to_non_nullable + as int, + hasHyper: + null == hasHyper + ? _value.hasHyper + : hasHyper // ignore: cast_nullable_to_non_nullable + as int, + aboutAllergy: + null == aboutAllergy + ? _value.aboutAllergy + : aboutAllergy // ignore: cast_nullable_to_non_nullable + as String, + aboutTakingPils: + null == aboutTakingPils + ? _value.aboutTakingPils + : aboutTakingPils // ignore: cast_nullable_to_non_nullable + as String, + aboutSportHobbies: + null == aboutSportHobbies + ? _value.aboutSportHobbies + : aboutSportHobbies // ignore: cast_nullable_to_non_nullable + as String, + favoriteFoods: + null == favoriteFoods + ? _value.favoriteFoods + : favoriteFoods // ignore: cast_nullable_to_non_nullable + as String, + unfavoriteFoods: + null == unfavoriteFoods + ? _value.unfavoriteFoods + : unfavoriteFoods // ignore: cast_nullable_to_non_nullable + as String, + additionalInfo: + null == additionalInfo + ? _value.additionalInfo + : additionalInfo // ignore: cast_nullable_to_non_nullable + as String, + activityCoefficient: + null == activityCoefficient + ? _value.activityCoefficient + : activityCoefficient // ignore: cast_nullable_to_non_nullable + as double, + ) + as $Val, + ); } } @@ -282,50 +319,52 @@ class _$UserRegistrationSheetCopyWithImpl<$Res, abstract class _$$UserRegistrationSheetImplCopyWith<$Res> implements $UserRegistrationSheetCopyWith<$Res> { factory _$$UserRegistrationSheetImplCopyWith( - _$UserRegistrationSheetImpl value, - $Res Function(_$UserRegistrationSheetImpl) then) = - __$$UserRegistrationSheetImplCopyWithImpl<$Res>; + _$UserRegistrationSheetImpl value, + $Res Function(_$UserRegistrationSheetImpl) then, + ) = __$$UserRegistrationSheetImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: 'first_name') String firstName, - @JsonKey(name: 'last_name') String lastName, - String email, - String password, - @JsonKey(name: 'password_confirmation') String passwordConfirmation, - @JsonKey(name: 'terms') String termsAccepted, - String birthdate, - String gender, - String location, - @JsonKey(name: 'response_body') String responseBody, - String lang, - int weight, - int height, - String phone, - @JsonKey(name: 'chest_circumference') int chestCircumference, - @JsonKey(name: 'waist_circumference') int waistCircumference, - @JsonKey(name: 'hip_circumference') int hipCircumference, - @JsonKey(name: 'blood_pressure_up') int bloodPressureUp, - @JsonKey(name: 'blood_pressure_down') int bloodPressureDown, - @JsonKey(name: 'has_hypo') int hasHypo, - @JsonKey(name: 'has_hyper') int hasHyper, - @JsonKey(name: 'about_alergy') String aboutAllergy, - @JsonKey(name: 'about_taking_pils') String aboutTakingPils, - @JsonKey(name: 'about_sport_hobbies') String aboutSportHobbies, - @JsonKey(name: 'favorite_foods') String favoriteFoods, - @JsonKey(name: 'unfavorite_foods') String unfavoriteFoods, - @JsonKey(name: 'additional_info') String additionalInfo, - @JsonKey(name: 'activity_coefficient') double activityCoefficient}); + $Res call({ + @JsonKey(name: 'first_name') String firstName, + @JsonKey(name: 'last_name') String lastName, + String email, + String password, + @JsonKey(name: 'password_confirmation') String passwordConfirmation, + @JsonKey(name: 'terms') String termsAccepted, + String birthdate, + String gender, + String location, + @JsonKey(name: 'response_body') String responseBody, + String lang, + int weight, + int height, + String phone, + @JsonKey(name: 'chest_circumference') int chestCircumference, + @JsonKey(name: 'waist_circumference') int waistCircumference, + @JsonKey(name: 'hip_circumference') int hipCircumference, + @JsonKey(name: 'blood_pressure_up') int bloodPressureUp, + @JsonKey(name: 'blood_pressure_down') int bloodPressureDown, + @JsonKey(name: 'has_hypo') int hasHypo, + @JsonKey(name: 'has_hyper') int hasHyper, + @JsonKey(name: 'about_alergy') String aboutAllergy, + @JsonKey(name: 'about_taking_pils') String aboutTakingPils, + @JsonKey(name: 'about_sport_hobbies') String aboutSportHobbies, + @JsonKey(name: 'favorite_foods') String favoriteFoods, + @JsonKey(name: 'unfavorite_foods') String unfavoriteFoods, + @JsonKey(name: 'additional_info') String additionalInfo, + @JsonKey(name: 'activity_coefficient') double activityCoefficient, + }); } /// @nodoc class __$$UserRegistrationSheetImplCopyWithImpl<$Res> - extends _$UserRegistrationSheetCopyWithImpl<$Res, - _$UserRegistrationSheetImpl> + extends + _$UserRegistrationSheetCopyWithImpl<$Res, _$UserRegistrationSheetImpl> implements _$$UserRegistrationSheetImplCopyWith<$Res> { - __$$UserRegistrationSheetImplCopyWithImpl(_$UserRegistrationSheetImpl _value, - $Res Function(_$UserRegistrationSheetImpl) _then) - : super(_value, _then); + __$$UserRegistrationSheetImplCopyWithImpl( + _$UserRegistrationSheetImpl _value, + $Res Function(_$UserRegistrationSheetImpl) _then, + ) : super(_value, _then); /// Create a copy of UserRegistrationSheet /// with the given fields replaced by the non-null parameter values. @@ -361,156 +400,186 @@ class __$$UserRegistrationSheetImplCopyWithImpl<$Res> Object? additionalInfo = null, Object? activityCoefficient = null, }) { - return _then(_$UserRegistrationSheetImpl( - firstName: null == firstName - ? _value.firstName - : firstName // ignore: cast_nullable_to_non_nullable - as String, - lastName: null == lastName - ? _value.lastName - : lastName // ignore: cast_nullable_to_non_nullable - as String, - email: null == email - ? _value.email - : email // ignore: cast_nullable_to_non_nullable - as String, - password: null == password - ? _value.password - : password // ignore: cast_nullable_to_non_nullable - as String, - passwordConfirmation: null == passwordConfirmation - ? _value.passwordConfirmation - : passwordConfirmation // ignore: cast_nullable_to_non_nullable - as String, - termsAccepted: null == termsAccepted - ? _value.termsAccepted - : termsAccepted // ignore: cast_nullable_to_non_nullable - as String, - birthdate: null == birthdate - ? _value.birthdate - : birthdate // ignore: cast_nullable_to_non_nullable - as String, - gender: null == gender - ? _value.gender - : gender // ignore: cast_nullable_to_non_nullable - as String, - location: null == location - ? _value.location - : location // ignore: cast_nullable_to_non_nullable - as String, - responseBody: null == responseBody - ? _value.responseBody - : responseBody // ignore: cast_nullable_to_non_nullable - as String, - lang: null == lang - ? _value.lang - : lang // ignore: cast_nullable_to_non_nullable - as String, - weight: null == weight - ? _value.weight - : weight // ignore: cast_nullable_to_non_nullable - as int, - height: null == height - ? _value.height - : height // ignore: cast_nullable_to_non_nullable - as int, - phone: null == phone - ? _value.phone - : phone // ignore: cast_nullable_to_non_nullable - as String, - chestCircumference: null == chestCircumference - ? _value.chestCircumference - : chestCircumference // ignore: cast_nullable_to_non_nullable - as int, - waistCircumference: null == waistCircumference - ? _value.waistCircumference - : waistCircumference // ignore: cast_nullable_to_non_nullable - as int, - hipCircumference: null == hipCircumference - ? _value.hipCircumference - : hipCircumference // ignore: cast_nullable_to_non_nullable - as int, - bloodPressureUp: null == bloodPressureUp - ? _value.bloodPressureUp - : bloodPressureUp // ignore: cast_nullable_to_non_nullable - as int, - bloodPressureDown: null == bloodPressureDown - ? _value.bloodPressureDown - : bloodPressureDown // ignore: cast_nullable_to_non_nullable - as int, - hasHypo: null == hasHypo - ? _value.hasHypo - : hasHypo // ignore: cast_nullable_to_non_nullable - as int, - hasHyper: null == hasHyper - ? _value.hasHyper - : hasHyper // ignore: cast_nullable_to_non_nullable - as int, - aboutAllergy: null == aboutAllergy - ? _value.aboutAllergy - : aboutAllergy // ignore: cast_nullable_to_non_nullable - as String, - aboutTakingPils: null == aboutTakingPils - ? _value.aboutTakingPils - : aboutTakingPils // ignore: cast_nullable_to_non_nullable - as String, - aboutSportHobbies: null == aboutSportHobbies - ? _value.aboutSportHobbies - : aboutSportHobbies // ignore: cast_nullable_to_non_nullable - as String, - favoriteFoods: null == favoriteFoods - ? _value.favoriteFoods - : favoriteFoods // ignore: cast_nullable_to_non_nullable - as String, - unfavoriteFoods: null == unfavoriteFoods - ? _value.unfavoriteFoods - : unfavoriteFoods // ignore: cast_nullable_to_non_nullable - as String, - additionalInfo: null == additionalInfo - ? _value.additionalInfo - : additionalInfo // ignore: cast_nullable_to_non_nullable - as String, - activityCoefficient: null == activityCoefficient - ? _value.activityCoefficient - : activityCoefficient // ignore: cast_nullable_to_non_nullable - as double, - )); + return _then( + _$UserRegistrationSheetImpl( + firstName: + null == firstName + ? _value.firstName + : firstName // ignore: cast_nullable_to_non_nullable + as String, + lastName: + null == lastName + ? _value.lastName + : lastName // ignore: cast_nullable_to_non_nullable + as String, + email: + null == email + ? _value.email + : email // ignore: cast_nullable_to_non_nullable + as String, + password: + null == password + ? _value.password + : password // ignore: cast_nullable_to_non_nullable + as String, + passwordConfirmation: + null == passwordConfirmation + ? _value.passwordConfirmation + : passwordConfirmation // ignore: cast_nullable_to_non_nullable + as String, + termsAccepted: + null == termsAccepted + ? _value.termsAccepted + : termsAccepted // ignore: cast_nullable_to_non_nullable + as String, + birthdate: + null == birthdate + ? _value.birthdate + : birthdate // ignore: cast_nullable_to_non_nullable + as String, + gender: + null == gender + ? _value.gender + : gender // ignore: cast_nullable_to_non_nullable + as String, + location: + null == location + ? _value.location + : location // ignore: cast_nullable_to_non_nullable + as String, + responseBody: + null == responseBody + ? _value.responseBody + : responseBody // ignore: cast_nullable_to_non_nullable + as String, + lang: + null == lang + ? _value.lang + : lang // ignore: cast_nullable_to_non_nullable + as String, + weight: + null == weight + ? _value.weight + : weight // ignore: cast_nullable_to_non_nullable + as int, + height: + null == height + ? _value.height + : height // ignore: cast_nullable_to_non_nullable + as int, + phone: + null == phone + ? _value.phone + : phone // ignore: cast_nullable_to_non_nullable + as String, + chestCircumference: + null == chestCircumference + ? _value.chestCircumference + : chestCircumference // ignore: cast_nullable_to_non_nullable + as int, + waistCircumference: + null == waistCircumference + ? _value.waistCircumference + : waistCircumference // ignore: cast_nullable_to_non_nullable + as int, + hipCircumference: + null == hipCircumference + ? _value.hipCircumference + : hipCircumference // ignore: cast_nullable_to_non_nullable + as int, + bloodPressureUp: + null == bloodPressureUp + ? _value.bloodPressureUp + : bloodPressureUp // ignore: cast_nullable_to_non_nullable + as int, + bloodPressureDown: + null == bloodPressureDown + ? _value.bloodPressureDown + : bloodPressureDown // ignore: cast_nullable_to_non_nullable + as int, + hasHypo: + null == hasHypo + ? _value.hasHypo + : hasHypo // ignore: cast_nullable_to_non_nullable + as int, + hasHyper: + null == hasHyper + ? _value.hasHyper + : hasHyper // ignore: cast_nullable_to_non_nullable + as int, + aboutAllergy: + null == aboutAllergy + ? _value.aboutAllergy + : aboutAllergy // ignore: cast_nullable_to_non_nullable + as String, + aboutTakingPils: + null == aboutTakingPils + ? _value.aboutTakingPils + : aboutTakingPils // ignore: cast_nullable_to_non_nullable + as String, + aboutSportHobbies: + null == aboutSportHobbies + ? _value.aboutSportHobbies + : aboutSportHobbies // ignore: cast_nullable_to_non_nullable + as String, + favoriteFoods: + null == favoriteFoods + ? _value.favoriteFoods + : favoriteFoods // ignore: cast_nullable_to_non_nullable + as String, + unfavoriteFoods: + null == unfavoriteFoods + ? _value.unfavoriteFoods + : unfavoriteFoods // ignore: cast_nullable_to_non_nullable + as String, + additionalInfo: + null == additionalInfo + ? _value.additionalInfo + : additionalInfo // ignore: cast_nullable_to_non_nullable + as String, + activityCoefficient: + null == activityCoefficient + ? _value.activityCoefficient + : activityCoefficient // ignore: cast_nullable_to_non_nullable + as double, + ), + ); } } /// @nodoc @JsonSerializable() class _$UserRegistrationSheetImpl implements _UserRegistrationSheet { - const _$UserRegistrationSheetImpl( - {@JsonKey(name: 'first_name') required this.firstName, - @JsonKey(name: 'last_name') required this.lastName, - required this.email, - required this.password, - @JsonKey(name: 'password_confirmation') - required this.passwordConfirmation, - @JsonKey(name: 'terms') this.termsAccepted = 'accepted', - required this.birthdate, - required this.gender, - required this.location, - @JsonKey(name: 'response_body') required this.responseBody, - required this.lang, - required this.weight, - required this.height, - required this.phone, - @JsonKey(name: 'chest_circumference') required this.chestCircumference, - @JsonKey(name: 'waist_circumference') required this.waistCircumference, - @JsonKey(name: 'hip_circumference') required this.hipCircumference, - @JsonKey(name: 'blood_pressure_up') required this.bloodPressureUp, - @JsonKey(name: 'blood_pressure_down') required this.bloodPressureDown, - @JsonKey(name: 'has_hypo') required this.hasHypo, - @JsonKey(name: 'has_hyper') required this.hasHyper, - @JsonKey(name: 'about_alergy') required this.aboutAllergy, - @JsonKey(name: 'about_taking_pils') required this.aboutTakingPils, - @JsonKey(name: 'about_sport_hobbies') required this.aboutSportHobbies, - @JsonKey(name: 'favorite_foods') required this.favoriteFoods, - @JsonKey(name: 'unfavorite_foods') required this.unfavoriteFoods, - @JsonKey(name: 'additional_info') required this.additionalInfo, - @JsonKey(name: 'activity_coefficient') this.activityCoefficient = 1.2}); + const _$UserRegistrationSheetImpl({ + @JsonKey(name: 'first_name') required this.firstName, + @JsonKey(name: 'last_name') required this.lastName, + required this.email, + required this.password, + @JsonKey(name: 'password_confirmation') required this.passwordConfirmation, + @JsonKey(name: 'terms') this.termsAccepted = 'accepted', + required this.birthdate, + required this.gender, + required this.location, + @JsonKey(name: 'response_body') required this.responseBody, + required this.lang, + required this.weight, + required this.height, + required this.phone, + @JsonKey(name: 'chest_circumference') required this.chestCircumference, + @JsonKey(name: 'waist_circumference') required this.waistCircumference, + @JsonKey(name: 'hip_circumference') required this.hipCircumference, + @JsonKey(name: 'blood_pressure_up') required this.bloodPressureUp, + @JsonKey(name: 'blood_pressure_down') required this.bloodPressureDown, + @JsonKey(name: 'has_hypo') required this.hasHypo, + @JsonKey(name: 'has_hyper') required this.hasHyper, + @JsonKey(name: 'about_alergy') required this.aboutAllergy, + @JsonKey(name: 'about_taking_pils') required this.aboutTakingPils, + @JsonKey(name: 'about_sport_hobbies') required this.aboutSportHobbies, + @JsonKey(name: 'favorite_foods') required this.favoriteFoods, + @JsonKey(name: 'unfavorite_foods') required this.unfavoriteFoods, + @JsonKey(name: 'additional_info') required this.additionalInfo, + @JsonKey(name: 'activity_coefficient') this.activityCoefficient = 1.2, + }); factory _$UserRegistrationSheetImpl.fromJson(Map json) => _$$UserRegistrationSheetImplFromJson(json); @@ -655,36 +724,36 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hashAll([ - runtimeType, - firstName, - lastName, - email, - password, - passwordConfirmation, - termsAccepted, - birthdate, - gender, - location, - responseBody, - lang, - weight, - height, - phone, - chestCircumference, - waistCircumference, - hipCircumference, - bloodPressureUp, - bloodPressureDown, - hasHypo, - hasHyper, - aboutAllergy, - aboutTakingPils, - aboutSportHobbies, - favoriteFoods, - unfavoriteFoods, - additionalInfo, - activityCoefficient - ]); + runtimeType, + firstName, + lastName, + email, + password, + passwordConfirmation, + termsAccepted, + birthdate, + gender, + location, + responseBody, + lang, + weight, + height, + phone, + chestCircumference, + waistCircumference, + hipCircumference, + bloodPressureUp, + bloodPressureDown, + hasHypo, + hasHyper, + aboutAllergy, + aboutTakingPils, + aboutSportHobbies, + favoriteFoods, + unfavoriteFoods, + additionalInfo, + activityCoefficient, + ]); /// Create a copy of UserRegistrationSheet /// with the given fields replaced by the non-null parameter values. @@ -692,53 +761,51 @@ class _$UserRegistrationSheetImpl implements _UserRegistrationSheet { @override @pragma('vm:prefer-inline') _$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl> - get copyWith => __$$UserRegistrationSheetImplCopyWithImpl< - _$UserRegistrationSheetImpl>(this, _$identity); + get copyWith => + __$$UserRegistrationSheetImplCopyWithImpl<_$UserRegistrationSheetImpl>( + this, + _$identity, + ); @override Map toJson() { - return _$$UserRegistrationSheetImplToJson( - this, - ); + return _$$UserRegistrationSheetImplToJson(this); } } abstract class _UserRegistrationSheet implements UserRegistrationSheet { - const factory _UserRegistrationSheet( - {@JsonKey(name: 'first_name') required final String firstName, - @JsonKey(name: 'last_name') required final String lastName, - required final String email, - required final String password, - @JsonKey(name: 'password_confirmation') - required final String passwordConfirmation, - @JsonKey(name: 'terms') final String termsAccepted, - required final String birthdate, - required final String gender, - required final String location, - @JsonKey(name: 'response_body') required final String responseBody, - required final String lang, - required final int weight, - required final int height, - required final String phone, - @JsonKey(name: 'chest_circumference') - required final int chestCircumference, - @JsonKey(name: 'waist_circumference') - required final int waistCircumference, - @JsonKey(name: 'hip_circumference') required final int hipCircumference, - @JsonKey(name: 'blood_pressure_up') required final int bloodPressureUp, - @JsonKey(name: 'blood_pressure_down') - required final int bloodPressureDown, - @JsonKey(name: 'has_hypo') required final int hasHypo, - @JsonKey(name: 'has_hyper') required final int hasHyper, - @JsonKey(name: 'about_alergy') required final String aboutAllergy, - @JsonKey(name: 'about_taking_pils') required final String aboutTakingPils, - @JsonKey(name: 'about_sport_hobbies') - required final String aboutSportHobbies, - @JsonKey(name: 'favorite_foods') required final String favoriteFoods, - @JsonKey(name: 'unfavorite_foods') required final String unfavoriteFoods, - @JsonKey(name: 'additional_info') required final String additionalInfo, - @JsonKey(name: 'activity_coefficient') - final double activityCoefficient}) = _$UserRegistrationSheetImpl; + const factory _UserRegistrationSheet({ + @JsonKey(name: 'first_name') required final String firstName, + @JsonKey(name: 'last_name') required final String lastName, + required final String email, + required final String password, + @JsonKey(name: 'password_confirmation') + required final String passwordConfirmation, + @JsonKey(name: 'terms') final String termsAccepted, + required final String birthdate, + required final String gender, + required final String location, + @JsonKey(name: 'response_body') required final String responseBody, + required final String lang, + required final int weight, + required final int height, + required final String phone, + @JsonKey(name: 'chest_circumference') required final int chestCircumference, + @JsonKey(name: 'waist_circumference') required final int waistCircumference, + @JsonKey(name: 'hip_circumference') required final int hipCircumference, + @JsonKey(name: 'blood_pressure_up') required final int bloodPressureUp, + @JsonKey(name: 'blood_pressure_down') required final int bloodPressureDown, + @JsonKey(name: 'has_hypo') required final int hasHypo, + @JsonKey(name: 'has_hyper') required final int hasHyper, + @JsonKey(name: 'about_alergy') required final String aboutAllergy, + @JsonKey(name: 'about_taking_pils') required final String aboutTakingPils, + @JsonKey(name: 'about_sport_hobbies') + required final String aboutSportHobbies, + @JsonKey(name: 'favorite_foods') required final String favoriteFoods, + @JsonKey(name: 'unfavorite_foods') required final String unfavoriteFoods, + @JsonKey(name: 'additional_info') required final String additionalInfo, + @JsonKey(name: 'activity_coefficient') final double activityCoefficient, + }) = _$UserRegistrationSheetImpl; factory _UserRegistrationSheet.fromJson(Map json) = _$UserRegistrationSheetImpl.fromJson; @@ -824,5 +891,5 @@ abstract class _UserRegistrationSheet implements UserRegistrationSheet { @override @JsonKey(includeFromJson: false, includeToJson: false) _$$UserRegistrationSheetImplCopyWith<_$UserRegistrationSheetImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/features/registration/models/user_registration_model.g.dart b/lib/features/registration/models/user_registration_model.g.dart index 076923a5..d5bbf8c6 100644 --- a/lib/features/registration/models/user_registration_model.g.dart +++ b/lib/features/registration/models/user_registration_model.g.dart @@ -7,68 +7,68 @@ part of 'user_registration_model.dart'; // ************************************************************************** _$UserRegistrationSheetImpl _$$UserRegistrationSheetImplFromJson( - Map json) => - _$UserRegistrationSheetImpl( - firstName: json['first_name'] as String, - lastName: json['last_name'] as String, - email: json['email'] as String, - password: json['password'] as String, - passwordConfirmation: json['password_confirmation'] as String, - termsAccepted: json['terms'] as String? ?? 'accepted', - birthdate: json['birthdate'] as String, - gender: json['gender'] as String, - location: json['location'] as String, - responseBody: json['response_body'] as String, - lang: json['lang'] as String, - weight: (json['weight'] as num).toInt(), - height: (json['height'] as num).toInt(), - phone: json['phone'] as String, - chestCircumference: (json['chest_circumference'] as num).toInt(), - waistCircumference: (json['waist_circumference'] as num).toInt(), - hipCircumference: (json['hip_circumference'] as num).toInt(), - bloodPressureUp: (json['blood_pressure_up'] as num).toInt(), - bloodPressureDown: (json['blood_pressure_down'] as num).toInt(), - hasHypo: (json['has_hypo'] as num).toInt(), - hasHyper: (json['has_hyper'] as num).toInt(), - aboutAllergy: json['about_alergy'] as String, - aboutTakingPils: json['about_taking_pils'] as String, - aboutSportHobbies: json['about_sport_hobbies'] as String, - favoriteFoods: json['favorite_foods'] as String, - unfavoriteFoods: json['unfavorite_foods'] as String, - additionalInfo: json['additional_info'] as String, - activityCoefficient: - (json['activity_coefficient'] as num?)?.toDouble() ?? 1.2, - ); + Map json, +) => _$UserRegistrationSheetImpl( + firstName: json['first_name'] as String, + lastName: json['last_name'] as String, + email: json['email'] as String, + password: json['password'] as String, + passwordConfirmation: json['password_confirmation'] as String, + termsAccepted: json['terms'] as String? ?? 'accepted', + birthdate: json['birthdate'] as String, + gender: json['gender'] as String, + location: json['location'] as String, + responseBody: json['response_body'] as String, + lang: json['lang'] as String, + weight: (json['weight'] as num).toInt(), + height: (json['height'] as num).toInt(), + phone: json['phone'] as String, + chestCircumference: (json['chest_circumference'] as num).toInt(), + waistCircumference: (json['waist_circumference'] as num).toInt(), + hipCircumference: (json['hip_circumference'] as num).toInt(), + bloodPressureUp: (json['blood_pressure_up'] as num).toInt(), + bloodPressureDown: (json['blood_pressure_down'] as num).toInt(), + hasHypo: (json['has_hypo'] as num).toInt(), + hasHyper: (json['has_hyper'] as num).toInt(), + aboutAllergy: json['about_alergy'] as String, + aboutTakingPils: json['about_taking_pils'] as String, + aboutSportHobbies: json['about_sport_hobbies'] as String, + favoriteFoods: json['favorite_foods'] as String, + unfavoriteFoods: json['unfavorite_foods'] as String, + additionalInfo: json['additional_info'] as String, + activityCoefficient: + (json['activity_coefficient'] as num?)?.toDouble() ?? 1.2, +); Map _$$UserRegistrationSheetImplToJson( - _$UserRegistrationSheetImpl instance) => - { - 'first_name': instance.firstName, - 'last_name': instance.lastName, - 'email': instance.email, - 'password': instance.password, - 'password_confirmation': instance.passwordConfirmation, - 'terms': instance.termsAccepted, - 'birthdate': instance.birthdate, - 'gender': instance.gender, - 'location': instance.location, - 'response_body': instance.responseBody, - 'lang': instance.lang, - 'weight': instance.weight, - 'height': instance.height, - 'phone': instance.phone, - 'chest_circumference': instance.chestCircumference, - 'waist_circumference': instance.waistCircumference, - 'hip_circumference': instance.hipCircumference, - 'blood_pressure_up': instance.bloodPressureUp, - 'blood_pressure_down': instance.bloodPressureDown, - 'has_hypo': instance.hasHypo, - 'has_hyper': instance.hasHyper, - 'about_alergy': instance.aboutAllergy, - 'about_taking_pils': instance.aboutTakingPils, - 'about_sport_hobbies': instance.aboutSportHobbies, - 'favorite_foods': instance.favoriteFoods, - 'unfavorite_foods': instance.unfavoriteFoods, - 'additional_info': instance.additionalInfo, - 'activity_coefficient': instance.activityCoefficient, - }; + _$UserRegistrationSheetImpl instance, +) => { + 'first_name': instance.firstName, + 'last_name': instance.lastName, + 'email': instance.email, + 'password': instance.password, + 'password_confirmation': instance.passwordConfirmation, + 'terms': instance.termsAccepted, + 'birthdate': instance.birthdate, + 'gender': instance.gender, + 'location': instance.location, + 'response_body': instance.responseBody, + 'lang': instance.lang, + 'weight': instance.weight, + 'height': instance.height, + 'phone': instance.phone, + 'chest_circumference': instance.chestCircumference, + 'waist_circumference': instance.waistCircumference, + 'hip_circumference': instance.hipCircumference, + 'blood_pressure_up': instance.bloodPressureUp, + 'blood_pressure_down': instance.bloodPressureDown, + 'has_hypo': instance.hasHypo, + 'has_hyper': instance.hasHyper, + 'about_alergy': instance.aboutAllergy, + 'about_taking_pils': instance.aboutTakingPils, + 'about_sport_hobbies': instance.aboutSportHobbies, + 'favorite_foods': instance.favoriteFoods, + 'unfavorite_foods': instance.unfavoriteFoods, + 'additional_info': instance.additionalInfo, + 'activity_coefficient': instance.activityCoefficient, +}; diff --git a/lib/features/registration/presentation/bloc/registration_cubit/registration_state.freezed.dart b/lib/features/registration/presentation/bloc/registration_cubit/registration_state.freezed.dart index ae0a9706..711c672d 100644 --- a/lib/features/registration/presentation/bloc/registration_cubit/registration_state.freezed.dart +++ b/lib/features/registration/presentation/bloc/registration_cubit/registration_state.freezed.dart @@ -12,7 +12,8 @@ part of 'registration_state.dart'; 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'); + '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 _$RegistrationState { @@ -28,8 +29,9 @@ mixin _$RegistrationState { /// @nodoc abstract class $RegistrationStateCopyWith<$Res> { factory $RegistrationStateCopyWith( - RegistrationState value, $Res Function(RegistrationState) then) = - _$RegistrationStateCopyWithImpl<$Res, RegistrationState>; + RegistrationState value, + $Res Function(RegistrationState) then, + ) = _$RegistrationStateCopyWithImpl<$Res, RegistrationState>; @useResult $Res call({UserRegistrationSheet sheet}); @@ -50,15 +52,17 @@ class _$RegistrationStateCopyWithImpl<$Res, $Val extends RegistrationState> /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? sheet = null, - }) { - return _then(_value.copyWith( - sheet: null == sheet - ? _value.sheet - : sheet // ignore: cast_nullable_to_non_nullable - as UserRegistrationSheet, - ) as $Val); + $Res call({Object? sheet = null}) { + return _then( + _value.copyWith( + sheet: + null == sheet + ? _value.sheet + : sheet // ignore: cast_nullable_to_non_nullable + as UserRegistrationSheet, + ) + as $Val, + ); } /// Create a copy of RegistrationState @@ -75,9 +79,10 @@ class _$RegistrationStateCopyWithImpl<$Res, $Val extends RegistrationState> /// @nodoc abstract class _$$RegistrationStateImplCopyWith<$Res> implements $RegistrationStateCopyWith<$Res> { - factory _$$RegistrationStateImplCopyWith(_$RegistrationStateImpl value, - $Res Function(_$RegistrationStateImpl) then) = - __$$RegistrationStateImplCopyWithImpl<$Res>; + factory _$$RegistrationStateImplCopyWith( + _$RegistrationStateImpl value, + $Res Function(_$RegistrationStateImpl) then, + ) = __$$RegistrationStateImplCopyWithImpl<$Res>; @override @useResult $Res call({UserRegistrationSheet sheet}); @@ -90,23 +95,25 @@ abstract class _$$RegistrationStateImplCopyWith<$Res> class __$$RegistrationStateImplCopyWithImpl<$Res> extends _$RegistrationStateCopyWithImpl<$Res, _$RegistrationStateImpl> implements _$$RegistrationStateImplCopyWith<$Res> { - __$$RegistrationStateImplCopyWithImpl(_$RegistrationStateImpl _value, - $Res Function(_$RegistrationStateImpl) _then) - : super(_value, _then); + __$$RegistrationStateImplCopyWithImpl( + _$RegistrationStateImpl _value, + $Res Function(_$RegistrationStateImpl) _then, + ) : super(_value, _then); /// Create a copy of RegistrationState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? sheet = null, - }) { - return _then(_$RegistrationStateImpl( - sheet: null == sheet - ? _value.sheet - : sheet // ignore: cast_nullable_to_non_nullable - as UserRegistrationSheet, - )); + $Res call({Object? sheet = null}) { + return _then( + _$RegistrationStateImpl( + sheet: + null == sheet + ? _value.sheet + : sheet // ignore: cast_nullable_to_non_nullable + as UserRegistrationSheet, + ), + ); } } @@ -141,12 +148,15 @@ class _$RegistrationStateImpl implements _RegistrationState { @pragma('vm:prefer-inline') _$$RegistrationStateImplCopyWith<_$RegistrationStateImpl> get copyWith => __$$RegistrationStateImplCopyWithImpl<_$RegistrationStateImpl>( - this, _$identity); + this, + _$identity, + ); } abstract class _RegistrationState implements RegistrationState { - const factory _RegistrationState( - {required final UserRegistrationSheet sheet}) = _$RegistrationStateImpl; + const factory _RegistrationState({ + required final UserRegistrationSheet sheet, + }) = _$RegistrationStateImpl; @override UserRegistrationSheet get sheet; diff --git a/lib/features/settings/models/profile_settings_model.freezed.dart b/lib/features/settings/models/profile_settings_model.freezed.dart index e6a0ff83..81b3eb7b 100644 --- a/lib/features/settings/models/profile_settings_model.freezed.dart +++ b/lib/features/settings/models/profile_settings_model.freezed.dart @@ -12,7 +12,8 @@ part of 'profile_settings_model.dart'; 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'); + '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', +); ProfileSettingsModel _$ProfileSettingsModelFromJson(Map json) { return _ProfileSettingsModel.fromJson(json); @@ -43,23 +44,26 @@ mixin _$ProfileSettingsModel { /// @nodoc abstract class $ProfileSettingsModelCopyWith<$Res> { - factory $ProfileSettingsModelCopyWith(ProfileSettingsModel value, - $Res Function(ProfileSettingsModel) then) = - _$ProfileSettingsModelCopyWithImpl<$Res, ProfileSettingsModel>; + factory $ProfileSettingsModelCopyWith( + ProfileSettingsModel value, + $Res Function(ProfileSettingsModel) then, + ) = _$ProfileSettingsModelCopyWithImpl<$Res, ProfileSettingsModel>; @useResult - $Res call( - {@JsonKey(name: "new_updates_notifications") - dynamic newUpdatesNotifications, - @JsonKey(name: "diary_reminder_notifications") - dynamic diaryReminderNotifications, - @JsonKey(name: "is_mood_fillable") bool isMoodFillable, - @JsonKey(name: "is_bedtime_fillable") bool isBedtimeFillable, - @JsonKey(name: "is_public_profile") bool isPublicProfile}); + $Res call({ + @JsonKey(name: "new_updates_notifications") dynamic newUpdatesNotifications, + @JsonKey(name: "diary_reminder_notifications") + dynamic diaryReminderNotifications, + @JsonKey(name: "is_mood_fillable") bool isMoodFillable, + @JsonKey(name: "is_bedtime_fillable") bool isBedtimeFillable, + @JsonKey(name: "is_public_profile") bool isPublicProfile, + }); } /// @nodoc -class _$ProfileSettingsModelCopyWithImpl<$Res, - $Val extends ProfileSettingsModel> +class _$ProfileSettingsModelCopyWithImpl< + $Res, + $Val extends ProfileSettingsModel +> implements $ProfileSettingsModelCopyWith<$Res> { _$ProfileSettingsModelCopyWithImpl(this._value, this._then); @@ -79,56 +83,66 @@ class _$ProfileSettingsModelCopyWithImpl<$Res, Object? isBedtimeFillable = null, Object? isPublicProfile = null, }) { - return _then(_value.copyWith( - newUpdatesNotifications: freezed == newUpdatesNotifications - ? _value.newUpdatesNotifications - : newUpdatesNotifications // ignore: cast_nullable_to_non_nullable - as dynamic, - diaryReminderNotifications: freezed == diaryReminderNotifications - ? _value.diaryReminderNotifications - : diaryReminderNotifications // ignore: cast_nullable_to_non_nullable - as dynamic, - isMoodFillable: null == isMoodFillable - ? _value.isMoodFillable - : isMoodFillable // ignore: cast_nullable_to_non_nullable - as bool, - isBedtimeFillable: null == isBedtimeFillable - ? _value.isBedtimeFillable - : isBedtimeFillable // ignore: cast_nullable_to_non_nullable - as bool, - isPublicProfile: null == isPublicProfile - ? _value.isPublicProfile - : isPublicProfile // ignore: cast_nullable_to_non_nullable - as bool, - ) as $Val); + return _then( + _value.copyWith( + newUpdatesNotifications: + freezed == newUpdatesNotifications + ? _value.newUpdatesNotifications + : newUpdatesNotifications // ignore: cast_nullable_to_non_nullable + as dynamic, + diaryReminderNotifications: + freezed == diaryReminderNotifications + ? _value.diaryReminderNotifications + : diaryReminderNotifications // ignore: cast_nullable_to_non_nullable + as dynamic, + isMoodFillable: + null == isMoodFillable + ? _value.isMoodFillable + : isMoodFillable // ignore: cast_nullable_to_non_nullable + as bool, + isBedtimeFillable: + null == isBedtimeFillable + ? _value.isBedtimeFillable + : isBedtimeFillable // ignore: cast_nullable_to_non_nullable + as bool, + isPublicProfile: + null == isPublicProfile + ? _value.isPublicProfile + : isPublicProfile // ignore: cast_nullable_to_non_nullable + as bool, + ) + as $Val, + ); } } /// @nodoc abstract class _$$ProfileSettingsModelImplCopyWith<$Res> implements $ProfileSettingsModelCopyWith<$Res> { - factory _$$ProfileSettingsModelImplCopyWith(_$ProfileSettingsModelImpl value, - $Res Function(_$ProfileSettingsModelImpl) then) = - __$$ProfileSettingsModelImplCopyWithImpl<$Res>; + factory _$$ProfileSettingsModelImplCopyWith( + _$ProfileSettingsModelImpl value, + $Res Function(_$ProfileSettingsModelImpl) then, + ) = __$$ProfileSettingsModelImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {@JsonKey(name: "new_updates_notifications") - dynamic newUpdatesNotifications, - @JsonKey(name: "diary_reminder_notifications") - dynamic diaryReminderNotifications, - @JsonKey(name: "is_mood_fillable") bool isMoodFillable, - @JsonKey(name: "is_bedtime_fillable") bool isBedtimeFillable, - @JsonKey(name: "is_public_profile") bool isPublicProfile}); + $Res call({ + @JsonKey(name: "new_updates_notifications") dynamic newUpdatesNotifications, + @JsonKey(name: "diary_reminder_notifications") + dynamic diaryReminderNotifications, + @JsonKey(name: "is_mood_fillable") bool isMoodFillable, + @JsonKey(name: "is_bedtime_fillable") bool isBedtimeFillable, + @JsonKey(name: "is_public_profile") bool isPublicProfile, + }); } /// @nodoc class __$$ProfileSettingsModelImplCopyWithImpl<$Res> extends _$ProfileSettingsModelCopyWithImpl<$Res, _$ProfileSettingsModelImpl> implements _$$ProfileSettingsModelImplCopyWith<$Res> { - __$$ProfileSettingsModelImplCopyWithImpl(_$ProfileSettingsModelImpl _value, - $Res Function(_$ProfileSettingsModelImpl) _then) - : super(_value, _then); + __$$ProfileSettingsModelImplCopyWithImpl( + _$ProfileSettingsModelImpl _value, + $Res Function(_$ProfileSettingsModelImpl) _then, + ) : super(_value, _then); /// Create a copy of ProfileSettingsModel /// with the given fields replaced by the non-null parameter values. @@ -141,42 +155,50 @@ class __$$ProfileSettingsModelImplCopyWithImpl<$Res> Object? isBedtimeFillable = null, Object? isPublicProfile = null, }) { - return _then(_$ProfileSettingsModelImpl( - newUpdatesNotifications: freezed == newUpdatesNotifications - ? _value.newUpdatesNotifications - : newUpdatesNotifications // ignore: cast_nullable_to_non_nullable - as dynamic, - diaryReminderNotifications: freezed == diaryReminderNotifications - ? _value.diaryReminderNotifications - : diaryReminderNotifications // ignore: cast_nullable_to_non_nullable - as dynamic, - isMoodFillable: null == isMoodFillable - ? _value.isMoodFillable - : isMoodFillable // ignore: cast_nullable_to_non_nullable - as bool, - isBedtimeFillable: null == isBedtimeFillable - ? _value.isBedtimeFillable - : isBedtimeFillable // ignore: cast_nullable_to_non_nullable - as bool, - isPublicProfile: null == isPublicProfile - ? _value.isPublicProfile - : isPublicProfile // ignore: cast_nullable_to_non_nullable - as bool, - )); + return _then( + _$ProfileSettingsModelImpl( + newUpdatesNotifications: + freezed == newUpdatesNotifications + ? _value.newUpdatesNotifications + : newUpdatesNotifications // ignore: cast_nullable_to_non_nullable + as dynamic, + diaryReminderNotifications: + freezed == diaryReminderNotifications + ? _value.diaryReminderNotifications + : diaryReminderNotifications // ignore: cast_nullable_to_non_nullable + as dynamic, + isMoodFillable: + null == isMoodFillable + ? _value.isMoodFillable + : isMoodFillable // ignore: cast_nullable_to_non_nullable + as bool, + isBedtimeFillable: + null == isBedtimeFillable + ? _value.isBedtimeFillable + : isBedtimeFillable // ignore: cast_nullable_to_non_nullable + as bool, + isPublicProfile: + null == isPublicProfile + ? _value.isPublicProfile + : isPublicProfile // ignore: cast_nullable_to_non_nullable + as bool, + ), + ); } } /// @nodoc @JsonSerializable() class _$ProfileSettingsModelImpl implements _ProfileSettingsModel { - const _$ProfileSettingsModelImpl( - {@JsonKey(name: "new_updates_notifications") - required this.newUpdatesNotifications, - @JsonKey(name: "diary_reminder_notifications") - required this.diaryReminderNotifications, - @JsonKey(name: "is_mood_fillable") required this.isMoodFillable, - @JsonKey(name: "is_bedtime_fillable") required this.isBedtimeFillable, - @JsonKey(name: "is_public_profile") required this.isPublicProfile}); + const _$ProfileSettingsModelImpl({ + @JsonKey(name: "new_updates_notifications") + required this.newUpdatesNotifications, + @JsonKey(name: "diary_reminder_notifications") + required this.diaryReminderNotifications, + @JsonKey(name: "is_mood_fillable") required this.isMoodFillable, + @JsonKey(name: "is_bedtime_fillable") required this.isBedtimeFillable, + @JsonKey(name: "is_public_profile") required this.isPublicProfile, + }); factory _$ProfileSettingsModelImpl.fromJson(Map json) => _$$ProfileSettingsModelImplFromJson(json); @@ -208,9 +230,13 @@ class _$ProfileSettingsModelImpl implements _ProfileSettingsModel { (other.runtimeType == runtimeType && other is _$ProfileSettingsModelImpl && const DeepCollectionEquality().equals( - other.newUpdatesNotifications, newUpdatesNotifications) && + other.newUpdatesNotifications, + newUpdatesNotifications, + ) && const DeepCollectionEquality().equals( - other.diaryReminderNotifications, diaryReminderNotifications) && + other.diaryReminderNotifications, + diaryReminderNotifications, + ) && (identical(other.isMoodFillable, isMoodFillable) || other.isMoodFillable == isMoodFillable) && (identical(other.isBedtimeFillable, isBedtimeFillable) || @@ -222,12 +248,13 @@ class _$ProfileSettingsModelImpl implements _ProfileSettingsModel { @JsonKey(includeFromJson: false, includeToJson: false) @override int get hashCode => Object.hash( - runtimeType, - const DeepCollectionEquality().hash(newUpdatesNotifications), - const DeepCollectionEquality().hash(diaryReminderNotifications), - isMoodFillable, - isBedtimeFillable, - isPublicProfile); + runtimeType, + const DeepCollectionEquality().hash(newUpdatesNotifications), + const DeepCollectionEquality().hash(diaryReminderNotifications), + isMoodFillable, + isBedtimeFillable, + isPublicProfile, + ); /// Create a copy of ProfileSettingsModel /// with the given fields replaced by the non-null parameter values. @@ -235,29 +262,28 @@ class _$ProfileSettingsModelImpl implements _ProfileSettingsModel { @override @pragma('vm:prefer-inline') _$$ProfileSettingsModelImplCopyWith<_$ProfileSettingsModelImpl> - get copyWith => - __$$ProfileSettingsModelImplCopyWithImpl<_$ProfileSettingsModelImpl>( - this, _$identity); + get copyWith => + __$$ProfileSettingsModelImplCopyWithImpl<_$ProfileSettingsModelImpl>( + this, + _$identity, + ); @override Map toJson() { - return _$$ProfileSettingsModelImplToJson( - this, - ); + return _$$ProfileSettingsModelImplToJson(this); } } abstract class _ProfileSettingsModel implements ProfileSettingsModel { - const factory _ProfileSettingsModel( - {@JsonKey(name: "new_updates_notifications") - required final dynamic newUpdatesNotifications, - @JsonKey(name: "diary_reminder_notifications") - required final dynamic diaryReminderNotifications, - @JsonKey(name: "is_mood_fillable") required final bool isMoodFillable, - @JsonKey(name: "is_bedtime_fillable") - required final bool isBedtimeFillable, - @JsonKey(name: "is_public_profile") - required final bool isPublicProfile}) = _$ProfileSettingsModelImpl; + const factory _ProfileSettingsModel({ + @JsonKey(name: "new_updates_notifications") + required final dynamic newUpdatesNotifications, + @JsonKey(name: "diary_reminder_notifications") + required final dynamic diaryReminderNotifications, + @JsonKey(name: "is_mood_fillable") required final bool isMoodFillable, + @JsonKey(name: "is_bedtime_fillable") required final bool isBedtimeFillable, + @JsonKey(name: "is_public_profile") required final bool isPublicProfile, + }) = _$ProfileSettingsModelImpl; factory _ProfileSettingsModel.fromJson(Map json) = _$ProfileSettingsModelImpl.fromJson; @@ -283,5 +309,5 @@ abstract class _ProfileSettingsModel implements ProfileSettingsModel { @override @JsonKey(includeFromJson: false, includeToJson: false) _$$ProfileSettingsModelImplCopyWith<_$ProfileSettingsModelImpl> - get copyWith => throw _privateConstructorUsedError; + get copyWith => throw _privateConstructorUsedError; } diff --git a/lib/features/settings/models/profile_settings_model.g.dart b/lib/features/settings/models/profile_settings_model.g.dart index d7a7e6eb..c6ee5ede 100644 --- a/lib/features/settings/models/profile_settings_model.g.dart +++ b/lib/features/settings/models/profile_settings_model.g.dart @@ -7,21 +7,21 @@ part of 'profile_settings_model.dart'; // ************************************************************************** _$ProfileSettingsModelImpl _$$ProfileSettingsModelImplFromJson( - Map json) => - _$ProfileSettingsModelImpl( - newUpdatesNotifications: json['new_updates_notifications'], - diaryReminderNotifications: json['diary_reminder_notifications'], - isMoodFillable: json['is_mood_fillable'] as bool, - isBedtimeFillable: json['is_bedtime_fillable'] as bool, - isPublicProfile: json['is_public_profile'] as bool, - ); + Map json, +) => _$ProfileSettingsModelImpl( + newUpdatesNotifications: json['new_updates_notifications'], + diaryReminderNotifications: json['diary_reminder_notifications'], + isMoodFillable: json['is_mood_fillable'] as bool, + isBedtimeFillable: json['is_bedtime_fillable'] as bool, + isPublicProfile: json['is_public_profile'] as bool, +); Map _$$ProfileSettingsModelImplToJson( - _$ProfileSettingsModelImpl instance) => - { - 'new_updates_notifications': instance.newUpdatesNotifications, - 'diary_reminder_notifications': instance.diaryReminderNotifications, - 'is_mood_fillable': instance.isMoodFillable, - 'is_bedtime_fillable': instance.isBedtimeFillable, - 'is_public_profile': instance.isPublicProfile, - }; + _$ProfileSettingsModelImpl instance, +) => { + 'new_updates_notifications': instance.newUpdatesNotifications, + 'diary_reminder_notifications': instance.diaryReminderNotifications, + 'is_mood_fillable': instance.isMoodFillable, + 'is_bedtime_fillable': instance.isBedtimeFillable, + 'is_public_profile': instance.isPublicProfile, +}; diff --git a/lib/features/settings/presentation/bloc/settings_cubit/settings_state.freezed.dart b/lib/features/settings/presentation/bloc/settings_cubit/settings_state.freezed.dart index a812e217..56f9946d 100644 --- a/lib/features/settings/presentation/bloc/settings_cubit/settings_state.freezed.dart +++ b/lib/features/settings/presentation/bloc/settings_cubit/settings_state.freezed.dart @@ -12,7 +12,8 @@ part of 'settings_state.dart'; 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'); + '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 _$SettingsState { @@ -20,49 +21,53 @@ mixin _$SettingsState { TResult when( TResult Function() $default, { required TResult Function() loading, - required TResult Function(ProfileSettingsModel profileSettings, - ProfileDetailsModel profileDetails, ProfileModel profile) - loaded, + required TResult Function( + ProfileSettingsModel profileSettings, + ProfileDetailsModel profileDetails, + ProfileModel profile, + ) + loaded, required TResult Function(String errorMessage) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, - TResult? Function(ProfileSettingsModel profileSettings, - ProfileDetailsModel profileDetails, ProfileModel profile)? - loaded, + TResult? Function( + ProfileSettingsModel profileSettings, + ProfileDetailsModel profileDetails, + ProfileModel profile, + )? + loaded, TResult? Function(String errorMessage)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, - TResult Function(ProfileSettingsModel profileSettings, - ProfileDetailsModel profileDetails, ProfileModel profile)? - loaded, + TResult Function( + ProfileSettingsModel profileSettings, + ProfileDetailsModel profileDetails, + ProfileModel profile, + )? + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult map( TResult Function(_SettingsState value) $default, { required TResult Function(SettingsStateLoading value) loading, required TResult Function(SettingsStateLoaded value) loaded, required TResult Function(SettingsStateError value) error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult? mapOrNull( TResult? Function(_SettingsState value)? $default, { TResult? Function(SettingsStateLoading value)? loading, TResult? Function(SettingsStateLoaded value)? loaded, TResult? Function(SettingsStateError value)? error, - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; @optionalTypeArgs TResult maybeMap( TResult Function(_SettingsState value)? $default, { @@ -70,15 +75,15 @@ mixin _$SettingsState { TResult Function(SettingsStateLoaded value)? loaded, TResult Function(SettingsStateError value)? error, required TResult orElse(), - }) => - throw _privateConstructorUsedError; + }) => throw _privateConstructorUsedError; } /// @nodoc abstract class $SettingsStateCopyWith<$Res> { factory $SettingsStateCopyWith( - SettingsState value, $Res Function(SettingsState) then) = - _$SettingsStateCopyWithImpl<$Res, SettingsState>; + SettingsState value, + $Res Function(SettingsState) then, + ) = _$SettingsStateCopyWithImpl<$Res, SettingsState>; } /// @nodoc @@ -98,8 +103,9 @@ class _$SettingsStateCopyWithImpl<$Res, $Val extends SettingsState> /// @nodoc abstract class _$$SettingsStateImplCopyWith<$Res> { factory _$$SettingsStateImplCopyWith( - _$SettingsStateImpl value, $Res Function(_$SettingsStateImpl) then) = - __$$SettingsStateImplCopyWithImpl<$Res>; + _$SettingsStateImpl value, + $Res Function(_$SettingsStateImpl) then, + ) = __$$SettingsStateImplCopyWithImpl<$Res>; } /// @nodoc @@ -107,8 +113,9 @@ class __$$SettingsStateImplCopyWithImpl<$Res> extends _$SettingsStateCopyWithImpl<$Res, _$SettingsStateImpl> implements _$$SettingsStateImplCopyWith<$Res> { __$$SettingsStateImplCopyWithImpl( - _$SettingsStateImpl _value, $Res Function(_$SettingsStateImpl) _then) - : super(_value, _then); + _$SettingsStateImpl _value, + $Res Function(_$SettingsStateImpl) _then, + ) : super(_value, _then); /// Create a copy of SettingsState /// with the given fields replaced by the non-null parameter values. @@ -138,9 +145,12 @@ class _$SettingsStateImpl implements _SettingsState { TResult when( TResult Function() $default, { required TResult Function() loading, - required TResult Function(ProfileSettingsModel profileSettings, - ProfileDetailsModel profileDetails, ProfileModel profile) - loaded, + required TResult Function( + ProfileSettingsModel profileSettings, + ProfileDetailsModel profileDetails, + ProfileModel profile, + ) + loaded, required TResult Function(String errorMessage) error, }) { return $default(); @@ -151,9 +161,12 @@ class _$SettingsStateImpl implements _SettingsState { TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, - TResult? Function(ProfileSettingsModel profileSettings, - ProfileDetailsModel profileDetails, ProfileModel profile)? - loaded, + TResult? Function( + ProfileSettingsModel profileSettings, + ProfileDetailsModel profileDetails, + ProfileModel profile, + )? + loaded, TResult? Function(String errorMessage)? error, }) { return $default?.call(); @@ -164,9 +177,12 @@ class _$SettingsStateImpl implements _SettingsState { TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, - TResult Function(ProfileSettingsModel profileSettings, - ProfileDetailsModel profileDetails, ProfileModel profile)? - loaded, + TResult Function( + ProfileSettingsModel profileSettings, + ProfileDetailsModel profileDetails, + ProfileModel profile, + )? + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -220,18 +236,20 @@ abstract class _SettingsState implements SettingsState { /// @nodoc abstract class _$$SettingsStateLoadingImplCopyWith<$Res> { - factory _$$SettingsStateLoadingImplCopyWith(_$SettingsStateLoadingImpl value, - $Res Function(_$SettingsStateLoadingImpl) then) = - __$$SettingsStateLoadingImplCopyWithImpl<$Res>; + factory _$$SettingsStateLoadingImplCopyWith( + _$SettingsStateLoadingImpl value, + $Res Function(_$SettingsStateLoadingImpl) then, + ) = __$$SettingsStateLoadingImplCopyWithImpl<$Res>; } /// @nodoc class __$$SettingsStateLoadingImplCopyWithImpl<$Res> extends _$SettingsStateCopyWithImpl<$Res, _$SettingsStateLoadingImpl> implements _$$SettingsStateLoadingImplCopyWith<$Res> { - __$$SettingsStateLoadingImplCopyWithImpl(_$SettingsStateLoadingImpl _value, - $Res Function(_$SettingsStateLoadingImpl) _then) - : super(_value, _then); + __$$SettingsStateLoadingImplCopyWithImpl( + _$SettingsStateLoadingImpl _value, + $Res Function(_$SettingsStateLoadingImpl) _then, + ) : super(_value, _then); /// Create a copy of SettingsState /// with the given fields replaced by the non-null parameter values. @@ -262,9 +280,12 @@ class _$SettingsStateLoadingImpl implements SettingsStateLoading { TResult when( TResult Function() $default, { required TResult Function() loading, - required TResult Function(ProfileSettingsModel profileSettings, - ProfileDetailsModel profileDetails, ProfileModel profile) - loaded, + required TResult Function( + ProfileSettingsModel profileSettings, + ProfileDetailsModel profileDetails, + ProfileModel profile, + ) + loaded, required TResult Function(String errorMessage) error, }) { return loading(); @@ -275,9 +296,12 @@ class _$SettingsStateLoadingImpl implements SettingsStateLoading { TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, - TResult? Function(ProfileSettingsModel profileSettings, - ProfileDetailsModel profileDetails, ProfileModel profile)? - loaded, + TResult? Function( + ProfileSettingsModel profileSettings, + ProfileDetailsModel profileDetails, + ProfileModel profile, + )? + loaded, TResult? Function(String errorMessage)? error, }) { return loading?.call(); @@ -288,9 +312,12 @@ class _$SettingsStateLoadingImpl implements SettingsStateLoading { TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, - TResult Function(ProfileSettingsModel profileSettings, - ProfileDetailsModel profileDetails, ProfileModel profile)? - loaded, + TResult Function( + ProfileSettingsModel profileSettings, + ProfileDetailsModel profileDetails, + ProfileModel profile, + )? + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -344,14 +371,16 @@ abstract class SettingsStateLoading implements SettingsState { /// @nodoc abstract class _$$SettingsStateLoadedImplCopyWith<$Res> { - factory _$$SettingsStateLoadedImplCopyWith(_$SettingsStateLoadedImpl value, - $Res Function(_$SettingsStateLoadedImpl) then) = - __$$SettingsStateLoadedImplCopyWithImpl<$Res>; + factory _$$SettingsStateLoadedImplCopyWith( + _$SettingsStateLoadedImpl value, + $Res Function(_$SettingsStateLoadedImpl) then, + ) = __$$SettingsStateLoadedImplCopyWithImpl<$Res>; @useResult - $Res call( - {ProfileSettingsModel profileSettings, - ProfileDetailsModel profileDetails, - ProfileModel profile}); + $Res call({ + ProfileSettingsModel profileSettings, + ProfileDetailsModel profileDetails, + ProfileModel profile, + }); $ProfileSettingsModelCopyWith<$Res> get profileSettings; $ProfileDetailsModelCopyWith<$Res> get profileDetails; @@ -362,9 +391,10 @@ abstract class _$$SettingsStateLoadedImplCopyWith<$Res> { class __$$SettingsStateLoadedImplCopyWithImpl<$Res> extends _$SettingsStateCopyWithImpl<$Res, _$SettingsStateLoadedImpl> implements _$$SettingsStateLoadedImplCopyWith<$Res> { - __$$SettingsStateLoadedImplCopyWithImpl(_$SettingsStateLoadedImpl _value, - $Res Function(_$SettingsStateLoadedImpl) _then) - : super(_value, _then); + __$$SettingsStateLoadedImplCopyWithImpl( + _$SettingsStateLoadedImpl _value, + $Res Function(_$SettingsStateLoadedImpl) _then, + ) : super(_value, _then); /// Create a copy of SettingsState /// with the given fields replaced by the non-null parameter values. @@ -375,20 +405,25 @@ class __$$SettingsStateLoadedImplCopyWithImpl<$Res> Object? profileDetails = null, Object? profile = null, }) { - return _then(_$SettingsStateLoadedImpl( - profileSettings: null == profileSettings - ? _value.profileSettings - : profileSettings // ignore: cast_nullable_to_non_nullable - as ProfileSettingsModel, - profileDetails: null == profileDetails - ? _value.profileDetails - : profileDetails // ignore: cast_nullable_to_non_nullable - as ProfileDetailsModel, - profile: null == profile - ? _value.profile - : profile // ignore: cast_nullable_to_non_nullable - as ProfileModel, - )); + return _then( + _$SettingsStateLoadedImpl( + profileSettings: + null == profileSettings + ? _value.profileSettings + : profileSettings // ignore: cast_nullable_to_non_nullable + as ProfileSettingsModel, + profileDetails: + null == profileDetails + ? _value.profileDetails + : profileDetails // ignore: cast_nullable_to_non_nullable + as ProfileDetailsModel, + profile: + null == profile + ? _value.profile + : profile // ignore: cast_nullable_to_non_nullable + as ProfileModel, + ), + ); } /// Create a copy of SettingsState @@ -425,10 +460,11 @@ class __$$SettingsStateLoadedImplCopyWithImpl<$Res> /// @nodoc class _$SettingsStateLoadedImpl implements SettingsStateLoaded { - const _$SettingsStateLoadedImpl( - {required this.profileSettings, - required this.profileDetails, - required this.profile}); + const _$SettingsStateLoadedImpl({ + required this.profileSettings, + required this.profileDetails, + required this.profile, + }); @override final ProfileSettingsModel profileSettings; @@ -465,16 +501,21 @@ class _$SettingsStateLoadedImpl implements SettingsStateLoaded { @pragma('vm:prefer-inline') _$$SettingsStateLoadedImplCopyWith<_$SettingsStateLoadedImpl> get copyWith => __$$SettingsStateLoadedImplCopyWithImpl<_$SettingsStateLoadedImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs TResult when( TResult Function() $default, { required TResult Function() loading, - required TResult Function(ProfileSettingsModel profileSettings, - ProfileDetailsModel profileDetails, ProfileModel profile) - loaded, + required TResult Function( + ProfileSettingsModel profileSettings, + ProfileDetailsModel profileDetails, + ProfileModel profile, + ) + loaded, required TResult Function(String errorMessage) error, }) { return loaded(profileSettings, profileDetails, profile); @@ -485,9 +526,12 @@ class _$SettingsStateLoadedImpl implements SettingsStateLoaded { TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, - TResult? Function(ProfileSettingsModel profileSettings, - ProfileDetailsModel profileDetails, ProfileModel profile)? - loaded, + TResult? Function( + ProfileSettingsModel profileSettings, + ProfileDetailsModel profileDetails, + ProfileModel profile, + )? + loaded, TResult? Function(String errorMessage)? error, }) { return loaded?.call(profileSettings, profileDetails, profile); @@ -498,9 +542,12 @@ class _$SettingsStateLoadedImpl implements SettingsStateLoaded { TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, - TResult Function(ProfileSettingsModel profileSettings, - ProfileDetailsModel profileDetails, ProfileModel profile)? - loaded, + TResult Function( + ProfileSettingsModel profileSettings, + ProfileDetailsModel profileDetails, + ProfileModel profile, + )? + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { @@ -549,10 +596,11 @@ class _$SettingsStateLoadedImpl implements SettingsStateLoaded { } abstract class SettingsStateLoaded implements SettingsState { - const factory SettingsStateLoaded( - {required final ProfileSettingsModel profileSettings, - required final ProfileDetailsModel profileDetails, - required final ProfileModel profile}) = _$SettingsStateLoadedImpl; + const factory SettingsStateLoaded({ + required final ProfileSettingsModel profileSettings, + required final ProfileDetailsModel profileDetails, + required final ProfileModel profile, + }) = _$SettingsStateLoadedImpl; ProfileSettingsModel get profileSettings; ProfileDetailsModel get profileDetails; @@ -567,9 +615,10 @@ abstract class SettingsStateLoaded implements SettingsState { /// @nodoc abstract class _$$SettingsStateErrorImplCopyWith<$Res> { - factory _$$SettingsStateErrorImplCopyWith(_$SettingsStateErrorImpl value, - $Res Function(_$SettingsStateErrorImpl) then) = - __$$SettingsStateErrorImplCopyWithImpl<$Res>; + factory _$$SettingsStateErrorImplCopyWith( + _$SettingsStateErrorImpl value, + $Res Function(_$SettingsStateErrorImpl) then, + ) = __$$SettingsStateErrorImplCopyWithImpl<$Res>; @useResult $Res call({String errorMessage}); } @@ -578,23 +627,25 @@ abstract class _$$SettingsStateErrorImplCopyWith<$Res> { class __$$SettingsStateErrorImplCopyWithImpl<$Res> extends _$SettingsStateCopyWithImpl<$Res, _$SettingsStateErrorImpl> implements _$$SettingsStateErrorImplCopyWith<$Res> { - __$$SettingsStateErrorImplCopyWithImpl(_$SettingsStateErrorImpl _value, - $Res Function(_$SettingsStateErrorImpl) _then) - : super(_value, _then); + __$$SettingsStateErrorImplCopyWithImpl( + _$SettingsStateErrorImpl _value, + $Res Function(_$SettingsStateErrorImpl) _then, + ) : super(_value, _then); /// Create a copy of SettingsState /// with the given fields replaced by the non-null parameter values. @pragma('vm:prefer-inline') @override - $Res call({ - Object? errorMessage = null, - }) { - return _then(_$SettingsStateErrorImpl( - errorMessage: null == errorMessage - ? _value.errorMessage - : errorMessage // ignore: cast_nullable_to_non_nullable - as String, - )); + $Res call({Object? errorMessage = null}) { + return _then( + _$SettingsStateErrorImpl( + errorMessage: + null == errorMessage + ? _value.errorMessage + : errorMessage // ignore: cast_nullable_to_non_nullable + as String, + ), + ); } } @@ -630,16 +681,21 @@ class _$SettingsStateErrorImpl implements SettingsStateError { @pragma('vm:prefer-inline') _$$SettingsStateErrorImplCopyWith<_$SettingsStateErrorImpl> get copyWith => __$$SettingsStateErrorImplCopyWithImpl<_$SettingsStateErrorImpl>( - this, _$identity); + this, + _$identity, + ); @override @optionalTypeArgs TResult when( TResult Function() $default, { required TResult Function() loading, - required TResult Function(ProfileSettingsModel profileSettings, - ProfileDetailsModel profileDetails, ProfileModel profile) - loaded, + required TResult Function( + ProfileSettingsModel profileSettings, + ProfileDetailsModel profileDetails, + ProfileModel profile, + ) + loaded, required TResult Function(String errorMessage) error, }) { return error(errorMessage); @@ -650,9 +706,12 @@ class _$SettingsStateErrorImpl implements SettingsStateError { TResult? whenOrNull( TResult? Function()? $default, { TResult? Function()? loading, - TResult? Function(ProfileSettingsModel profileSettings, - ProfileDetailsModel profileDetails, ProfileModel profile)? - loaded, + TResult? Function( + ProfileSettingsModel profileSettings, + ProfileDetailsModel profileDetails, + ProfileModel profile, + )? + loaded, TResult? Function(String errorMessage)? error, }) { return error?.call(errorMessage); @@ -663,9 +722,12 @@ class _$SettingsStateErrorImpl implements SettingsStateError { TResult maybeWhen( TResult Function()? $default, { TResult Function()? loading, - TResult Function(ProfileSettingsModel profileSettings, - ProfileDetailsModel profileDetails, ProfileModel profile)? - loaded, + TResult Function( + ProfileSettingsModel profileSettings, + ProfileDetailsModel profileDetails, + ProfileModel profile, + )? + loaded, TResult Function(String errorMessage)? error, required TResult orElse(), }) { diff --git a/lib/features/user_details/presentation/cubit/user_details_state.freezed.dart b/lib/features/user_details/presentation/cubit/user_details_state.freezed.dart index 5cad9acb..67ba4353 100644 --- a/lib/features/user_details/presentation/cubit/user_details_state.freezed.dart +++ b/lib/features/user_details/presentation/cubit/user_details_state.freezed.dart @@ -12,7 +12,8 @@ part of 'user_details_state.dart'; 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'); + '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 _$UserDetailsState { @@ -33,15 +34,17 @@ mixin _$UserDetailsState { /// @nodoc abstract class $UserDetailsStateCopyWith<$Res> { factory $UserDetailsStateCopyWith( - UserDetailsState value, $Res Function(UserDetailsState) then) = - _$UserDetailsStateCopyWithImpl<$Res, UserDetailsState>; + UserDetailsState value, + $Res Function(UserDetailsState) then, + ) = _$UserDetailsStateCopyWithImpl<$Res, UserDetailsState>; @useResult - $Res call( - {bool isLoading, - String? error, - ProfileDetailsModel? profileDetails, - List? weightPoints, - List? circumferencePoints}); + $Res call({ + bool isLoading, + String? error, + ProfileDetailsModel? profileDetails, + List? weightPoints, + List? circumferencePoints, + }); $ProfileDetailsModelCopyWith<$Res>? get profileDetails; } @@ -67,28 +70,36 @@ class _$UserDetailsStateCopyWithImpl<$Res, $Val extends UserDetailsState> Object? weightPoints = freezed, Object? circumferencePoints = freezed, }) { - return _then(_value.copyWith( - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - error: freezed == error - ? _value.error - : error // ignore: cast_nullable_to_non_nullable - as String?, - profileDetails: freezed == profileDetails - ? _value.profileDetails - : profileDetails // ignore: cast_nullable_to_non_nullable - as ProfileDetailsModel?, - weightPoints: freezed == weightPoints - ? _value.weightPoints - : weightPoints // ignore: cast_nullable_to_non_nullable - as List?, - circumferencePoints: freezed == circumferencePoints - ? _value.circumferencePoints - : circumferencePoints // ignore: cast_nullable_to_non_nullable - as List?, - ) as $Val); + return _then( + _value.copyWith( + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + error: + freezed == error + ? _value.error + : error // ignore: cast_nullable_to_non_nullable + as String?, + profileDetails: + freezed == profileDetails + ? _value.profileDetails + : profileDetails // ignore: cast_nullable_to_non_nullable + as ProfileDetailsModel?, + weightPoints: + freezed == weightPoints + ? _value.weightPoints + : weightPoints // ignore: cast_nullable_to_non_nullable + as List?, + circumferencePoints: + freezed == circumferencePoints + ? _value.circumferencePoints + : circumferencePoints // ignore: cast_nullable_to_non_nullable + as List?, + ) + as $Val, + ); } /// Create a copy of UserDetailsState @@ -109,17 +120,19 @@ class _$UserDetailsStateCopyWithImpl<$Res, $Val extends UserDetailsState> /// @nodoc abstract class _$$UserDetailsStateImplCopyWith<$Res> implements $UserDetailsStateCopyWith<$Res> { - factory _$$UserDetailsStateImplCopyWith(_$UserDetailsStateImpl value, - $Res Function(_$UserDetailsStateImpl) then) = - __$$UserDetailsStateImplCopyWithImpl<$Res>; + factory _$$UserDetailsStateImplCopyWith( + _$UserDetailsStateImpl value, + $Res Function(_$UserDetailsStateImpl) then, + ) = __$$UserDetailsStateImplCopyWithImpl<$Res>; @override @useResult - $Res call( - {bool isLoading, - String? error, - ProfileDetailsModel? profileDetails, - List? weightPoints, - List? circumferencePoints}); + $Res call({ + bool isLoading, + String? error, + ProfileDetailsModel? profileDetails, + List? weightPoints, + List? circumferencePoints, + }); @override $ProfileDetailsModelCopyWith<$Res>? get profileDetails; @@ -129,9 +142,10 @@ abstract class _$$UserDetailsStateImplCopyWith<$Res> class __$$UserDetailsStateImplCopyWithImpl<$Res> extends _$UserDetailsStateCopyWithImpl<$Res, _$UserDetailsStateImpl> implements _$$UserDetailsStateImplCopyWith<$Res> { - __$$UserDetailsStateImplCopyWithImpl(_$UserDetailsStateImpl _value, - $Res Function(_$UserDetailsStateImpl) _then) - : super(_value, _then); + __$$UserDetailsStateImplCopyWithImpl( + _$UserDetailsStateImpl _value, + $Res Function(_$UserDetailsStateImpl) _then, + ) : super(_value, _then); /// Create a copy of UserDetailsState /// with the given fields replaced by the non-null parameter values. @@ -144,42 +158,49 @@ class __$$UserDetailsStateImplCopyWithImpl<$Res> Object? weightPoints = freezed, Object? circumferencePoints = freezed, }) { - return _then(_$UserDetailsStateImpl( - isLoading: null == isLoading - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - error: freezed == error - ? _value.error - : error // ignore: cast_nullable_to_non_nullable - as String?, - profileDetails: freezed == profileDetails - ? _value.profileDetails - : profileDetails // ignore: cast_nullable_to_non_nullable - as ProfileDetailsModel?, - weightPoints: freezed == weightPoints - ? _value._weightPoints - : weightPoints // ignore: cast_nullable_to_non_nullable - as List?, - circumferencePoints: freezed == circumferencePoints - ? _value._circumferencePoints - : circumferencePoints // ignore: cast_nullable_to_non_nullable - as List?, - )); + return _then( + _$UserDetailsStateImpl( + isLoading: + null == isLoading + ? _value.isLoading + : isLoading // ignore: cast_nullable_to_non_nullable + as bool, + error: + freezed == error + ? _value.error + : error // ignore: cast_nullable_to_non_nullable + as String?, + profileDetails: + freezed == profileDetails + ? _value.profileDetails + : profileDetails // ignore: cast_nullable_to_non_nullable + as ProfileDetailsModel?, + weightPoints: + freezed == weightPoints + ? _value._weightPoints + : weightPoints // ignore: cast_nullable_to_non_nullable + as List?, + circumferencePoints: + freezed == circumferencePoints + ? _value._circumferencePoints + : circumferencePoints // ignore: cast_nullable_to_non_nullable + as List?, + ), + ); } } /// @nodoc class _$UserDetailsStateImpl implements _UserDetailsState { - _$UserDetailsStateImpl( - {this.isLoading = false, - this.error, - this.profileDetails, - final List? weightPoints, - final List? circumferencePoints}) - : _weightPoints = weightPoints, - _circumferencePoints = circumferencePoints; + _$UserDetailsStateImpl({ + this.isLoading = false, + this.error, + this.profileDetails, + final List? weightPoints, + final List? circumferencePoints, + }) : _weightPoints = weightPoints, + _circumferencePoints = circumferencePoints; @override @JsonKey() @@ -224,20 +245,25 @@ class _$UserDetailsStateImpl implements _UserDetailsState { (identical(other.error, error) || other.error == error) && (identical(other.profileDetails, profileDetails) || other.profileDetails == profileDetails) && - const DeepCollectionEquality() - .equals(other._weightPoints, _weightPoints) && - const DeepCollectionEquality() - .equals(other._circumferencePoints, _circumferencePoints)); + const DeepCollectionEquality().equals( + other._weightPoints, + _weightPoints, + ) && + const DeepCollectionEquality().equals( + other._circumferencePoints, + _circumferencePoints, + )); } @override int get hashCode => Object.hash( - runtimeType, - isLoading, - error, - profileDetails, - const DeepCollectionEquality().hash(_weightPoints), - const DeepCollectionEquality().hash(_circumferencePoints)); + runtimeType, + isLoading, + error, + profileDetails, + const DeepCollectionEquality().hash(_weightPoints), + const DeepCollectionEquality().hash(_circumferencePoints), + ); /// Create a copy of UserDetailsState /// with the given fields replaced by the non-null parameter values. @@ -246,17 +272,19 @@ class _$UserDetailsStateImpl implements _UserDetailsState { @pragma('vm:prefer-inline') _$$UserDetailsStateImplCopyWith<_$UserDetailsStateImpl> get copyWith => __$$UserDetailsStateImplCopyWithImpl<_$UserDetailsStateImpl>( - this, _$identity); + this, + _$identity, + ); } abstract class _UserDetailsState implements UserDetailsState { - factory _UserDetailsState( - {final bool isLoading, - final String? error, - final ProfileDetailsModel? profileDetails, - final List? weightPoints, - final List? circumferencePoints}) = - _$UserDetailsStateImpl; + factory _UserDetailsState({ + final bool isLoading, + final String? error, + final ProfileDetailsModel? profileDetails, + final List? weightPoints, + final List? circumferencePoints, + }) = _$UserDetailsStateImpl; @override bool get isLoading; diff --git a/lib/generated/intl/messages_all.dart b/lib/generated/intl/messages_all.dart index abae25a5..3139e159 100644 --- a/lib/generated/intl/messages_all.dart +++ b/lib/generated/intl/messages_all.dart @@ -39,8 +39,10 @@ MessageLookupByLibrary? _findExact(String localeName) { /// User programs should call this before using [localeName] for messages. Future initializeMessages(String localeName) { var availableLocale = Intl.verifiedLocale( - localeName, (locale) => _deferredLibraries[locale] != null, - onFailure: (_) => null); + localeName, + (locale) => _deferredLibraries[locale] != null, + onFailure: (_) => null, + ); if (availableLocale == null) { return new SynchronousFuture(false); } @@ -60,8 +62,11 @@ bool _messagesExistFor(String locale) { } MessageLookupByLibrary? _findGeneratedMessagesFor(String locale) { - var actualLocale = - Intl.verifiedLocale(locale, _messagesExistFor, onFailure: (_) => null); + var actualLocale = Intl.verifiedLocale( + locale, + _messagesExistFor, + onFailure: (_) => null, + ); if (actualLocale == null) return null; return _findExact(actualLocale); } diff --git a/lib/generated/intl/messages_en.dart b/lib/generated/intl/messages_en.dart index ab2b76d5..dfc173ae 100644 --- a/lib/generated/intl/messages_en.dart +++ b/lib/generated/intl/messages_en.dart @@ -22,479 +22,578 @@ class MessageLookup extends MessageLookupByLibrary { final messages = _notInlinedMessages(_notInlinedMessages); static Map _notInlinedMessages(_) => { - "Moscow": MessageLookupByLibrary.simpleMessage("Москва"), - "Russia": MessageLookupByLibrary.simpleMessage("Россия"), - "about_diet": MessageLookupByLibrary.simpleMessage("Об этой диете"), - "about_plan": MessageLookupByLibrary.simpleMessage("Об этом плане"), - "about_recipe": MessageLookupByLibrary.simpleMessage("Об этом рецепте"), - "active": MessageLookupByLibrary.simpleMessage("Активен"), - "active_consultations_count": MessageLookupByLibrary.simpleMessage( - "Кол-во активных консультаций"), - "active_diet_state": MessageLookupByLibrary.simpleMessage("Активная"), - "add": MessageLookupByLibrary.simpleMessage("Добавить"), - "add_card": MessageLookupByLibrary.simpleMessage("Привязать карту"), - "add_cover": MessageLookupByLibrary.simpleMessage("Добавьте обложку"), - "add_measure": MessageLookupByLibrary.simpleMessage("Добавить замер"), - "adding_plan": MessageLookupByLibrary.simpleMessage("Добавление плана"), - "additional_information": - MessageLookupByLibrary.simpleMessage("Дополнительная информация"), - "admin": MessageLookupByLibrary.simpleMessage("Админ"), - "alcohol": MessageLookupByLibrary.simpleMessage("Алкоголь"), - "all": MessageLookupByLibrary.simpleMessage("Все"), - "allergies_presence": - MessageLookupByLibrary.simpleMessage("Наличие аллергии"), - "another_form_of_comment": - MessageLookupByLibrary.simpleMessage("комментария"), - "another_form_of_day": MessageLookupByLibrary.simpleMessage("дня"), - "another_form_of_hour": MessageLookupByLibrary.simpleMessage("часа"), - "another_form_of_minute": MessageLookupByLibrary.simpleMessage("минут"), - "another_form_of_stage": MessageLookupByLibrary.simpleMessage("этапа"), - "answer": MessageLookupByLibrary.simpleMessage("Ответить"), - "archived": MessageLookupByLibrary.simpleMessage("В архиве"), - "authentificate": MessageLookupByLibrary.simpleMessage("Войти"), - "average_pressure": MessageLookupByLibrary.simpleMessage( - "Средние показатели давления:"), - "bodymass_chart": MessageLookupByLibrary.simpleMessage("График ИМТ"), - "by_default": MessageLookupByLibrary.simpleMessage("По умолчянию"), - "calls_for_bullying": - MessageLookupByLibrary.simpleMessage("Призывы к травле"), - "calories": MessageLookupByLibrary.simpleMessage("Калории"), - "can_not_choose_start_date": MessageLookupByLibrary.simpleMessage( - "Дату старта плана невозможно выбрать, пока Вы не привяжите карту"), - "can_not_load_data_please_try_again": - MessageLookupByLibrary.simpleMessage( - "Не удалось загрузить данные. Попробуйте обновить страницу"), - "cancel_diet": MessageLookupByLibrary.simpleMessage("Отменить диету?"), - "cancel_order": MessageLookupByLibrary.simpleMessage("Отменить заказ"), - "carb_type": MessageLookupByLibrary.simpleMessage("Мучное"), - "carb_type_desc": MessageLookupByLibrary.simpleMessage( - "Если вы любите мучные продукты, но хотите придерживаться диеты, вам подходит диета с добавленим мучных блюд на основе цельнозерновых вариантов. В них больше сложных углеводов и клетчатки, что способствует длительному чувству сытости и поддерживает здоровье пищеварительной системы."), - "carbohydrates": MessageLookupByLibrary.simpleMessage("Углеводы"), - "chat": MessageLookupByLibrary.simpleMessage("Чат"), - "check_out_video_recipe": - MessageLookupByLibrary.simpleMessage("Посмотреть видео рецепт"), - "chest": MessageLookupByLibrary.simpleMessage("Грудь"), - "chest_circumference": - MessageLookupByLibrary.simpleMessage("Обхват груди"), - "choose_date": MessageLookupByLibrary.simpleMessage("Выбрать дату"), - "choose_diet_duration": - MessageLookupByLibrary.simpleMessage("Выберите срок диеты"), - "choose_plan_duration": - MessageLookupByLibrary.simpleMessage("Выберите срок плана"), - "choose_plan_start_date": MessageLookupByLibrary.simpleMessage( - "Выберите дату старта плана питания"), - "choose_start_diet_date": MessageLookupByLibrary.simpleMessage( - "Выберите дату старты диеты. Она отобразиться у Вас в дневнике"), - "circumference_empty": MessageLookupByLibrary.simpleMessage( - "Все замеры обязательны к заполнению"), - "circumference_is_not_a_number": MessageLookupByLibrary.simpleMessage( - "Все замеры должны быть числами"), - "circumferences_chart": - MessageLookupByLibrary.simpleMessage("График обхватов"), - "city": MessageLookupByLibrary.simpleMessage("Город"), - "city_of_living": - MessageLookupByLibrary.simpleMessage("Город проживания"), - "comfort": MessageLookupByLibrary.simpleMessage("Комфорт"), - "comment": MessageLookupByLibrary.simpleMessage("комментарий"), - "comments": MessageLookupByLibrary.simpleMessage("Комментарии"), - "comments_plural": MessageLookupByLibrary.simpleMessage("комментариев"), - "complain": MessageLookupByLibrary.simpleMessage("Пожаловаться"), - "complaint": MessageLookupByLibrary.simpleMessage("Жалоба"), - "complaint_question": MessageLookupByLibrary.simpleMessage( - "Что именно в этом материале Вы считаете неприемлемым и нарушающим правила?"), - "complaint_sent": - MessageLookupByLibrary.simpleMessage("Жалоба успешно отправлена"), - "complaint_sent_description": MessageLookupByLibrary.simpleMessage( - "Ваше обращение принято! Мы рассмотрим его в ближайшее время и примем необходимые меры. Спасибо за вашу бдительность и помощь в улучшении нашего сервиса."), - "confirm": MessageLookupByLibrary.simpleMessage("Подтвердить"), - "consultations_count": MessageLookupByLibrary.simpleMessage( - "Кол-во проведенных консулдьтаций"), - "continueButton": MessageLookupByLibrary.simpleMessage("Продолжить"), - "continue_": MessageLookupByLibrary.simpleMessage("Продолжить"), - "copied": MessageLookupByLibrary.simpleMessage("cкопирован"), - "copy_link": MessageLookupByLibrary.simpleMessage("Скопировать ссылку"), - "copy_referral_link": MessageLookupByLibrary.simpleMessage( - "Скопировать пригласительную ссылку"), - "could_not_cancel_diet": - MessageLookupByLibrary.simpleMessage("Не удалось отменить диету"), - "could_not_delete_blog_post": - MessageLookupByLibrary.simpleMessage("Не удалось удалить пост"), - "could_not_launch_video": - MessageLookupByLibrary.simpleMessage("Не удалось запустить видео"), - "could_not_publish_blog_post": MessageLookupByLibrary.simpleMessage( - "Не удалось опубликовать пост"), - "could_not_publish_diet": MessageLookupByLibrary.simpleMessage( - "Не удалось опубликовать диету"), - "could_not_publish_recipe": MessageLookupByLibrary.simpleMessage( - "Не удалось опубликовать рецепт"), - "could_not_send_complain": - MessageLookupByLibrary.simpleMessage("Не удалось отправить жалобу"), - "could_not_update_blog_post": - MessageLookupByLibrary.simpleMessage("Не удалось обновить пост"), - "could_not_update_diet": - MessageLookupByLibrary.simpleMessage("Не удалось обновить диету"), - "country": MessageLookupByLibrary.simpleMessage("Страна"), - "create_diet": MessageLookupByLibrary.simpleMessage("Создание диеты"), - "customer_price": - MessageLookupByLibrary.simpleMessage("Цена для покупателя"), - "date_has_ben_set": MessageLookupByLibrary.simpleMessage( - "Дата старта начала консультации установлена"), - "date_of_birth": MessageLookupByLibrary.simpleMessage("Дата рождения"), - "day": MessageLookupByLibrary.simpleMessage("День"), - "days": MessageLookupByLibrary.simpleMessage("дней"), - "deception": MessageLookupByLibrary.simpleMessage("Обман"), - "deleted": MessageLookupByLibrary.simpleMessage("Удалена"), - "diary": MessageLookupByLibrary.simpleMessage("Дневник"), - "diet": MessageLookupByLibrary.simpleMessage("Диета"), - "diet_author": MessageLookupByLibrary.simpleMessage("Автор диеты"), - "diet_has_been_sent_to_draft": MessageLookupByLibrary.simpleMessage( - "снята с публикации и перенесена в черновик"), - "diet_plan": MessageLookupByLibrary.simpleMessage("План диеты"), - "diet_started": - MessageLookupByLibrary.simpleMessage("Диета уже начата"), - "diet_state": MessageLookupByLibrary.simpleMessage("Статус диеты"), - "diet_type": MessageLookupByLibrary.simpleMessage("Тип диеты"), - "do_you_have_hypertension_tendency": - MessageLookupByLibrary.simpleMessage("Есть ли у вас гипертония?"), - "do_you_have_hypotension_tendency": - MessageLookupByLibrary.simpleMessage("Есть ли у вас гипотония?"), - "do_you_take_pills": MessageLookupByLibrary.simpleMessage( - "Принимаете ли вы лекарства или бады?"), - "down_pressure": - MessageLookupByLibrary.simpleMessage("Нижние показатели давления:"), - "draft": MessageLookupByLibrary.simpleMessage("Черновик"), - "drafted": MessageLookupByLibrary.simpleMessage("Черновики"), - "drugs": MessageLookupByLibrary.simpleMessage("Наркотики"), - "eating_behavior": - MessageLookupByLibrary.simpleMessage("Пищевое поведение"), - "eating_behavior_type": MessageLookupByLibrary.simpleMessage( - "Формирование пищевого поведения"), - "eating_behavior_type_desc": MessageLookupByLibrary.simpleMessage( - "Формирование здорового пищевого поведения — это процесс, который включает в себя изменение привычек и отношения к еде. Он направлен на то, чтобы помочь людям научиться правильно питаться и поддерживать здоровый образ жизни.Основные принципы формирования здорового пищевого поведения: \n● Разнообразие продуктов; \n● Сбалансированный рацион; \n● Питьевой режим; \n● Ограничение вредных продуктов; \n● Регулярные приёмы пищи; \n● Умеренность;Осознанное питание; \n● Физическая активность;"), - "economy": MessageLookupByLibrary.simpleMessage("Эконом"), - "edit": MessageLookupByLibrary.simpleMessage("Редактировать"), - "email": MessageLookupByLibrary.simpleMessage("Электронная почта"), - "email_empty": MessageLookupByLibrary.simpleMessage( - "Необходимо ввести адрес электронной почты"), - "email_invalid": MessageLookupByLibrary.simpleMessage( - "Некорректный адрес электронной почты"), - "enter_additional_information": MessageLookupByLibrary.simpleMessage( - "Введите любую дополнительную информацию на своё усмотрение:"), - "enter_diet_description": - MessageLookupByLibrary.simpleMessage("Введите описание диеты"), - "enter_diet_name": - MessageLookupByLibrary.simpleMessage("Выведите название диеты"), - "enter_information": - MessageLookupByLibrary.simpleMessage("Введите информацию..."), - "exit": MessageLookupByLibrary.simpleMessage("Выйти"), - "expand": MessageLookupByLibrary.simpleMessage("Показать полностью"), - "explicitImage": - MessageLookupByLibrary.simpleMessage("Откровенное изображение"), - "explicitImages": - MessageLookupByLibrary.simpleMessage("Откровенные изображения"), - "explicitImagesDescription": MessageLookupByLibrary.simpleMessage( - "Отправьте жалобу, если кто-то разместил откровенные изображения"), - "extremism": MessageLookupByLibrary.simpleMessage("Экстремизм"), - "fake_documents": - MessageLookupByLibrary.simpleMessage("Поддельные документы"), - "fats": MessageLookupByLibrary.simpleMessage("Жиры"), - "favorite_foods": - MessageLookupByLibrary.simpleMessage("Любимые продукты"), - "favorite_unfavorite_foods": MessageLookupByLibrary.simpleMessage( - "Ваши любимые/нелюбимые продукты питания?"), - "female": MessageLookupByLibrary.simpleMessage("Женский"), - "fill_in_information": - MessageLookupByLibrary.simpleMessage("Заполните информацию:"), - "finish": MessageLookupByLibrary.simpleMessage("Завершить"), - "first_name": MessageLookupByLibrary.simpleMessage("Имя"), - "first_name_empty": MessageLookupByLibrary.simpleMessage( - "Имя обязательно для заполнения"), - "first_name_short": MessageLookupByLibrary.simpleMessage( - "В имени должен быть минимум 1 символ"), - "fit_type": MessageLookupByLibrary.simpleMessage("Поддержание формы"), - "fit_type_desc": MessageLookupByLibrary.simpleMessage( - "План питания для поддержания формы сбалансированный и разнообразный, чтобы обеспечить организм всеми необходимыми питательными веществами. Общие принципы: \n● Дробное питание; \n● Разнообразие продуктов; \n● Контроль порций; \n● Питьевой режим; \n● Ограничение вредных продуктов;"), - "fitness": MessageLookupByLibrary.simpleMessage("Поддержка формы"), - "for_a_month": MessageLookupByLibrary.simpleMessage("За месяц"), - "for_a_week": MessageLookupByLibrary.simpleMessage("За неделю"), - "for_a_year": MessageLookupByLibrary.simpleMessage("За год"), - "for_whole_period_of_time": - MessageLookupByLibrary.simpleMessage("За всё время"), - "fraud": MessageLookupByLibrary.simpleMessage("Мошенничество"), - "fraud_description": MessageLookupByLibrary.simpleMessage( - "Мошенничество с целью наживы. Если вас обманули, пожалуйста, сообщите об этом в правоохранительные органы."), - "from": MessageLookupByLibrary.simpleMessage("от"), - "from_a_to_z": MessageLookupByLibrary.simpleMessage("Название: А-Я"), - "from_z_to_a": MessageLookupByLibrary.simpleMessage("Название: Я-А"), - "gallery": MessageLookupByLibrary.simpleMessage("Галерея"), - "general_info": - MessageLookupByLibrary.simpleMessage("Общая информация"), - "gr": MessageLookupByLibrary.simpleMessage("гр"), - "grams": MessageLookupByLibrary.simpleMessage("гр"), - "has_alergy": MessageLookupByLibrary.simpleMessage("Наличие аллергии"), - "has_hyper": - MessageLookupByLibrary.simpleMessage("Склонность к гипертонии"), - "has_hypo": - MessageLookupByLibrary.simpleMessage("Склонность к гипотонии"), - "hatred": MessageLookupByLibrary.simpleMessage("Оскорбление"), - "hatred_description": - MessageLookupByLibrary.simpleMessage("Враждебные высказывания"), - "height": MessageLookupByLibrary.simpleMessage("Рост"), - "height_measurements": - MessageLookupByLibrary.simpleMessage("Замер роста"), - "hide": MessageLookupByLibrary.simpleMessage("Свернуть"), - "hip_circumference": - MessageLookupByLibrary.simpleMessage("Обхват бедер"), - "hips": MessageLookupByLibrary.simpleMessage("Бедра"), - "hour": MessageLookupByLibrary.simpleMessage("час"), - "hours": MessageLookupByLibrary.simpleMessage("часов"), - "in_progress": MessageLookupByLibrary.simpleMessage("В процессе"), - "inactive_diet_state": MessageLookupByLibrary.simpleMessage("Черновик"), - "infoAboutOrder": - MessageLookupByLibrary.simpleMessage("Информация о заказе"), - "ingredients": MessageLookupByLibrary.simpleMessage("Ингредиенты"), - "initial_measurements": - MessageLookupByLibrary.simpleMessage("Первичные замеры"), - "invited_people_count": - MessageLookupByLibrary.simpleMessage("Количество приглашенных"), - "label": MessageLookupByLibrary.simpleMessage("Название"), - "language": MessageLookupByLibrary.simpleMessage("Язык"), - "last_name": MessageLookupByLibrary.simpleMessage("Фамилия"), - "last_name_empty": MessageLookupByLibrary.simpleMessage( - "Фамилия обязательна для заполнения"), - "last_name_short": MessageLookupByLibrary.simpleMessage( - "В фамилии должен быть минимум 6 символов"), - "lawViolation": - MessageLookupByLibrary.simpleMessage("Нарушение законодательства"), - "lbl_english": MessageLookupByLibrary.simpleMessage("English"), - "light_type": MessageLookupByLibrary.simpleMessage("Легкая"), - "light_type_desc": MessageLookupByLibrary.simpleMessage( - "С некоторыми видами диет можно употреблять алкоголь в умеренных количествах. Рекомендуется совмещать вместе с низкокалорийными закусками."), - "liked_groceries": - MessageLookupByLibrary.simpleMessage("Любимые продукты"), - "link_was_copied": - MessageLookupByLibrary.simpleMessage("Ссылка успешно скопирована"), - "loading": MessageLookupByLibrary.simpleMessage("Загрузка..."), - "lower": MessageLookupByLibrary.simpleMessage("Нижнее"), - "male": MessageLookupByLibrary.simpleMessage("Мужской"), - "meal": MessageLookupByLibrary.simpleMessage("Приём пищи"), - "meat": MessageLookupByLibrary.simpleMessage("Мясо"), - "meat_type": MessageLookupByLibrary.simpleMessage("С мясом"), - "meat_type_desc": MessageLookupByLibrary.simpleMessage( - "Диета с мясом полезная и сбалансированная. Включает в себя нежирное мясо: курицу, индейку, кролика или говядину. В сочетании с овощами получаете все необходимые витамины и минералы. Не забывайте о порциях и старайтесь есть медленно, прислушиваясь к своему организму."), - "milliliter": MessageLookupByLibrary.simpleMessage("мл"), - "minimal_customer_price": MessageLookupByLibrary.simpleMessage( - "Минимальная цена для покупателя: 1200₽"), - "minute": MessageLookupByLibrary.simpleMessage("минута"), - "minutes": MessageLookupByLibrary.simpleMessage("минуты"), - "misrepresentation": - MessageLookupByLibrary.simpleMessage("Введение в заблуждение"), - "misrepresentation_description": MessageLookupByLibrary.simpleMessage( - "Новости, которые могут вызвать широкий резонанс или несут угрозу, распространяемые с целью введения людей в заблуждение."), - "more_about_order": - MessageLookupByLibrary.simpleMessage("Подробнее о заказе"), - "most_new": MessageLookupByLibrary.simpleMessage("Самые новые"), - "most_old": MessageLookupByLibrary.simpleMessage("Самые старые"), - "msg_network_err": - MessageLookupByLibrary.simpleMessage("Сетевая ошибка!"), - "msg_something_went_wrong": - MessageLookupByLibrary.simpleMessage("Что то пошло не так!"), - "my_blog": MessageLookupByLibrary.simpleMessage("Мой блог"), - "my_diets": MessageLookupByLibrary.simpleMessage("Мои диеты"), - "my_plans": MessageLookupByLibrary.simpleMessage("Мои планы"), - "my_settings": MessageLookupByLibrary.simpleMessage("Мои настройки"), - "name_empty": MessageLookupByLibrary.simpleMessage( - "Имя пользователя обязательно для заполнения"), - "name_short": MessageLookupByLibrary.simpleMessage( - "В имени пользователя должно быть минимум 6 символов"), - "nicotine": MessageLookupByLibrary.simpleMessage("Никотин"), - "no": MessageLookupByLibrary.simpleMessage("Нет"), - "no_account": - MessageLookupByLibrary.simpleMessage("У меня нет аккаунта"), - "not_liked_groceries": - MessageLookupByLibrary.simpleMessage("Не любимые продукты"), - "ok": MessageLookupByLibrary.simpleMessage("Хорошо"), - "one_option": MessageLookupByLibrary.simpleMessage("1 опция"), - "option": MessageLookupByLibrary.simpleMessage("Опция"), - "option_content": - MessageLookupByLibrary.simpleMessage("Содержание опции"), - "option_content_hint_text": - MessageLookupByLibrary.simpleMessage("На связи 7 дней в неделю"), - "option_desc": MessageLookupByLibrary.simpleMessage("Описание опции"), - "option_desc_hint_text": MessageLookupByLibrary.simpleMessage( - "Этот план питания для похудения на 7 дней сбалансированный и разнообразный"), - "option_duration": - MessageLookupByLibrary.simpleMessage("Продолжительность опции"), - "option_personal_diet_desc": MessageLookupByLibrary.simpleMessage( - "Опция подразумевает создание индивидуальной диеты"), - "option_title": MessageLookupByLibrary.simpleMessage("Заголовок опции"), - "order": MessageLookupByLibrary.simpleMessage("Порядок"), - "other": MessageLookupByLibrary.simpleMessage("Другое"), - "other_info": MessageLookupByLibrary.simpleMessage("Прочая информация"), - "password": MessageLookupByLibrary.simpleMessage("Пароль"), - "password_confirmation": - MessageLookupByLibrary.simpleMessage("Подтвердите пароль"), - "password_confirmation_mismatch": - MessageLookupByLibrary.simpleMessage("Пароли не совпадают"), - "password_empty": MessageLookupByLibrary.simpleMessage( - "Пароль обязателен для заполнения"), - "password_short": MessageLookupByLibrary.simpleMessage( - "В пароле должно быть минимум 6 символов"), - "pay": MessageLookupByLibrary.simpleMessage("Оплатить"), - "pcs": MessageLookupByLibrary.simpleMessage("шт"), - "personal": MessageLookupByLibrary.simpleMessage("Персональные"), - "personal_diet_state": - MessageLookupByLibrary.simpleMessage("Персональная"), - "photo": MessageLookupByLibrary.simpleMessage("Фото"), - "physical_fitness": - MessageLookupByLibrary.simpleMessage("Физическая форма"), - "place_of_living": - MessageLookupByLibrary.simpleMessage("Место проживания"), - "plan_author": MessageLookupByLibrary.simpleMessage("Автор плана"), - "plan_desc": MessageLookupByLibrary.simpleMessage("Описание плана"), - "plan_desc_example": MessageLookupByLibrary.simpleMessage( - "Большое подробное, привлекательное описание плана"), - "plan_duration": MessageLookupByLibrary.simpleMessage("Срок плана"), - "plan_label_desc": - MessageLookupByLibrary.simpleMessage("План для поддержания формы"), - "plan_type": MessageLookupByLibrary.simpleMessage("Тип плана"), - "plans_complete": - MessageLookupByLibrary.simpleMessage("Пройденные планы"), - "please_try_again_later": MessageLookupByLibrary.simpleMessage( - "Пожалуйста, попробуйте еще раз позже"), - "popular": MessageLookupByLibrary.simpleMessage("Популярные"), - "preferred_language": - MessageLookupByLibrary.simpleMessage("Предпочитаемый язык общения"), - "pressure": MessageLookupByLibrary.simpleMessage("Давление"), - "pressure_empty": MessageLookupByLibrary.simpleMessage( - "Все показатели давления обязательны к заполнению"), - "pressure_is_not_a_number": MessageLookupByLibrary.simpleMessage( - "Все показатели давления должны быть числами"), - "preview": MessageLookupByLibrary.simpleMessage("Превью"), - "price": MessageLookupByLibrary.simpleMessage("Цена"), - "price_explanation": MessageLookupByLibrary.simpleMessage( - "Разница в ценах, это комиссия Итвио"), - "profile": MessageLookupByLibrary.simpleMessage("Профиль"), - "prostitution": MessageLookupByLibrary.simpleMessage("Проституция"), - "proteins": MessageLookupByLibrary.simpleMessage("Белки"), - "publish": MessageLookupByLibrary.simpleMessage("Опубликовать"), - "published": MessageLookupByLibrary.simpleMessage("Опубликованные"), - "published_diets_count": - MessageLookupByLibrary.simpleMessage("Кол-во опубликованных диет"), - "published_posts_count": MessageLookupByLibrary.simpleMessage( - "Количество опубликованных постов"), - "published_recipes_count": MessageLookupByLibrary.simpleMessage( - "Кол-во опубликованных рецептов"), - "rating_and_statistics": - MessageLookupByLibrary.simpleMessage("Рейтинг и статистика"), - "rating_history": - MessageLookupByLibrary.simpleMessage("Начисление рейтинга"), - "recipe_author": MessageLookupByLibrary.simpleMessage("Автор рецепта"), - "recipe_publishing": - MessageLookupByLibrary.simpleMessage("Публикация рецепта"), - "refuse_order": - MessageLookupByLibrary.simpleMessage("Отказаться от заказа"), - "removeFromActive": - MessageLookupByLibrary.simpleMessage("Снять с публикации"), - "save": MessageLookupByLibrary.simpleMessage("Сохранить"), - "send_complain": - MessageLookupByLibrary.simpleMessage("Отправить жалобу"), - "services": MessageLookupByLibrary.simpleMessage("Оказание услуг"), - "settings": MessageLookupByLibrary.simpleMessage("Настройки"), - "sex": MessageLookupByLibrary.simpleMessage("Пол"), - "share": MessageLookupByLibrary.simpleMessage("Поделиться"), - "skip": MessageLookupByLibrary.simpleMessage("Пропустить"), - "slim": MessageLookupByLibrary.simpleMessage("Похудение"), - "slim_type": MessageLookupByLibrary.simpleMessage("Похудение"), - "slim_type_desc": MessageLookupByLibrary.simpleMessage( - "План питания для похудения должен быть разработан с учётом индивидуальных особенностей организма, возраста, пола, уровня физической активности и состояния здоровья. Общие принципы: \n● Снижение калорийности; \n● Сбалансированный рацион; \n● Разнообразие продуктов; \n● Питьевой режим; \n● Ограничение вредных продуктов;"), - "some_error_occurred": - MessageLookupByLibrary.simpleMessage("Упс! Произошла ошибка"), - "some_error_occurred_description": MessageLookupByLibrary.simpleMessage( - "Произошла ошибка. Мы уже работаем над ее устранением. Попробуйте позже."), - "something_went_wrong": - MessageLookupByLibrary.simpleMessage("Упс! Что-то пошло не так"), - "spam": MessageLookupByLibrary.simpleMessage("Спам"), - "spam_description": MessageLookupByLibrary.simpleMessage( - "Отправьте жалобу, если Вы заметили рекламу, размещенную в не предназначенном для этого месте."), - "sport_hobbies": - MessageLookupByLibrary.simpleMessage("Спортивные увлечения"), - "stage": MessageLookupByLibrary.simpleMessage("этап"), - "stages": MessageLookupByLibrary.simpleMessage("этапов"), - "standard": MessageLookupByLibrary.simpleMessage("Стандарт"), - "startDiet": MessageLookupByLibrary.simpleMessage("Начать диету"), - "statistic": MessageLookupByLibrary.simpleMessage("Статистика"), - "step": MessageLookupByLibrary.simpleMessage("Шаг"), - "step_by_step_photo_recipe": - MessageLookupByLibrary.simpleMessage("Пошаговый фоторецепт"), - "successfully_published": - MessageLookupByLibrary.simpleMessage("успешно опубликован"), - "suicide": - MessageLookupByLibrary.simpleMessage("Склонение к самоубийству"), - "takes_pills": - MessageLookupByLibrary.simpleMessage("Принимает лекарства"), - "tell_your_schedule": MessageLookupByLibrary.simpleMessage( - "Расскажите в свободной форме о том как просыпаетесь, когда едите, когда ложитесь спать:"), - "there_is_a_video": MessageLookupByLibrary.simpleMessage("Есть видео"), - "three_options": MessageLookupByLibrary.simpleMessage("3 опции"), - "time": MessageLookupByLibrary.simpleMessage("Время прохождения"), - "toOffer": MessageLookupByLibrary.simpleMessage("Предложить"), - "to_draft": MessageLookupByLibrary.simpleMessage("В черновик"), - "to_order": MessageLookupByLibrary.simpleMessage("Заказать"), - "try_again": MessageLookupByLibrary.simpleMessage("Попробовать снова"), - "type_here_your_complaint": - MessageLookupByLibrary.simpleMessage("Напишите здесь свою жалобу"), - "unfavorite_foods": - MessageLookupByLibrary.simpleMessage("Нелюбимые продукты"), - "up_pressure": MessageLookupByLibrary.simpleMessage( - "Верхние показатели давления:"), - "upper": MessageLookupByLibrary.simpleMessage("Верхнее"), - "user_authorization": - MessageLookupByLibrary.simpleMessage("Аутентификация"), - "user_data": - MessageLookupByLibrary.simpleMessage("Данные пользователя"), - "user_registration": - MessageLookupByLibrary.simpleMessage("Регистрация пользователя"), - "username": MessageLookupByLibrary.simpleMessage("Имя пользователя"), - "vegan": MessageLookupByLibrary.simpleMessage("Веган."), - "vegan_type": MessageLookupByLibrary.simpleMessage("Вегетарианская"), - "vegan_type_desc": MessageLookupByLibrary.simpleMessage( - "Диета основана на потреблении растительной пищи и отказе от продуктов животного происхождения. Такой тип питания может быть разнообразным и вкусным, а также полезным для здоровья."), - "violenceAndHostility": - MessageLookupByLibrary.simpleMessage("Насилие и вражда"), - "violence_against_people_or_animal": - MessageLookupByLibrary.simpleMessage( - "Насилие над людьми или животными"), - "waist": MessageLookupByLibrary.simpleMessage("Талия"), - "waist_circumference": - MessageLookupByLibrary.simpleMessage("Обхват талии"), - "weapon": MessageLookupByLibrary.simpleMessage("Оружие"), - "weight": MessageLookupByLibrary.simpleMessage("Вес"), - "weight_chart": MessageLookupByLibrary.simpleMessage("График веса"), - "weight_measurements": - MessageLookupByLibrary.simpleMessage("Замер веса"), - "wellness": - MessageLookupByLibrary.simpleMessage("Улучшение самочувствия"), - "wellness_type": - MessageLookupByLibrary.simpleMessage("Улучшение самочувствия"), - "wellness_type_desc": MessageLookupByLibrary.simpleMessage( - "Если вы любите мучные продукты, но хотите придерживаться диеты, вам подходит диета с добавленим мучных блюд на основе цельнозерновых вариантов. В них больше сложных углеводов и клетчатки, что способствует длительному чувству сытости и поддерживает здоровье пищеварительной системы."), - "what_do_you_want_to_complaint_about": - MessageLookupByLibrary.simpleMessage( - "На что Вы хотите пожаловаться?"), - "what_is_your_name": - MessageLookupByLibrary.simpleMessage("Как вас зовут?"), - "wrong_credentials": MessageLookupByLibrary.simpleMessage( - "Неверные данные пользователя"), - "you_will_get": MessageLookupByLibrary.simpleMessage("Вы получите"), - "your_blood_pressure": - MessageLookupByLibrary.simpleMessage("Ваше артериальное давление?"), - "your_favorite_sports": - MessageLookupByLibrary.simpleMessage("Ваши спортивные увлечения?"), - "your_gender": MessageLookupByLibrary.simpleMessage("Ваш пол?"), - "your_height": MessageLookupByLibrary.simpleMessage("Ваш рост:"), - "your_rating": MessageLookupByLibrary.simpleMessage("Ваш рейтинг"), - "your_schedule": MessageLookupByLibrary.simpleMessage("Ваш режим дня?"), - "your_weight": MessageLookupByLibrary.simpleMessage("Ваш вес:") - }; + "Moscow": MessageLookupByLibrary.simpleMessage("Москва"), + "Russia": MessageLookupByLibrary.simpleMessage("Россия"), + "about_diet": MessageLookupByLibrary.simpleMessage("Об этой диете"), + "about_plan": MessageLookupByLibrary.simpleMessage("Об этом плане"), + "about_recipe": MessageLookupByLibrary.simpleMessage("Об этом рецепте"), + "active": MessageLookupByLibrary.simpleMessage("Активен"), + "active_consultations_count": MessageLookupByLibrary.simpleMessage( + "Кол-во активных консультаций", + ), + "active_diet_state": MessageLookupByLibrary.simpleMessage("Активная"), + "add": MessageLookupByLibrary.simpleMessage("Добавить"), + "add_card": MessageLookupByLibrary.simpleMessage("Привязать карту"), + "add_cover": MessageLookupByLibrary.simpleMessage("Добавьте обложку"), + "add_measure": MessageLookupByLibrary.simpleMessage("Добавить замер"), + "adding_plan": MessageLookupByLibrary.simpleMessage("Добавление плана"), + "additional_information": MessageLookupByLibrary.simpleMessage( + "Дополнительная информация", + ), + "admin": MessageLookupByLibrary.simpleMessage("Админ"), + "alcohol": MessageLookupByLibrary.simpleMessage("Алкоголь"), + "all": MessageLookupByLibrary.simpleMessage("Все"), + "allergies_presence": MessageLookupByLibrary.simpleMessage( + "Наличие аллергии", + ), + "another_form_of_comment": MessageLookupByLibrary.simpleMessage( + "комментария", + ), + "another_form_of_day": MessageLookupByLibrary.simpleMessage("дня"), + "another_form_of_hour": MessageLookupByLibrary.simpleMessage("часа"), + "another_form_of_minute": MessageLookupByLibrary.simpleMessage("минут"), + "another_form_of_stage": MessageLookupByLibrary.simpleMessage("этапа"), + "answer": MessageLookupByLibrary.simpleMessage("Ответить"), + "archived": MessageLookupByLibrary.simpleMessage("В архиве"), + "authentificate": MessageLookupByLibrary.simpleMessage("Войти"), + "average_pressure": MessageLookupByLibrary.simpleMessage( + "Средние показатели давления:", + ), + "bodymass_chart": MessageLookupByLibrary.simpleMessage("График ИМТ"), + "by_default": MessageLookupByLibrary.simpleMessage("По умолчянию"), + "calls_for_bullying": MessageLookupByLibrary.simpleMessage( + "Призывы к травле", + ), + "calories": MessageLookupByLibrary.simpleMessage("Калории"), + "can_not_choose_start_date": MessageLookupByLibrary.simpleMessage( + "Дату старта плана невозможно выбрать, пока Вы не привяжите карту", + ), + "can_not_load_data_please_try_again": MessageLookupByLibrary.simpleMessage( + "Не удалось загрузить данные. Попробуйте обновить страницу", + ), + "cancel_diet": MessageLookupByLibrary.simpleMessage("Отменить диету?"), + "cancel_order": MessageLookupByLibrary.simpleMessage("Отменить заказ"), + "carb_type": MessageLookupByLibrary.simpleMessage("Мучное"), + "carb_type_desc": MessageLookupByLibrary.simpleMessage( + "Если вы любите мучные продукты, но хотите придерживаться диеты, вам подходит диета с добавленим мучных блюд на основе цельнозерновых вариантов. В них больше сложных углеводов и клетчатки, что способствует длительному чувству сытости и поддерживает здоровье пищеварительной системы.", + ), + "carbohydrates": MessageLookupByLibrary.simpleMessage("Углеводы"), + "chat": MessageLookupByLibrary.simpleMessage("Чат"), + "check_out_video_recipe": MessageLookupByLibrary.simpleMessage( + "Посмотреть видео рецепт", + ), + "chest": MessageLookupByLibrary.simpleMessage("Грудь"), + "chest_circumference": MessageLookupByLibrary.simpleMessage("Обхват груди"), + "choose_date": MessageLookupByLibrary.simpleMessage("Выбрать дату"), + "choose_diet_duration": MessageLookupByLibrary.simpleMessage( + "Выберите срок диеты", + ), + "choose_plan_duration": MessageLookupByLibrary.simpleMessage( + "Выберите срок плана", + ), + "choose_plan_start_date": MessageLookupByLibrary.simpleMessage( + "Выберите дату старта плана питания", + ), + "choose_start_diet_date": MessageLookupByLibrary.simpleMessage( + "Выберите дату старты диеты. Она отобразиться у Вас в дневнике", + ), + "circumference_empty": MessageLookupByLibrary.simpleMessage( + "Все замеры обязательны к заполнению", + ), + "circumference_is_not_a_number": MessageLookupByLibrary.simpleMessage( + "Все замеры должны быть числами", + ), + "circumferences_chart": MessageLookupByLibrary.simpleMessage( + "График обхватов", + ), + "city": MessageLookupByLibrary.simpleMessage("Город"), + "city_of_living": MessageLookupByLibrary.simpleMessage("Город проживания"), + "comfort": MessageLookupByLibrary.simpleMessage("Комфорт"), + "comment": MessageLookupByLibrary.simpleMessage("комментарий"), + "comments": MessageLookupByLibrary.simpleMessage("Комментарии"), + "comments_plural": MessageLookupByLibrary.simpleMessage("комментариев"), + "complain": MessageLookupByLibrary.simpleMessage("Пожаловаться"), + "complaint": MessageLookupByLibrary.simpleMessage("Жалоба"), + "complaint_question": MessageLookupByLibrary.simpleMessage( + "Что именно в этом материале Вы считаете неприемлемым и нарушающим правила?", + ), + "complaint_sent": MessageLookupByLibrary.simpleMessage( + "Жалоба успешно отправлена", + ), + "complaint_sent_description": MessageLookupByLibrary.simpleMessage( + "Ваше обращение принято! Мы рассмотрим его в ближайшее время и примем необходимые меры. Спасибо за вашу бдительность и помощь в улучшении нашего сервиса.", + ), + "confirm": MessageLookupByLibrary.simpleMessage("Подтвердить"), + "consultations_count": MessageLookupByLibrary.simpleMessage( + "Кол-во проведенных консулдьтаций", + ), + "continueButton": MessageLookupByLibrary.simpleMessage("Продолжить"), + "continue_": MessageLookupByLibrary.simpleMessage("Продолжить"), + "copied": MessageLookupByLibrary.simpleMessage("cкопирован"), + "copy_link": MessageLookupByLibrary.simpleMessage("Скопировать ссылку"), + "copy_referral_link": MessageLookupByLibrary.simpleMessage( + "Скопировать пригласительную ссылку", + ), + "could_not_cancel_diet": MessageLookupByLibrary.simpleMessage( + "Не удалось отменить диету", + ), + "could_not_delete_blog_post": MessageLookupByLibrary.simpleMessage( + "Не удалось удалить пост", + ), + "could_not_launch_video": MessageLookupByLibrary.simpleMessage( + "Не удалось запустить видео", + ), + "could_not_publish_blog_post": MessageLookupByLibrary.simpleMessage( + "Не удалось опубликовать пост", + ), + "could_not_publish_diet": MessageLookupByLibrary.simpleMessage( + "Не удалось опубликовать диету", + ), + "could_not_publish_recipe": MessageLookupByLibrary.simpleMessage( + "Не удалось опубликовать рецепт", + ), + "could_not_send_complain": MessageLookupByLibrary.simpleMessage( + "Не удалось отправить жалобу", + ), + "could_not_update_blog_post": MessageLookupByLibrary.simpleMessage( + "Не удалось обновить пост", + ), + "could_not_update_diet": MessageLookupByLibrary.simpleMessage( + "Не удалось обновить диету", + ), + "country": MessageLookupByLibrary.simpleMessage("Страна"), + "create_diet": MessageLookupByLibrary.simpleMessage("Создание диеты"), + "customer_price": MessageLookupByLibrary.simpleMessage( + "Цена для покупателя", + ), + "date_has_ben_set": MessageLookupByLibrary.simpleMessage( + "Дата старта начала консультации установлена", + ), + "date_of_birth": MessageLookupByLibrary.simpleMessage("Дата рождения"), + "day": MessageLookupByLibrary.simpleMessage("День"), + "days": MessageLookupByLibrary.simpleMessage("дней"), + "deception": MessageLookupByLibrary.simpleMessage("Обман"), + "deleted": MessageLookupByLibrary.simpleMessage("Удалена"), + "diary": MessageLookupByLibrary.simpleMessage("Дневник"), + "diet": MessageLookupByLibrary.simpleMessage("Диета"), + "diet_author": MessageLookupByLibrary.simpleMessage("Автор диеты"), + "diet_has_been_sent_to_draft": MessageLookupByLibrary.simpleMessage( + "снята с публикации и перенесена в черновик", + ), + "diet_plan": MessageLookupByLibrary.simpleMessage("План диеты"), + "diet_started": MessageLookupByLibrary.simpleMessage("Диета уже начата"), + "diet_state": MessageLookupByLibrary.simpleMessage("Статус диеты"), + "diet_type": MessageLookupByLibrary.simpleMessage("Тип диеты"), + "do_you_have_hypertension_tendency": MessageLookupByLibrary.simpleMessage( + "Есть ли у вас гипертония?", + ), + "do_you_have_hypotension_tendency": MessageLookupByLibrary.simpleMessage( + "Есть ли у вас гипотония?", + ), + "do_you_take_pills": MessageLookupByLibrary.simpleMessage( + "Принимаете ли вы лекарства или бады?", + ), + "down_pressure": MessageLookupByLibrary.simpleMessage( + "Нижние показатели давления:", + ), + "draft": MessageLookupByLibrary.simpleMessage("Черновик"), + "drafted": MessageLookupByLibrary.simpleMessage("Черновики"), + "drugs": MessageLookupByLibrary.simpleMessage("Наркотики"), + "eating_behavior": MessageLookupByLibrary.simpleMessage( + "Пищевое поведение", + ), + "eating_behavior_type": MessageLookupByLibrary.simpleMessage( + "Формирование пищевого поведения", + ), + "eating_behavior_type_desc": MessageLookupByLibrary.simpleMessage( + "Формирование здорового пищевого поведения — это процесс, который включает в себя изменение привычек и отношения к еде. Он направлен на то, чтобы помочь людям научиться правильно питаться и поддерживать здоровый образ жизни.Основные принципы формирования здорового пищевого поведения: \n● Разнообразие продуктов; \n● Сбалансированный рацион; \n● Питьевой режим; \n● Ограничение вредных продуктов; \n● Регулярные приёмы пищи; \n● Умеренность;Осознанное питание; \n● Физическая активность;", + ), + "economy": MessageLookupByLibrary.simpleMessage("Эконом"), + "edit": MessageLookupByLibrary.simpleMessage("Редактировать"), + "email": MessageLookupByLibrary.simpleMessage("Электронная почта"), + "email_empty": MessageLookupByLibrary.simpleMessage( + "Необходимо ввести адрес электронной почты", + ), + "email_invalid": MessageLookupByLibrary.simpleMessage( + "Некорректный адрес электронной почты", + ), + "enter_additional_information": MessageLookupByLibrary.simpleMessage( + "Введите любую дополнительную информацию на своё усмотрение:", + ), + "enter_diet_description": MessageLookupByLibrary.simpleMessage( + "Введите описание диеты", + ), + "enter_diet_name": MessageLookupByLibrary.simpleMessage( + "Выведите название диеты", + ), + "enter_information": MessageLookupByLibrary.simpleMessage( + "Введите информацию...", + ), + "exit": MessageLookupByLibrary.simpleMessage("Выйти"), + "expand": MessageLookupByLibrary.simpleMessage("Показать полностью"), + "explicitImage": MessageLookupByLibrary.simpleMessage( + "Откровенное изображение", + ), + "explicitImages": MessageLookupByLibrary.simpleMessage( + "Откровенные изображения", + ), + "explicitImagesDescription": MessageLookupByLibrary.simpleMessage( + "Отправьте жалобу, если кто-то разместил откровенные изображения", + ), + "extremism": MessageLookupByLibrary.simpleMessage("Экстремизм"), + "fake_documents": MessageLookupByLibrary.simpleMessage( + "Поддельные документы", + ), + "fats": MessageLookupByLibrary.simpleMessage("Жиры"), + "favorite_foods": MessageLookupByLibrary.simpleMessage("Любимые продукты"), + "favorite_unfavorite_foods": MessageLookupByLibrary.simpleMessage( + "Ваши любимые/нелюбимые продукты питания?", + ), + "female": MessageLookupByLibrary.simpleMessage("Женский"), + "fill_in_information": MessageLookupByLibrary.simpleMessage( + "Заполните информацию:", + ), + "finish": MessageLookupByLibrary.simpleMessage("Завершить"), + "first_name": MessageLookupByLibrary.simpleMessage("Имя"), + "first_name_empty": MessageLookupByLibrary.simpleMessage( + "Имя обязательно для заполнения", + ), + "first_name_short": MessageLookupByLibrary.simpleMessage( + "В имени должен быть минимум 1 символ", + ), + "fit_type": MessageLookupByLibrary.simpleMessage("Поддержание формы"), + "fit_type_desc": MessageLookupByLibrary.simpleMessage( + "План питания для поддержания формы сбалансированный и разнообразный, чтобы обеспечить организм всеми необходимыми питательными веществами. Общие принципы: \n● Дробное питание; \n● Разнообразие продуктов; \n● Контроль порций; \n● Питьевой режим; \n● Ограничение вредных продуктов;", + ), + "fitness": MessageLookupByLibrary.simpleMessage("Поддержка формы"), + "for_a_month": MessageLookupByLibrary.simpleMessage("За месяц"), + "for_a_week": MessageLookupByLibrary.simpleMessage("За неделю"), + "for_a_year": MessageLookupByLibrary.simpleMessage("За год"), + "for_whole_period_of_time": MessageLookupByLibrary.simpleMessage( + "За всё время", + ), + "fraud": MessageLookupByLibrary.simpleMessage("Мошенничество"), + "fraud_description": MessageLookupByLibrary.simpleMessage( + "Мошенничество с целью наживы. Если вас обманули, пожалуйста, сообщите об этом в правоохранительные органы.", + ), + "from": MessageLookupByLibrary.simpleMessage("от"), + "from_a_to_z": MessageLookupByLibrary.simpleMessage("Название: А-Я"), + "from_z_to_a": MessageLookupByLibrary.simpleMessage("Название: Я-А"), + "gallery": MessageLookupByLibrary.simpleMessage("Галерея"), + "general_info": MessageLookupByLibrary.simpleMessage("Общая информация"), + "gr": MessageLookupByLibrary.simpleMessage("гр"), + "grams": MessageLookupByLibrary.simpleMessage("гр"), + "has_alergy": MessageLookupByLibrary.simpleMessage("Наличие аллергии"), + "has_hyper": MessageLookupByLibrary.simpleMessage( + "Склонность к гипертонии", + ), + "has_hypo": MessageLookupByLibrary.simpleMessage("Склонность к гипотонии"), + "hatred": MessageLookupByLibrary.simpleMessage("Оскорбление"), + "hatred_description": MessageLookupByLibrary.simpleMessage( + "Враждебные высказывания", + ), + "height": MessageLookupByLibrary.simpleMessage("Рост"), + "height_measurements": MessageLookupByLibrary.simpleMessage("Замер роста"), + "hide": MessageLookupByLibrary.simpleMessage("Свернуть"), + "hip_circumference": MessageLookupByLibrary.simpleMessage("Обхват бедер"), + "hips": MessageLookupByLibrary.simpleMessage("Бедра"), + "hour": MessageLookupByLibrary.simpleMessage("час"), + "hours": MessageLookupByLibrary.simpleMessage("часов"), + "in_progress": MessageLookupByLibrary.simpleMessage("В процессе"), + "inactive_diet_state": MessageLookupByLibrary.simpleMessage("Черновик"), + "infoAboutOrder": MessageLookupByLibrary.simpleMessage( + "Информация о заказе", + ), + "ingredients": MessageLookupByLibrary.simpleMessage("Ингредиенты"), + "initial_measurements": MessageLookupByLibrary.simpleMessage( + "Первичные замеры", + ), + "invited_people_count": MessageLookupByLibrary.simpleMessage( + "Количество приглашенных", + ), + "label": MessageLookupByLibrary.simpleMessage("Название"), + "language": MessageLookupByLibrary.simpleMessage("Язык"), + "last_name": MessageLookupByLibrary.simpleMessage("Фамилия"), + "last_name_empty": MessageLookupByLibrary.simpleMessage( + "Фамилия обязательна для заполнения", + ), + "last_name_short": MessageLookupByLibrary.simpleMessage( + "В фамилии должен быть минимум 6 символов", + ), + "lawViolation": MessageLookupByLibrary.simpleMessage( + "Нарушение законодательства", + ), + "lbl_english": MessageLookupByLibrary.simpleMessage("English"), + "light_type": MessageLookupByLibrary.simpleMessage("Легкая"), + "light_type_desc": MessageLookupByLibrary.simpleMessage( + "С некоторыми видами диет можно употреблять алкоголь в умеренных количествах. Рекомендуется совмещать вместе с низкокалорийными закусками.", + ), + "liked_groceries": MessageLookupByLibrary.simpleMessage("Любимые продукты"), + "link_was_copied": MessageLookupByLibrary.simpleMessage( + "Ссылка успешно скопирована", + ), + "loading": MessageLookupByLibrary.simpleMessage("Загрузка..."), + "lower": MessageLookupByLibrary.simpleMessage("Нижнее"), + "male": MessageLookupByLibrary.simpleMessage("Мужской"), + "meal": MessageLookupByLibrary.simpleMessage("Приём пищи"), + "meat": MessageLookupByLibrary.simpleMessage("Мясо"), + "meat_type": MessageLookupByLibrary.simpleMessage("С мясом"), + "meat_type_desc": MessageLookupByLibrary.simpleMessage( + "Диета с мясом полезная и сбалансированная. Включает в себя нежирное мясо: курицу, индейку, кролика или говядину. В сочетании с овощами получаете все необходимые витамины и минералы. Не забывайте о порциях и старайтесь есть медленно, прислушиваясь к своему организму.", + ), + "milliliter": MessageLookupByLibrary.simpleMessage("мл"), + "minimal_customer_price": MessageLookupByLibrary.simpleMessage( + "Минимальная цена для покупателя: 1200₽", + ), + "minute": MessageLookupByLibrary.simpleMessage("минута"), + "minutes": MessageLookupByLibrary.simpleMessage("минуты"), + "misrepresentation": MessageLookupByLibrary.simpleMessage( + "Введение в заблуждение", + ), + "misrepresentation_description": MessageLookupByLibrary.simpleMessage( + "Новости, которые могут вызвать широкий резонанс или несут угрозу, распространяемые с целью введения людей в заблуждение.", + ), + "more_about_order": MessageLookupByLibrary.simpleMessage( + "Подробнее о заказе", + ), + "most_new": MessageLookupByLibrary.simpleMessage("Самые новые"), + "most_old": MessageLookupByLibrary.simpleMessage("Самые старые"), + "msg_network_err": MessageLookupByLibrary.simpleMessage("Сетевая ошибка!"), + "msg_something_went_wrong": MessageLookupByLibrary.simpleMessage( + "Что то пошло не так!", + ), + "my_blog": MessageLookupByLibrary.simpleMessage("Мой блог"), + "my_diets": MessageLookupByLibrary.simpleMessage("Мои диеты"), + "my_plans": MessageLookupByLibrary.simpleMessage("Мои планы"), + "my_settings": MessageLookupByLibrary.simpleMessage("Мои настройки"), + "name_empty": MessageLookupByLibrary.simpleMessage( + "Имя пользователя обязательно для заполнения", + ), + "name_short": MessageLookupByLibrary.simpleMessage( + "В имени пользователя должно быть минимум 6 символов", + ), + "nicotine": MessageLookupByLibrary.simpleMessage("Никотин"), + "no": MessageLookupByLibrary.simpleMessage("Нет"), + "no_account": MessageLookupByLibrary.simpleMessage("У меня нет аккаунта"), + "not_liked_groceries": MessageLookupByLibrary.simpleMessage( + "Не любимые продукты", + ), + "ok": MessageLookupByLibrary.simpleMessage("Хорошо"), + "one_option": MessageLookupByLibrary.simpleMessage("1 опция"), + "option": MessageLookupByLibrary.simpleMessage("Опция"), + "option_content": MessageLookupByLibrary.simpleMessage("Содержание опции"), + "option_content_hint_text": MessageLookupByLibrary.simpleMessage( + "На связи 7 дней в неделю", + ), + "option_desc": MessageLookupByLibrary.simpleMessage("Описание опции"), + "option_desc_hint_text": MessageLookupByLibrary.simpleMessage( + "Этот план питания для похудения на 7 дней сбалансированный и разнообразный", + ), + "option_duration": MessageLookupByLibrary.simpleMessage( + "Продолжительность опции", + ), + "option_personal_diet_desc": MessageLookupByLibrary.simpleMessage( + "Опция подразумевает создание индивидуальной диеты", + ), + "option_title": MessageLookupByLibrary.simpleMessage("Заголовок опции"), + "order": MessageLookupByLibrary.simpleMessage("Порядок"), + "other": MessageLookupByLibrary.simpleMessage("Другое"), + "other_info": MessageLookupByLibrary.simpleMessage("Прочая информация"), + "password": MessageLookupByLibrary.simpleMessage("Пароль"), + "password_confirmation": MessageLookupByLibrary.simpleMessage( + "Подтвердите пароль", + ), + "password_confirmation_mismatch": MessageLookupByLibrary.simpleMessage( + "Пароли не совпадают", + ), + "password_empty": MessageLookupByLibrary.simpleMessage( + "Пароль обязателен для заполнения", + ), + "password_short": MessageLookupByLibrary.simpleMessage( + "В пароле должно быть минимум 6 символов", + ), + "pay": MessageLookupByLibrary.simpleMessage("Оплатить"), + "pcs": MessageLookupByLibrary.simpleMessage("шт"), + "personal": MessageLookupByLibrary.simpleMessage("Персональные"), + "personal_diet_state": MessageLookupByLibrary.simpleMessage("Персональная"), + "photo": MessageLookupByLibrary.simpleMessage("Фото"), + "physical_fitness": MessageLookupByLibrary.simpleMessage( + "Физическая форма", + ), + "place_of_living": MessageLookupByLibrary.simpleMessage("Место проживания"), + "plan_author": MessageLookupByLibrary.simpleMessage("Автор плана"), + "plan_desc": MessageLookupByLibrary.simpleMessage("Описание плана"), + "plan_desc_example": MessageLookupByLibrary.simpleMessage( + "Большое подробное, привлекательное описание плана", + ), + "plan_duration": MessageLookupByLibrary.simpleMessage("Срок плана"), + "plan_label_desc": MessageLookupByLibrary.simpleMessage( + "План для поддержания формы", + ), + "plan_type": MessageLookupByLibrary.simpleMessage("Тип плана"), + "plans_complete": MessageLookupByLibrary.simpleMessage("Пройденные планы"), + "please_try_again_later": MessageLookupByLibrary.simpleMessage( + "Пожалуйста, попробуйте еще раз позже", + ), + "popular": MessageLookupByLibrary.simpleMessage("Популярные"), + "preferred_language": MessageLookupByLibrary.simpleMessage( + "Предпочитаемый язык общения", + ), + "pressure": MessageLookupByLibrary.simpleMessage("Давление"), + "pressure_empty": MessageLookupByLibrary.simpleMessage( + "Все показатели давления обязательны к заполнению", + ), + "pressure_is_not_a_number": MessageLookupByLibrary.simpleMessage( + "Все показатели давления должны быть числами", + ), + "preview": MessageLookupByLibrary.simpleMessage("Превью"), + "price": MessageLookupByLibrary.simpleMessage("Цена"), + "price_explanation": MessageLookupByLibrary.simpleMessage( + "Разница в ценах, это комиссия Итвио", + ), + "profile": MessageLookupByLibrary.simpleMessage("Профиль"), + "prostitution": MessageLookupByLibrary.simpleMessage("Проституция"), + "proteins": MessageLookupByLibrary.simpleMessage("Белки"), + "publish": MessageLookupByLibrary.simpleMessage("Опубликовать"), + "published": MessageLookupByLibrary.simpleMessage("Опубликованные"), + "published_diets_count": MessageLookupByLibrary.simpleMessage( + "Кол-во опубликованных диет", + ), + "published_posts_count": MessageLookupByLibrary.simpleMessage( + "Количество опубликованных постов", + ), + "published_recipes_count": MessageLookupByLibrary.simpleMessage( + "Кол-во опубликованных рецептов", + ), + "rating_and_statistics": MessageLookupByLibrary.simpleMessage( + "Рейтинг и статистика", + ), + "rating_history": MessageLookupByLibrary.simpleMessage( + "Начисление рейтинга", + ), + "recipe_author": MessageLookupByLibrary.simpleMessage("Автор рецепта"), + "recipe_publishing": MessageLookupByLibrary.simpleMessage( + "Публикация рецепта", + ), + "refuse_order": MessageLookupByLibrary.simpleMessage( + "Отказаться от заказа", + ), + "removeFromActive": MessageLookupByLibrary.simpleMessage( + "Снять с публикации", + ), + "save": MessageLookupByLibrary.simpleMessage("Сохранить"), + "send_complain": MessageLookupByLibrary.simpleMessage("Отправить жалобу"), + "services": MessageLookupByLibrary.simpleMessage("Оказание услуг"), + "settings": MessageLookupByLibrary.simpleMessage("Настройки"), + "sex": MessageLookupByLibrary.simpleMessage("Пол"), + "share": MessageLookupByLibrary.simpleMessage("Поделиться"), + "skip": MessageLookupByLibrary.simpleMessage("Пропустить"), + "slim": MessageLookupByLibrary.simpleMessage("Похудение"), + "slim_type": MessageLookupByLibrary.simpleMessage("Похудение"), + "slim_type_desc": MessageLookupByLibrary.simpleMessage( + "План питания для похудения должен быть разработан с учётом индивидуальных особенностей организма, возраста, пола, уровня физической активности и состояния здоровья. Общие принципы: \n● Снижение калорийности; \n● Сбалансированный рацион; \n● Разнообразие продуктов; \n● Питьевой режим; \n● Ограничение вредных продуктов;", + ), + "some_error_occurred": MessageLookupByLibrary.simpleMessage( + "Упс! Произошла ошибка", + ), + "some_error_occurred_description": MessageLookupByLibrary.simpleMessage( + "Произошла ошибка. Мы уже работаем над ее устранением. Попробуйте позже.", + ), + "something_went_wrong": MessageLookupByLibrary.simpleMessage( + "Упс! Что-то пошло не так", + ), + "spam": MessageLookupByLibrary.simpleMessage("Спам"), + "spam_description": MessageLookupByLibrary.simpleMessage( + "Отправьте жалобу, если Вы заметили рекламу, размещенную в не предназначенном для этого месте.", + ), + "sport_hobbies": MessageLookupByLibrary.simpleMessage( + "Спортивные увлечения", + ), + "stage": MessageLookupByLibrary.simpleMessage("этап"), + "stages": MessageLookupByLibrary.simpleMessage("этапов"), + "standard": MessageLookupByLibrary.simpleMessage("Стандарт"), + "startDiet": MessageLookupByLibrary.simpleMessage("Начать диету"), + "statistic": MessageLookupByLibrary.simpleMessage("Статистика"), + "step": MessageLookupByLibrary.simpleMessage("Шаг"), + "step_by_step_photo_recipe": MessageLookupByLibrary.simpleMessage( + "Пошаговый фоторецепт", + ), + "successfully_published": MessageLookupByLibrary.simpleMessage( + "успешно опубликован", + ), + "suicide": MessageLookupByLibrary.simpleMessage("Склонение к самоубийству"), + "takes_pills": MessageLookupByLibrary.simpleMessage("Принимает лекарства"), + "tell_your_schedule": MessageLookupByLibrary.simpleMessage( + "Расскажите в свободной форме о том как просыпаетесь, когда едите, когда ложитесь спать:", + ), + "there_is_a_video": MessageLookupByLibrary.simpleMessage("Есть видео"), + "three_options": MessageLookupByLibrary.simpleMessage("3 опции"), + "time": MessageLookupByLibrary.simpleMessage("Время прохождения"), + "toOffer": MessageLookupByLibrary.simpleMessage("Предложить"), + "to_draft": MessageLookupByLibrary.simpleMessage("В черновик"), + "to_order": MessageLookupByLibrary.simpleMessage("Заказать"), + "try_again": MessageLookupByLibrary.simpleMessage("Попробовать снова"), + "type_here_your_complaint": MessageLookupByLibrary.simpleMessage( + "Напишите здесь свою жалобу", + ), + "unfavorite_foods": MessageLookupByLibrary.simpleMessage( + "Нелюбимые продукты", + ), + "up_pressure": MessageLookupByLibrary.simpleMessage( + "Верхние показатели давления:", + ), + "upper": MessageLookupByLibrary.simpleMessage("Верхнее"), + "user_authorization": MessageLookupByLibrary.simpleMessage( + "Аутентификация", + ), + "user_data": MessageLookupByLibrary.simpleMessage("Данные пользователя"), + "user_info": MessageLookupByLibrary.simpleMessage("Анкета пользователя"), + "user_registration": MessageLookupByLibrary.simpleMessage( + "Регистрация пользователя", + ), + "username": MessageLookupByLibrary.simpleMessage("Имя пользователя"), + "vegan": MessageLookupByLibrary.simpleMessage("Веган."), + "vegan_type": MessageLookupByLibrary.simpleMessage("Вегетарианская"), + "vegan_type_desc": MessageLookupByLibrary.simpleMessage( + "Диета основана на потреблении растительной пищи и отказе от продуктов животного происхождения. Такой тип питания может быть разнообразным и вкусным, а также полезным для здоровья.", + ), + "violenceAndHostility": MessageLookupByLibrary.simpleMessage( + "Насилие и вражда", + ), + "violence_against_people_or_animal": MessageLookupByLibrary.simpleMessage( + "Насилие над людьми или животными", + ), + "waist": MessageLookupByLibrary.simpleMessage("Талия"), + "waist_circumference": MessageLookupByLibrary.simpleMessage("Обхват талии"), + "weapon": MessageLookupByLibrary.simpleMessage("Оружие"), + "weight": MessageLookupByLibrary.simpleMessage("Вес"), + "weight_chart": MessageLookupByLibrary.simpleMessage("График веса"), + "weight_measurements": MessageLookupByLibrary.simpleMessage("Замер веса"), + "wellness": MessageLookupByLibrary.simpleMessage("Улучшение самочувствия"), + "wellness_type": MessageLookupByLibrary.simpleMessage( + "Улучшение самочувствия", + ), + "wellness_type_desc": MessageLookupByLibrary.simpleMessage( + "Если вы любите мучные продукты, но хотите придерживаться диеты, вам подходит диета с добавленим мучных блюд на основе цельнозерновых вариантов. В них больше сложных углеводов и клетчатки, что способствует длительному чувству сытости и поддерживает здоровье пищеварительной системы.", + ), + "what_do_you_want_to_complaint_about": MessageLookupByLibrary.simpleMessage( + "На что Вы хотите пожаловаться?", + ), + "what_is_your_name": MessageLookupByLibrary.simpleMessage("Как вас зовут?"), + "wrong_credentials": MessageLookupByLibrary.simpleMessage( + "Неверные данные пользователя", + ), + "you_will_get": MessageLookupByLibrary.simpleMessage("Вы получите"), + "your_blood_pressure": MessageLookupByLibrary.simpleMessage( + "Ваше артериальное давление?", + ), + "your_favorite_sports": MessageLookupByLibrary.simpleMessage( + "Ваши спортивные увлечения?", + ), + "your_gender": MessageLookupByLibrary.simpleMessage("Ваш пол?"), + "your_height": MessageLookupByLibrary.simpleMessage("Ваш рост:"), + "your_rating": MessageLookupByLibrary.simpleMessage("Ваш рейтинг"), + "your_schedule": MessageLookupByLibrary.simpleMessage("Ваш режим дня?"), + "your_weight": MessageLookupByLibrary.simpleMessage("Ваш вес:"), + }; } diff --git a/lib/generated/intl/messages_ru.dart b/lib/generated/intl/messages_ru.dart index 32433d08..914d96c1 100644 --- a/lib/generated/intl/messages_ru.dart +++ b/lib/generated/intl/messages_ru.dart @@ -22,301 +22,353 @@ class MessageLookup extends MessageLookupByLibrary { final messages = _notInlinedMessages(_notInlinedMessages); static Map _notInlinedMessages(_) => { - "Moscow": MessageLookupByLibrary.simpleMessage("Москва"), - "Russia": MessageLookupByLibrary.simpleMessage("Россия"), - "about_diet": MessageLookupByLibrary.simpleMessage("Об этой диете"), - "about_plan": MessageLookupByLibrary.simpleMessage("Об этом плане"), - "active": MessageLookupByLibrary.simpleMessage("Активен"), - "active_diet_state": MessageLookupByLibrary.simpleMessage("Активная"), - "add": MessageLookupByLibrary.simpleMessage("Добавить"), - "add_cover": MessageLookupByLibrary.simpleMessage("Добавьте обложку"), - "add_measure": MessageLookupByLibrary.simpleMessage("Добавить замер"), - "adding_plan": MessageLookupByLibrary.simpleMessage("Добавление плана"), - "additional_information": - MessageLookupByLibrary.simpleMessage("Дополнительная информация"), - "admin": MessageLookupByLibrary.simpleMessage("Админ"), - "all": MessageLookupByLibrary.simpleMessage("Все"), - "allergies_presence": - MessageLookupByLibrary.simpleMessage("Наличие аллергии"), - "another_form_of_comment": - MessageLookupByLibrary.simpleMessage("комментария"), - "another_form_of_day": MessageLookupByLibrary.simpleMessage("дня"), - "answer": MessageLookupByLibrary.simpleMessage("Ответить"), - "archived": MessageLookupByLibrary.simpleMessage("В архиве"), - "authentificate": MessageLookupByLibrary.simpleMessage("Войти"), - "average_pressure": MessageLookupByLibrary.simpleMessage( - "Средние показатели давления:"), - "bodymass_chart": MessageLookupByLibrary.simpleMessage("График ИМТ"), - "by_default": MessageLookupByLibrary.simpleMessage("По умолчянию"), - "calories": MessageLookupByLibrary.simpleMessage("Калории"), - "carb_type": MessageLookupByLibrary.simpleMessage("Мучное"), - "carb_type_desc": MessageLookupByLibrary.simpleMessage( - "Если вы любите мучные продукты, но хотите придерживаться диеты, вам подходит диета с добавленим мучных блюд на основе цельнозерновых вариантов. В них больше сложных углеводов и клетчатки, что способствует длительному чувству сытости и поддерживает здоровье пищеварительной системы."), - "carbohydrates": MessageLookupByLibrary.simpleMessage("Углеводы"), - "chat": MessageLookupByLibrary.simpleMessage("Чат"), - "chest": MessageLookupByLibrary.simpleMessage("Грудь"), - "chest_circumference": - MessageLookupByLibrary.simpleMessage("Обхват груди"), - "choose_diet_duration": - MessageLookupByLibrary.simpleMessage("Выберите срок диеты"), - "choose_plan_duration": - MessageLookupByLibrary.simpleMessage("Выберите срок плана"), - "choose_start_diet_date": MessageLookupByLibrary.simpleMessage( - "Выберите дату старты диеты. Она отобразиться у Вас в дневнике"), - "circumference_empty": MessageLookupByLibrary.simpleMessage( - "Все замеры обязательны к заполнению"), - "circumference_is_not_a_number": MessageLookupByLibrary.simpleMessage( - "Все замеры должны быть числами"), - "circumferences_chart": - MessageLookupByLibrary.simpleMessage("График обхватов"), - "city": MessageLookupByLibrary.simpleMessage("Город"), - "city_of_living": - MessageLookupByLibrary.simpleMessage("Город проживания"), - "comfort": MessageLookupByLibrary.simpleMessage("Комфорт"), - "comment": MessageLookupByLibrary.simpleMessage("комментарий"), - "comments": MessageLookupByLibrary.simpleMessage("Комментарии"), - "comments_plural": MessageLookupByLibrary.simpleMessage("комментариев"), - "complain": MessageLookupByLibrary.simpleMessage("Пожаловаться"), - "continueButton": MessageLookupByLibrary.simpleMessage("Продолжить"), - "continue_": MessageLookupByLibrary.simpleMessage("Продолжить"), - "copied": MessageLookupByLibrary.simpleMessage("cкопирован"), - "copy_link": MessageLookupByLibrary.simpleMessage("Скопировать ссылку"), - "country": MessageLookupByLibrary.simpleMessage("Страна"), - "create_diet": MessageLookupByLibrary.simpleMessage("Создание диеты"), - "customer_price": - MessageLookupByLibrary.simpleMessage("Цена для покупателя"), - "date_of_birth": MessageLookupByLibrary.simpleMessage("Дата рождения"), - "day": MessageLookupByLibrary.simpleMessage("День"), - "days": MessageLookupByLibrary.simpleMessage("дней"), - "deleted": MessageLookupByLibrary.simpleMessage("Удалена"), - "diary": MessageLookupByLibrary.simpleMessage("Дневник"), - "diet": MessageLookupByLibrary.simpleMessage("Диета"), - "diet_author": MessageLookupByLibrary.simpleMessage("Автор диеты"), - "diet_plan": MessageLookupByLibrary.simpleMessage("План диеты"), - "diet_state": MessageLookupByLibrary.simpleMessage("Статус диеты"), - "diet_type": MessageLookupByLibrary.simpleMessage("Тип диеты"), - "do_you_have_hypertension_tendency": - MessageLookupByLibrary.simpleMessage("Есть ли у вас гипертония?"), - "do_you_have_hypotension_tendency": - MessageLookupByLibrary.simpleMessage("Есть ли у вас гипотония?"), - "do_you_take_pills": MessageLookupByLibrary.simpleMessage( - "Принимаете ли вы лекарства или бады?"), - "down_pressure": - MessageLookupByLibrary.simpleMessage("Нижние показатели давления:"), - "draft": MessageLookupByLibrary.simpleMessage("Черновик"), - "drafted": MessageLookupByLibrary.simpleMessage("Черновики"), - "eating_behavior": - MessageLookupByLibrary.simpleMessage("Пищевое поведение"), - "eating_behavior_type": MessageLookupByLibrary.simpleMessage( - "Формирование пищевого поведения"), - "eating_behavior_type_desc": MessageLookupByLibrary.simpleMessage( - "Формирование здорового пищевого поведения — это процесс, который включает в себя изменение привычек и отношения к еде. Он направлен на то, чтобы помочь людям научиться правильно питаться и поддерживать здоровый образ жизни.Основные принципы формирования здорового пищевого поведения: \n● Разнообразие продуктов; \n● Сбалансированный рацион; \n● Питьевой режим; \n● Ограничение вредных продуктов; \n● Регулярные приёмы пищи; \n● Умеренность;Осознанное питание; \n● Физическая активность;"), - "economy": MessageLookupByLibrary.simpleMessage("Эконом"), - "edit": MessageLookupByLibrary.simpleMessage("Редактировать"), - "email": MessageLookupByLibrary.simpleMessage("Электронная почта"), - "email_empty": MessageLookupByLibrary.simpleMessage( - "Необходимо ввести адрес электронной почты"), - "email_invalid": MessageLookupByLibrary.simpleMessage( - "Некорректный адрес электронной почты"), - "enter_additional_information": MessageLookupByLibrary.simpleMessage( - "Введите любую дополнительную информацию на своё усмотрение:"), - "enter_diet_description": - MessageLookupByLibrary.simpleMessage("Введите описание диеты"), - "enter_diet_name": - MessageLookupByLibrary.simpleMessage("Выведите название диеты"), - "enter_information": - MessageLookupByLibrary.simpleMessage("Введите информацию..."), - "exit": MessageLookupByLibrary.simpleMessage("Выйти"), - "expand": MessageLookupByLibrary.simpleMessage("Показать полностью"), - "fats": MessageLookupByLibrary.simpleMessage("Жиры"), - "favorite_foods": - MessageLookupByLibrary.simpleMessage("Любимые продукты"), - "favorite_unfavorite_foods": MessageLookupByLibrary.simpleMessage( - "Ваши любимые/нелюбимые продукты питания?"), - "female": MessageLookupByLibrary.simpleMessage("Женский"), - "fill_in_information": - MessageLookupByLibrary.simpleMessage("Заполните информацию:"), - "finish": MessageLookupByLibrary.simpleMessage("Завершить"), - "first_name": MessageLookupByLibrary.simpleMessage("Имя"), - "first_name_empty": MessageLookupByLibrary.simpleMessage( - "Имя обязательно для заполнения"), - "first_name_short": MessageLookupByLibrary.simpleMessage( - "В имени должен быть минимум 1 символ"), - "fit_type": MessageLookupByLibrary.simpleMessage("Поддержание формы"), - "fit_type_desc": MessageLookupByLibrary.simpleMessage( - "План питания для поддержания формы сбалансированный и разнообразный, чтобы обеспечить организм всеми необходимыми питательными веществами. Общие принципы: \n● Дробное питание; \n● Разнообразие продуктов; \n● Контроль порций; \n● Питьевой режим; \n● Ограничение вредных продуктов;"), - "fitness": MessageLookupByLibrary.simpleMessage("Поддержка формы"), - "from": MessageLookupByLibrary.simpleMessage("от"), - "from_a_to_z": MessageLookupByLibrary.simpleMessage("Название: А-Я"), - "from_z_to_a": MessageLookupByLibrary.simpleMessage("Название: Я-А"), - "gallery": MessageLookupByLibrary.simpleMessage("Галерея"), - "gr": MessageLookupByLibrary.simpleMessage("гр"), - "grams": MessageLookupByLibrary.simpleMessage("гр"), - "height_measurements": - MessageLookupByLibrary.simpleMessage("Замер роста"), - "hide": MessageLookupByLibrary.simpleMessage("Свернуть"), - "hip_circumference": - MessageLookupByLibrary.simpleMessage("Обхват бедер"), - "hips": MessageLookupByLibrary.simpleMessage("Бедра"), - "in_progress": MessageLookupByLibrary.simpleMessage("В процессе"), - "inactive_diet_state": MessageLookupByLibrary.simpleMessage("Черновик"), - "infoAboutOrder": - MessageLookupByLibrary.simpleMessage("Информация о заказе"), - "initial_measurements": - MessageLookupByLibrary.simpleMessage("Первичные замеры"), - "label": MessageLookupByLibrary.simpleMessage("Название"), - "language": MessageLookupByLibrary.simpleMessage("Язык"), - "last_name": MessageLookupByLibrary.simpleMessage("Фамилия"), - "last_name_empty": MessageLookupByLibrary.simpleMessage( - "Фамилия обязательна для заполнения"), - "last_name_short": MessageLookupByLibrary.simpleMessage( - "В фамилии должен быть минимум 6 символов"), - "lbl_english": MessageLookupByLibrary.simpleMessage("English"), - "light_type": MessageLookupByLibrary.simpleMessage("Легкая"), - "light_type_desc": MessageLookupByLibrary.simpleMessage( - "С некоторыми видами диет можно употреблять алкоголь в умеренных количествах. Рекомендуется совмещать вместе с низкокалорийными закусками."), - "link_was_copied": - MessageLookupByLibrary.simpleMessage("Ссылка успешно скопирована"), - "loading": MessageLookupByLibrary.simpleMessage("Загрузка..."), - "male": MessageLookupByLibrary.simpleMessage("Мужской"), - "meal": MessageLookupByLibrary.simpleMessage("Приём пищи"), - "meat": MessageLookupByLibrary.simpleMessage("Мясо"), - "meat_type": MessageLookupByLibrary.simpleMessage("С мясом"), - "meat_type_desc": MessageLookupByLibrary.simpleMessage( - "Диета с мясом полезная и сбалансированная. Включает в себя нежирное мясо: курицу, индейку, кролика или говядину. В сочетании с овощами получаете все необходимые витамины и минералы. Не забывайте о порциях и старайтесь есть медленно, прислушиваясь к своему организму."), - "milliliter": MessageLookupByLibrary.simpleMessage("мл"), - "minimal_customer_price": MessageLookupByLibrary.simpleMessage( - "Минимальная цена для покупателя: 1200₽"), - "most_new": MessageLookupByLibrary.simpleMessage("Самые новые"), - "most_old": MessageLookupByLibrary.simpleMessage("Самые старые"), - "msg_network_err": - MessageLookupByLibrary.simpleMessage("Сетевая ошибка!"), - "msg_something_went_wrong": - MessageLookupByLibrary.simpleMessage("Что то пошло не так!"), - "my_blog": MessageLookupByLibrary.simpleMessage("Мой блог"), - "my_diets": MessageLookupByLibrary.simpleMessage("Мои диеты"), - "my_plans": MessageLookupByLibrary.simpleMessage("Мои планы"), - "my_settings": MessageLookupByLibrary.simpleMessage("Мои настройки"), - "name_empty": MessageLookupByLibrary.simpleMessage( - "Имя пользователя обязательно для заполнения"), - "name_short": MessageLookupByLibrary.simpleMessage( - "В имени пользователя должно быть минимум 6 символов"), - "no": MessageLookupByLibrary.simpleMessage("Нет"), - "no_account": - MessageLookupByLibrary.simpleMessage("У меня нет аккаунта"), - "one_option": MessageLookupByLibrary.simpleMessage("1 опция"), - "option": MessageLookupByLibrary.simpleMessage("Опция"), - "option_content": - MessageLookupByLibrary.simpleMessage("Содержание опции"), - "option_content_hint_text": - MessageLookupByLibrary.simpleMessage("На связи 7 дней в неделю"), - "option_desc": MessageLookupByLibrary.simpleMessage("Описание опции"), - "option_desc_hint_text": MessageLookupByLibrary.simpleMessage( - "Этот план питания для похудения на 7 дней сбалансированный и разнообразный"), - "option_duration": - MessageLookupByLibrary.simpleMessage("Продолжительность опции"), - "option_personal_diet_desc": MessageLookupByLibrary.simpleMessage( - "Опция подразумевает создание индивидуальной диеты"), - "option_title": MessageLookupByLibrary.simpleMessage("Заголовок опции"), - "order": MessageLookupByLibrary.simpleMessage("Порядок"), - "password": MessageLookupByLibrary.simpleMessage("Пароль"), - "password_confirmation": - MessageLookupByLibrary.simpleMessage("Подтвердите пароль"), - "password_confirmation_mismatch": - MessageLookupByLibrary.simpleMessage("Пароли не совпадают"), - "password_empty": MessageLookupByLibrary.simpleMessage( - "Пароль обязателен для заполнения"), - "password_short": MessageLookupByLibrary.simpleMessage( - "В пароле должно быть минимум 6 символов"), - "pcs": MessageLookupByLibrary.simpleMessage("шт"), - "personal": MessageLookupByLibrary.simpleMessage("Персональные"), - "personal_diet_state": - MessageLookupByLibrary.simpleMessage("Персональная"), - "photo": MessageLookupByLibrary.simpleMessage("Фото"), - "place_of_living": - MessageLookupByLibrary.simpleMessage("Место проживания"), - "plan_author": MessageLookupByLibrary.simpleMessage("Автор плана"), - "plan_desc": MessageLookupByLibrary.simpleMessage("Описание плана"), - "plan_desc_example": MessageLookupByLibrary.simpleMessage( - "Большое подробное, привлекательное описание плана"), - "plan_duration": MessageLookupByLibrary.simpleMessage("Срок плана"), - "plan_label_desc": - MessageLookupByLibrary.simpleMessage("План для поддержания формы"), - "plans_complete": - MessageLookupByLibrary.simpleMessage("Пройденные планы"), - "popular": MessageLookupByLibrary.simpleMessage("Популярные"), - "preferred_language": - MessageLookupByLibrary.simpleMessage("Предпочитаемый язык общения"), - "pressure_empty": MessageLookupByLibrary.simpleMessage( - "Все показатели давления обязательны к заполнению"), - "pressure_is_not_a_number": MessageLookupByLibrary.simpleMessage( - "Все показатели давления должны быть числами"), - "preview": MessageLookupByLibrary.simpleMessage("Превью"), - "price": MessageLookupByLibrary.simpleMessage("Цена"), - "price_explanation": MessageLookupByLibrary.simpleMessage( - "Разница в ценах, это комиссия Итвио"), - "profile": MessageLookupByLibrary.simpleMessage("Профиль"), - "proteins": MessageLookupByLibrary.simpleMessage("Белки"), - "publish": MessageLookupByLibrary.simpleMessage("Опубликовать"), - "published": MessageLookupByLibrary.simpleMessage("Опубликованные"), - "removeFromActive": - MessageLookupByLibrary.simpleMessage("Снять с публикации"), - "save": MessageLookupByLibrary.simpleMessage("Сохранить"), - "services": MessageLookupByLibrary.simpleMessage("Оказание услуг"), - "settings": MessageLookupByLibrary.simpleMessage("Настройки"), - "share": MessageLookupByLibrary.simpleMessage("Поделиться"), - "skip": MessageLookupByLibrary.simpleMessage("Пропустить"), - "slim": MessageLookupByLibrary.simpleMessage("Похудение"), - "slim_type": MessageLookupByLibrary.simpleMessage("Похудение"), - "slim_type_desc": MessageLookupByLibrary.simpleMessage( - "План питания для похудения должен быть разработан с учётом индивидуальных особенностей организма, возраста, пола, уровня физической активности и состояния здоровья. Общие принципы: \n● Снижение калорийности; \n● Сбалансированный рацион; \n● Разнообразие продуктов; \n● Питьевой режим; \n● Ограничение вредных продуктов;"), - "standard": MessageLookupByLibrary.simpleMessage("Стандарт"), - "startDiet": MessageLookupByLibrary.simpleMessage("Начать диету"), - "tell_your_schedule": MessageLookupByLibrary.simpleMessage( - "Расскажите в свободной форме о том как просыпаетесь, когда едите, когда ложитесь спать:"), - "three_options": MessageLookupByLibrary.simpleMessage("3 опции"), - "toOffer": MessageLookupByLibrary.simpleMessage("Предложить"), - "to_draft": MessageLookupByLibrary.simpleMessage("В черновик"), - "unfavorite_foods": - MessageLookupByLibrary.simpleMessage("Нелюбимые продукты"), - "up_pressure": MessageLookupByLibrary.simpleMessage( - "Верхние показатели давления:"), - "user_authorization": - MessageLookupByLibrary.simpleMessage("Аутентификация"), - "user_data": - MessageLookupByLibrary.simpleMessage("Данные пользователя"), - "user_registration": - MessageLookupByLibrary.simpleMessage("Регистрация пользователя"), - "username": MessageLookupByLibrary.simpleMessage("Имя пользователя"), - "vegan": MessageLookupByLibrary.simpleMessage("Веган."), - "vegan_type": MessageLookupByLibrary.simpleMessage("Вегетарианская"), - "vegan_type_desc": MessageLookupByLibrary.simpleMessage( - "Диета основана на потреблении растительной пищи и отказе от продуктов животного происхождения. Такой тип питания может быть разнообразным и вкусным, а также полезным для здоровья."), - "waist": MessageLookupByLibrary.simpleMessage("Талия"), - "waist_circumference": - MessageLookupByLibrary.simpleMessage("Обхват талии"), - "weight": MessageLookupByLibrary.simpleMessage("Вес"), - "weight_chart": MessageLookupByLibrary.simpleMessage("График веса"), - "weight_measurements": - MessageLookupByLibrary.simpleMessage("Замер веса"), - "wellness": - MessageLookupByLibrary.simpleMessage("Улучшение самочувствия"), - "wellness_type": - MessageLookupByLibrary.simpleMessage("Улучшение самочувствия"), - "wellness_type_desc": MessageLookupByLibrary.simpleMessage( - "Если вы любите мучные продукты, но хотите придерживаться диеты, вам подходит диета с добавленим мучных блюд на основе цельнозерновых вариантов. В них больше сложных углеводов и клетчатки, что способствует длительному чувству сытости и поддерживает здоровье пищеварительной системы."), - "what_is_your_name": - MessageLookupByLibrary.simpleMessage("Как вас зовут?"), - "wrong_credentials": MessageLookupByLibrary.simpleMessage( - "Неверные данные пользователя"), - "you_will_get": MessageLookupByLibrary.simpleMessage("Вы получите"), - "your_blood_pressure": - MessageLookupByLibrary.simpleMessage("Ваше артериальное давление?"), - "your_favorite_sports": - MessageLookupByLibrary.simpleMessage("Ваши спортивные увлечения?"), - "your_gender": MessageLookupByLibrary.simpleMessage("Ваш пол?"), - "your_height": MessageLookupByLibrary.simpleMessage("Ваш рост:"), - "your_schedule": MessageLookupByLibrary.simpleMessage("Ваш режим дня?"), - "your_weight": MessageLookupByLibrary.simpleMessage("Ваш вес:") - }; + "Moscow": MessageLookupByLibrary.simpleMessage("Москва"), + "Russia": MessageLookupByLibrary.simpleMessage("Россия"), + "about_diet": MessageLookupByLibrary.simpleMessage("Об этой диете"), + "about_plan": MessageLookupByLibrary.simpleMessage("Об этом плане"), + "active": MessageLookupByLibrary.simpleMessage("Активен"), + "active_diet_state": MessageLookupByLibrary.simpleMessage("Активная"), + "add": MessageLookupByLibrary.simpleMessage("Добавить"), + "add_cover": MessageLookupByLibrary.simpleMessage("Добавьте обложку"), + "add_measure": MessageLookupByLibrary.simpleMessage("Добавить замер"), + "adding_plan": MessageLookupByLibrary.simpleMessage("Добавление плана"), + "additional_information": MessageLookupByLibrary.simpleMessage( + "Дополнительная информация", + ), + "admin": MessageLookupByLibrary.simpleMessage("Админ"), + "all": MessageLookupByLibrary.simpleMessage("Все"), + "allergies_presence": MessageLookupByLibrary.simpleMessage( + "Наличие аллергии", + ), + "another_form_of_comment": MessageLookupByLibrary.simpleMessage( + "комментария", + ), + "another_form_of_day": MessageLookupByLibrary.simpleMessage("дня"), + "answer": MessageLookupByLibrary.simpleMessage("Ответить"), + "archived": MessageLookupByLibrary.simpleMessage("В архиве"), + "authentificate": MessageLookupByLibrary.simpleMessage("Войти"), + "average_pressure": MessageLookupByLibrary.simpleMessage( + "Средние показатели давления:", + ), + "bodymass_chart": MessageLookupByLibrary.simpleMessage("График ИМТ"), + "by_default": MessageLookupByLibrary.simpleMessage("По умолчянию"), + "calories": MessageLookupByLibrary.simpleMessage("Калории"), + "carb_type": MessageLookupByLibrary.simpleMessage("Мучное"), + "carb_type_desc": MessageLookupByLibrary.simpleMessage( + "Если вы любите мучные продукты, но хотите придерживаться диеты, вам подходит диета с добавленим мучных блюд на основе цельнозерновых вариантов. В них больше сложных углеводов и клетчатки, что способствует длительному чувству сытости и поддерживает здоровье пищеварительной системы.", + ), + "carbohydrates": MessageLookupByLibrary.simpleMessage("Углеводы"), + "chat": MessageLookupByLibrary.simpleMessage("Чат"), + "chest": MessageLookupByLibrary.simpleMessage("Грудь"), + "chest_circumference": MessageLookupByLibrary.simpleMessage("Обхват груди"), + "choose_diet_duration": MessageLookupByLibrary.simpleMessage( + "Выберите срок диеты", + ), + "choose_plan_duration": MessageLookupByLibrary.simpleMessage( + "Выберите срок плана", + ), + "choose_start_diet_date": MessageLookupByLibrary.simpleMessage( + "Выберите дату старты диеты. Она отобразиться у Вас в дневнике", + ), + "circumference_empty": MessageLookupByLibrary.simpleMessage( + "Все замеры обязательны к заполнению", + ), + "circumference_is_not_a_number": MessageLookupByLibrary.simpleMessage( + "Все замеры должны быть числами", + ), + "circumferences_chart": MessageLookupByLibrary.simpleMessage( + "График обхватов", + ), + "city": MessageLookupByLibrary.simpleMessage("Город"), + "city_of_living": MessageLookupByLibrary.simpleMessage("Город проживания"), + "comfort": MessageLookupByLibrary.simpleMessage("Комфорт"), + "comment": MessageLookupByLibrary.simpleMessage("комментарий"), + "comments": MessageLookupByLibrary.simpleMessage("Комментарии"), + "comments_plural": MessageLookupByLibrary.simpleMessage("комментариев"), + "complain": MessageLookupByLibrary.simpleMessage("Пожаловаться"), + "continueButton": MessageLookupByLibrary.simpleMessage("Продолжить"), + "continue_": MessageLookupByLibrary.simpleMessage("Продолжить"), + "copied": MessageLookupByLibrary.simpleMessage("cкопирован"), + "copy_link": MessageLookupByLibrary.simpleMessage("Скопировать ссылку"), + "country": MessageLookupByLibrary.simpleMessage("Страна"), + "create_diet": MessageLookupByLibrary.simpleMessage("Создание диеты"), + "customer_price": MessageLookupByLibrary.simpleMessage( + "Цена для покупателя", + ), + "date_of_birth": MessageLookupByLibrary.simpleMessage("Дата рождения"), + "day": MessageLookupByLibrary.simpleMessage("День"), + "days": MessageLookupByLibrary.simpleMessage("дней"), + "deleted": MessageLookupByLibrary.simpleMessage("Удалена"), + "diary": MessageLookupByLibrary.simpleMessage("Дневник"), + "diet": MessageLookupByLibrary.simpleMessage("Диета"), + "diet_author": MessageLookupByLibrary.simpleMessage("Автор диеты"), + "diet_plan": MessageLookupByLibrary.simpleMessage("План диеты"), + "diet_state": MessageLookupByLibrary.simpleMessage("Статус диеты"), + "diet_type": MessageLookupByLibrary.simpleMessage("Тип диеты"), + "do_you_have_hypertension_tendency": MessageLookupByLibrary.simpleMessage( + "Есть ли у вас гипертония?", + ), + "do_you_have_hypotension_tendency": MessageLookupByLibrary.simpleMessage( + "Есть ли у вас гипотония?", + ), + "do_you_take_pills": MessageLookupByLibrary.simpleMessage( + "Принимаете ли вы лекарства или бады?", + ), + "down_pressure": MessageLookupByLibrary.simpleMessage( + "Нижние показатели давления:", + ), + "draft": MessageLookupByLibrary.simpleMessage("Черновик"), + "drafted": MessageLookupByLibrary.simpleMessage("Черновики"), + "eating_behavior": MessageLookupByLibrary.simpleMessage( + "Пищевое поведение", + ), + "eating_behavior_type": MessageLookupByLibrary.simpleMessage( + "Формирование пищевого поведения", + ), + "eating_behavior_type_desc": MessageLookupByLibrary.simpleMessage( + "Формирование здорового пищевого поведения — это процесс, который включает в себя изменение привычек и отношения к еде. Он направлен на то, чтобы помочь людям научиться правильно питаться и поддерживать здоровый образ жизни.Основные принципы формирования здорового пищевого поведения: \n● Разнообразие продуктов; \n● Сбалансированный рацион; \n● Питьевой режим; \n● Ограничение вредных продуктов; \n● Регулярные приёмы пищи; \n● Умеренность;Осознанное питание; \n● Физическая активность;", + ), + "economy": MessageLookupByLibrary.simpleMessage("Эконом"), + "edit": MessageLookupByLibrary.simpleMessage("Редактировать"), + "email": MessageLookupByLibrary.simpleMessage("Электронная почта"), + "email_empty": MessageLookupByLibrary.simpleMessage( + "Необходимо ввести адрес электронной почты", + ), + "email_invalid": MessageLookupByLibrary.simpleMessage( + "Некорректный адрес электронной почты", + ), + "enter_additional_information": MessageLookupByLibrary.simpleMessage( + "Введите любую дополнительную информацию на своё усмотрение:", + ), + "enter_diet_description": MessageLookupByLibrary.simpleMessage( + "Введите описание диеты", + ), + "enter_diet_name": MessageLookupByLibrary.simpleMessage( + "Выведите название диеты", + ), + "enter_information": MessageLookupByLibrary.simpleMessage( + "Введите информацию...", + ), + "exit": MessageLookupByLibrary.simpleMessage("Выйти"), + "expand": MessageLookupByLibrary.simpleMessage("Показать полностью"), + "fats": MessageLookupByLibrary.simpleMessage("Жиры"), + "favorite_foods": MessageLookupByLibrary.simpleMessage("Любимые продукты"), + "favorite_unfavorite_foods": MessageLookupByLibrary.simpleMessage( + "Ваши любимые/нелюбимые продукты питания?", + ), + "female": MessageLookupByLibrary.simpleMessage("Женский"), + "fill_in_information": MessageLookupByLibrary.simpleMessage( + "Заполните информацию:", + ), + "finish": MessageLookupByLibrary.simpleMessage("Завершить"), + "first_name": MessageLookupByLibrary.simpleMessage("Имя"), + "first_name_empty": MessageLookupByLibrary.simpleMessage( + "Имя обязательно для заполнения", + ), + "first_name_short": MessageLookupByLibrary.simpleMessage( + "В имени должен быть минимум 1 символ", + ), + "fit_type": MessageLookupByLibrary.simpleMessage("Поддержание формы"), + "fit_type_desc": MessageLookupByLibrary.simpleMessage( + "План питания для поддержания формы сбалансированный и разнообразный, чтобы обеспечить организм всеми необходимыми питательными веществами. Общие принципы: \n● Дробное питание; \n● Разнообразие продуктов; \n● Контроль порций; \n● Питьевой режим; \n● Ограничение вредных продуктов;", + ), + "fitness": MessageLookupByLibrary.simpleMessage("Поддержка формы"), + "from": MessageLookupByLibrary.simpleMessage("от"), + "from_a_to_z": MessageLookupByLibrary.simpleMessage("Название: А-Я"), + "from_z_to_a": MessageLookupByLibrary.simpleMessage("Название: Я-А"), + "gallery": MessageLookupByLibrary.simpleMessage("Галерея"), + "gr": MessageLookupByLibrary.simpleMessage("гр"), + "grams": MessageLookupByLibrary.simpleMessage("гр"), + "height_measurements": MessageLookupByLibrary.simpleMessage("Замер роста"), + "hide": MessageLookupByLibrary.simpleMessage("Свернуть"), + "hip_circumference": MessageLookupByLibrary.simpleMessage("Обхват бедер"), + "hips": MessageLookupByLibrary.simpleMessage("Бедра"), + "in_progress": MessageLookupByLibrary.simpleMessage("В процессе"), + "inactive_diet_state": MessageLookupByLibrary.simpleMessage("Черновик"), + "infoAboutOrder": MessageLookupByLibrary.simpleMessage( + "Информация о заказе", + ), + "initial_measurements": MessageLookupByLibrary.simpleMessage( + "Первичные замеры", + ), + "label": MessageLookupByLibrary.simpleMessage("Название"), + "language": MessageLookupByLibrary.simpleMessage("Язык"), + "last_name": MessageLookupByLibrary.simpleMessage("Фамилия"), + "last_name_empty": MessageLookupByLibrary.simpleMessage( + "Фамилия обязательна для заполнения", + ), + "last_name_short": MessageLookupByLibrary.simpleMessage( + "В фамилии должен быть минимум 6 символов", + ), + "lbl_english": MessageLookupByLibrary.simpleMessage("English"), + "light_type": MessageLookupByLibrary.simpleMessage("Легкая"), + "light_type_desc": MessageLookupByLibrary.simpleMessage( + "С некоторыми видами диет можно употреблять алкоголь в умеренных количествах. Рекомендуется совмещать вместе с низкокалорийными закусками.", + ), + "link_was_copied": MessageLookupByLibrary.simpleMessage( + "Ссылка успешно скопирована", + ), + "loading": MessageLookupByLibrary.simpleMessage("Загрузка..."), + "male": MessageLookupByLibrary.simpleMessage("Мужской"), + "meal": MessageLookupByLibrary.simpleMessage("Приём пищи"), + "meat": MessageLookupByLibrary.simpleMessage("Мясо"), + "meat_type": MessageLookupByLibrary.simpleMessage("С мясом"), + "meat_type_desc": MessageLookupByLibrary.simpleMessage( + "Диета с мясом полезная и сбалансированная. Включает в себя нежирное мясо: курицу, индейку, кролика или говядину. В сочетании с овощами получаете все необходимые витамины и минералы. Не забывайте о порциях и старайтесь есть медленно, прислушиваясь к своему организму.", + ), + "milliliter": MessageLookupByLibrary.simpleMessage("мл"), + "minimal_customer_price": MessageLookupByLibrary.simpleMessage( + "Минимальная цена для покупателя: 1200₽", + ), + "most_new": MessageLookupByLibrary.simpleMessage("Самые новые"), + "most_old": MessageLookupByLibrary.simpleMessage("Самые старые"), + "msg_network_err": MessageLookupByLibrary.simpleMessage("Сетевая ошибка!"), + "msg_something_went_wrong": MessageLookupByLibrary.simpleMessage( + "Что то пошло не так!", + ), + "my_blog": MessageLookupByLibrary.simpleMessage("Мой блог"), + "my_diets": MessageLookupByLibrary.simpleMessage("Мои диеты"), + "my_plans": MessageLookupByLibrary.simpleMessage("Мои планы"), + "my_settings": MessageLookupByLibrary.simpleMessage("Мои настройки"), + "name_empty": MessageLookupByLibrary.simpleMessage( + "Имя пользователя обязательно для заполнения", + ), + "name_short": MessageLookupByLibrary.simpleMessage( + "В имени пользователя должно быть минимум 6 символов", + ), + "no": MessageLookupByLibrary.simpleMessage("Нет"), + "no_account": MessageLookupByLibrary.simpleMessage("У меня нет аккаунта"), + "one_option": MessageLookupByLibrary.simpleMessage("1 опция"), + "option": MessageLookupByLibrary.simpleMessage("Опция"), + "option_content": MessageLookupByLibrary.simpleMessage("Содержание опции"), + "option_content_hint_text": MessageLookupByLibrary.simpleMessage( + "На связи 7 дней в неделю", + ), + "option_desc": MessageLookupByLibrary.simpleMessage("Описание опции"), + "option_desc_hint_text": MessageLookupByLibrary.simpleMessage( + "Этот план питания для похудения на 7 дней сбалансированный и разнообразный", + ), + "option_duration": MessageLookupByLibrary.simpleMessage( + "Продолжительность опции", + ), + "option_personal_diet_desc": MessageLookupByLibrary.simpleMessage( + "Опция подразумевает создание индивидуальной диеты", + ), + "option_title": MessageLookupByLibrary.simpleMessage("Заголовок опции"), + "order": MessageLookupByLibrary.simpleMessage("Порядок"), + "password": MessageLookupByLibrary.simpleMessage("Пароль"), + "password_confirmation": MessageLookupByLibrary.simpleMessage( + "Подтвердите пароль", + ), + "password_confirmation_mismatch": MessageLookupByLibrary.simpleMessage( + "Пароли не совпадают", + ), + "password_empty": MessageLookupByLibrary.simpleMessage( + "Пароль обязателен для заполнения", + ), + "password_short": MessageLookupByLibrary.simpleMessage( + "В пароле должно быть минимум 6 символов", + ), + "pcs": MessageLookupByLibrary.simpleMessage("шт"), + "personal": MessageLookupByLibrary.simpleMessage("Персональные"), + "personal_diet_state": MessageLookupByLibrary.simpleMessage("Персональная"), + "photo": MessageLookupByLibrary.simpleMessage("Фото"), + "place_of_living": MessageLookupByLibrary.simpleMessage("Место проживания"), + "plan_author": MessageLookupByLibrary.simpleMessage("Автор плана"), + "plan_desc": MessageLookupByLibrary.simpleMessage("Описание плана"), + "plan_desc_example": MessageLookupByLibrary.simpleMessage( + "Большое подробное, привлекательное описание плана", + ), + "plan_duration": MessageLookupByLibrary.simpleMessage("Срок плана"), + "plan_label_desc": MessageLookupByLibrary.simpleMessage( + "План для поддержания формы", + ), + "plans_complete": MessageLookupByLibrary.simpleMessage("Пройденные планы"), + "popular": MessageLookupByLibrary.simpleMessage("Популярные"), + "preferred_language": MessageLookupByLibrary.simpleMessage( + "Предпочитаемый язык общения", + ), + "pressure_empty": MessageLookupByLibrary.simpleMessage( + "Все показатели давления обязательны к заполнению", + ), + "pressure_is_not_a_number": MessageLookupByLibrary.simpleMessage( + "Все показатели давления должны быть числами", + ), + "preview": MessageLookupByLibrary.simpleMessage("Превью"), + "price": MessageLookupByLibrary.simpleMessage("Цена"), + "price_explanation": MessageLookupByLibrary.simpleMessage( + "Разница в ценах, это комиссия Итвио", + ), + "profile": MessageLookupByLibrary.simpleMessage("Профиль"), + "proteins": MessageLookupByLibrary.simpleMessage("Белки"), + "publish": MessageLookupByLibrary.simpleMessage("Опубликовать"), + "published": MessageLookupByLibrary.simpleMessage("Опубликованные"), + "removeFromActive": MessageLookupByLibrary.simpleMessage( + "Снять с публикации", + ), + "save": MessageLookupByLibrary.simpleMessage("Сохранить"), + "services": MessageLookupByLibrary.simpleMessage("Оказание услуг"), + "settings": MessageLookupByLibrary.simpleMessage("Настройки"), + "share": MessageLookupByLibrary.simpleMessage("Поделиться"), + "skip": MessageLookupByLibrary.simpleMessage("Пропустить"), + "slim": MessageLookupByLibrary.simpleMessage("Похудение"), + "slim_type": MessageLookupByLibrary.simpleMessage("Похудение"), + "slim_type_desc": MessageLookupByLibrary.simpleMessage( + "План питания для похудения должен быть разработан с учётом индивидуальных особенностей организма, возраста, пола, уровня физической активности и состояния здоровья. Общие принципы: \n● Снижение калорийности; \n● Сбалансированный рацион; \n● Разнообразие продуктов; \n● Питьевой режим; \n● Ограничение вредных продуктов;", + ), + "standard": MessageLookupByLibrary.simpleMessage("Стандарт"), + "startDiet": MessageLookupByLibrary.simpleMessage("Начать диету"), + "tell_your_schedule": MessageLookupByLibrary.simpleMessage( + "Расскажите в свободной форме о том как просыпаетесь, когда едите, когда ложитесь спать:", + ), + "three_options": MessageLookupByLibrary.simpleMessage("3 опции"), + "toOffer": MessageLookupByLibrary.simpleMessage("Предложить"), + "to_draft": MessageLookupByLibrary.simpleMessage("В черновик"), + "unfavorite_foods": MessageLookupByLibrary.simpleMessage( + "Нелюбимые продукты", + ), + "up_pressure": MessageLookupByLibrary.simpleMessage( + "Верхние показатели давления:", + ), + "user_authorization": MessageLookupByLibrary.simpleMessage( + "Аутентификация", + ), + "user_data": MessageLookupByLibrary.simpleMessage("Данные пользователя"), + "user_registration": MessageLookupByLibrary.simpleMessage( + "Регистрация пользователя", + ), + "username": MessageLookupByLibrary.simpleMessage("Имя пользователя"), + "vegan": MessageLookupByLibrary.simpleMessage("Веган."), + "vegan_type": MessageLookupByLibrary.simpleMessage("Вегетарианская"), + "vegan_type_desc": MessageLookupByLibrary.simpleMessage( + "Диета основана на потреблении растительной пищи и отказе от продуктов животного происхождения. Такой тип питания может быть разнообразным и вкусным, а также полезным для здоровья.", + ), + "waist": MessageLookupByLibrary.simpleMessage("Талия"), + "waist_circumference": MessageLookupByLibrary.simpleMessage("Обхват талии"), + "weight": MessageLookupByLibrary.simpleMessage("Вес"), + "weight_chart": MessageLookupByLibrary.simpleMessage("График веса"), + "weight_measurements": MessageLookupByLibrary.simpleMessage("Замер веса"), + "wellness": MessageLookupByLibrary.simpleMessage("Улучшение самочувствия"), + "wellness_type": MessageLookupByLibrary.simpleMessage( + "Улучшение самочувствия", + ), + "wellness_type_desc": MessageLookupByLibrary.simpleMessage( + "Если вы любите мучные продукты, но хотите придерживаться диеты, вам подходит диета с добавленим мучных блюд на основе цельнозерновых вариантов. В них больше сложных углеводов и клетчатки, что способствует длительному чувству сытости и поддерживает здоровье пищеварительной системы.", + ), + "what_is_your_name": MessageLookupByLibrary.simpleMessage("Как вас зовут?"), + "wrong_credentials": MessageLookupByLibrary.simpleMessage( + "Неверные данные пользователя", + ), + "you_will_get": MessageLookupByLibrary.simpleMessage("Вы получите"), + "your_blood_pressure": MessageLookupByLibrary.simpleMessage( + "Ваше артериальное давление?", + ), + "your_favorite_sports": MessageLookupByLibrary.simpleMessage( + "Ваши спортивные увлечения?", + ), + "your_gender": MessageLookupByLibrary.simpleMessage("Ваш пол?"), + "your_height": MessageLookupByLibrary.simpleMessage("Ваш рост:"), + "your_schedule": MessageLookupByLibrary.simpleMessage("Ваш режим дня?"), + "your_weight": MessageLookupByLibrary.simpleMessage("Ваш вес:"), + }; } diff --git a/lib/generated/l10n.dart b/lib/generated/l10n.dart index 10cb4a70..32705c64 100644 --- a/lib/generated/l10n.dart +++ b/lib/generated/l10n.dart @@ -18,17 +18,20 @@ class S { static S? _current; static S get current { - assert(_current != null, - 'No instance of S was loaded. Try to initialize the S delegate before accessing S.current.'); + assert( + _current != null, + 'No instance of S was loaded. Try to initialize the S delegate before accessing S.current.', + ); return _current!; } static const AppLocalizationDelegate delegate = AppLocalizationDelegate(); static Future load(Locale locale) { - final name = (locale.countryCode?.isEmpty ?? false) - ? locale.languageCode - : locale.toString(); + final name = + (locale.countryCode?.isEmpty ?? false) + ? locale.languageCode + : locale.toString(); final localeName = Intl.canonicalizedLocale(name); return initializeMessages(localeName).then((_) { Intl.defaultLocale = localeName; @@ -41,8 +44,10 @@ class S { static S of(BuildContext context) { final instance = S.maybeOf(context); - assert(instance != null, - 'No instance of S present in the widget tree. Did you add S.delegate in localizationsDelegates?'); + assert( + instance != null, + 'No instance of S present in the widget tree. Did you add S.delegate in localizationsDelegates?', + ); return instance!; } @@ -62,12 +67,7 @@ class S { /// `Электронная почта` String get email { - return Intl.message( - 'Электронная почта', - name: 'email', - desc: '', - args: [], - ); + return Intl.message('Электронная почта', name: 'email', desc: '', args: []); } /// `Имя пользователя` @@ -82,12 +82,7 @@ class S { /// `Пароль` String get password { - return Intl.message( - 'Пароль', - name: 'password', - desc: '', - args: [], - ); + return Intl.message('Пароль', name: 'password', desc: '', args: []); } /// `Подтвердите пароль` @@ -112,22 +107,12 @@ class S { /// `Имя` String get first_name { - return Intl.message( - 'Имя', - name: 'first_name', - desc: '', - args: [], - ); + return Intl.message('Имя', name: 'first_name', desc: '', args: []); } /// `Фамилия` String get last_name { - return Intl.message( - 'Фамилия', - name: 'last_name', - desc: '', - args: [], - ); + return Intl.message('Фамилия', name: 'last_name', desc: '', args: []); } /// `Как вас зовут?` @@ -152,42 +137,22 @@ class S { /// `Страна` String get country { - return Intl.message( - 'Страна', - name: 'country', - desc: '', - args: [], - ); + return Intl.message('Страна', name: 'country', desc: '', args: []); } /// `Россия` String get Russia { - return Intl.message( - 'Россия', - name: 'Russia', - desc: '', - args: [], - ); + return Intl.message('Россия', name: 'Russia', desc: '', args: []); } /// `Город` String get city { - return Intl.message( - 'Город', - name: 'city', - desc: '', - args: [], - ); + return Intl.message('Город', name: 'city', desc: '', args: []); } /// `Москва` String get Moscow { - return Intl.message( - 'Москва', - name: 'Moscow', - desc: '', - args: [], - ); + return Intl.message('Москва', name: 'Moscow', desc: '', args: []); } /// `Место проживания` @@ -242,22 +207,12 @@ class S { /// `Мужской` String get male { - return Intl.message( - 'Мужской', - name: 'male', - desc: '', - args: [], - ); + return Intl.message('Мужской', name: 'male', desc: '', args: []); } /// `Женский` String get female { - return Intl.message( - 'Женский', - name: 'female', - desc: '', - args: [], - ); + return Intl.message('Женский', name: 'female', desc: '', args: []); } /// `Замер веса` @@ -272,12 +227,7 @@ class S { /// `Ваш вес:` String get your_weight { - return Intl.message( - 'Ваш вес:', - name: 'your_weight', - desc: '', - args: [], - ); + return Intl.message('Ваш вес:', name: 'your_weight', desc: '', args: []); } /// `Замер роста` @@ -292,12 +242,7 @@ class S { /// `Ваш рост:` String get your_height { - return Intl.message( - 'Ваш рост:', - name: 'your_height', - desc: '', - args: [], - ); + return Intl.message('Ваш рост:', name: 'your_height', desc: '', args: []); } /// `Наличие аллергии` @@ -322,22 +267,12 @@ class S { /// `Ваш пол?` String get your_gender { - return Intl.message( - 'Ваш пол?', - name: 'your_gender', - desc: '', - args: [], - ); + return Intl.message('Ваш пол?', name: 'your_gender', desc: '', args: []); } /// `Нет` String get no { - return Intl.message( - 'Нет', - name: 'no', - desc: '', - args: [], - ); + return Intl.message('Нет', name: 'no', desc: '', args: []); } /// `Есть ли у вас гипертония?` @@ -482,22 +417,12 @@ class S { /// `English` String get lbl_english { - return Intl.message( - 'English', - name: 'lbl_english', - desc: '', - args: [], - ); + return Intl.message('English', name: 'lbl_english', desc: '', args: []); } /// `Завершить` String get finish { - return Intl.message( - 'Завершить', - name: 'finish', - desc: '', - args: [], - ); + return Intl.message('Завершить', name: 'finish', desc: '', args: []); } /// `Предпочитаемый язык общения` @@ -522,12 +447,7 @@ class S { /// `Пропустить` String get skip { - return Intl.message( - 'Пропустить', - name: 'skip', - desc: '', - args: [], - ); + return Intl.message('Пропустить', name: 'skip', desc: '', args: []); } /// `Заполните информацию:` @@ -732,12 +652,7 @@ class S { /// `Войти` String get authentificate { - return Intl.message( - 'Войти', - name: 'authentificate', - desc: '', - args: [], - ); + return Intl.message('Войти', name: 'authentificate', desc: '', args: []); } /// `Аутентификация` @@ -752,12 +667,7 @@ class S { /// `Загрузка...` String get loading { - return Intl.message( - 'Загрузка...', - name: 'loading', - desc: '', - args: [], - ); + return Intl.message('Загрузка...', name: 'loading', desc: '', args: []); } /// `График веса` @@ -802,102 +712,52 @@ class S { /// `Грудь` String get chest { - return Intl.message( - 'Грудь', - name: 'chest', - desc: '', - args: [], - ); + return Intl.message('Грудь', name: 'chest', desc: '', args: []); } /// `Талия` String get waist { - return Intl.message( - 'Талия', - name: 'waist', - desc: '', - args: [], - ); + return Intl.message('Талия', name: 'waist', desc: '', args: []); } /// `Бедра` String get hips { - return Intl.message( - 'Бедра', - name: 'hips', - desc: '', - args: [], - ); + return Intl.message('Бедра', name: 'hips', desc: '', args: []); } /// `Выйти` String get exit { - return Intl.message( - 'Выйти', - name: 'exit', - desc: '', - args: [], - ); + return Intl.message('Выйти', name: 'exit', desc: '', args: []); } /// `Активен` String get active { - return Intl.message( - 'Активен', - name: 'active', - desc: '', - args: [], - ); + return Intl.message('Активен', name: 'active', desc: '', args: []); } /// `В архиве` String get archived { - return Intl.message( - 'В архиве', - name: 'archived', - desc: '', - args: [], - ); + return Intl.message('В архиве', name: 'archived', desc: '', args: []); } /// `Черновик` String get draft { - return Intl.message( - 'Черновик', - name: 'draft', - desc: '', - args: [], - ); + return Intl.message('Черновик', name: 'draft', desc: '', args: []); } /// `Мой блог` String get my_blog { - return Intl.message( - 'Мой блог', - name: 'my_blog', - desc: '', - args: [], - ); + return Intl.message('Мой блог', name: 'my_blog', desc: '', args: []); } /// `Язык` String get language { - return Intl.message( - 'Язык', - name: 'language', - desc: '', - args: [], - ); + return Intl.message('Язык', name: 'language', desc: '', args: []); } /// `В процессе` String get in_progress { - return Intl.message( - 'В процессе', - name: 'in_progress', - desc: '', - args: [], - ); + return Intl.message('В процессе', name: 'in_progress', desc: '', args: []); } /// `Добавить замер` @@ -912,12 +772,7 @@ class S { /// `Вес` String get weight { - return Intl.message( - 'Вес', - name: 'weight', - desc: '', - args: [], - ); + return Intl.message('Вес', name: 'weight', desc: '', args: []); } /// `Пройденные планы` @@ -942,132 +797,67 @@ class S { /// `Настройки` String get settings { - return Intl.message( - 'Настройки', - name: 'settings', - desc: '', - args: [], - ); + return Intl.message('Настройки', name: 'settings', desc: '', args: []); } /// `Профиль` String get profile { - return Intl.message( - 'Профиль', - name: 'profile', - desc: '', - args: [], - ); + return Intl.message('Профиль', name: 'profile', desc: '', args: []); } /// `Чат` String get chat { - return Intl.message( - 'Чат', - name: 'chat', - desc: '', - args: [], - ); + return Intl.message('Чат', name: 'chat', desc: '', args: []); } /// `Админ` String get admin { - return Intl.message( - 'Админ', - name: 'admin', - desc: '', - args: [], - ); + return Intl.message('Админ', name: 'admin', desc: '', args: []); } /// `Дневник` String get diary { - return Intl.message( - 'Дневник', - name: 'diary', - desc: '', - args: [], - ); + return Intl.message('Дневник', name: 'diary', desc: '', args: []); } /// `Сохранить` String get save { - return Intl.message( - 'Сохранить', - name: 'save', - desc: '', - args: [], - ); + return Intl.message('Сохранить', name: 'save', desc: '', args: []); } /// `шт` String get pcs { - return Intl.message( - 'шт', - name: 'pcs', - desc: '', - args: [], - ); + return Intl.message('шт', name: 'pcs', desc: '', args: []); } /// `гр` String get gr { - return Intl.message( - 'гр', - name: 'gr', - desc: '', - args: [], - ); + return Intl.message('гр', name: 'gr', desc: '', args: []); } /// `мл` String get milliliter { - return Intl.message( - 'мл', - name: 'milliliter', - desc: '', - args: [], - ); + return Intl.message('мл', name: 'milliliter', desc: '', args: []); } /// `гр` String get grams { - return Intl.message( - 'гр', - name: 'grams', - desc: '', - args: [], - ); + return Intl.message('гр', name: 'grams', desc: '', args: []); } /// `Начать диету` String get startDiet { - return Intl.message( - 'Начать диету', - name: 'startDiet', - desc: '', - args: [], - ); + return Intl.message('Начать диету', name: 'startDiet', desc: '', args: []); } /// `Комментарии` String get comments { - return Intl.message( - 'Комментарии', - name: 'comments', - desc: '', - args: [], - ); + return Intl.message('Комментарии', name: 'comments', desc: '', args: []); } /// `комментарий` String get comment { - return Intl.message( - 'комментарий', - name: 'comment', - desc: '', - args: [], - ); + return Intl.message('комментарий', name: 'comment', desc: '', args: []); } /// `комментария` @@ -1092,32 +882,17 @@ class S { /// `дней` String get days { - return Intl.message( - 'дней', - name: 'days', - desc: '', - args: [], - ); + return Intl.message('дней', name: 'days', desc: '', args: []); } /// `День` String get day { - return Intl.message( - 'День', - name: 'day', - desc: '', - args: [], - ); + return Intl.message('День', name: 'day', desc: '', args: []); } /// `дня` String get another_form_of_day { - return Intl.message( - 'дня', - name: 'another_form_of_day', - desc: '', - args: [], - ); + return Intl.message('дня', name: 'another_form_of_day', desc: '', args: []); } /// `комментариев` @@ -1132,32 +907,17 @@ class S { /// `Приём пищи` String get meal { - return Intl.message( - 'Приём пищи', - name: 'meal', - desc: '', - args: [], - ); + return Intl.message('Приём пищи', name: 'meal', desc: '', args: []); } /// `Автор диеты` String get diet_author { - return Intl.message( - 'Автор диеты', - name: 'diet_author', - desc: '', - args: [], - ); + return Intl.message('Автор диеты', name: 'diet_author', desc: '', args: []); } /// `Свернуть` String get hide { - return Intl.message( - 'Свернуть', - name: 'hide', - desc: '', - args: [], - ); + return Intl.message('Свернуть', name: 'hide', desc: '', args: []); } /// `Показать полностью` @@ -1182,22 +942,12 @@ class S { /// `Поделиться` String get share { - return Intl.message( - 'Поделиться', - name: 'share', - desc: '', - args: [], - ); + return Intl.message('Поделиться', name: 'share', desc: '', args: []); } /// `Пожаловаться` String get complain { - return Intl.message( - 'Пожаловаться', - name: 'complain', - desc: '', - args: [], - ); + return Intl.message('Пожаловаться', name: 'complain', desc: '', args: []); } /// `Вегетарианская` @@ -1212,32 +962,17 @@ class S { /// `Легкая` String get light_type { - return Intl.message( - 'Легкая', - name: 'light_type', - desc: '', - args: [], - ); + return Intl.message('Легкая', name: 'light_type', desc: '', args: []); } /// `С мясом` String get meat_type { - return Intl.message( - 'С мясом', - name: 'meat_type', - desc: '', - args: [], - ); + return Intl.message('С мясом', name: 'meat_type', desc: '', args: []); } /// `Мучное` String get carb_type { - return Intl.message( - 'Мучное', - name: 'carb_type', - desc: '', - args: [], - ); + return Intl.message('Мучное', name: 'carb_type', desc: '', args: []); } /// `Диета основана на потреблении растительной пищи и отказе от продуктов животного происхождения. Такой тип питания может быть разнообразным и вкусным, а также полезным для здоровья.` @@ -1282,62 +1017,32 @@ class S { /// `План диеты` String get diet_plan { - return Intl.message( - 'План диеты', - name: 'diet_plan', - desc: '', - args: [], - ); + return Intl.message('План диеты', name: 'diet_plan', desc: '', args: []); } /// `Калории` String get calories { - return Intl.message( - 'Калории', - name: 'calories', - desc: '', - args: [], - ); + return Intl.message('Калории', name: 'calories', desc: '', args: []); } /// `Белки` String get proteins { - return Intl.message( - 'Белки', - name: 'proteins', - desc: '', - args: [], - ); + return Intl.message('Белки', name: 'proteins', desc: '', args: []); } /// `Жиры` String get fats { - return Intl.message( - 'Жиры', - name: 'fats', - desc: '', - args: [], - ); + return Intl.message('Жиры', name: 'fats', desc: '', args: []); } /// `Углеводы` String get carbohydrates { - return Intl.message( - 'Углеводы', - name: 'carbohydrates', - desc: '', - args: [], - ); + return Intl.message('Углеводы', name: 'carbohydrates', desc: '', args: []); } /// `Ответить` String get answer { - return Intl.message( - 'Ответить', - name: 'answer', - desc: '', - args: [], - ); + return Intl.message('Ответить', name: 'answer', desc: '', args: []); } /// `Ссылка успешно скопирована` @@ -1362,92 +1067,47 @@ class S { /// `Продолжить` String get continue_ { - return Intl.message( - 'Продолжить', - name: 'continue_', - desc: '', - args: [], - ); + return Intl.message('Продолжить', name: 'continue_', desc: '', args: []); } /// `Порядок` String get order { - return Intl.message( - 'Порядок', - name: 'order', - desc: '', - args: [], - ); + return Intl.message('Порядок', name: 'order', desc: '', args: []); } /// `Время прохождения` String get time { - return Intl.message( - 'Время прохождения', - name: 'time', - desc: '', - args: [], - ); + return Intl.message('Время прохождения', name: 'time', desc: '', args: []); } /// `Все` String get all { - return Intl.message( - 'Все', - name: 'all', - desc: '', - args: [], - ); + return Intl.message('Все', name: 'all', desc: '', args: []); } /// `Тип диеты` String get diet_type { - return Intl.message( - 'Тип диеты', - name: 'diet_type', - desc: '', - args: [], - ); + return Intl.message('Тип диеты', name: 'diet_type', desc: '', args: []); } /// `Тип плана` String get plan_type { - return Intl.message( - 'Тип плана', - name: 'plan_type', - desc: '', - args: [], - ); + return Intl.message('Тип плана', name: 'plan_type', desc: '', args: []); } /// `Популярные` String get popular { - return Intl.message( - 'Популярные', - name: 'popular', - desc: '', - args: [], - ); + return Intl.message('Популярные', name: 'popular', desc: '', args: []); } /// `Самые новые` String get most_new { - return Intl.message( - 'Самые новые', - name: 'most_new', - desc: '', - args: [], - ); + return Intl.message('Самые новые', name: 'most_new', desc: '', args: []); } /// `Самые старые` String get most_old { - return Intl.message( - 'Самые старые', - name: 'most_old', - desc: '', - args: [], - ); + return Intl.message('Самые старые', name: 'most_old', desc: '', args: []); } /// `Название: А-Я` @@ -1472,12 +1132,7 @@ class S { /// `По умолчянию` String get by_default { - return Intl.message( - 'По умолчянию', - name: 'by_default', - desc: '', - args: [], - ); + return Intl.message('По умолчянию', name: 'by_default', desc: '', args: []); } /// `Создание диеты` @@ -1522,12 +1177,7 @@ class S { /// `Статус диеты` String get diet_state { - return Intl.message( - 'Статус диеты', - name: 'diet_state', - desc: '', - args: [], - ); + return Intl.message('Статус диеты', name: 'diet_state', desc: '', args: []); } /// `Активная` @@ -1562,42 +1212,22 @@ class S { /// `Мясо` String get meat { - return Intl.message( - 'Мясо', - name: 'meat', - desc: '', - args: [], - ); + return Intl.message('Мясо', name: 'meat', desc: '', args: []); } /// `Веган.` String get vegan { - return Intl.message( - 'Веган.', - name: 'vegan', - desc: '', - args: [], - ); + return Intl.message('Веган.', name: 'vegan', desc: '', args: []); } /// `Фото` String get photo { - return Intl.message( - 'Фото', - name: 'photo', - desc: '', - args: [], - ); + return Intl.message('Фото', name: 'photo', desc: '', args: []); } /// `Галерея` String get gallery { - return Intl.message( - 'Галерея', - name: 'gallery', - desc: '', - args: [], - ); + return Intl.message('Галерея', name: 'gallery', desc: '', args: []); } /// `Добавьте обложку` @@ -1612,52 +1242,27 @@ class S { /// `Добавить` String get add { - return Intl.message( - 'Добавить', - name: 'add', - desc: '', - args: [], - ); + return Intl.message('Добавить', name: 'add', desc: '', args: []); } /// `cкопирован` String get copied { - return Intl.message( - 'cкопирован', - name: 'copied', - desc: '', - args: [], - ); + return Intl.message('cкопирован', name: 'copied', desc: '', args: []); } /// `В черновик` String get to_draft { - return Intl.message( - 'В черновик', - name: 'to_draft', - desc: '', - args: [], - ); + return Intl.message('В черновик', name: 'to_draft', desc: '', args: []); } /// `Превью` String get preview { - return Intl.message( - 'Превью', - name: 'preview', - desc: '', - args: [], - ); + return Intl.message('Превью', name: 'preview', desc: '', args: []); } /// `Опубликовать` String get publish { - return Intl.message( - 'Опубликовать', - name: 'publish', - desc: '', - args: [], - ); + return Intl.message('Опубликовать', name: 'publish', desc: '', args: []); } /// `Добавление плана` @@ -1672,12 +1277,7 @@ class S { /// `Название` String get label { - return Intl.message( - 'Название', - name: 'label', - desc: '', - args: [], - ); + return Intl.message('Название', name: 'label', desc: '', args: []); } /// `План для поддержания формы` @@ -1702,22 +1302,12 @@ class S { /// `Похудение` String get slim { - return Intl.message( - 'Похудение', - name: 'slim', - desc: '', - args: [], - ); + return Intl.message('Похудение', name: 'slim', desc: '', args: []); } /// `Поддержка формы` String get fitness { - return Intl.message( - 'Поддержка формы', - name: 'fitness', - desc: '', - args: [], - ); + return Intl.message('Поддержка формы', name: 'fitness', desc: '', args: []); } /// `Улучшение самочувствия` @@ -1772,72 +1362,37 @@ class S { /// `1 опция` String get one_option { - return Intl.message( - '1 опция', - name: 'one_option', - desc: '', - args: [], - ); + return Intl.message('1 опция', name: 'one_option', desc: '', args: []); } /// `3 опции` String get three_options { - return Intl.message( - '3 опции', - name: 'three_options', - desc: '', - args: [], - ); + return Intl.message('3 опции', name: 'three_options', desc: '', args: []); } /// `Опция` String get option { - return Intl.message( - 'Опция', - name: 'option', - desc: '', - args: [], - ); + return Intl.message('Опция', name: 'option', desc: '', args: []); } /// `Оказание услуг` String get services { - return Intl.message( - 'Оказание услуг', - name: 'services', - desc: '', - args: [], - ); + return Intl.message('Оказание услуг', name: 'services', desc: '', args: []); } /// `Эконом` String get economy { - return Intl.message( - 'Эконом', - name: 'economy', - desc: '', - args: [], - ); + return Intl.message('Эконом', name: 'economy', desc: '', args: []); } /// `Стандарт` String get standard { - return Intl.message( - 'Стандарт', - name: 'standard', - desc: '', - args: [], - ); + return Intl.message('Стандарт', name: 'standard', desc: '', args: []); } /// `Комфорт` String get comfort { - return Intl.message( - 'Комфорт', - name: 'comfort', - desc: '', - args: [], - ); + return Intl.message('Комфорт', name: 'comfort', desc: '', args: []); } /// `Заголовок опции` @@ -1952,12 +1507,7 @@ class S { /// `Автор плана` String get plan_author { - return Intl.message( - 'Автор плана', - name: 'plan_author', - desc: '', - args: [], - ); + return Intl.message('Автор плана', name: 'plan_author', desc: '', args: []); } /// `Продолжительность опции` @@ -1992,12 +1542,7 @@ class S { /// `Похудение` String get slim_type { - return Intl.message( - 'Похудение', - name: 'slim_type', - desc: '', - args: [], - ); + return Intl.message('Похудение', name: 'slim_type', desc: '', args: []); } /// `План питания для похудения должен быть разработан с учётом индивидуальных особенностей организма, возраста, пола, уровня физической активности и состояния здоровья. Общие принципы: \n● Снижение калорийности; \n● Сбалансированный рацион; \n● Разнообразие продуктов; \n● Питьевой режим; \n● Ограничение вредных продуктов;` @@ -2052,22 +1597,12 @@ class S { /// `Цена` String get price { - return Intl.message( - 'Цена', - name: 'price', - desc: '', - args: [], - ); + return Intl.message('Цена', name: 'price', desc: '', args: []); } /// `Мои диеты` String get my_diets { - return Intl.message( - 'Мои диеты', - name: 'my_diets', - desc: '', - args: [], - ); + return Intl.message('Мои диеты', name: 'my_diets', desc: '', args: []); } /// `Опубликованные` @@ -2082,42 +1617,22 @@ class S { /// `Черновики` String get drafted { - return Intl.message( - 'Черновики', - name: 'drafted', - desc: '', - args: [], - ); + return Intl.message('Черновики', name: 'drafted', desc: '', args: []); } /// `Персональные` String get personal { - return Intl.message( - 'Персональные', - name: 'personal', - desc: '', - args: [], - ); + return Intl.message('Персональные', name: 'personal', desc: '', args: []); } /// `Редактировать` String get edit { - return Intl.message( - 'Редактировать', - name: 'edit', - desc: '', - args: [], - ); + return Intl.message('Редактировать', name: 'edit', desc: '', args: []); } /// `Предложить` String get toOffer { - return Intl.message( - 'Предложить', - name: 'toOffer', - desc: '', - args: [], - ); + return Intl.message('Предложить', name: 'toOffer', desc: '', args: []); } /// `Снять с публикации` @@ -2132,42 +1647,22 @@ class S { /// `Диета` String get diet { - return Intl.message( - 'Диета', - name: 'diet', - desc: '', - args: [], - ); + return Intl.message('Диета', name: 'diet', desc: '', args: []); } /// `Удалена` String get deleted { - return Intl.message( - 'Удалена', - name: 'deleted', - desc: '', - args: [], - ); + return Intl.message('Удалена', name: 'deleted', desc: '', args: []); } /// `Мои планы` String get my_plans { - return Intl.message( - 'Мои планы', - name: 'my_plans', - desc: '', - args: [], - ); + return Intl.message('Мои планы', name: 'my_plans', desc: '', args: []); } /// `от` String get from { - return Intl.message( - 'от', - name: 'from', - desc: '', - args: [], - ); + return Intl.message('от', name: 'from', desc: '', args: []); } /// `Данные пользователя` @@ -2192,12 +1687,7 @@ class S { /// `Пол` String get sex { - return Intl.message( - 'Пол', - name: 'sex', - desc: '', - args: [], - ); + return Intl.message('Пол', name: 'sex', desc: '', args: []); } /// `Физическая форма` @@ -2212,42 +1702,22 @@ class S { /// `Рост` String get height { - return Intl.message( - 'Рост', - name: 'height', - desc: '', - args: [], - ); + return Intl.message('Рост', name: 'height', desc: '', args: []); } /// `Давление` String get pressure { - return Intl.message( - 'Давление', - name: 'pressure', - desc: '', - args: [], - ); + return Intl.message('Давление', name: 'pressure', desc: '', args: []); } /// `Верхнее` String get upper { - return Intl.message( - 'Верхнее', - name: 'upper', - desc: '', - args: [], - ); + return Intl.message('Верхнее', name: 'upper', desc: '', args: []); } /// `Нижнее` String get lower { - return Intl.message( - 'Нижнее', - name: 'lower', - desc: '', - args: [], - ); + return Intl.message('Нижнее', name: 'lower', desc: '', args: []); } /// `Склонность к гипотонии` @@ -2352,12 +1822,7 @@ class S { /// `Подтвердить` String get confirm { - return Intl.message( - 'Подтвердить', - name: 'confirm', - desc: '', - args: [], - ); + return Intl.message('Подтвердить', name: 'confirm', desc: '', args: []); } /// `Не удалось отменить диету` @@ -2372,22 +1837,12 @@ class S { /// `часов` String get hours { - return Intl.message( - 'часов', - name: 'hours', - desc: '', - args: [], - ); + return Intl.message('часов', name: 'hours', desc: '', args: []); } /// `час` String get hour { - return Intl.message( - 'час', - name: 'hour', - desc: '', - args: [], - ); + return Intl.message('час', name: 'hour', desc: '', args: []); } /// `часа` @@ -2402,22 +1857,12 @@ class S { /// `минуты` String get minutes { - return Intl.message( - 'минуты', - name: 'minutes', - desc: '', - args: [], - ); + return Intl.message('минуты', name: 'minutes', desc: '', args: []); } /// `минута` String get minute { - return Intl.message( - 'минута', - name: 'minute', - desc: '', - args: [], - ); + return Intl.message('минута', name: 'minute', desc: '', args: []); } /// `минут` @@ -2462,22 +1907,12 @@ class S { /// `этапов` String get stages { - return Intl.message( - 'этапов', - name: 'stages', - desc: '', - args: [], - ); + return Intl.message('этапов', name: 'stages', desc: '', args: []); } /// `этап` String get stage { - return Intl.message( - 'этап', - name: 'stage', - desc: '', - args: [], - ); + return Intl.message('этап', name: 'stage', desc: '', args: []); } /// `этапа` @@ -2512,22 +1947,12 @@ class S { /// `Ингредиенты` String get ingredients { - return Intl.message( - 'Ингредиенты', - name: 'ingredients', - desc: '', - args: [], - ); + return Intl.message('Ингредиенты', name: 'ingredients', desc: '', args: []); } /// `Шаг` String get step { - return Intl.message( - 'Шаг', - name: 'step', - desc: '', - args: [], - ); + return Intl.message('Шаг', name: 'step', desc: '', args: []); } /// `Пошаговый фоторецепт` @@ -2552,12 +1977,7 @@ class S { /// `Спам` String get spam { - return Intl.message( - 'Спам', - name: 'spam', - desc: '', - args: [], - ); + return Intl.message('Спам', name: 'spam', desc: '', args: []); } /// `Нарушение законодательства` @@ -2572,12 +1992,7 @@ class S { /// `Обман` String get deception { - return Intl.message( - 'Обман', - name: 'deception', - desc: '', - args: [], - ); + return Intl.message('Обман', name: 'deception', desc: '', args: []); } /// `Насилие и вражда` @@ -2622,12 +2037,7 @@ class S { /// `Жалоба` String get complaint { - return Intl.message( - 'Жалоба', - name: 'complaint', - desc: '', - args: [], - ); + return Intl.message('Жалоба', name: 'complaint', desc: '', args: []); } /// `Что именно в этом материале Вы считаете неприемлемым и нарушающим правила?` @@ -2692,52 +2102,27 @@ class S { /// `Хорошо` String get ok { - return Intl.message( - 'Хорошо', - name: 'ok', - desc: '', - args: [], - ); + return Intl.message('Хорошо', name: 'ok', desc: '', args: []); } /// `Алкоголь` String get alcohol { - return Intl.message( - 'Алкоголь', - name: 'alcohol', - desc: '', - args: [], - ); + return Intl.message('Алкоголь', name: 'alcohol', desc: '', args: []); } /// `Наркотики` String get drugs { - return Intl.message( - 'Наркотики', - name: 'drugs', - desc: '', - args: [], - ); + return Intl.message('Наркотики', name: 'drugs', desc: '', args: []); } /// `Никотин` String get nicotine { - return Intl.message( - 'Никотин', - name: 'nicotine', - desc: '', - args: [], - ); + return Intl.message('Никотин', name: 'nicotine', desc: '', args: []); } /// `Оружие` String get weapon { - return Intl.message( - 'Оружие', - name: 'weapon', - desc: '', - args: [], - ); + return Intl.message('Оружие', name: 'weapon', desc: '', args: []); } /// `Поддельные документы` @@ -2762,12 +2147,7 @@ class S { /// `Другое` String get other { - return Intl.message( - 'Другое', - name: 'other', - desc: '', - args: [], - ); + return Intl.message('Другое', name: 'other', desc: '', args: []); } /// `Введение в заблуждение` @@ -2792,12 +2172,7 @@ class S { /// `Мошенничество` String get fraud { - return Intl.message( - 'Мошенничество', - name: 'fraud', - desc: '', - args: [], - ); + return Intl.message('Мошенничество', name: 'fraud', desc: '', args: []); } /// `Мошенничество с целью наживы. Если вас обманули, пожалуйста, сообщите об этом в правоохранительные органы.` @@ -2822,12 +2197,7 @@ class S { /// `Оскорбление` String get hatred { - return Intl.message( - 'Оскорбление', - name: 'hatred', - desc: '', - args: [], - ); + return Intl.message('Оскорбление', name: 'hatred', desc: '', args: []); } /// `Склонение к самоубийству` @@ -2852,12 +2222,7 @@ class S { /// `Экстремизм` String get extremism { - return Intl.message( - 'Экстремизм', - name: 'extremism', - desc: '', - args: [], - ); + return Intl.message('Экстремизм', name: 'extremism', desc: '', args: []); } /// `Призывы к травле` @@ -2912,12 +2277,7 @@ class S { /// `Ваш рейтинг` String get your_rating { - return Intl.message( - 'Ваш рейтинг', - name: 'your_rating', - desc: '', - args: [], - ); + return Intl.message('Ваш рейтинг', name: 'your_rating', desc: '', args: []); } /// `Скопировать пригласительную ссылку` @@ -2932,12 +2292,7 @@ class S { /// `Статистика` String get statistic { - return Intl.message( - 'Статистика', - name: 'statistic', - desc: '', - args: [], - ); + return Intl.message('Статистика', name: 'statistic', desc: '', args: []); } /// `За всё время` @@ -2952,32 +2307,17 @@ class S { /// `За год` String get for_a_year { - return Intl.message( - 'За год', - name: 'for_a_year', - desc: '', - args: [], - ); + return Intl.message('За год', name: 'for_a_year', desc: '', args: []); } /// `За месяц` String get for_a_month { - return Intl.message( - 'За месяц', - name: 'for_a_month', - desc: '', - args: [], - ); + return Intl.message('За месяц', name: 'for_a_month', desc: '', args: []); } /// `За неделю` String get for_a_week { - return Intl.message( - 'За неделю', - name: 'for_a_week', - desc: '', - args: [], - ); + return Intl.message('За неделю', name: 'for_a_week', desc: '', args: []); } /// `Количество приглашенных` @@ -3192,12 +2532,7 @@ class S { /// `Заказать` String get to_order { - return Intl.message( - 'Заказать', - name: 'to_order', - desc: '', - args: [], - ); + return Intl.message('Заказать', name: 'to_order', desc: '', args: []); } /// `Дату старта плана невозможно выбрать, пока Вы не привяжите карту` @@ -3254,12 +2589,7 @@ class S { /// `Оплатить` String get pay { - return Intl.message( - 'Оплатить', - name: 'pay', - desc: '', - args: [], - ); + return Intl.message('Оплатить', name: 'pay', desc: '', args: []); } /// `Подробнее о заказе` @@ -3291,6 +2621,16 @@ class S { args: [], ); } + + /// `Анкета пользователя` + String get user_info { + return Intl.message( + 'Анкета пользователя', + name: 'user_info', + desc: '', + args: [], + ); + } } class AppLocalizationDelegate extends LocalizationsDelegate { diff --git a/lib/l10n/intl_en.arb b/lib/l10n/intl_en.arb index bef9a95e..9ba44b26 100644 --- a/lib/l10n/intl_en.arb +++ b/lib/l10n/intl_en.arb @@ -323,7 +323,8 @@ "pay": "Оплатить", "more_about_order": "Подробнее о заказе", "cancel_order": "Отменить заказ", - "refuse_order":"Отказаться от заказа" + "refuse_order":"Отказаться от заказа", + "user_info": "Анкета пользователя" }