Files
eatvio_app/lib/features/recipes/models/recipe_model.freezed.dart

357 lines
11 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_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');
RecipeModel _$RecipeModelFromJson(Map<String, dynamic> json) {
return _RecipeModel.fromJson(json);
}
/// @nodoc
mixin _$RecipeModel {
int? get id => throw _privateConstructorUsedError;
List<Ingredient> get ingredients => throw _privateConstructorUsedError;
List<Step> get steps => throw _privateConstructorUsedError;
String get state => throw _privateConstructorUsedError;
String get description => throw _privateConstructorUsedError;
String get type => throw _privateConstructorUsedError;
Image get image => throw _privateConstructorUsedError;
String? get video_url => throw _privateConstructorUsedError;
num? get cooking_time => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$RecipeModelCopyWith<RecipeModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $RecipeModelCopyWith<$Res> {
factory $RecipeModelCopyWith(
RecipeModel value, $Res Function(RecipeModel) then) =
_$RecipeModelCopyWithImpl<$Res, RecipeModel>;
@useResult
$Res call(
{int? id,
List<Ingredient> ingredients,
List<Step> steps,
String state,
String description,
String type,
Image image,
String? video_url,
num? cooking_time});
$ImageCopyWith<$Res> get image;
}
/// @nodoc
class _$RecipeModelCopyWithImpl<$Res, $Val extends RecipeModel>
implements $RecipeModelCopyWith<$Res> {
_$RecipeModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = freezed,
Object? ingredients = null,
Object? steps = null,
Object? state = null,
Object? description = null,
Object? type = null,
Object? image = null,
Object? video_url = freezed,
Object? cooking_time = freezed,
}) {
return _then(_value.copyWith(
id: freezed == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int?,
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>,
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 String,
image: null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as Image,
video_url: freezed == video_url
? _value.video_url
: video_url // ignore: cast_nullable_to_non_nullable
as String?,
cooking_time: freezed == cooking_time
? _value.cooking_time
: cooking_time // ignore: cast_nullable_to_non_nullable
as num?,
) as $Val);
}
@override
@pragma('vm:prefer-inline')
$ImageCopyWith<$Res> get image {
return $ImageCopyWith<$Res>(_value.image, (value) {
return _then(_value.copyWith(image: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$RecipeModelImplCopyWith<$Res>
implements $RecipeModelCopyWith<$Res> {
factory _$$RecipeModelImplCopyWith(
_$RecipeModelImpl value, $Res Function(_$RecipeModelImpl) then) =
__$$RecipeModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int? id,
List<Ingredient> ingredients,
List<Step> steps,
String state,
String description,
String type,
Image image,
String? video_url,
num? cooking_time});
@override
$ImageCopyWith<$Res> get image;
}
/// @nodoc
class __$$RecipeModelImplCopyWithImpl<$Res>
extends _$RecipeModelCopyWithImpl<$Res, _$RecipeModelImpl>
implements _$$RecipeModelImplCopyWith<$Res> {
__$$RecipeModelImplCopyWithImpl(
_$RecipeModelImpl _value, $Res Function(_$RecipeModelImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = freezed,
Object? ingredients = null,
Object? steps = null,
Object? state = null,
Object? description = null,
Object? type = null,
Object? image = null,
Object? video_url = freezed,
Object? cooking_time = freezed,
}) {
return _then(_$RecipeModelImpl(
id: freezed == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int?,
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>,
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 String,
image: null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as Image,
video_url: freezed == video_url
? _value.video_url
: video_url // ignore: cast_nullable_to_non_nullable
as String?,
cooking_time: freezed == cooking_time
? _value.cooking_time
: cooking_time // ignore: cast_nullable_to_non_nullable
as num?,
));
}
}
/// @nodoc
@JsonSerializable()
class _$RecipeModelImpl implements _RecipeModel {
const _$RecipeModelImpl(
{this.id,
required final List<Ingredient> ingredients,
required final List<Step> steps,
required this.state,
required this.description,
required this.type,
required this.image,
this.video_url,
this.cooking_time})
: _ingredients = ingredients,
_steps = steps;
factory _$RecipeModelImpl.fromJson(Map<String, dynamic> json) =>
_$$RecipeModelImplFromJson(json);
@override
final int? id;
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
final String state;
@override
final String description;
@override
final String type;
@override
final Image image;
@override
final String? video_url;
@override
final num? cooking_time;
@override
String toString() {
return 'RecipeModel(id: $id, ingredients: $ingredients, steps: $steps, state: $state, description: $description, type: $type, image: $image, video_url: $video_url, cooking_time: $cooking_time)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$RecipeModelImpl &&
(identical(other.id, id) || other.id == id) &&
const DeepCollectionEquality()
.equals(other._ingredients, _ingredients) &&
const DeepCollectionEquality().equals(other._steps, _steps) &&
(identical(other.state, state) || other.state == state) &&
(identical(other.description, description) ||
other.description == description) &&
(identical(other.type, type) || other.type == type) &&
(identical(other.image, image) || other.image == image) &&
(identical(other.video_url, video_url) ||
other.video_url == video_url) &&
(identical(other.cooking_time, cooking_time) ||
other.cooking_time == cooking_time));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(
runtimeType,
id,
const DeepCollectionEquality().hash(_ingredients),
const DeepCollectionEquality().hash(_steps),
state,
description,
type,
image,
video_url,
cooking_time);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$RecipeModelImplCopyWith<_$RecipeModelImpl> get copyWith =>
__$$RecipeModelImplCopyWithImpl<_$RecipeModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$RecipeModelImplToJson(
this,
);
}
}
abstract class _RecipeModel implements RecipeModel {
const factory _RecipeModel(
{final int? id,
required final List<Ingredient> ingredients,
required final List<Step> steps,
required final String state,
required final String description,
required final String type,
required final Image image,
final String? video_url,
final num? cooking_time}) = _$RecipeModelImpl;
factory _RecipeModel.fromJson(Map<String, dynamic> json) =
_$RecipeModelImpl.fromJson;
@override
int? get id;
@override
List<Ingredient> get ingredients;
@override
List<Step> get steps;
@override
String get state;
@override
String get description;
@override
String get type;
@override
Image get image;
@override
String? get video_url;
@override
num? get cooking_time;
@override
@JsonKey(ignore: true)
_$$RecipeModelImplCopyWith<_$RecipeModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}