Files
eatvio_app/lib/features/feed/models/recipes_model.freezed.dart

1102 lines
35 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 'recipes_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',
);
Recipe _$RecipeFromJson(Map<String, dynamic> json) {
return _Recipes.fromJson(json);
}
/// @nodoc
mixin _$Recipe {
int get id => throw _privateConstructorUsedError;
String get image => throw _privateConstructorUsedError;
String get state => throw _privateConstructorUsedError;
@JsonKey(name: 'cooking_time')
int get cookingTime => throw _privateConstructorUsedError;
@JsonKey(name: 'active_time')
int get activeCookingTime => throw _privateConstructorUsedError;
List<Ingredient>? get ingredients => throw _privateConstructorUsedError;
@JsonKey(name: 'description_md')
String get description => throw _privateConstructorUsedError;
List<Step>? get steps => throw _privateConstructorUsedError;
@JsonKey(name: 'video_url')
String? get videoUrl => throw _privateConstructorUsedError;
@JsonKey(name: 'created_at')
DateTime get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: 'updated_at')
DateTime get updatedAt => throw _privateConstructorUsedError;
String? get title => throw _privateConstructorUsedError;
String? get type => throw _privateConstructorUsedError;
String get slug => throw _privateConstructorUsedError;
@JsonKey(name: 'total_comments')
int get commentsCount => throw _privateConstructorUsedError;
@JsonKey(name: 'was_liked_by_me')
bool get wasLikedByMe => throw _privateConstructorUsedError;
@JsonKey(name: 'is_favorite')
bool get isFavorite => throw _privateConstructorUsedError;
@JsonKey(name: 'energy_per_serving')
double get calories => throw _privateConstructorUsedError;
@JsonKey(name: 'total_likes')
int get likesCount => throw _privateConstructorUsedError;
@JsonKey(name: 'total_views')
int get viewsCount => throw _privateConstructorUsedError;
Author get author => throw _privateConstructorUsedError;
/// Serializes this Recipe to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of Recipe
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$RecipeCopyWith<Recipe> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $RecipeCopyWith<$Res> {
factory $RecipeCopyWith(Recipe value, $Res Function(Recipe) then) =
_$RecipeCopyWithImpl<$Res, Recipe>;
@useResult
$Res call({
int id,
String image,
String state,
@JsonKey(name: 'cooking_time') int cookingTime,
@JsonKey(name: 'active_time') int activeCookingTime,
List<Ingredient>? ingredients,
@JsonKey(name: 'description_md') String description,
List<Step>? steps,
@JsonKey(name: 'video_url') String? videoUrl,
@JsonKey(name: 'created_at') DateTime createdAt,
@JsonKey(name: 'updated_at') DateTime updatedAt,
String? title,
String? type,
String slug,
@JsonKey(name: 'total_comments') int commentsCount,
@JsonKey(name: 'was_liked_by_me') bool wasLikedByMe,
@JsonKey(name: 'is_favorite') bool isFavorite,
@JsonKey(name: 'energy_per_serving') double calories,
@JsonKey(name: 'total_likes') int likesCount,
@JsonKey(name: 'total_views') int viewsCount,
Author author,
});
$AuthorCopyWith<$Res> get author;
}
/// @nodoc
class _$RecipeCopyWithImpl<$Res, $Val extends Recipe>
implements $RecipeCopyWith<$Res> {
_$RecipeCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of Recipe
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? image = null,
Object? state = null,
Object? cookingTime = null,
Object? activeCookingTime = null,
Object? ingredients = freezed,
Object? description = null,
Object? steps = freezed,
Object? videoUrl = freezed,
Object? createdAt = null,
Object? updatedAt = null,
Object? title = freezed,
Object? type = freezed,
Object? slug = null,
Object? commentsCount = null,
Object? wasLikedByMe = null,
Object? isFavorite = null,
Object? calories = null,
Object? likesCount = null,
Object? viewsCount = null,
Object? author = null,
}) {
return _then(
_value.copyWith(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
image:
null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
state:
null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String,
cookingTime:
null == cookingTime
? _value.cookingTime
: cookingTime // ignore: cast_nullable_to_non_nullable
as int,
activeCookingTime:
null == activeCookingTime
? _value.activeCookingTime
: activeCookingTime // ignore: cast_nullable_to_non_nullable
as int,
ingredients:
freezed == ingredients
? _value.ingredients
: ingredients // ignore: cast_nullable_to_non_nullable
as List<Ingredient>?,
description:
null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
steps:
freezed == steps
? _value.steps
: steps // ignore: cast_nullable_to_non_nullable
as List<Step>?,
videoUrl:
freezed == videoUrl
? _value.videoUrl
: videoUrl // ignore: cast_nullable_to_non_nullable
as String?,
createdAt:
null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt:
null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
title:
freezed == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String?,
type:
freezed == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String?,
slug:
null == slug
? _value.slug
: slug // ignore: cast_nullable_to_non_nullable
as String,
commentsCount:
null == commentsCount
? _value.commentsCount
: commentsCount // ignore: cast_nullable_to_non_nullable
as int,
wasLikedByMe:
null == wasLikedByMe
? _value.wasLikedByMe
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
as bool,
isFavorite:
null == isFavorite
? _value.isFavorite
: isFavorite // ignore: cast_nullable_to_non_nullable
as bool,
calories:
null == calories
? _value.calories
: calories // ignore: cast_nullable_to_non_nullable
as double,
likesCount:
null == likesCount
? _value.likesCount
: likesCount // ignore: cast_nullable_to_non_nullable
as int,
viewsCount:
null == viewsCount
? _value.viewsCount
: viewsCount // ignore: cast_nullable_to_non_nullable
as int,
author:
null == author
? _value.author
: author // ignore: cast_nullable_to_non_nullable
as Author,
)
as $Val,
);
}
/// Create a copy of Recipe
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AuthorCopyWith<$Res> get author {
return $AuthorCopyWith<$Res>(_value.author, (value) {
return _then(_value.copyWith(author: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$RecipesImplCopyWith<$Res> implements $RecipeCopyWith<$Res> {
factory _$$RecipesImplCopyWith(
_$RecipesImpl value,
$Res Function(_$RecipesImpl) then,
) = __$$RecipesImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
int id,
String image,
String state,
@JsonKey(name: 'cooking_time') int cookingTime,
@JsonKey(name: 'active_time') int activeCookingTime,
List<Ingredient>? ingredients,
@JsonKey(name: 'description_md') String description,
List<Step>? steps,
@JsonKey(name: 'video_url') String? videoUrl,
@JsonKey(name: 'created_at') DateTime createdAt,
@JsonKey(name: 'updated_at') DateTime updatedAt,
String? title,
String? type,
String slug,
@JsonKey(name: 'total_comments') int commentsCount,
@JsonKey(name: 'was_liked_by_me') bool wasLikedByMe,
@JsonKey(name: 'is_favorite') bool isFavorite,
@JsonKey(name: 'energy_per_serving') double calories,
@JsonKey(name: 'total_likes') int likesCount,
@JsonKey(name: 'total_views') int viewsCount,
Author author,
});
@override
$AuthorCopyWith<$Res> get author;
}
/// @nodoc
class __$$RecipesImplCopyWithImpl<$Res>
extends _$RecipeCopyWithImpl<$Res, _$RecipesImpl>
implements _$$RecipesImplCopyWith<$Res> {
__$$RecipesImplCopyWithImpl(
_$RecipesImpl _value,
$Res Function(_$RecipesImpl) _then,
) : super(_value, _then);
/// Create a copy of Recipe
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? image = null,
Object? state = null,
Object? cookingTime = null,
Object? activeCookingTime = null,
Object? ingredients = freezed,
Object? description = null,
Object? steps = freezed,
Object? videoUrl = freezed,
Object? createdAt = null,
Object? updatedAt = null,
Object? title = freezed,
Object? type = freezed,
Object? slug = null,
Object? commentsCount = null,
Object? wasLikedByMe = null,
Object? isFavorite = null,
Object? calories = null,
Object? likesCount = null,
Object? viewsCount = null,
Object? author = null,
}) {
return _then(
_$RecipesImpl(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
image:
null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
state:
null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String,
cookingTime:
null == cookingTime
? _value.cookingTime
: cookingTime // ignore: cast_nullable_to_non_nullable
as int,
activeCookingTime:
null == activeCookingTime
? _value.activeCookingTime
: activeCookingTime // ignore: cast_nullable_to_non_nullable
as int,
ingredients:
freezed == ingredients
? _value._ingredients
: ingredients // ignore: cast_nullable_to_non_nullable
as List<Ingredient>?,
description:
null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
steps:
freezed == steps
? _value._steps
: steps // ignore: cast_nullable_to_non_nullable
as List<Step>?,
videoUrl:
freezed == videoUrl
? _value.videoUrl
: videoUrl // ignore: cast_nullable_to_non_nullable
as String?,
createdAt:
null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt:
null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
title:
freezed == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String?,
type:
freezed == type
? _value.type
: type // ignore: cast_nullable_to_non_nullable
as String?,
slug:
null == slug
? _value.slug
: slug // ignore: cast_nullable_to_non_nullable
as String,
commentsCount:
null == commentsCount
? _value.commentsCount
: commentsCount // ignore: cast_nullable_to_non_nullable
as int,
wasLikedByMe:
null == wasLikedByMe
? _value.wasLikedByMe
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
as bool,
isFavorite:
null == isFavorite
? _value.isFavorite
: isFavorite // ignore: cast_nullable_to_non_nullable
as bool,
calories:
null == calories
? _value.calories
: calories // ignore: cast_nullable_to_non_nullable
as double,
likesCount:
null == likesCount
? _value.likesCount
: likesCount // ignore: cast_nullable_to_non_nullable
as int,
viewsCount:
null == viewsCount
? _value.viewsCount
: viewsCount // ignore: cast_nullable_to_non_nullable
as int,
author:
null == author
? _value.author
: author // ignore: cast_nullable_to_non_nullable
as Author,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$RecipesImpl implements _Recipes {
const _$RecipesImpl({
required this.id,
required this.image,
required this.state,
@JsonKey(name: 'cooking_time') required this.cookingTime,
@JsonKey(name: 'active_time') required this.activeCookingTime,
required final List<Ingredient>? ingredients,
@JsonKey(name: 'description_md') required this.description,
required final List<Step>? steps,
@JsonKey(name: 'video_url') required this.videoUrl,
@JsonKey(name: 'created_at') required this.createdAt,
@JsonKey(name: 'updated_at') required this.updatedAt,
required this.title,
required this.type,
required this.slug,
@JsonKey(name: 'total_comments') required this.commentsCount,
@JsonKey(name: 'was_liked_by_me') required this.wasLikedByMe,
@JsonKey(name: 'is_favorite') required this.isFavorite,
@JsonKey(name: 'energy_per_serving') required this.calories,
@JsonKey(name: 'total_likes') required this.likesCount,
@JsonKey(name: 'total_views') required this.viewsCount,
required this.author,
}) : _ingredients = ingredients,
_steps = steps;
factory _$RecipesImpl.fromJson(Map<String, dynamic> json) =>
_$$RecipesImplFromJson(json);
@override
final int id;
@override
final String image;
@override
final String state;
@override
@JsonKey(name: 'cooking_time')
final int cookingTime;
@override
@JsonKey(name: 'active_time')
final int activeCookingTime;
final List<Ingredient>? _ingredients;
@override
List<Ingredient>? get ingredients {
final value = _ingredients;
if (value == null) return null;
if (_ingredients is EqualUnmodifiableListView) return _ingredients;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override
@JsonKey(name: 'description_md')
final String description;
final List<Step>? _steps;
@override
List<Step>? get steps {
final value = _steps;
if (value == null) return null;
if (_steps is EqualUnmodifiableListView) return _steps;
// ignore: implicit_dynamic_type
return EqualUnmodifiableListView(value);
}
@override
@JsonKey(name: 'video_url')
final String? videoUrl;
@override
@JsonKey(name: 'created_at')
final DateTime createdAt;
@override
@JsonKey(name: 'updated_at')
final DateTime updatedAt;
@override
final String? title;
@override
final String? type;
@override
final String slug;
@override
@JsonKey(name: 'total_comments')
final int commentsCount;
@override
@JsonKey(name: 'was_liked_by_me')
final bool wasLikedByMe;
@override
@JsonKey(name: 'is_favorite')
final bool isFavorite;
@override
@JsonKey(name: 'energy_per_serving')
final double calories;
@override
@JsonKey(name: 'total_likes')
final int likesCount;
@override
@JsonKey(name: 'total_views')
final int viewsCount;
@override
final Author author;
@override
String toString() {
return 'Recipe(id: $id, image: $image, state: $state, cookingTime: $cookingTime, activeCookingTime: $activeCookingTime, ingredients: $ingredients, description: $description, steps: $steps, videoUrl: $videoUrl, createdAt: $createdAt, updatedAt: $updatedAt, title: $title, type: $type, slug: $slug, commentsCount: $commentsCount, wasLikedByMe: $wasLikedByMe, isFavorite: $isFavorite, calories: $calories, likesCount: $likesCount, viewsCount: $viewsCount, author: $author)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$RecipesImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.image, image) || other.image == image) &&
(identical(other.state, state) || other.state == state) &&
(identical(other.cookingTime, cookingTime) ||
other.cookingTime == cookingTime) &&
(identical(other.activeCookingTime, activeCookingTime) ||
other.activeCookingTime == activeCookingTime) &&
const DeepCollectionEquality().equals(
other._ingredients,
_ingredients,
) &&
(identical(other.description, description) ||
other.description == description) &&
const DeepCollectionEquality().equals(other._steps, _steps) &&
(identical(other.videoUrl, videoUrl) ||
other.videoUrl == videoUrl) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.type, type) || other.type == type) &&
(identical(other.slug, slug) || other.slug == slug) &&
(identical(other.commentsCount, commentsCount) ||
other.commentsCount == commentsCount) &&
(identical(other.wasLikedByMe, wasLikedByMe) ||
other.wasLikedByMe == wasLikedByMe) &&
(identical(other.isFavorite, isFavorite) ||
other.isFavorite == isFavorite) &&
(identical(other.calories, calories) ||
other.calories == calories) &&
(identical(other.likesCount, likesCount) ||
other.likesCount == likesCount) &&
(identical(other.viewsCount, viewsCount) ||
other.viewsCount == viewsCount) &&
(identical(other.author, author) || other.author == author));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hashAll([
runtimeType,
id,
image,
state,
cookingTime,
activeCookingTime,
const DeepCollectionEquality().hash(_ingredients),
description,
const DeepCollectionEquality().hash(_steps),
videoUrl,
createdAt,
updatedAt,
title,
type,
slug,
commentsCount,
wasLikedByMe,
isFavorite,
calories,
likesCount,
viewsCount,
author,
]);
/// Create a copy of Recipe
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
__$$RecipesImplCopyWithImpl<_$RecipesImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$RecipesImplToJson(this);
}
}
abstract class _Recipes implements Recipe {
const factory _Recipes({
required final int id,
required final String image,
required final String state,
@JsonKey(name: 'cooking_time') required final int cookingTime,
@JsonKey(name: 'active_time') required final int activeCookingTime,
required final List<Ingredient>? ingredients,
@JsonKey(name: 'description_md') required final String description,
required final List<Step>? steps,
@JsonKey(name: 'video_url') required final String? videoUrl,
@JsonKey(name: 'created_at') required final DateTime createdAt,
@JsonKey(name: 'updated_at') required final DateTime updatedAt,
required final String? title,
required final String? type,
required final String slug,
@JsonKey(name: 'total_comments') required final int commentsCount,
@JsonKey(name: 'was_liked_by_me') required final bool wasLikedByMe,
@JsonKey(name: 'is_favorite') required final bool isFavorite,
@JsonKey(name: 'energy_per_serving') required final double calories,
@JsonKey(name: 'total_likes') required final int likesCount,
@JsonKey(name: 'total_views') required final int viewsCount,
required final Author author,
}) = _$RecipesImpl;
factory _Recipes.fromJson(Map<String, dynamic> json) = _$RecipesImpl.fromJson;
@override
int get id;
@override
String get image;
@override
String get state;
@override
@JsonKey(name: 'cooking_time')
int get cookingTime;
@override
@JsonKey(name: 'active_time')
int get activeCookingTime;
@override
List<Ingredient>? get ingredients;
@override
@JsonKey(name: 'description_md')
String get description;
@override
List<Step>? get steps;
@override
@JsonKey(name: 'video_url')
String? get videoUrl;
@override
@JsonKey(name: 'created_at')
DateTime get createdAt;
@override
@JsonKey(name: 'updated_at')
DateTime get updatedAt;
@override
String? get title;
@override
String? get type;
@override
String get slug;
@override
@JsonKey(name: 'total_comments')
int get commentsCount;
@override
@JsonKey(name: 'was_liked_by_me')
bool get wasLikedByMe;
@override
@JsonKey(name: 'is_favorite')
bool get isFavorite;
@override
@JsonKey(name: 'energy_per_serving')
double get calories;
@override
@JsonKey(name: 'total_likes')
int get likesCount;
@override
@JsonKey(name: 'total_views')
int get viewsCount;
@override
Author get author;
/// Create a copy of Recipe
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$RecipesImplCopyWith<_$RecipesImpl> get copyWith =>
throw _privateConstructorUsedError;
}
Ingredient _$IngredientFromJson(Map<String, dynamic> json) {
return _Ingredient.fromJson(json);
}
/// @nodoc
mixin _$Ingredient {
String get name => throw _privateConstructorUsedError;
String? get unit => throw _privateConstructorUsedError;
String get portion => throw _privateConstructorUsedError;
/// Serializes this Ingredient to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of Ingredient
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$IngredientCopyWith<Ingredient> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $IngredientCopyWith<$Res> {
factory $IngredientCopyWith(
Ingredient value,
$Res Function(Ingredient) then,
) = _$IngredientCopyWithImpl<$Res, Ingredient>;
@useResult
$Res call({String name, String? unit, String portion});
}
/// @nodoc
class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient>
implements $IngredientCopyWith<$Res> {
_$IngredientCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of Ingredient
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? name = null,
Object? unit = freezed,
Object? portion = null,
}) {
return _then(
_value.copyWith(
name:
null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
unit:
freezed == unit
? _value.unit
: unit // ignore: cast_nullable_to_non_nullable
as String?,
portion:
null == portion
? _value.portion
: portion // ignore: cast_nullable_to_non_nullable
as String,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$IngredientImplCopyWith<$Res>
implements $IngredientCopyWith<$Res> {
factory _$$IngredientImplCopyWith(
_$IngredientImpl value,
$Res Function(_$IngredientImpl) then,
) = __$$IngredientImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({String name, String? unit, String portion});
}
/// @nodoc
class __$$IngredientImplCopyWithImpl<$Res>
extends _$IngredientCopyWithImpl<$Res, _$IngredientImpl>
implements _$$IngredientImplCopyWith<$Res> {
__$$IngredientImplCopyWithImpl(
_$IngredientImpl _value,
$Res Function(_$IngredientImpl) _then,
) : super(_value, _then);
/// Create a copy of Ingredient
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? name = null,
Object? unit = freezed,
Object? portion = null,
}) {
return _then(
_$IngredientImpl(
name:
null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
unit:
freezed == unit
? _value.unit
: unit // ignore: cast_nullable_to_non_nullable
as String?,
portion:
null == portion
? _value.portion
: portion // ignore: cast_nullable_to_non_nullable
as String,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$IngredientImpl implements _Ingredient {
const _$IngredientImpl({
required this.name,
this.unit,
required this.portion,
});
factory _$IngredientImpl.fromJson(Map<String, dynamic> json) =>
_$$IngredientImplFromJson(json);
@override
final String name;
@override
final String? unit;
@override
final String portion;
@override
String toString() {
return 'Ingredient(name: $name, unit: $unit, portion: $portion)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$IngredientImpl &&
(identical(other.name, name) || other.name == name) &&
(identical(other.unit, unit) || other.unit == unit) &&
(identical(other.portion, portion) || other.portion == portion));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, name, unit, portion);
/// Create a copy of Ingredient
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
__$$IngredientImplCopyWithImpl<_$IngredientImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$IngredientImplToJson(this);
}
}
abstract class _Ingredient implements Ingredient {
const factory _Ingredient({
required final String name,
final String? unit,
required final String portion,
}) = _$IngredientImpl;
factory _Ingredient.fromJson(Map<String, dynamic> json) =
_$IngredientImpl.fromJson;
@override
String get name;
@override
String? get unit;
@override
String get portion;
/// Create a copy of Ingredient
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
throw _privateConstructorUsedError;
}
Step _$StepFromJson(Map<String, dynamic> json) {
return _Step.fromJson(json);
}
/// @nodoc
mixin _$Step {
String get image => throw _privateConstructorUsedError;
@JsonKey(name: 'description_md')
String get description => throw _privateConstructorUsedError;
/// Serializes this Step to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of Step
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$StepCopyWith<Step> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $StepCopyWith<$Res> {
factory $StepCopyWith(Step value, $Res Function(Step) then) =
_$StepCopyWithImpl<$Res, Step>;
@useResult
$Res call({
String image,
@JsonKey(name: 'description_md') String description,
});
}
/// @nodoc
class _$StepCopyWithImpl<$Res, $Val extends Step>
implements $StepCopyWith<$Res> {
_$StepCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of Step
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? image = null, Object? description = null}) {
return _then(
_value.copyWith(
image:
null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
description:
null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$StepImplCopyWith<$Res> implements $StepCopyWith<$Res> {
factory _$$StepImplCopyWith(
_$StepImpl value,
$Res Function(_$StepImpl) then,
) = __$$StepImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
String image,
@JsonKey(name: 'description_md') String description,
});
}
/// @nodoc
class __$$StepImplCopyWithImpl<$Res>
extends _$StepCopyWithImpl<$Res, _$StepImpl>
implements _$$StepImplCopyWith<$Res> {
__$$StepImplCopyWithImpl(_$StepImpl _value, $Res Function(_$StepImpl) _then)
: super(_value, _then);
/// Create a copy of Step
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({Object? image = null, Object? description = null}) {
return _then(
_$StepImpl(
image:
null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
description:
null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$StepImpl implements _Step {
const _$StepImpl({
required this.image,
@JsonKey(name: 'description_md') required this.description,
});
factory _$StepImpl.fromJson(Map<String, dynamic> json) =>
_$$StepImplFromJson(json);
@override
final String image;
@override
@JsonKey(name: 'description_md')
final String description;
@override
String toString() {
return 'Step(image: $image, description: $description)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$StepImpl &&
(identical(other.image, image) || other.image == image) &&
(identical(other.description, description) ||
other.description == description));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(runtimeType, image, description);
/// Create a copy of Step
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
__$$StepImplCopyWithImpl<_$StepImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$StepImplToJson(this);
}
}
abstract class _Step implements Step {
const factory _Step({
required final String image,
@JsonKey(name: 'description_md') required final String description,
}) = _$StepImpl;
factory _Step.fromJson(Map<String, dynamic> json) = _$StepImpl.fromJson;
@override
String get image;
@override
@JsonKey(name: 'description_md')
String get description;
/// Create a copy of Step
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
throw _privateConstructorUsedError;
}