Files
eatvio_app/lib/features/create_recipe/models/recipe_create_model.freezed.dart

484 lines
16 KiB
Dart

// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'recipe_create_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
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',
);
RecipeCreateModel _$RecipeCreateModelFromJson(Map<String, dynamic> json) {
return _RecipeCreateModel.fromJson(json);
}
/// @nodoc
mixin _$RecipeCreateModel {
String get title => throw _privateConstructorUsedError;
String get state => throw _privateConstructorUsedError;
@JsonKey(name: 'description_md')
String get description => throw _privateConstructorUsedError;
RecipeType get type => throw _privateConstructorUsedError;
@JsonKey(name: 'video_url')
String? get videoUrl => throw _privateConstructorUsedError;
@JsonKey(name: 'cooking_time')
String? get cookingTime => throw _privateConstructorUsedError;
@JsonKey(name: 'active_time')
String? get activeTime => throw _privateConstructorUsedError;
String get servings => throw _privateConstructorUsedError;
@JsonKey(name: 'energy_per_serving')
String get energyPerServing => throw _privateConstructorUsedError;
List<String> get tags => throw _privateConstructorUsedError;
List<Ingredient> get ingredients => throw _privateConstructorUsedError;
List<Step> get steps => throw _privateConstructorUsedError;
/// Serializes this RecipeCreateModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of RecipeCreateModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$RecipeCreateModelCopyWith<RecipeCreateModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $RecipeCreateModelCopyWith<$Res> {
factory $RecipeCreateModelCopyWith(
RecipeCreateModel value,
$Res Function(RecipeCreateModel) then,
) = _$RecipeCreateModelCopyWithImpl<$Res, RecipeCreateModel>;
@useResult
$Res call({
String title,
String state,
@JsonKey(name: 'description_md') 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 _$RecipeCreateModelCopyWithImpl<$Res, $Val extends RecipeCreateModel>
implements $RecipeCreateModelCopyWith<$Res> {
_$RecipeCreateModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of RecipeCreateModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? title = null,
Object? state = null,
Object? description = null,
Object? type = null,
Object? videoUrl = freezed,
Object? cookingTime = freezed,
Object? activeTime = freezed,
Object? servings = null,
Object? energyPerServing = null,
Object? tags = null,
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,
);
}
}
/// @nodoc
abstract class _$$RecipeCreateModelImplCopyWith<$Res>
implements $RecipeCreateModelCopyWith<$Res> {
factory _$$RecipeCreateModelImplCopyWith(
_$RecipeCreateModelImpl value,
$Res Function(_$RecipeCreateModelImpl) then,
) = __$$RecipeCreateModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
String title,
String state,
@JsonKey(name: 'description_md') 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);
/// Create a copy of RecipeCreateModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? title = null,
Object? state = null,
Object? description = null,
Object? type = null,
Object? videoUrl = freezed,
Object? cookingTime = freezed,
Object? activeTime = freezed,
Object? servings = null,
Object? energyPerServing = null,
Object? tags = null,
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>,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$RecipeCreateModelImpl implements _RecipeCreateModel {
const _$RecipeCreateModelImpl({
required this.title,
required this.state,
@JsonKey(name: 'description_md') 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);
@override
final String title;
@override
final String state;
@override
@JsonKey(name: 'description_md')
final String description;
@override
final RecipeType type;
@override
@JsonKey(name: 'video_url')
final String? videoUrl;
@override
@JsonKey(name: 'cooking_time')
final String? cookingTime;
@override
@JsonKey(name: 'active_time')
final String? activeTime;
@override
final String servings;
@override
@JsonKey(name: 'energy_per_serving')
final String energyPerServing;
final List<String> _tags;
@override
List<String> get tags {
if (_tags is EqualUnmodifiableListView) return _tags;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_tags);
}
final List<Ingredient> _ingredients;
@override
List<Ingredient> get ingredients {
if (_ingredients is EqualUnmodifiableListView) return _ingredients;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_ingredients);
}
final List<Step> _steps;
@override
List<Step> get steps {
if (_steps is EqualUnmodifiableListView) return _steps;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(_steps);
}
@override
String toString() {
return 'RecipeCreateModel(title: $title, state: $state, description: $description, type: $type, videoUrl: $videoUrl, cookingTime: $cookingTime, activeTime: $activeTime, servings: $servings, energyPerServing: $energyPerServing, tags: $tags, ingredients: $ingredients, steps: $steps)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$RecipeCreateModelImpl &&
(identical(other.title, title) || other.title == title) &&
(identical(other.state, state) || other.state == state) &&
(identical(other.description, description) ||
other.description == description) &&
(identical(other.type, type) || other.type == type) &&
(identical(other.videoUrl, videoUrl) ||
other.videoUrl == videoUrl) &&
(identical(other.cookingTime, cookingTime) ||
other.cookingTime == cookingTime) &&
(identical(other.activeTime, activeTime) ||
other.activeTime == activeTime) &&
(identical(other.servings, servings) ||
other.servings == servings) &&
(identical(other.energyPerServing, energyPerServing) ||
other.energyPerServing == energyPerServing) &&
const DeepCollectionEquality().equals(other._tags, _tags) &&
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),
);
/// Create a copy of RecipeCreateModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$RecipeCreateModelImplCopyWith<_$RecipeCreateModelImpl> get copyWith =>
__$$RecipeCreateModelImplCopyWithImpl<_$RecipeCreateModelImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$RecipeCreateModelImplToJson(this);
}
}
abstract class _RecipeCreateModel implements RecipeCreateModel {
const factory _RecipeCreateModel({
required final String title,
required final String state,
@JsonKey(name: 'description_md') 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;
@override
String get title;
@override
String get state;
@override
@JsonKey(name: 'description_md')
String get description;
@override
RecipeType get type;
@override
@JsonKey(name: 'video_url')
String? get videoUrl;
@override
@JsonKey(name: 'cooking_time')
String? get cookingTime;
@override
@JsonKey(name: 'active_time')
String? get activeTime;
@override
String get servings;
@override
@JsonKey(name: 'energy_per_serving')
String get energyPerServing;
@override
List<String> get tags;
@override
List<Ingredient> get ingredients;
@override
List<Step> get steps;
/// Create a copy of RecipeCreateModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$RecipeCreateModelImplCopyWith<_$RecipeCreateModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}