forked from eatvio/eatvio_app
Merge pull request 'cards screen updated' (#318) from misha/eatvio_app:main into main
Reviewed-on: eatvio/eatvio_app#318
This commit is contained in:
25
.metadata
25
.metadata
@@ -4,7 +4,7 @@
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: "ba393198430278b6595976de84fe170f553cc728"
|
||||
revision: "09de023485e95e6d1225c2baa44b8feb85e0d45f"
|
||||
channel: "stable"
|
||||
|
||||
project_type: app
|
||||
@@ -13,26 +13,11 @@ project_type: app
|
||||
migration:
|
||||
platforms:
|
||||
- platform: root
|
||||
create_revision: ba393198430278b6595976de84fe170f553cc728
|
||||
base_revision: ba393198430278b6595976de84fe170f553cc728
|
||||
- platform: android
|
||||
create_revision: ba393198430278b6595976de84fe170f553cc728
|
||||
base_revision: ba393198430278b6595976de84fe170f553cc728
|
||||
create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f
|
||||
base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f
|
||||
- platform: ios
|
||||
create_revision: ba393198430278b6595976de84fe170f553cc728
|
||||
base_revision: ba393198430278b6595976de84fe170f553cc728
|
||||
- platform: linux
|
||||
create_revision: ba393198430278b6595976de84fe170f553cc728
|
||||
base_revision: ba393198430278b6595976de84fe170f553cc728
|
||||
- platform: macos
|
||||
create_revision: ba393198430278b6595976de84fe170f553cc728
|
||||
base_revision: ba393198430278b6595976de84fe170f553cc728
|
||||
- platform: web
|
||||
create_revision: ba393198430278b6595976de84fe170f553cc728
|
||||
base_revision: ba393198430278b6595976de84fe170f553cc728
|
||||
- platform: windows
|
||||
create_revision: ba393198430278b6595976de84fe170f553cc728
|
||||
base_revision: ba393198430278b6595976de84fe170f553cc728
|
||||
create_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f
|
||||
base_revision: 09de023485e95e6d1225c2baa44b8feb85e0d45f
|
||||
|
||||
# User provided section
|
||||
|
||||
|
||||
3
assets/icons/add_card.svg
Normal file
3
assets/icons/add_card.svg
Normal file
@@ -0,0 +1,3 @@
|
||||
<svg width="22" height="18" viewBox="0 0 22 18" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.30775 15.5C1.80258 15.5 1.375 15.325 1.025 14.975C0.675 14.625 0.5 14.1974 0.5 13.6923V2.30775C0.5 1.80258 0.675 1.375 1.025 1.025C1.375 0.675 1.80258 0.5 2.30775 0.5H17.6923C18.1974 0.5 18.625 0.675 18.975 1.025C19.325 1.375 19.5 1.80258 19.5 2.30775V6.69625C19.5 6.94492 19.4153 7.15708 19.2458 7.33275C19.0761 7.50825 18.8659 7.596 18.6152 7.596H2V13.6923C2 13.7692 2.03208 13.8398 2.09625 13.9038C2.16025 13.9679 2.23075 14 2.30775 14H11.1155C11.328 14 11.5061 14.0719 11.6497 14.2158C11.7934 14.3596 11.8652 14.5378 11.8652 14.7503C11.8652 14.9629 11.7934 15.141 11.6497 15.2845C11.5061 15.4282 11.328 15.5 11.1155 15.5H2.30775ZM2 4.404H18V2.30775C18 2.23075 17.9679 2.16025 17.9038 2.09625C17.8398 2.03208 17.7693 2 17.6923 2H2.30775C2.23075 2 2.16025 2.03208 2.09625 2.09625C2.03208 2.16025 2 2.23075 2 2.30775V4.404ZM17.25 14.75H15C14.7875 14.75 14.6094 14.6781 14.4658 14.5343C14.3219 14.3904 14.25 14.2122 14.25 13.9998C14.25 13.7871 14.3219 13.609 14.4658 13.4655C14.6094 13.3218 14.7875 13.25 15 13.25H17.25V11C17.25 10.7875 17.3219 10.6094 17.4657 10.4658C17.6096 10.3219 17.7878 10.25 18.0002 10.25C18.2129 10.25 18.391 10.3219 18.5345 10.4658C18.6782 10.6094 18.75 10.7875 18.75 11V13.25H21C21.2125 13.25 21.3906 13.3219 21.5343 13.4658C21.6781 13.6096 21.75 13.7878 21.75 14.0003C21.75 14.2129 21.6781 14.391 21.5343 14.5345C21.3906 14.6782 21.2125 14.75 21 14.75H18.75V17C18.75 17.2125 18.6781 17.3906 18.5343 17.5343C18.3904 17.6781 18.2122 17.75 17.9998 17.75C17.7871 17.75 17.609 17.6781 17.4655 17.5343C17.3218 17.3906 17.25 17.2125 17.25 17V14.75Z" fill="#323F4B"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.7 KiB |
5
assets/icons/card.svg
Normal file
5
assets/icons/card.svg
Normal file
@@ -0,0 +1,5 @@
|
||||
<svg width="40" height="28" viewBox="0 0 40 28" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M2.00809 0.40625C1.4534 0.5 0.984652 0.765625 0.594027 1.19531C-0.0465986 1.90625 0.000276472 0.875 0.000276472 14C0.000276472 27.3281 -0.0622236 26.1328 0.695589 26.8984C1.00809 27.2109 1.25809 27.375 1.56278 27.4844C1.98465 27.625 2.47684 27.6328 20.0003 27.6328C37.5237 27.6328 38.0159 27.625 38.4378 27.4844C38.7425 27.375 38.9925 27.2109 39.305 26.8984C40.0628 26.1328 40.0003 27.3281 40.0003 14C40.0003 3.26562 39.9925 2.28125 39.8675 1.92188C39.6956 1.41406 39.0081 0.726562 38.4768 0.515625C38.094 0.367188 37.6565 0.367188 20.2347 0.359375C10.4143 0.351562 2.21903 0.375 2.00809 0.40625ZM37.9143 2.13281C38.3284 2.32031 38.3597 2.48438 38.3597 4.69531V6.73438H20.0003H1.6409V4.67969C1.64871 2.49219 1.66434 2.35938 2.03934 2.15625C2.19559 2.07031 5.3909 2.05469 19.9768 2.04688C32.5784 2.04688 37.7815 2.07031 37.9143 2.13281ZM38.3597 18.5C38.3597 24.7422 38.3518 25.3594 38.2268 25.5625C38.1565 25.6875 38.0159 25.8203 37.9143 25.8672C37.6331 25.9922 2.35184 25.9844 2.07059 25.8594C1.62528 25.6562 1.6409 25.9219 1.6409 18.4922V11.6562H20.0003H38.3597V18.5Z" fill="#2F80ED"/>
|
||||
<path d="M6.82867 16.4687C6.26617 16.7422 6.21929 17.5625 6.74273 17.9062C6.89117 18.0078 7.99273 18.0234 14.2193 18.0469C19.2584 18.0625 21.6099 18.0469 21.813 17.9844C22.4302 17.8047 22.6255 17.1172 22.1959 16.6406L21.9693 16.3828L14.5162 16.3672C7.93023 16.3515 7.03961 16.3594 6.82867 16.4687Z" fill="#2F80ED"/>
|
||||
<path d="M6.82867 19.6719C6.26617 19.9453 6.21929 20.7656 6.74273 21.1094C6.88336 21.2109 7.58648 21.2344 11.0162 21.25C13.7974 21.2656 15.2115 21.25 15.4068 21.1875C16.024 21.0078 16.2193 20.3203 15.7896 19.8437L15.563 19.5859L11.313 19.5703C7.60992 19.5469 7.03961 19.5625 6.82867 19.6719Z" fill="#2F80ED"/>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.8 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 406 B |
@@ -117,9 +117,21 @@ class AppRouter {
|
||||
),
|
||||
],
|
||||
),
|
||||
GoRoute(path: '/consultant-finance-screen', name: 'consultantFinanceScreen', builder: (context, state) => ConsultantFinanceScreen()),
|
||||
GoRoute(path: '/user-finance-screen', name: 'userFinanceScreen', builder: (context, state) => UserFinanceScreen()),
|
||||
GoRoute(path: '/card-settings-screen', name: 'cardSettingsScreen', builder: (context, state) => CardSettingsScreen()),
|
||||
GoRoute(
|
||||
path: '/consultant-finance-screen',
|
||||
name: 'consultantFinanceScreen',
|
||||
builder: (context, state) => ConsultantFinanceScreen(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/user-finance-screen',
|
||||
name: 'userFinanceScreen',
|
||||
builder: (context, state) => UserFinanceScreen(),
|
||||
),
|
||||
GoRoute(
|
||||
path: CardSettingsScreen.path,
|
||||
name: CardSettingsScreen.name,
|
||||
builder: (context, state) => CardSettingsScreen(),
|
||||
),
|
||||
GoRoute(
|
||||
path: '/about-plan-screen',
|
||||
name: 'aboutPlanScreen',
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'selection_popup_model.dart';
|
||||
T _$identity<T>(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;
|
||||
|
||||
@@ -49,6 +49,9 @@ import 'package:eatvio_app/features/feed/presentation/bloc/plans_cubit/plans_cub
|
||||
import 'package:eatvio_app/features/my_diets/presentation/cubit/my_diets_cubit.dart';
|
||||
import 'package:eatvio_app/features/my_diets/repositories/my_diets_repository.dart';
|
||||
import 'package:eatvio_app/features/my_diets/services/my_diets_service.dart';
|
||||
import 'package:eatvio_app/features/my_finance/presentation/cubit/user_cards_cubit/user_cards_cubit.dart';
|
||||
import 'package:eatvio_app/features/my_finance/repositories/cards_repository.dart';
|
||||
import 'package:eatvio_app/features/my_finance/services/cards_service.dart';
|
||||
import 'package:eatvio_app/features/my_plans/presentation/cubit/my_plans_cubit.dart';
|
||||
import 'package:eatvio_app/features/my_plans/repositories/my_diets_repository.dart';
|
||||
import 'package:eatvio_app/features/my_plans/services/my_plans_service.dart';
|
||||
@@ -117,6 +120,7 @@ Future<void> init() async {
|
||||
sl.registerFactory<AboutRecipeCubit>(() => AboutRecipeCubit(recipeRepository: sl(), profileRepository: sl()));
|
||||
sl.registerFactory<AuthCubit>(() => AuthCubit(authRepository: sl()));
|
||||
sl.registerFactory<ComplainingCubit>(() => ComplainingCubit(repository: sl()));
|
||||
sl.registerFactory<UserCardsCubit>(() => UserCardsCubit(cardsRepository: sl()));
|
||||
|
||||
// Repository
|
||||
sl.registerLazySingleton<ChatRepository>(() => ChatRepository(chatService: sl()));
|
||||
@@ -139,6 +143,7 @@ Future<void> init() async {
|
||||
sl.registerLazySingleton<AboutRecipeRepository>(() => AboutRecipeRepository(recipeService: sl()));
|
||||
sl.registerLazySingleton<ComplainingRepository>(() => ComplainingRepository(service: sl()));
|
||||
sl.registerLazySingleton<AuthRepository>(() => AuthRepository(authService: sl()));
|
||||
sl.registerLazySingleton<CardsRepository>(() => CardsRepository(cardsService: sl()));
|
||||
|
||||
// Services
|
||||
sl.registerLazySingleton<ChatService>(() => ChatService(sl()));
|
||||
@@ -162,6 +167,7 @@ Future<void> init() async {
|
||||
sl.registerLazySingleton<AboutRecipeService>(() => AboutRecipeService(sl()));
|
||||
sl.registerLazySingleton<ComplainingService>(() => ComplainingService(sl()));
|
||||
sl.registerLazySingleton<AuthService>(() => AuthService(sl()));
|
||||
sl.registerLazySingleton<CardsService>(() => CardsService(sl()));
|
||||
|
||||
// External
|
||||
sl.registerLazySingleton(
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'pagination_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<Link> 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<Link> 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<Link>,
|
||||
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<Link>,
|
||||
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<Link> 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<Link> 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<Link>,
|
||||
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<Link>,
|
||||
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<Link> 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<Link> 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<String, dynamic> 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<String, dynamic> 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<Link> 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<Link> 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<String, dynamic> 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<String, dynamic> json) =>
|
||||
_$$LinkImplFromJson(json);
|
||||
@@ -785,17 +847,16 @@ class _$LinkImpl implements _Link {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> 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<String, dynamic> json) = _$LinkImpl.fromJson;
|
||||
|
||||
|
||||
@@ -7,11 +7,11 @@ part of 'pagination_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$LinksImpl _$$LinksImplFromJson(Map<String, dynamic> 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<String, dynamic> _$$LinksImplToJson(_$LinksImpl instance) =>
|
||||
<String, dynamic>{
|
||||
@@ -22,19 +22,20 @@ Map<String, dynamic> _$$LinksImplToJson(_$LinksImpl instance) =>
|
||||
};
|
||||
|
||||
_$MetaImpl _$$MetaImplFromJson(Map<String, dynamic> json) => _$MetaImpl(
|
||||
currentPage: (json['current_page'] as num).toInt(),
|
||||
from: json['from'],
|
||||
lastPage: (json['last_page'] as num).toInt(),
|
||||
links: (json['links'] as List<dynamic>)
|
||||
currentPage: (json['current_page'] as num).toInt(),
|
||||
from: json['from'],
|
||||
lastPage: (json['last_page'] as num).toInt(),
|
||||
links:
|
||||
(json['links'] as List<dynamic>)
|
||||
.map((e) => Link.fromJson(e as Map<String, dynamic>))
|
||||
.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<String, dynamic> _$$MetaImplToJson(_$MetaImpl instance) =>
|
||||
<String, dynamic>{
|
||||
@@ -51,10 +52,10 @@ Map<String, dynamic> _$$MetaImplToJson(_$MetaImpl instance) =>
|
||||
};
|
||||
|
||||
_$LinkImpl _$$LinkImplFromJson(Map<String, dynamic> 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<String, dynamic> _$$LinkImplToJson(_$LinkImpl instance) =>
|
||||
<String, dynamic>{
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'credentials_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String, dynamic> 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<String, dynamic> json) =
|
||||
_$CredentialsModelImpl.fromJson;
|
||||
|
||||
@@ -7,15 +7,12 @@ part of 'credentials_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$CredentialsModelImpl _$$CredentialsModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$CredentialsModelImpl(
|
||||
email: json['email'] as String,
|
||||
password: json['password'] as String,
|
||||
);
|
||||
Map<String, dynamic> json,
|
||||
) => _$CredentialsModelImpl(
|
||||
email: json['email'] as String,
|
||||
password: json['password'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$CredentialsModelImplToJson(
|
||||
_$CredentialsModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'email': instance.email,
|
||||
'password': instance.password,
|
||||
};
|
||||
_$CredentialsModelImpl instance,
|
||||
) => <String, dynamic>{'email': instance.email, 'password': instance.password};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'token_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String, dynamic> toJson() {
|
||||
return _$$TokenModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$TokenModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,11 +7,7 @@ part of 'token_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$TokenModelImpl _$$TokenModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$TokenModelImpl(
|
||||
token: json['token'] as String,
|
||||
);
|
||||
_$TokenModelImpl(token: json['token'] as String);
|
||||
|
||||
Map<String, dynamic> _$$TokenModelImplToJson(_$TokenModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'token': instance.token,
|
||||
};
|
||||
<String, dynamic>{'token': instance.token};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'auth_state.dart';
|
||||
T _$identity<T>(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 extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(String token)? loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'blog_post_create_state.dart';
|
||||
T _$identity<T>(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 extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function()? loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -25,11 +25,11 @@ class _BlogPostService implements BlogPostService {
|
||||
final _data = formData;
|
||||
final _options = _setStreamType<void>(
|
||||
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<void>(
|
||||
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}',
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'new_messages_state.dart';
|
||||
T _$identity<T>(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 extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? empty,
|
||||
TResult? Function(int messagesCount)? loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'notifications_state.dart';
|
||||
T _$identity<T>(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<String> notifications, int notificationsCount)
|
||||
loaded,
|
||||
List<String> notifications,
|
||||
int notificationsCount,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? empty,
|
||||
TResult? Function(List<String> notifications, int notificationsCount)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? empty,
|
||||
TResult Function(List<String> notifications, int notificationsCount)?
|
||||
loaded,
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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<String> notifications, int notificationsCount)
|
||||
loaded,
|
||||
List<String> 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<String> 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<String> 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<String> notifications, int notificationsCount)
|
||||
loaded,
|
||||
List<String> 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<String> 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<String> 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<String> 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<String>,
|
||||
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<String>,
|
||||
notificationsCount:
|
||||
null == notificationsCount
|
||||
? _value.notificationsCount
|
||||
: notificationsCount // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$NotificationsStateLoadedImpl implements NotificationsStateLoaded {
|
||||
const _$NotificationsStateLoadedImpl(
|
||||
{required final List<String> notifications,
|
||||
required this.notificationsCount})
|
||||
: _notifications = notifications;
|
||||
const _$NotificationsStateLoadedImpl({
|
||||
required final List<String> notifications,
|
||||
required this.notificationsCount,
|
||||
}) : _notifications = notifications;
|
||||
|
||||
final List<String> _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<String> notifications, int notificationsCount)
|
||||
loaded,
|
||||
List<String> 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<String> 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<String> 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<String> notifications,
|
||||
required final int notificationsCount}) = _$NotificationsStateLoadedImpl;
|
||||
const factory NotificationsStateLoaded({
|
||||
required final List<String> notifications,
|
||||
required final int notificationsCount,
|
||||
}) = _$NotificationsStateLoadedImpl;
|
||||
|
||||
List<String> 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<String> notifications, int notificationsCount)
|
||||
loaded,
|
||||
List<String> 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<String> 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<String> 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;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'profile_avatar_state.dart';
|
||||
T _$identity<T>(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 extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ProfileModel profile)? loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'calendar_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> json) =
|
||||
_$CalendarModelImpl.fromJson;
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'calendar_state.dart';
|
||||
T _$identity<T>(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<CalendarModel> calendarList) loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(List<CalendarModel> calendarList)? loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
@@ -39,24 +38,21 @@ mixin _$CalendarState {
|
||||
TResult Function(List<CalendarModel> calendarList)? loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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<CalendarModel> 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<CalendarModel>,
|
||||
));
|
||||
$Res call({Object? calendarList = null}) {
|
||||
return _then(
|
||||
_$CalendarStateLoadedImpl(
|
||||
calendarList:
|
||||
null == calendarList
|
||||
? _value._calendarList
|
||||
: calendarList // ignore: cast_nullable_to_non_nullable
|
||||
as List<CalendarModel>,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$CalendarStateLoadedImpl implements CalendarStateLoaded {
|
||||
const _$CalendarStateLoadedImpl(
|
||||
{required final List<CalendarModel> calendarList})
|
||||
: _calendarList = calendarList;
|
||||
const _$CalendarStateLoadedImpl({
|
||||
required final List<CalendarModel> calendarList,
|
||||
}) : _calendarList = calendarList;
|
||||
|
||||
final List<CalendarModel> _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<CalendarModel> calendarList}) =
|
||||
_$CalendarStateLoadedImpl;
|
||||
const factory CalendarStateLoaded({
|
||||
required final List<CalendarModel> calendarList,
|
||||
}) = _$CalendarStateLoadedImpl;
|
||||
|
||||
List<CalendarModel> 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
|
||||
|
||||
@@ -36,11 +36,13 @@ class _CalendarService implements CalendarService {
|
||||
final _result = await _dio.fetch<List<dynamic>>(_options);
|
||||
late List<CalendarModel> _value;
|
||||
try {
|
||||
_value = _result.data!
|
||||
.map(
|
||||
(dynamic i) => CalendarModel.fromJson(i as Map<String, dynamic>),
|
||||
)
|
||||
.toList();
|
||||
_value =
|
||||
_result.data!
|
||||
.map(
|
||||
(dynamic i) =>
|
||||
CalendarModel.fromJson(i as Map<String, dynamic>),
|
||||
)
|
||||
.toList();
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'chat_message_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<dynamic>? 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<dynamic>? 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<dynamic>?,
|
||||
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<dynamic>?,
|
||||
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<dynamic>? 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<dynamic>? 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<dynamic>?,
|
||||
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<dynamic>?,
|
||||
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<dynamic>? 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<dynamic>? 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<String, dynamic> 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<String, dynamic> 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<dynamic>? 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<dynamic>? 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<String, dynamic> json) =
|
||||
_$ChatMessageModelImpl.fromJson;
|
||||
|
||||
@@ -7,27 +7,27 @@ part of 'chat_message_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatMessageModelImpl _$$ChatMessageModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ChatMessageModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
data: json['data'] as String,
|
||||
mediaData: json['media_data'] as List<dynamic>?,
|
||||
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<String, dynamic> json,
|
||||
) => _$ChatMessageModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
data: json['data'] as String,
|
||||
mediaData: json['media_data'] as List<dynamic>?,
|
||||
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<String, dynamic> _$$ChatMessageModelImplToJson(
|
||||
_$ChatMessageModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'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,
|
||||
) => <String, dynamic>{
|
||||
'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,
|
||||
};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'chat_messages_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<ChatMessageModel> messagesList,
|
||||
ChatMetaModel meta});
|
||||
$Res call({
|
||||
@JsonKey(name: 'data') List<ChatMessageModel> 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<ChatMessageModel>,
|
||||
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<ChatMessageModel>,
|
||||
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<ChatMessageModel> messagesList,
|
||||
ChatMetaModel meta});
|
||||
$Res call({
|
||||
@JsonKey(name: 'data') List<ChatMessageModel> 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<ChatMessageModel>,
|
||||
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<ChatMessageModel>,
|
||||
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<ChatMessageModel> messagesList,
|
||||
required this.meta})
|
||||
: _messagesList = messagesList;
|
||||
const _$ChatMessagesModelImpl({
|
||||
@JsonKey(name: 'data') required final List<ChatMessageModel> messagesList,
|
||||
required this.meta,
|
||||
}) : _messagesList = messagesList;
|
||||
|
||||
factory _$ChatMessagesModelImpl.fromJson(Map<String, dynamic> 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<String, dynamic> toJson() {
|
||||
return _$$ChatMessagesModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$ChatMessagesModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _ChatMessagesModel implements ChatMessagesModel {
|
||||
const factory _ChatMessagesModel(
|
||||
{@JsonKey(name: 'data')
|
||||
required final List<ChatMessageModel> messagesList,
|
||||
required final ChatMetaModel meta}) = _$ChatMessagesModelImpl;
|
||||
const factory _ChatMessagesModel({
|
||||
@JsonKey(name: 'data') required final List<ChatMessageModel> messagesList,
|
||||
required final ChatMetaModel meta,
|
||||
}) = _$ChatMessagesModelImpl;
|
||||
|
||||
factory _ChatMessagesModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ChatMessagesModelImpl.fromJson;
|
||||
|
||||
@@ -7,17 +7,15 @@ part of 'chat_messages_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatMessagesModelImpl _$$ChatMessagesModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ChatMessagesModelImpl(
|
||||
messagesList: (json['data'] as List<dynamic>)
|
||||
Map<String, dynamic> json,
|
||||
) => _$ChatMessagesModelImpl(
|
||||
messagesList:
|
||||
(json['data'] as List<dynamic>)
|
||||
.map((e) => ChatMessageModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
meta: ChatMetaModel.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
meta: ChatMetaModel.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatMessagesModelImplToJson(
|
||||
_$ChatMessagesModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.messagesList,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
_$ChatMessagesModelImpl instance,
|
||||
) => <String, dynamic>{'data': instance.messagesList, 'meta': instance.meta};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'chat_meta_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String, dynamic> json) =>
|
||||
_$$ChatMetaModelImplFromJson(json);
|
||||
@@ -144,16 +152,14 @@ class _$ChatMetaModelImpl implements _ChatMetaModel {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> 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<String, dynamic> json) =
|
||||
_$ChatMetaModelImpl.fromJson;
|
||||
|
||||
@@ -7,11 +7,7 @@ part of 'chat_meta_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatMetaModelImpl _$$ChatMetaModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ChatMetaModelImpl(
|
||||
lastPage: (json['last_page'] as num).toInt(),
|
||||
);
|
||||
_$ChatMetaModelImpl(lastPage: (json['last_page'] as num).toInt());
|
||||
|
||||
Map<String, dynamic> _$$ChatMetaModelImplToJson(_$ChatMetaModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'last_page': instance.lastPage,
|
||||
};
|
||||
<String, dynamic>{'last_page': instance.lastPage};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'chat_room_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String, dynamic> json) =>
|
||||
_$$ChatRoomModelImplFromJson(json);
|
||||
@@ -253,20 +272,19 @@ class _$ChatRoomModelImpl implements _ChatRoomModel {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> json) =>
|
||||
_$$UsersImplFromJson(json);
|
||||
@@ -466,17 +492,15 @@ class _$UsersImpl implements _Users {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> 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<String, dynamic> json) = _$UsersImpl.fromJson;
|
||||
|
||||
|
||||
@@ -10,7 +10,8 @@ _$ChatRoomModelImpl _$$ChatRoomModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ChatRoomModelImpl(
|
||||
id: json['id'] as String,
|
||||
chatRoomSettings: ChatRoomSettingsModel.fromJson(
|
||||
json['chat_room_setting'] as Map<String, dynamic>),
|
||||
json['chat_room_setting'] as Map<String, dynamic>,
|
||||
),
|
||||
users: Users.fromJson(json['users'] as Map<String, dynamic>),
|
||||
chosenPlan: parseChosenPlan(json['chosen_plan']),
|
||||
);
|
||||
@@ -24,11 +25,13 @@ Map<String, dynamic> _$$ChatRoomModelImplToJson(_$ChatRoomModelImpl instance) =>
|
||||
};
|
||||
|
||||
_$UsersImpl _$$UsersImplFromJson(Map<String, dynamic> json) => _$UsersImpl(
|
||||
sender: ChatUserModel.fromJson(
|
||||
json['from_chat_user'] as Map<String, dynamic>),
|
||||
receiver:
|
||||
ChatUserModel.fromJson(json['to_chat_user'] as Map<String, dynamic>),
|
||||
);
|
||||
sender: ChatUserModel.fromJson(
|
||||
json['from_chat_user'] as Map<String, dynamic>,
|
||||
),
|
||||
receiver: ChatUserModel.fromJson(
|
||||
json['to_chat_user'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$UsersImplToJson(_$UsersImpl instance) =>
|
||||
<String, dynamic>{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,24 +7,25 @@ part of 'chat_room_pagination_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatRoomPreviewModelImpl _$$ChatRoomPreviewModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ChatRoomPreviewModelImpl(
|
||||
chatRooms: ChatRooms.fromJson(json['chatRooms'] as Map<String, dynamic>),
|
||||
unreadChatsCount: (json['number_of_unread_chat_rooms'] as num).toInt(),
|
||||
);
|
||||
Map<String, dynamic> json,
|
||||
) => _$ChatRoomPreviewModelImpl(
|
||||
chatRooms: ChatRooms.fromJson(json['chatRooms'] as Map<String, dynamic>),
|
||||
unreadChatsCount: (json['number_of_unread_chat_rooms'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ChatRoomPreviewModelImplToJson(
|
||||
_$ChatRoomPreviewModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'chatRooms': instance.chatRooms,
|
||||
'number_of_unread_chat_rooms': instance.unreadChatsCount,
|
||||
};
|
||||
_$ChatRoomPreviewModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'chatRooms': instance.chatRooms,
|
||||
'number_of_unread_chat_rooms': instance.unreadChatsCount,
|
||||
};
|
||||
|
||||
_$ChatRoomsImpl _$$ChatRoomsImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ChatRoomsImpl(
|
||||
data: (json['data'] as List<dynamic>)
|
||||
.map((e) => ChatRoom.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
data:
|
||||
(json['data'] as List<dynamic>)
|
||||
.map((e) => ChatRoom.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
lastPage: (json['last_page'] as num).toInt(),
|
||||
currentPage: (json['current_page'] as num).toInt(),
|
||||
);
|
||||
@@ -57,11 +58,11 @@ Map<String, dynamic> _$$ChatRoomImplToJson(_$ChatRoomImpl instance) =>
|
||||
};
|
||||
|
||||
_$UsersImpl _$$UsersImplFromJson(Map<String, dynamic> json) => _$UsersImpl(
|
||||
fromChatUser:
|
||||
ChatUser.fromJson(json['from_chat_user'] as Map<String, dynamic>),
|
||||
toChatUser:
|
||||
ChatUser.fromJson(json['to_chat_user'] as Map<String, dynamic>),
|
||||
);
|
||||
fromChatUser: ChatUser.fromJson(
|
||||
json['from_chat_user'] as Map<String, dynamic>,
|
||||
),
|
||||
toChatUser: ChatUser.fromJson(json['to_chat_user'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$UsersImplToJson(_$UsersImpl instance) =>
|
||||
<String, dynamic>{
|
||||
|
||||
@@ -12,10 +12,12 @@ part of 'chat_room_settings_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> json) {
|
||||
Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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;
|
||||
}
|
||||
|
||||
@@ -7,21 +7,21 @@ part of 'chat_room_settings_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$ChatRoomSettingsModelImpl _$$ChatRoomSettingsModelImplFromJson(
|
||||
Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> _$$ChatRoomSettingsModelImplToJson(
|
||||
_$ChatRoomSettingsModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'room_name': instance.roomName,
|
||||
'state': instance.state,
|
||||
'access_level': instance.accessLevel,
|
||||
'updated_at': instance.updatedAt,
|
||||
};
|
||||
_$ChatRoomSettingsModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'room_name': instance.roomName,
|
||||
'state': instance.state,
|
||||
'access_level': instance.accessLevel,
|
||||
'updated_at': instance.updatedAt,
|
||||
};
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'chat_user_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> json) {
|
||||
return _ChatUserModel.fromJson(json);
|
||||
@@ -22,6 +23,7 @@ ChatUserModel _$ChatUserModelFromJson(Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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
|
||||
|
||||
@@ -10,6 +10,7 @@ _$ChatUserModelImpl _$$ChatUserModelImplFromJson(Map<String, dynamic> 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<String, dynamic> _$$ChatUserModelImplToJson(_$ChatUserModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'slug': instance.slug,
|
||||
'profile_photo_path': instance.profilePhotoPath,
|
||||
'profile_photo_url': instance.profilePhotoUrl,
|
||||
};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'websocket_info_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> json) =
|
||||
_$WebsocketInfoModelImpl.fromJson;
|
||||
|
||||
@@ -7,21 +7,21 @@ part of 'websocket_info_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$WebsocketInfoModelImpl _$$WebsocketInfoModelImplFromJson(
|
||||
Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> _$$WebsocketInfoModelImplToJson(
|
||||
_$WebsocketInfoModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'key': instance.key,
|
||||
'host': instance.host,
|
||||
'port': instance.port,
|
||||
'cluster': instance.cluster,
|
||||
'user_id': instance.userId,
|
||||
};
|
||||
_$WebsocketInfoModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'key': instance.key,
|
||||
'host': instance.host,
|
||||
'port': instance.port,
|
||||
'cluster': instance.cluster,
|
||||
'user_id': instance.userId,
|
||||
};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'chat_room_state.dart';
|
||||
T _$identity<T>(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 extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool isTyping,
|
||||
bool isLoading,
|
||||
)
|
||||
loaded,
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool isTyping,
|
||||
bool isLoading,
|
||||
)?
|
||||
loaded,
|
||||
TResult? Function(String errorMessage)? error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult maybeWhen<TResult extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool isTyping,
|
||||
bool isLoading,
|
||||
)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
}) => throw _privateConstructorUsedError;
|
||||
@optionalTypeArgs
|
||||
TResult map<TResult extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> 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 extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> 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 extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> 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 extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> 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 extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> 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 extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> 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<ChatMessageModel> chatMessages,
|
||||
bool isTyping,
|
||||
bool isLoading});
|
||||
$Res call({
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> 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<ChatMessageModel>,
|
||||
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<ChatMessageModel>,
|
||||
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<ChatMessageModel> chatMessages,
|
||||
required this.isTyping,
|
||||
required this.isLoading})
|
||||
: _chatMessages = chatMessages;
|
||||
const _$ChatRoomStateLoadedImpl({
|
||||
required this.chatRoom,
|
||||
required final List<ChatMessageModel> 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 extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> 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 extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> 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 extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> 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<ChatMessageModel> chatMessages,
|
||||
required final bool isTyping,
|
||||
required final bool isLoading}) = _$ChatRoomStateLoadedImpl;
|
||||
const factory ChatRoomStateLoaded({
|
||||
required final ChatRoomModel chatRoom,
|
||||
required final List<ChatMessageModel> chatMessages,
|
||||
required final bool isTyping,
|
||||
required final bool isLoading,
|
||||
}) = _$ChatRoomStateLoadedImpl;
|
||||
|
||||
ChatRoomModel get chatRoom;
|
||||
List<ChatMessageModel> 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 extends Object?>(
|
||||
TResult Function() $default, {
|
||||
required TResult Function() loading,
|
||||
required TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)
|
||||
loaded,
|
||||
required TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> 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 extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
TResult? Function()? loading,
|
||||
TResult? Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult? Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> 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 extends Object?>(
|
||||
TResult Function()? $default, {
|
||||
TResult Function()? loading,
|
||||
TResult Function(ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages, bool isTyping, bool isLoading)?
|
||||
loaded,
|
||||
TResult Function(
|
||||
ChatRoomModel chatRoom,
|
||||
List<ChatMessageModel> chatMessages,
|
||||
bool isTyping,
|
||||
bool isLoading,
|
||||
)?
|
||||
loaded,
|
||||
TResult Function(String errorMessage)? error,
|
||||
required TResult orElse(),
|
||||
}) {
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'chats_state.dart';
|
||||
T _$identity<T>(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<ChatRoom> chatRooms,
|
||||
bool isLoadingMoreChats,
|
||||
String? errorMessage});
|
||||
$Res call({
|
||||
BaseState state,
|
||||
int chatsWithUnreadMessagesCount,
|
||||
List<ChatRoom> 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<ChatRoom>,
|
||||
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<ChatRoom>,
|
||||
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<ChatRoom> chatRooms,
|
||||
bool isLoadingMoreChats,
|
||||
String? errorMessage});
|
||||
$Res call({
|
||||
BaseState state,
|
||||
int chatsWithUnreadMessagesCount,
|
||||
List<ChatRoom> 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<ChatRoom>,
|
||||
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<ChatRoom>,
|
||||
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<ChatRoom> chatRooms = const [],
|
||||
this.isLoadingMoreChats = false,
|
||||
this.errorMessage = null})
|
||||
: _chatRooms = chatRooms;
|
||||
_$ChatsStateImpl({
|
||||
this.state = BaseState.initial,
|
||||
this.chatsWithUnreadMessagesCount = 0,
|
||||
final List<ChatRoom> 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<ChatRoom> chatRooms,
|
||||
final bool isLoadingMoreChats,
|
||||
final String? errorMessage}) = _$ChatsStateImpl;
|
||||
factory _ChatsState({
|
||||
final BaseState state,
|
||||
final int chatsWithUnreadMessagesCount,
|
||||
final List<ChatRoom> chatRooms,
|
||||
final bool isLoadingMoreChats,
|
||||
final String? errorMessage,
|
||||
}) = _$ChatsStateImpl;
|
||||
|
||||
@override
|
||||
BaseState get state;
|
||||
|
||||
@@ -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<ChatScreen> {
|
||||
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<ChatRoomCubit>().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<ChatScreen> {
|
||||
chatId: widget.chatId,
|
||||
files: files,
|
||||
);
|
||||
} else {
|
||||
// User canceled the picker
|
||||
}
|
||||
},
|
||||
customBorder: CircleBorder(),
|
||||
@@ -397,46 +416,7 @@ class _ChatScreenState extends State<ChatScreen> {
|
||||
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(),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
@@ -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,
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -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<void> 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<OrderCard> createState() => _OrderCardState();
|
||||
@@ -115,7 +115,7 @@ class _OrderCardState extends State<OrderCard> {
|
||||
),
|
||||
)
|
||||
.toList(),
|
||||
if (widget.isUserView) ...[
|
||||
if (widget.isCustomerView) ...[
|
||||
SizedBox(height: 8),
|
||||
isLoading
|
||||
? Loader()
|
||||
|
||||
@@ -97,11 +97,11 @@ class _ChatService implements ChatService {
|
||||
}
|
||||
final _options = _setStreamType<void>(
|
||||
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',
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'complain_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String> 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<String>,
|
||||
) 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<String>,
|
||||
)
|
||||
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<String> 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<String>,
|
||||
));
|
||||
$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<String>,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ComplainModelImpl implements _ComplainModel {
|
||||
const _$ComplainModelImpl(
|
||||
{this.description = null, final List<String> tags = const []})
|
||||
: _tags = tags;
|
||||
const _$ComplainModelImpl({
|
||||
this.description = null,
|
||||
final List<String> tags = const [],
|
||||
}) : _tags = tags;
|
||||
|
||||
factory _$ComplainModelImpl.fromJson(Map<String, dynamic> 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<String, dynamic> toJson() {
|
||||
return _$$ComplainModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$ComplainModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _ComplainModel implements ComplainModel {
|
||||
const factory _ComplainModel(
|
||||
{final String? description,
|
||||
final List<String> tags}) = _$ComplainModelImpl;
|
||||
const factory _ComplainModel({
|
||||
final String? description,
|
||||
final List<String> tags,
|
||||
}) = _$ComplainModelImpl;
|
||||
|
||||
factory _ComplainModel.fromJson(Map<String, dynamic> json) =
|
||||
_$ComplainModelImpl.fromJson;
|
||||
|
||||
@@ -11,7 +11,7 @@ _$ComplainModelImpl _$$ComplainModelImplFromJson(Map<String, dynamic> json) =>
|
||||
description: json['description'] as String? ?? null,
|
||||
tags:
|
||||
(json['tags'] as List<dynamic>?)?.map((e) => e as String).toList() ??
|
||||
const [],
|
||||
const [],
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ComplainModelImplToJson(_$ComplainModelImpl instance) =>
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'complaining_state.dart';
|
||||
T _$identity<T>(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;
|
||||
|
||||
@@ -12,10 +12,12 @@ part of 'consultant_profile_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> json) {
|
||||
Map<String, dynamic> 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<String>? photos,
|
||||
@JsonKey(name: 'completed_courses', includeIfNull: false)
|
||||
List<CertificatesModel>? 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<String>? photos,
|
||||
@JsonKey(name: 'completed_courses', includeIfNull: false)
|
||||
List<CertificatesModel>? 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<String>?,
|
||||
certificates: freezed == certificates
|
||||
? _value.certificates
|
||||
: certificates // ignore: cast_nullable_to_non_nullable
|
||||
as List<CertificatesModel>?,
|
||||
) 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<String>?,
|
||||
certificates:
|
||||
freezed == certificates
|
||||
? _value.certificates
|
||||
: certificates // ignore: cast_nullable_to_non_nullable
|
||||
as List<CertificatesModel>?,
|
||||
)
|
||||
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<String>? photos,
|
||||
@JsonKey(name: 'completed_courses', includeIfNull: false)
|
||||
List<CertificatesModel>? 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<String>? photos,
|
||||
@JsonKey(name: 'completed_courses', includeIfNull: false)
|
||||
List<CertificatesModel>? 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<String>?,
|
||||
certificates: freezed == certificates
|
||||
? _value._certificates
|
||||
: certificates // ignore: cast_nullable_to_non_nullable
|
||||
as List<CertificatesModel>?,
|
||||
));
|
||||
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<String>?,
|
||||
certificates:
|
||||
freezed == certificates
|
||||
? _value._certificates
|
||||
: certificates // ignore: cast_nullable_to_non_nullable
|
||||
as List<CertificatesModel>?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @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<String>? photos,
|
||||
@JsonKey(name: 'completed_courses', includeIfNull: false)
|
||||
final List<CertificatesModel>? 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<String>? photos,
|
||||
@JsonKey(name: 'completed_courses', includeIfNull: false)
|
||||
final List<CertificatesModel>? certificates,
|
||||
}) : _photos = photos,
|
||||
_certificates = certificates;
|
||||
|
||||
factory _$ConsultantProfileModelImpl.fromJson(Map<String, dynamic> 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<String, dynamic> 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<String>? photos,
|
||||
@JsonKey(name: 'completed_courses', includeIfNull: false)
|
||||
final List<CertificatesModel>? 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<String>? photos,
|
||||
@JsonKey(name: 'completed_courses', includeIfNull: false)
|
||||
final List<CertificatesModel>? certificates,
|
||||
}) = _$ConsultantProfileModelImpl;
|
||||
|
||||
factory _ConsultantProfileModel.fromJson(Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> json) =
|
||||
_$CertificatesModelImpl.fromJson;
|
||||
|
||||
@@ -7,62 +7,60 @@ part of 'consultant_profile_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$ConsultantProfileModelImpl _$$ConsultantProfileModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$ConsultantProfileModelImpl(
|
||||
hasMedicalEducation: json['has_medical_education'] as bool?,
|
||||
socialLinks: json['social_links'] == null
|
||||
Map<String, dynamic> json,
|
||||
) => _$ConsultantProfileModelImpl(
|
||||
hasMedicalEducation: json['has_medical_education'] as bool?,
|
||||
socialLinks:
|
||||
json['social_links'] == null
|
||||
? null
|
||||
: SocialLinksModel.fromJson(
|
||||
json['social_links'] as Map<String, dynamic>),
|
||||
photos: (json['cert_photos'] as List<dynamic>?)
|
||||
?.map((e) => e as String)
|
||||
.toList(),
|
||||
certificates: (json['completed_courses'] as List<dynamic>?)
|
||||
json['social_links'] as Map<String, dynamic>,
|
||||
),
|
||||
photos:
|
||||
(json['cert_photos'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
||||
certificates:
|
||||
(json['completed_courses'] as List<dynamic>?)
|
||||
?.map((e) => CertificatesModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ConsultantProfileModelImplToJson(
|
||||
_$ConsultantProfileModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
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,
|
||||
) => <String, dynamic>{
|
||||
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<String, dynamic> 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<String, dynamic> 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<String, dynamic> _$$SocialLinksModelImplToJson(
|
||||
_$SocialLinksModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
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,
|
||||
) => <String, dynamic>{
|
||||
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<String, dynamic> json) =>
|
||||
_$CertificatesModelImpl(
|
||||
title: json['title'] as String,
|
||||
date: json['date'] as String,
|
||||
);
|
||||
Map<String, dynamic> json,
|
||||
) => _$CertificatesModelImpl(
|
||||
title: json['title'] as String,
|
||||
date: json['date'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$CertificatesModelImplToJson(
|
||||
_$CertificatesModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'title': instance.title,
|
||||
'date': instance.date,
|
||||
};
|
||||
_$CertificatesModelImpl instance,
|
||||
) => <String, dynamic>{'title': instance.title, 'date': instance.date};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'register_consultant_state.dart';
|
||||
T _$identity<T>(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;
|
||||
}
|
||||
|
||||
@@ -50,11 +50,11 @@ class _ConsultantService implements ConsultantService {
|
||||
}
|
||||
final _options = _setStreamType<List<String>>(
|
||||
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',
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'rating_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String, dynamic> json) =>
|
||||
_$$RatingModelImplFromJson(json);
|
||||
@@ -169,17 +187,16 @@ class _$RatingModelImpl implements _RatingModel {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> 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<String, dynamic> json) =
|
||||
_$RatingModelImpl.fromJson;
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'create_diet_model.dart';
|
||||
T _$identity<T>(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<String, bool> type,
|
||||
XFile? image,
|
||||
List<List<List<DailySchedule>>>? dailySchedule});
|
||||
$Res call({
|
||||
String? imageUrl,
|
||||
String? name,
|
||||
String? details,
|
||||
DietState? state,
|
||||
int? duration,
|
||||
Map<String, bool> type,
|
||||
XFile? image,
|
||||
List<List<List<DailySchedule>>>? 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<String, bool>,
|
||||
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<List<List<DailySchedule>>>?,
|
||||
) 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<String, bool>,
|
||||
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<List<List<DailySchedule>>>?,
|
||||
)
|
||||
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<String, bool> type,
|
||||
XFile? image,
|
||||
List<List<List<DailySchedule>>>? dailySchedule});
|
||||
$Res call({
|
||||
String? imageUrl,
|
||||
String? name,
|
||||
String? details,
|
||||
DietState? state,
|
||||
int? duration,
|
||||
Map<String, bool> type,
|
||||
XFile? image,
|
||||
List<List<List<DailySchedule>>>? 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<String, bool>,
|
||||
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<List<List<DailySchedule>>>?,
|
||||
));
|
||||
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<String, bool>,
|
||||
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<List<List<DailySchedule>>>?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$CreateDietModelImpl extends _CreateDietModel {
|
||||
const _$CreateDietModelImpl(
|
||||
{this.imageUrl,
|
||||
this.name,
|
||||
this.details,
|
||||
this.state,
|
||||
this.duration,
|
||||
required final Map<String, bool> type,
|
||||
this.image,
|
||||
final List<List<List<DailySchedule>>>? dailySchedule})
|
||||
: _type = type,
|
||||
_dailySchedule = dailySchedule,
|
||||
super._();
|
||||
const _$CreateDietModelImpl({
|
||||
this.imageUrl,
|
||||
this.name,
|
||||
this.details,
|
||||
this.state,
|
||||
this.duration,
|
||||
required final Map<String, bool> type,
|
||||
this.image,
|
||||
final List<List<List<DailySchedule>>>? 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<String, bool> type,
|
||||
final XFile? image,
|
||||
final List<List<List<DailySchedule>>>? dailySchedule}) =
|
||||
_$CreateDietModelImpl;
|
||||
const factory _CreateDietModel({
|
||||
final String? imageUrl,
|
||||
final String? name,
|
||||
final String? details,
|
||||
final DietState? state,
|
||||
final int? duration,
|
||||
required final Map<String, bool> type,
|
||||
final XFile? image,
|
||||
final List<List<List<DailySchedule>>>? dailySchedule,
|
||||
}) = _$CreateDietModelImpl;
|
||||
const _CreateDietModel._() : super._();
|
||||
|
||||
@override
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'create_diet_state.dart';
|
||||
T _$identity<T>(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<List<DailySchedule>>? copiedDay,
|
||||
String? dietNameError,
|
||||
String? dietDescriptionError,
|
||||
String? dietDurationError,
|
||||
String? dietStateError,
|
||||
String? dietImageError,
|
||||
List<String> dailyScheduleErrors,
|
||||
int? durationIndex,
|
||||
int? dietStateIndex,
|
||||
bool published,
|
||||
bool drafted,
|
||||
bool isDietBeingEdited});
|
||||
$Res call({
|
||||
bool isLoading,
|
||||
bool isDietPublishing,
|
||||
String? errorMessage,
|
||||
CreateDietModel dietData,
|
||||
List<List<DailySchedule>>? copiedDay,
|
||||
String? dietNameError,
|
||||
String? dietDescriptionError,
|
||||
String? dietDurationError,
|
||||
String? dietStateError,
|
||||
String? dietImageError,
|
||||
List<String> 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<List<DailySchedule>>?,
|
||||
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<String>,
|
||||
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<List<DailySchedule>>?,
|
||||
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<String>,
|
||||
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<List<DailySchedule>>? copiedDay,
|
||||
String? dietNameError,
|
||||
String? dietDescriptionError,
|
||||
String? dietDurationError,
|
||||
String? dietStateError,
|
||||
String? dietImageError,
|
||||
List<String> dailyScheduleErrors,
|
||||
int? durationIndex,
|
||||
int? dietStateIndex,
|
||||
bool published,
|
||||
bool drafted,
|
||||
bool isDietBeingEdited});
|
||||
$Res call({
|
||||
bool isLoading,
|
||||
bool isDietPublishing,
|
||||
String? errorMessage,
|
||||
CreateDietModel dietData,
|
||||
List<List<DailySchedule>>? copiedDay,
|
||||
String? dietNameError,
|
||||
String? dietDescriptionError,
|
||||
String? dietDurationError,
|
||||
String? dietStateError,
|
||||
String? dietImageError,
|
||||
List<String> 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<List<DailySchedule>>?,
|
||||
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<String>,
|
||||
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<List<DailySchedule>>?,
|
||||
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<String>,
|
||||
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<List<DailySchedule>>? copiedDay,
|
||||
this.dietNameError,
|
||||
this.dietDescriptionError,
|
||||
this.dietDurationError,
|
||||
this.dietStateError,
|
||||
this.dietImageError,
|
||||
required final List<String> 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<List<DailySchedule>>? copiedDay,
|
||||
this.dietNameError,
|
||||
this.dietDescriptionError,
|
||||
this.dietDurationError,
|
||||
this.dietStateError,
|
||||
this.dietImageError,
|
||||
required final List<String> 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<List<DailySchedule>>? copiedDay,
|
||||
final String? dietNameError,
|
||||
final String? dietDescriptionError,
|
||||
final String? dietDurationError,
|
||||
final String? dietStateError,
|
||||
final String? dietImageError,
|
||||
required final List<String> 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<List<DailySchedule>>? copiedDay,
|
||||
final String? dietNameError,
|
||||
final String? dietDescriptionError,
|
||||
final String? dietDurationError,
|
||||
final String? dietStateError,
|
||||
final String? dietImageError,
|
||||
required final List<String> dailyScheduleErrors,
|
||||
final int? durationIndex,
|
||||
final int? dietStateIndex,
|
||||
final bool published,
|
||||
final bool drafted,
|
||||
final bool isDietBeingEdited,
|
||||
}) = _$CreateDietStateImpl;
|
||||
|
||||
@override
|
||||
bool get isLoading;
|
||||
|
||||
@@ -25,11 +25,11 @@ class _CreateDietService implements CreateDietService {
|
||||
final _data = formData;
|
||||
final _options = _setStreamType<CreatedDiet>(
|
||||
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<CreatedDiet>(
|
||||
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<CreatedDiet>(
|
||||
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<void>(
|
||||
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<void>(
|
||||
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<void>(
|
||||
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}',
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'create_plan_model.dart';
|
||||
T _$identity<T>(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<bool> type,
|
||||
XFile? image,
|
||||
List<PacketOptions> options});
|
||||
$Res call({
|
||||
String? name,
|
||||
String? details,
|
||||
String? state,
|
||||
int? duration,
|
||||
List<bool> type,
|
||||
XFile? image,
|
||||
List<PacketOptions> 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<bool>,
|
||||
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<PacketOptions>,
|
||||
) 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<bool>,
|
||||
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<PacketOptions>,
|
||||
)
|
||||
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<bool> type,
|
||||
XFile? image,
|
||||
List<PacketOptions> options});
|
||||
$Res call({
|
||||
String? name,
|
||||
String? details,
|
||||
String? state,
|
||||
int? duration,
|
||||
List<bool> type,
|
||||
XFile? image,
|
||||
List<PacketOptions> 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<bool>,
|
||||
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<PacketOptions>,
|
||||
));
|
||||
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<bool>,
|
||||
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<PacketOptions>,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$CreatePlanModelImpl extends _CreatePlanModel {
|
||||
const _$CreatePlanModelImpl(
|
||||
{this.name,
|
||||
this.details,
|
||||
this.state,
|
||||
this.duration,
|
||||
required final List<bool> type,
|
||||
this.image,
|
||||
required final List<PacketOptions> options})
|
||||
: _type = type,
|
||||
_options = options,
|
||||
super._();
|
||||
const _$CreatePlanModelImpl({
|
||||
this.name,
|
||||
this.details,
|
||||
this.state,
|
||||
this.duration,
|
||||
required final List<bool> type,
|
||||
this.image,
|
||||
required final List<PacketOptions> 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<bool> type,
|
||||
final XFile? image,
|
||||
required final List<PacketOptions> options}) = _$CreatePlanModelImpl;
|
||||
const factory _CreatePlanModel({
|
||||
final String? name,
|
||||
final String? details,
|
||||
final String? state,
|
||||
final int? duration,
|
||||
required final List<bool> type,
|
||||
final XFile? image,
|
||||
required final List<PacketOptions> options,
|
||||
}) = _$CreatePlanModelImpl;
|
||||
const _CreatePlanModel._() : super._();
|
||||
|
||||
@override
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'create_plan_state.dart';
|
||||
T _$identity<T>(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;
|
||||
|
||||
@@ -26,11 +26,11 @@ class _CreatePlanService implements CreatePlanService {
|
||||
_data.addAll(model);
|
||||
final _options = _setStreamType<void>(
|
||||
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',
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'recipe_create_entity.dart';
|
||||
T _$identity<T>(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<Ingredient> ingredients,
|
||||
List<StepEntity> steps,
|
||||
List<String> 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<Ingredient> ingredients,
|
||||
List<StepEntity> steps,
|
||||
List<String> 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<Ingredient>,
|
||||
steps: null == steps
|
||||
? _value.steps
|
||||
: steps // ignore: cast_nullable_to_non_nullable
|
||||
as List<StepEntity>,
|
||||
tags: null == tags
|
||||
? _value.tags
|
||||
: tags // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
) 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<Ingredient>,
|
||||
steps:
|
||||
null == steps
|
||||
? _value.steps
|
||||
: steps // ignore: cast_nullable_to_non_nullable
|
||||
as List<StepEntity>,
|
||||
tags:
|
||||
null == tags
|
||||
? _value.tags
|
||||
: tags // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
)
|
||||
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<Ingredient> ingredients,
|
||||
List<StepEntity> steps,
|
||||
List<String> 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<Ingredient> ingredients,
|
||||
List<StepEntity> steps,
|
||||
List<String> 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<Ingredient>,
|
||||
steps: null == steps
|
||||
? _value._steps
|
||||
: steps // ignore: cast_nullable_to_non_nullable
|
||||
as List<StepEntity>,
|
||||
tags: null == tags
|
||||
? _value._tags
|
||||
: tags // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
));
|
||||
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<Ingredient>,
|
||||
steps:
|
||||
null == steps
|
||||
? _value._steps
|
||||
: steps // ignore: cast_nullable_to_non_nullable
|
||||
as List<StepEntity>,
|
||||
tags:
|
||||
null == tags
|
||||
? _value._tags
|
||||
: tags // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @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<Ingredient> ingredients,
|
||||
required final List<StepEntity> steps,
|
||||
required final List<String> 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<Ingredient> ingredients,
|
||||
required final List<StepEntity> steps,
|
||||
required final List<String> 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<Ingredient> ingredients,
|
||||
required final List<StepEntity> steps,
|
||||
required final List<String> 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<Ingredient> ingredients,
|
||||
required final List<StepEntity> steps,
|
||||
required final List<String> 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?,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'ingredient.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String, dynamic> json) =>
|
||||
_$$IngredientImplFromJson(json);
|
||||
@@ -169,17 +187,16 @@ class _$IngredientImpl implements _Ingredient {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> 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<String, dynamic> json) =
|
||||
_$IngredientImpl.fromJson;
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'product.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String, dynamic> toJson() {
|
||||
return _$$ProductImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$ProductImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,4 @@ _$ProductImpl _$$ProductImplFromJson(Map<String, dynamic> json) =>
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ProductImplToJson(_$ProductImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
};
|
||||
<String, dynamic>{'id': instance.id, 'name': instance.name};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'recipe_create_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String> tags,
|
||||
List<Ingredient> ingredients,
|
||||
List<Step> 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<String> tags,
|
||||
List<Ingredient> ingredients,
|
||||
List<Step> 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<String>,
|
||||
ingredients: null == ingredients
|
||||
? _value.ingredients
|
||||
: ingredients // ignore: cast_nullable_to_non_nullable
|
||||
as List<Ingredient>,
|
||||
steps: null == steps
|
||||
? _value.steps
|
||||
: steps // ignore: cast_nullable_to_non_nullable
|
||||
as List<Step>,
|
||||
) 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<String>,
|
||||
ingredients:
|
||||
null == ingredients
|
||||
? _value.ingredients
|
||||
: ingredients // ignore: cast_nullable_to_non_nullable
|
||||
as List<Ingredient>,
|
||||
steps:
|
||||
null == steps
|
||||
? _value.steps
|
||||
: steps // ignore: cast_nullable_to_non_nullable
|
||||
as List<Step>,
|
||||
)
|
||||
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<String> tags,
|
||||
List<Ingredient> ingredients,
|
||||
List<Step> 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<String> tags,
|
||||
List<Ingredient> ingredients,
|
||||
List<Step> 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<String>,
|
||||
ingredients: null == ingredients
|
||||
? _value._ingredients
|
||||
: ingredients // ignore: cast_nullable_to_non_nullable
|
||||
as List<Ingredient>,
|
||||
steps: null == steps
|
||||
? _value._steps
|
||||
: steps // ignore: cast_nullable_to_non_nullable
|
||||
as List<Step>,
|
||||
));
|
||||
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<String>,
|
||||
ingredients:
|
||||
null == ingredients
|
||||
? _value._ingredients
|
||||
: ingredients // ignore: cast_nullable_to_non_nullable
|
||||
as List<Ingredient>,
|
||||
steps:
|
||||
null == steps
|
||||
? _value._steps
|
||||
: steps // ignore: cast_nullable_to_non_nullable
|
||||
as List<Step>,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @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<String> tags,
|
||||
required final List<Ingredient> ingredients,
|
||||
required final List<Step> 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<String> tags,
|
||||
required final List<Ingredient> ingredients,
|
||||
required final List<Step> steps,
|
||||
}) : _tags = tags,
|
||||
_ingredients = ingredients,
|
||||
_steps = steps;
|
||||
|
||||
factory _$RecipeCreateModelImpl.fromJson(Map<String, dynamic> 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<String, dynamic> 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<String> tags,
|
||||
required final List<Ingredient> ingredients,
|
||||
required final List<Step> 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<String> tags,
|
||||
required final List<Ingredient> ingredients,
|
||||
required final List<Step> steps,
|
||||
}) = _$RecipeCreateModelImpl;
|
||||
|
||||
factory _RecipeCreateModel.fromJson(Map<String, dynamic> json) =
|
||||
_$RecipeCreateModelImpl.fromJson;
|
||||
|
||||
@@ -7,42 +7,44 @@ part of 'recipe_create_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$RecipeCreateModelImpl _$$RecipeCreateModelImplFromJson(
|
||||
Map<String, dynamic> 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<dynamic>).map((e) => e as String).toList(),
|
||||
ingredients: (json['ingredients'] as List<dynamic>)
|
||||
Map<String, dynamic> 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<dynamic>).map((e) => e as String).toList(),
|
||||
ingredients:
|
||||
(json['ingredients'] as List<dynamic>)
|
||||
.map((e) => Ingredient.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
steps: (json['steps'] as List<dynamic>)
|
||||
steps:
|
||||
(json['steps'] as List<dynamic>)
|
||||
.map((e) => Step.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$RecipeCreateModelImplToJson(
|
||||
_$RecipeCreateModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'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,
|
||||
) => <String, dynamic>{
|
||||
'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',
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'recipe_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<Ingredient?>? ingredients,
|
||||
List<Step?>? steps,
|
||||
List<String>? 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<Ingredient?>? ingredients,
|
||||
List<Step?>? steps,
|
||||
List<String>? 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<Ingredient?>?,
|
||||
steps: freezed == steps
|
||||
? _value.steps
|
||||
: steps // ignore: cast_nullable_to_non_nullable
|
||||
as List<Step?>?,
|
||||
tags: freezed == tags
|
||||
? _value.tags
|
||||
: tags // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>?,
|
||||
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<Ingredient?>?,
|
||||
steps:
|
||||
freezed == steps
|
||||
? _value.steps
|
||||
: steps // ignore: cast_nullable_to_non_nullable
|
||||
as List<Step?>?,
|
||||
tags:
|
||||
freezed == tags
|
||||
? _value.tags
|
||||
: tags // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>?,
|
||||
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<Ingredient?>? ingredients,
|
||||
List<Step?>? steps,
|
||||
List<String>? 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<Ingredient?>? ingredients,
|
||||
List<Step?>? steps,
|
||||
List<String>? 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<Ingredient?>?,
|
||||
steps: freezed == steps
|
||||
? _value._steps
|
||||
: steps // ignore: cast_nullable_to_non_nullable
|
||||
as List<Step?>?,
|
||||
tags: freezed == tags
|
||||
? _value._tags
|
||||
: tags // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>?,
|
||||
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<Ingredient?>?,
|
||||
steps:
|
||||
freezed == steps
|
||||
? _value._steps
|
||||
: steps // ignore: cast_nullable_to_non_nullable
|
||||
as List<Step?>?,
|
||||
tags:
|
||||
freezed == tags
|
||||
? _value._tags
|
||||
: tags // ignore: cast_nullable_to_non_nullable
|
||||
as List<String>?,
|
||||
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<Ingredient?>? ingredients,
|
||||
final List<Step?>? steps,
|
||||
final List<String>? 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<Ingredient?>? ingredients,
|
||||
final List<Step?>? steps,
|
||||
final List<String>? 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<String, dynamic> 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<String, dynamic> toJson() {
|
||||
return _$$RecipeModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$RecipeModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _RecipeModel implements RecipeModel {
|
||||
const factory _RecipeModel(
|
||||
{final List<Ingredient?>? ingredients,
|
||||
final List<Step?>? steps,
|
||||
final List<String>? 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<Ingredient?>? ingredients,
|
||||
final List<Step?>? steps,
|
||||
final List<String>? 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<String, dynamic> json) =
|
||||
_$RecipeModelImpl.fromJson;
|
||||
|
||||
@@ -8,14 +8,22 @@ part of 'recipe_model.dart';
|
||||
|
||||
_$RecipeModelImpl _$$RecipeModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$RecipeModelImpl(
|
||||
ingredients: (json['ingredients'] as List<dynamic>?)
|
||||
?.map((e) =>
|
||||
e == null ? null : Ingredient.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
steps: (json['steps'] as List<dynamic>?)
|
||||
?.map((e) =>
|
||||
e == null ? null : Step.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
ingredients:
|
||||
(json['ingredients'] as List<dynamic>?)
|
||||
?.map(
|
||||
(e) =>
|
||||
e == null
|
||||
? null
|
||||
: Ingredient.fromJson(e as Map<String, dynamic>),
|
||||
)
|
||||
.toList(),
|
||||
steps:
|
||||
(json['steps'] as List<dynamic>?)
|
||||
?.map(
|
||||
(e) =>
|
||||
e == null ? null : Step.fromJson(e as Map<String, dynamic>),
|
||||
)
|
||||
.toList(),
|
||||
tags: (json['tags'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
||||
type: json['type'] as String?,
|
||||
state: json['state'] as String?,
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'recipe_tag_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<RecipeTag> data,
|
||||
@JsonKey(name: "links") Links links,
|
||||
@JsonKey(name: "meta") Meta meta});
|
||||
$Res call({
|
||||
@JsonKey(name: "data") List<RecipeTag> 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<RecipeTag>,
|
||||
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<RecipeTag>,
|
||||
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<RecipeTag> data,
|
||||
@JsonKey(name: "links") Links links,
|
||||
@JsonKey(name: "meta") Meta meta});
|
||||
$Res call({
|
||||
@JsonKey(name: "data") List<RecipeTag> 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<RecipeTag>,
|
||||
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<RecipeTag>,
|
||||
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<RecipeTag> data,
|
||||
@JsonKey(name: "links") required this.links,
|
||||
@JsonKey(name: "meta") required this.meta})
|
||||
: _data = data;
|
||||
const _$RecipeTagModelImpl({
|
||||
@JsonKey(name: "data") required final List<RecipeTag> data,
|
||||
@JsonKey(name: "links") required this.links,
|
||||
@JsonKey(name: "meta") required this.meta,
|
||||
}) : _data = data;
|
||||
|
||||
factory _$RecipeTagModelImpl.fromJson(Map<String, dynamic> 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<String, dynamic> toJson() {
|
||||
return _$$RecipeTagModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$RecipeTagModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _RecipeTagModel implements RecipeTagModel {
|
||||
const factory _RecipeTagModel(
|
||||
{@JsonKey(name: "data") required final List<RecipeTag> 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<RecipeTag> data,
|
||||
@JsonKey(name: "links") required final Links links,
|
||||
@JsonKey(name: "meta") required final Meta meta,
|
||||
}) = _$RecipeTagModelImpl;
|
||||
|
||||
factory _RecipeTagModel.fromJson(Map<String, dynamic> 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<String, dynamic> json) =>
|
||||
_$$RecipeTagImplFromJson(json);
|
||||
@@ -463,20 +497,18 @@ class _$RecipeTagImpl implements _RecipeTag {
|
||||
|
||||
@override
|
||||
Map<String, dynamic> 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<String, dynamic> json) =
|
||||
_$RecipeTagImpl.fromJson;
|
||||
|
||||
@@ -8,20 +8,21 @@ part of 'recipe_tag_model.dart';
|
||||
|
||||
_$RecipeTagModelImpl _$$RecipeTagModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$RecipeTagModelImpl(
|
||||
data: (json['data'] as List<dynamic>)
|
||||
.map((e) => RecipeTag.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
data:
|
||||
(json['data'] as List<dynamic>)
|
||||
.map((e) => RecipeTag.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$RecipeTagModelImplToJson(
|
||||
_$RecipeTagModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
_$RecipeTagModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
_$RecipeTagImpl _$$RecipeTagImplFromJson(Map<String, dynamic> json) =>
|
||||
_$RecipeTagImpl(
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'step.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String, dynamic> toJson() {
|
||||
return _$$StepImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$StepImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,9 +7,9 @@ part of 'step.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$StepImpl _$$StepImplFromJson(Map<String, dynamic> json) => _$StepImpl(
|
||||
image: json['image'] as String?,
|
||||
description: json['description'] as String?,
|
||||
);
|
||||
image: json['image'] as String?,
|
||||
description: json['description'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) =>
|
||||
<String, dynamic>{
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'create_recipe_state.dart';
|
||||
T _$identity<T>(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;
|
||||
|
||||
@@ -143,11 +143,11 @@ class _CreateRecipeService implements CreateRecipeService {
|
||||
final _data = formData;
|
||||
final _options = _setStreamType<void>(
|
||||
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',
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,16 +7,14 @@ part of 'diary_day_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$DiaryDayWrapperModelImpl _$$DiaryDayWrapperModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$DiaryDayWrapperModelImpl(
|
||||
diary: DiaryDayModel.fromJson(json['diary'] as Map<String, dynamic>),
|
||||
);
|
||||
Map<String, dynamic> json,
|
||||
) => _$DiaryDayWrapperModelImpl(
|
||||
diary: DiaryDayModel.fromJson(json['diary'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DiaryDayWrapperModelImplToJson(
|
||||
_$DiaryDayWrapperModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'diary': instance.diary,
|
||||
};
|
||||
_$DiaryDayWrapperModelImpl instance,
|
||||
) => <String, dynamic>{'diary': instance.diary};
|
||||
|
||||
_$DiaryDayModelImpl _$$DiaryDayModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$DiaryDayModelImpl(
|
||||
@@ -26,11 +24,13 @@ _$DiaryDayModelImpl _$$DiaryDayModelImplFromJson(Map<String, dynamic> json) =>
|
||||
retire: json['retire'] as String?,
|
||||
closed: (json['closed'] as num).toInt(),
|
||||
comment: json['comment'] as String,
|
||||
typeOfDiary:
|
||||
TypeOfDiaryModel.fromJson(json['state'] as Map<String, dynamic>),
|
||||
meals: (json['meals'] as List<dynamic>)
|
||||
.map((e) => MealModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
typeOfDiary: TypeOfDiaryModel.fromJson(
|
||||
json['state'] as Map<String, dynamic>,
|
||||
),
|
||||
meals:
|
||||
(json['meals'] as List<dynamic>)
|
||||
.map((e) => MealModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DiaryDayModelImplToJson(_$DiaryDayModelImpl instance) =>
|
||||
@@ -52,12 +52,14 @@ _$MealModelImpl _$$MealModelImplFromJson(Map<String, dynamic> 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<dynamic>)
|
||||
.map((e) => PortionModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
photos: (json['photos'] as List<dynamic>)
|
||||
.map((e) => DiaryPhotoModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
portions:
|
||||
(json['portions'] as List<dynamic>)
|
||||
.map((e) => PortionModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
photos:
|
||||
(json['photos'] as List<dynamic>)
|
||||
.map((e) => DiaryPhotoModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$MealModelImplToJson(_$MealModelImpl instance) =>
|
||||
@@ -72,22 +74,22 @@ Map<String, dynamic> _$$MealModelImplToJson(_$MealModelImpl instance) =>
|
||||
};
|
||||
|
||||
_$DiaryPhotoModelImpl _$$DiaryPhotoModelImplFromJson(
|
||||
Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> _$$DiaryPhotoModelImplToJson(
|
||||
_$DiaryPhotoModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'original_name': instance.originalName,
|
||||
'path': instance.path,
|
||||
'size': instance.size,
|
||||
};
|
||||
_$DiaryPhotoModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'id': instance.id,
|
||||
'original_name': instance.originalName,
|
||||
'path': instance.path,
|
||||
'size': instance.size,
|
||||
};
|
||||
|
||||
_$PortionModelImpl _$$PortionModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$PortionModelImpl(
|
||||
@@ -124,18 +126,18 @@ const _$PortionStateEnumMap = {
|
||||
};
|
||||
|
||||
_$TypeOfDiaryModelImpl _$$TypeOfDiaryModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$TypeOfDiaryModelImpl(
|
||||
hasChosenDiet: json['has_chosen_diet'] as bool,
|
||||
hasChosenPlan: json['has_chosen_plan'] as bool,
|
||||
);
|
||||
Map<String, dynamic> json,
|
||||
) => _$TypeOfDiaryModelImpl(
|
||||
hasChosenDiet: json['has_chosen_diet'] as bool,
|
||||
hasChosenPlan: json['has_chosen_plan'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$TypeOfDiaryModelImplToJson(
|
||||
_$TypeOfDiaryModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'has_chosen_diet': instance.hasChosenDiet,
|
||||
'has_chosen_plan': instance.hasChosenPlan,
|
||||
};
|
||||
_$TypeOfDiaryModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'has_chosen_diet': instance.hasChosenDiet,
|
||||
'has_chosen_plan': instance.hasChosenPlan,
|
||||
};
|
||||
|
||||
_$ProductInMealImpl _$$ProductInMealImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ProductInMealImpl(
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'diary_index_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String, dynamic> toJson() {
|
||||
return _$$DiaryIndexModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$DiaryIndexModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -7,13 +7,9 @@ part of 'diary_index_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$DiaryIndexModelImpl _$$DiaryIndexModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$DiaryIndexModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
);
|
||||
Map<String, dynamic> json,
|
||||
) => _$DiaryIndexModelImpl(id: (json['id'] as num).toInt());
|
||||
|
||||
Map<String, dynamic> _$$DiaryIndexModelImplToJson(
|
||||
_$DiaryIndexModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
};
|
||||
_$DiaryIndexModelImpl instance,
|
||||
) => <String, dynamic>{'id': instance.id};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'finish_diary_day_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String, dynamic> 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<String, dynamic> json) =
|
||||
_$FinishDiaryDayModelImpl.fromJson;
|
||||
|
||||
@@ -7,15 +7,12 @@ part of 'finish_diary_day_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$FinishDiaryDayModelImpl _$$FinishDiaryDayModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$FinishDiaryDayModelImpl(
|
||||
wakeUp: json['wakeUp'] as String,
|
||||
retire: json['retire'] as String,
|
||||
);
|
||||
Map<String, dynamic> json,
|
||||
) => _$FinishDiaryDayModelImpl(
|
||||
wakeUp: json['wakeUp'] as String,
|
||||
retire: json['retire'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FinishDiaryDayModelImplToJson(
|
||||
_$FinishDiaryDayModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'wakeUp': instance.wakeUp,
|
||||
'retire': instance.retire,
|
||||
};
|
||||
_$FinishDiaryDayModelImpl instance,
|
||||
) => <String, dynamic>{'wakeUp': instance.wakeUp, 'retire': instance.retire};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'nutrition_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> json) =
|
||||
_$NutritionModelImpl.fromJson;
|
||||
|
||||
@@ -7,20 +7,22 @@ part of 'nutrition_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$NutritionDataModelImpl _$$NutritionDataModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$NutritionDataModelImpl(
|
||||
dailyNutritionIntake: NutritionModel.fromJson(
|
||||
json['dailyNutritionIntake'] as Map<String, dynamic>),
|
||||
dailyNutritionRecommendation: NutritionModel.fromJson(
|
||||
json['dailyNutritionRecommendation'] as Map<String, dynamic>),
|
||||
);
|
||||
Map<String, dynamic> json,
|
||||
) => _$NutritionDataModelImpl(
|
||||
dailyNutritionIntake: NutritionModel.fromJson(
|
||||
json['dailyNutritionIntake'] as Map<String, dynamic>,
|
||||
),
|
||||
dailyNutritionRecommendation: NutritionModel.fromJson(
|
||||
json['dailyNutritionRecommendation'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$NutritionDataModelImplToJson(
|
||||
_$NutritionDataModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'dailyNutritionIntake': instance.dailyNutritionIntake,
|
||||
'dailyNutritionRecommendation': instance.dailyNutritionRecommendation,
|
||||
};
|
||||
_$NutritionDataModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'dailyNutritionIntake': instance.dailyNutritionIntake,
|
||||
'dailyNutritionRecommendation': instance.dailyNutritionRecommendation,
|
||||
};
|
||||
|
||||
_$NutritionModelImpl _$$NutritionModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$NutritionModelImpl(
|
||||
@@ -31,10 +33,10 @@ _$NutritionModelImpl _$$NutritionModelImplFromJson(Map<String, dynamic> json) =>
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$NutritionModelImplToJson(
|
||||
_$NutritionModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'energy': instance.energy,
|
||||
'proteins': instance.proteins,
|
||||
'fats': instance.fats,
|
||||
'carbohydrates': instance.carbohydrates,
|
||||
};
|
||||
_$NutritionModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'energy': instance.energy,
|
||||
'proteins': instance.proteins,
|
||||
'fats': instance.fats,
|
||||
'carbohydrates': instance.carbohydrates,
|
||||
};
|
||||
|
||||
@@ -12,10 +12,12 @@ part of 'product_moderation_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> json) {
|
||||
Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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;
|
||||
}
|
||||
|
||||
@@ -7,21 +7,21 @@ part of 'product_moderation_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$ProductModerationModelImpl _$$ProductModerationModelImplFromJson(
|
||||
Map<String, dynamic> 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<String, dynamic> 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<String, dynamic> _$$ProductModerationModelImplToJson(
|
||||
_$ProductModerationModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'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,
|
||||
) => <String, dynamic>{
|
||||
'name': instance.name,
|
||||
'energy_on_100gr': instance.energy,
|
||||
'proteins_on_100gr': instance.proteins,
|
||||
'fats_on_100gr': instance.fats,
|
||||
'carbohydrates_on_100gr': instance.carbohydrates,
|
||||
};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'diary_state.dart';
|
||||
T _$identity<T>(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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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;
|
||||
|
||||
@@ -38,11 +38,13 @@ class _DiaryService implements DiaryService {
|
||||
final _result = await _dio.fetch<List<dynamic>>(_options);
|
||||
late List<DiaryDayModel> _value;
|
||||
try {
|
||||
_value = _result.data!
|
||||
.map(
|
||||
(dynamic i) => DiaryDayModel.fromJson(i as Map<String, dynamic>),
|
||||
)
|
||||
.toList();
|
||||
_value =
|
||||
_result.data!
|
||||
.map(
|
||||
(dynamic i) =>
|
||||
DiaryDayModel.fromJson(i as Map<String, dynamic>),
|
||||
)
|
||||
.toList();
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
@@ -125,11 +127,11 @@ class _DiaryService implements DiaryService {
|
||||
);
|
||||
final _options = _setStreamType<void>(
|
||||
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',
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'diet_likes_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> json) =
|
||||
_$DietLikesModelImpl.fromJson;
|
||||
|
||||
@@ -13,8 +13,8 @@ _$DietLikesModelImpl _$$DietLikesModelImplFromJson(Map<String, dynamic> json) =>
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DietLikesModelImplToJson(
|
||||
_$DietLikesModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'total_likers': instance.totalLikes,
|
||||
'is_liked': instance.isLiked,
|
||||
};
|
||||
_$DietLikesModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'total_likers': instance.totalLikes,
|
||||
'is_liked': instance.isLiked,
|
||||
};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'about_diet_state.dart';
|
||||
T _$identity<T>(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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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 extends Object?>(
|
||||
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);
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'comment_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<Comment> data,
|
||||
@JsonKey(name: "links") Links links,
|
||||
@JsonKey(name: "meta") Meta meta});
|
||||
$Res call({
|
||||
@JsonKey(name: "data") List<Comment> 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<Comment>,
|
||||
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<Comment>,
|
||||
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<Comment> data,
|
||||
@JsonKey(name: "links") Links links,
|
||||
@JsonKey(name: "meta") Meta meta});
|
||||
$Res call({
|
||||
@JsonKey(name: "data") List<Comment> 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<Comment>,
|
||||
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<Comment>,
|
||||
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<Comment> data,
|
||||
@JsonKey(name: "links") required this.links,
|
||||
@JsonKey(name: "meta") required this.meta})
|
||||
: _data = data;
|
||||
const _$CommentModelImpl({
|
||||
@JsonKey(name: "data") required final List<Comment> data,
|
||||
@JsonKey(name: "links") required this.links,
|
||||
@JsonKey(name: "meta") required this.meta,
|
||||
}) : _data = data;
|
||||
|
||||
factory _$CommentModelImpl.fromJson(Map<String, dynamic> 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<String, dynamic> toJson() {
|
||||
return _$$CommentModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$CommentModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _CommentModel implements CommentModel {
|
||||
const factory _CommentModel(
|
||||
{@JsonKey(name: "data") required final List<Comment> 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<Comment> data,
|
||||
@JsonKey(name: "links") required final Links links,
|
||||
@JsonKey(name: "meta") required final Meta meta,
|
||||
}) = _$CommentModelImpl;
|
||||
|
||||
factory _CommentModel.fromJson(Map<String, dynamic> 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<Comment> 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<Comment> 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<Comment>,
|
||||
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<Comment>,
|
||||
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<Comment> 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<Comment> 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<Comment>,
|
||||
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<Comment>,
|
||||
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<Comment> 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<Comment> childrenComments,
|
||||
@JsonKey(name: "created_at") required this.createdAt,
|
||||
}) : _childrenComments = childrenComments;
|
||||
|
||||
factory _$CommentImpl.fromJson(Map<String, dynamic> 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<String, dynamic> 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<Comment> 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<Comment> childrenComments,
|
||||
@JsonKey(name: "created_at") required final DateTime createdAt,
|
||||
}) = _$CommentImpl;
|
||||
|
||||
factory _Comment.fromJson(Map<String, dynamic> json) = _$CommentImpl.fromJson;
|
||||
|
||||
|
||||
@@ -8,9 +8,10 @@ part of 'comment_model.dart';
|
||||
|
||||
_$CommentModelImpl _$$CommentModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$CommentModelImpl(
|
||||
data: (json['data'] as List<dynamic>)
|
||||
.map((e) => Comment.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
data:
|
||||
(json['data'] as List<dynamic>)
|
||||
.map((e) => Comment.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
@@ -28,9 +29,10 @@ _$CommentImpl _$$CommentImplFromJson(Map<String, dynamic> 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<dynamic>)
|
||||
.map((e) => Comment.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
childrenComments:
|
||||
(json['children_comments'] as List<dynamic>)
|
||||
.map((e) => Comment.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,75 +7,87 @@ part of 'diets_pagination_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$DietsPaginationImpl _$$DietsPaginationImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$DietsPaginationImpl(
|
||||
data: (json['data'] as List<dynamic>)
|
||||
Map<String, dynamic> json,
|
||||
) => _$DietsPaginationImpl(
|
||||
data:
|
||||
(json['data'] as List<dynamic>)
|
||||
.map((e) => Diet.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DietsPaginationImplToJson(
|
||||
_$DietsPaginationImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
_$DietsPaginationImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
_$DietImpl _$$DietImplFromJson(Map<String, dynamic> 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<String, dynamic>),
|
||||
details: json['details'] as String,
|
||||
dailySchedule: (json['daily_schedule'] as Map<String, dynamic>).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<String, dynamic>),
|
||||
details: json['details'] as String,
|
||||
dailySchedule: (json['daily_schedule'] as Map<String, dynamic>).map(
|
||||
(k, e) => MapEntry(
|
||||
int.parse(k),
|
||||
(e as Map<String, dynamic>).map(
|
||||
(k, e) => MapEntry(
|
||||
int.parse(k),
|
||||
(e as Map<String, dynamic>).map(
|
||||
(k, e) => MapEntry(
|
||||
int.parse(k),
|
||||
(e as Map<String, dynamic>).map(
|
||||
(k, e) => MapEntry(int.parse(k),
|
||||
DailySchedule.fromJson(e as Map<String, dynamic>)),
|
||||
)),
|
||||
)),
|
||||
int.parse(k),
|
||||
(e as Map<String, dynamic>).map(
|
||||
(k, e) => MapEntry(
|
||||
int.parse(k),
|
||||
DailySchedule.fromJson(e as Map<String, dynamic>),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
author: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
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<dynamic>)
|
||||
),
|
||||
),
|
||||
author: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
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<dynamic>)
|
||||
.map((e) => DailyNutrition.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DietImplToJson(_$DietImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'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<String, dynamic> _$$DietImplToJson(
|
||||
_$DietImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'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<String, dynamic> json) =>
|
||||
_$CreatedDietImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
);
|
||||
_$CreatedDietImpl(id: (json['id'] as num).toInt());
|
||||
|
||||
Map<String, dynamic> _$$CreatedDietImplToJson(_$CreatedDietImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
};
|
||||
<String, dynamic>{'id': instance.id};
|
||||
|
||||
_$AuthorImpl _$$AuthorImplFromJson(Map<String, dynamic> 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<String, dynamic> _$$AuthorImplToJson(_$AuthorImpl instance) =>
|
||||
<String, dynamic>{
|
||||
@@ -117,9 +125,12 @@ _$DailyScheduleImpl _$$DailyScheduleImplFromJson(Map<String, dynamic> 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<String, dynamic>),
|
||||
dailyNutrition:
|
||||
json['nutrition'] == null
|
||||
? null
|
||||
: DailyNutrition.fromJson(
|
||||
json['nutrition'] as Map<String, dynamic>,
|
||||
),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DailyScheduleImplToJson(_$DailyScheduleImpl instance) =>
|
||||
@@ -162,10 +173,10 @@ _$DailyNutritionImpl _$$DailyNutritionImplFromJson(Map<String, dynamic> json) =>
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DailyNutritionImplToJson(
|
||||
_$DailyNutritionImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'energy': instance.energy,
|
||||
'proteins': instance.proteins,
|
||||
'fats': instance.fats,
|
||||
'carbohydrates': instance.carbohydrates,
|
||||
};
|
||||
_$DailyNutritionImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'energy': instance.energy,
|
||||
'proteins': instance.proteins,
|
||||
'fats': instance.fats,
|
||||
'carbohydrates': instance.carbohydrates,
|
||||
};
|
||||
|
||||
@@ -12,7 +12,8 @@ part of 'feed_blog_post_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> 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<String, dynamic> 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<String, dynamic> 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<String, dynamic> json) =
|
||||
_$FeedBlogPostModelImpl.fromJson;
|
||||
|
||||
@@ -7,37 +7,37 @@ part of 'feed_blog_post_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(
|
||||
Map<String, dynamic> 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<String, dynamic>),
|
||||
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<String, dynamic> 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<String, dynamic>),
|
||||
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<String, dynamic> _$$FeedBlogPostModelImplToJson(
|
||||
_$FeedBlogPostModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'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,
|
||||
) => <String, dynamic>{
|
||||
'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,
|
||||
};
|
||||
|
||||
@@ -12,10 +12,12 @@ part of 'feed_blog_post_settings_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> json) {
|
||||
Map<String, dynamic> 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<FeedBlogPostModel> feedBlogPostList,
|
||||
Meta meta});
|
||||
$Res call({
|
||||
@JsonKey(name: 'data') List<FeedBlogPostModel> 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<FeedBlogPostModel>,
|
||||
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<FeedBlogPostModel>,
|
||||
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<FeedBlogPostModel> feedBlogPostList,
|
||||
Meta meta});
|
||||
$Res call({
|
||||
@JsonKey(name: 'data') List<FeedBlogPostModel> 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<FeedBlogPostModel>,
|
||||
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<FeedBlogPostModel>,
|
||||
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<FeedBlogPostModel> feedBlogPostList,
|
||||
required this.meta})
|
||||
: _feedBlogPostList = feedBlogPostList;
|
||||
const _$FeedBlogPostSettingsModelImpl({
|
||||
@JsonKey(name: 'data')
|
||||
required final List<FeedBlogPostModel> feedBlogPostList,
|
||||
required this.meta,
|
||||
}) : _feedBlogPostList = feedBlogPostList;
|
||||
|
||||
factory _$FeedBlogPostSettingsModelImpl.fromJson(Map<String, dynamic> 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<String, dynamic> toJson() {
|
||||
return _$$FeedBlogPostSettingsModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$FeedBlogPostSettingsModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _FeedBlogPostSettingsModel implements FeedBlogPostSettingsModel {
|
||||
const factory _FeedBlogPostSettingsModel(
|
||||
{@JsonKey(name: 'data')
|
||||
required final List<FeedBlogPostModel> feedBlogPostList,
|
||||
required final Meta meta}) = _$FeedBlogPostSettingsModelImpl;
|
||||
const factory _FeedBlogPostSettingsModel({
|
||||
@JsonKey(name: 'data')
|
||||
required final List<FeedBlogPostModel> feedBlogPostList,
|
||||
required final Meta meta,
|
||||
}) = _$FeedBlogPostSettingsModelImpl;
|
||||
|
||||
factory _FeedBlogPostSettingsModel.fromJson(Map<String, dynamic> 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;
|
||||
}
|
||||
|
||||
@@ -7,17 +7,18 @@ part of 'feed_blog_post_settings_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$FeedBlogPostSettingsModelImpl _$$FeedBlogPostSettingsModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$FeedBlogPostSettingsModelImpl(
|
||||
feedBlogPostList: (json['data'] as List<dynamic>)
|
||||
Map<String, dynamic> json,
|
||||
) => _$FeedBlogPostSettingsModelImpl(
|
||||
feedBlogPostList:
|
||||
(json['data'] as List<dynamic>)
|
||||
.map((e) => FeedBlogPostModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FeedBlogPostSettingsModelImplToJson(
|
||||
_$FeedBlogPostSettingsModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.feedBlogPostList,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
_$FeedBlogPostSettingsModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'data': instance.feedBlogPostList,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
@@ -12,10 +12,12 @@ part of 'feed_consultant_model.dart';
|
||||
T _$identity<T>(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<String, dynamic> json) {
|
||||
Map<String, dynamic> 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<FeedConsultantPaginationModel>
|
||||
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<FeedConsultantModel> 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<FeedConsultantModel>,
|
||||
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<FeedConsultantModel>,
|
||||
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<FeedConsultantModel> 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<FeedConsultantModel>,
|
||||
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<FeedConsultantModel>,
|
||||
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<FeedConsultantModel> data,
|
||||
required this.links,
|
||||
required this.meta})
|
||||
: _data = data;
|
||||
const _$FeedConsultantPaginationModelImpl({
|
||||
required final List<FeedConsultantModel> data,
|
||||
required this.links,
|
||||
required this.meta,
|
||||
}) : _data = data;
|
||||
|
||||
factory _$FeedConsultantPaginationModelImpl.fromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$$FeedConsultantPaginationModelImplFromJson(json);
|
||||
Map<String, dynamic> json,
|
||||
) => _$$FeedConsultantPaginationModelImplFromJson(json);
|
||||
|
||||
final List<FeedConsultantModel> _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<String, dynamic> toJson() {
|
||||
return _$$FeedConsultantPaginationModelImplToJson(
|
||||
this,
|
||||
);
|
||||
return _$$FeedConsultantPaginationModelImplToJson(this);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _FeedConsultantPaginationModel
|
||||
implements FeedConsultantPaginationModel {
|
||||
const factory _FeedConsultantPaginationModel(
|
||||
{required final List<FeedConsultantModel> data,
|
||||
required final Links links,
|
||||
required final Meta meta}) = _$FeedConsultantPaginationModelImpl;
|
||||
const factory _FeedConsultantPaginationModel({
|
||||
required final List<FeedConsultantModel> data,
|
||||
required final Links links,
|
||||
required final Meta meta,
|
||||
}) = _$FeedConsultantPaginationModelImpl;
|
||||
|
||||
factory _FeedConsultantPaginationModel.fromJson(Map<String, dynamic> 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<String, dynamic> 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<BadgeModel> 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<BadgeModel> 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<BadgeModel>,
|
||||
) 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<BadgeModel>,
|
||||
)
|
||||
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<BadgeModel> 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<BadgeModel> 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<BadgeModel>,
|
||||
));
|
||||
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<BadgeModel>,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/// @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<BadgeModel> 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<BadgeModel> badges,
|
||||
}) : _badges = badges;
|
||||
|
||||
factory _$FeedConsultantModelImpl.fromJson(Map<String, dynamic> 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<String, dynamic> 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<BadgeModel> 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<BadgeModel> badges,
|
||||
}) = _$FeedConsultantModelImpl;
|
||||
|
||||
factory _FeedConsultantModel.fromJson(Map<String, dynamic> json) =
|
||||
_$FeedConsultantModelImpl.fromJson;
|
||||
|
||||
@@ -7,46 +7,49 @@ part of 'feed_consultant_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$FeedConsultantPaginationModelImpl
|
||||
_$$FeedConsultantPaginationModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$FeedConsultantPaginationModelImpl(
|
||||
data: (json['data'] as List<dynamic>)
|
||||
.map((e) =>
|
||||
FeedConsultantModel.fromJson(e as Map<String, dynamic>))
|
||||
_$$FeedConsultantPaginationModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$FeedConsultantPaginationModelImpl(
|
||||
data:
|
||||
(json['data'] as List<dynamic>)
|
||||
.map(
|
||||
(e) => FeedConsultantModel.fromJson(e as Map<String, dynamic>),
|
||||
)
|
||||
.toList(),
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FeedConsultantPaginationModelImplToJson(
|
||||
_$FeedConsultantPaginationModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
_$FeedConsultantModelImpl _$$FeedConsultantModelImplFromJson(
|
||||
Map<String, dynamic> 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<dynamic>)
|
||||
.map((e) => BadgeModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FeedConsultantPaginationModelImplToJson(
|
||||
_$FeedConsultantPaginationModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
_$FeedConsultantModelImpl _$$FeedConsultantModelImplFromJson(
|
||||
Map<String, dynamic> 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<dynamic>)
|
||||
.map((e) => BadgeModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$FeedConsultantModelImplToJson(
|
||||
_$FeedConsultantModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'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,
|
||||
) => <String, dynamic>{
|
||||
'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,
|
||||
};
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -7,22 +7,23 @@ part of 'plan_pagination_model.dart';
|
||||
// **************************************************************************
|
||||
|
||||
_$PlanPaginationModelImpl _$$PlanPaginationModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$PlanPaginationModelImpl(
|
||||
data: (json['data'] as List<dynamic>)
|
||||
Map<String, dynamic> json,
|
||||
) => _$PlanPaginationModelImpl(
|
||||
data:
|
||||
(json['data'] as List<dynamic>)
|
||||
.map((e) => PlanModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
links: Links.fromJson(json['links'] as Map<String, dynamic>),
|
||||
meta: Meta.fromJson(json['meta'] as Map<String, dynamic>),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$PlanPaginationModelImplToJson(
|
||||
_$PlanPaginationModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
_$PlanPaginationModelImpl instance,
|
||||
) => <String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
_$PlanModelImpl _$$PlanModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$PlanModelImpl(
|
||||
@@ -35,18 +36,24 @@ _$PlanModelImpl _$$PlanModelImplFromJson(Map<String, dynamic> 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<String, dynamic>),
|
||||
packet2Options: json['packet2_options'] == null
|
||||
? null
|
||||
: PacketOptions.fromJson(
|
||||
json['packet2_options'] as Map<String, dynamic>),
|
||||
packet3Options: json['packet3_options'] == null
|
||||
? null
|
||||
: PacketOptions.fromJson(
|
||||
json['packet3_options'] as Map<String, dynamic>),
|
||||
packet1Options:
|
||||
json['packet1_options'] == null
|
||||
? null
|
||||
: PacketOptions.fromJson(
|
||||
json['packet1_options'] as Map<String, dynamic>,
|
||||
),
|
||||
packet2Options:
|
||||
json['packet2_options'] == null
|
||||
? null
|
||||
: PacketOptions.fromJson(
|
||||
json['packet2_options'] as Map<String, dynamic>,
|
||||
),
|
||||
packet3Options:
|
||||
json['packet3_options'] == null
|
||||
? null
|
||||
: PacketOptions.fromJson(
|
||||
json['packet3_options'] as Map<String, dynamic>,
|
||||
),
|
||||
author: Author.fromJson(json['author'] as Map<String, dynamic>),
|
||||
totalLikes: (json['total_likes'] as num).toInt(),
|
||||
totalViews: (json['total_views'] as num).toInt(),
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user