forked from eatvio/eatvio_app
fix: remove ignored files
This commit is contained in:
@@ -1,602 +0,0 @@
|
||||
// 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_entity.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');
|
||||
|
||||
/// @nodoc
|
||||
mixin _$RecipeCreateEntity {
|
||||
String? get title => throw _privateConstructorUsedError;
|
||||
TypeOfRecipe? get typeOfRecipe => throw _privateConstructorUsedError;
|
||||
int? get countOfPortions => throw _privateConstructorUsedError;
|
||||
double? get energyInOnePortion => throw _privateConstructorUsedError;
|
||||
int? get totalCookHours => throw _privateConstructorUsedError;
|
||||
int? get totalCookMinutes => throw _privateConstructorUsedError;
|
||||
int? get activeCookHours => throw _privateConstructorUsedError;
|
||||
int? get activeCookMinutes => throw _privateConstructorUsedError;
|
||||
String? get description => throw _privateConstructorUsedError;
|
||||
File? get image => throw _privateConstructorUsedError;
|
||||
String? get videoUrl => throw _privateConstructorUsedError;
|
||||
List<Ingredient> get ingredients => throw _privateConstructorUsedError;
|
||||
List<StepEntity> get steps => throw _privateConstructorUsedError;
|
||||
List<String> get tags => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of RecipeCreateEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$RecipeCreateEntityCopyWith<RecipeCreateEntity> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipeCreateEntityCopyWith<$Res> {
|
||||
factory $RecipeCreateEntityCopyWith(
|
||||
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});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipeCreateEntityCopyWithImpl<$Res, $Val extends RecipeCreateEntity>
|
||||
implements $RecipeCreateEntityCopyWith<$Res> {
|
||||
_$RecipeCreateEntityCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of RecipeCreateEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? title = freezed,
|
||||
Object? typeOfRecipe = freezed,
|
||||
Object? countOfPortions = freezed,
|
||||
Object? energyInOnePortion = freezed,
|
||||
Object? totalCookHours = freezed,
|
||||
Object? totalCookMinutes = freezed,
|
||||
Object? activeCookHours = freezed,
|
||||
Object? activeCookMinutes = freezed,
|
||||
Object? description = freezed,
|
||||
Object? image = freezed,
|
||||
Object? videoUrl = freezed,
|
||||
Object? ingredients = null,
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipeCreateEntityImplCopyWith<$Res>
|
||||
implements $RecipeCreateEntityCopyWith<$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});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipeCreateEntityImplCopyWithImpl<$Res>
|
||||
extends _$RecipeCreateEntityCopyWithImpl<$Res, _$RecipeCreateEntityImpl>
|
||||
implements _$$RecipeCreateEntityImplCopyWith<$Res> {
|
||||
__$$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.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? title = freezed,
|
||||
Object? typeOfRecipe = freezed,
|
||||
Object? countOfPortions = freezed,
|
||||
Object? energyInOnePortion = freezed,
|
||||
Object? totalCookHours = freezed,
|
||||
Object? totalCookMinutes = freezed,
|
||||
Object? activeCookHours = freezed,
|
||||
Object? activeCookMinutes = freezed,
|
||||
Object? description = freezed,
|
||||
Object? image = freezed,
|
||||
Object? videoUrl = freezed,
|
||||
Object? ingredients = null,
|
||||
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>,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @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._();
|
||||
|
||||
@override
|
||||
final String? title;
|
||||
@override
|
||||
final TypeOfRecipe? typeOfRecipe;
|
||||
@override
|
||||
final int? countOfPortions;
|
||||
@override
|
||||
final double? energyInOnePortion;
|
||||
@override
|
||||
final int? totalCookHours;
|
||||
@override
|
||||
final int? totalCookMinutes;
|
||||
@override
|
||||
final int? activeCookHours;
|
||||
@override
|
||||
final int? activeCookMinutes;
|
||||
@override
|
||||
final String? description;
|
||||
@override
|
||||
final File? image;
|
||||
@override
|
||||
final String? videoUrl;
|
||||
final List<Ingredient> _ingredients;
|
||||
@override
|
||||
List<Ingredient> get ingredients {
|
||||
if (_ingredients is EqualUnmodifiableListView) return _ingredients;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_ingredients);
|
||||
}
|
||||
|
||||
final List<StepEntity> _steps;
|
||||
@override
|
||||
List<StepEntity> get steps {
|
||||
if (_steps is EqualUnmodifiableListView) return _steps;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_steps);
|
||||
}
|
||||
|
||||
final List<String> _tags;
|
||||
@override
|
||||
List<String> get tags {
|
||||
if (_tags is EqualUnmodifiableListView) return _tags;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_tags);
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'RecipeCreateEntity(title: $title, typeOfRecipe: $typeOfRecipe, countOfPortions: $countOfPortions, energyInOnePortion: $energyInOnePortion, totalCookHours: $totalCookHours, totalCookMinutes: $totalCookMinutes, activeCookHours: $activeCookHours, activeCookMinutes: $activeCookMinutes, description: $description, image: $image, videoUrl: $videoUrl, ingredients: $ingredients, steps: $steps, tags: $tags)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipeCreateEntityImpl &&
|
||||
(identical(other.title, title) || other.title == title) &&
|
||||
(identical(other.typeOfRecipe, typeOfRecipe) ||
|
||||
other.typeOfRecipe == typeOfRecipe) &&
|
||||
(identical(other.countOfPortions, countOfPortions) ||
|
||||
other.countOfPortions == countOfPortions) &&
|
||||
(identical(other.energyInOnePortion, energyInOnePortion) ||
|
||||
other.energyInOnePortion == energyInOnePortion) &&
|
||||
(identical(other.totalCookHours, totalCookHours) ||
|
||||
other.totalCookHours == totalCookHours) &&
|
||||
(identical(other.totalCookMinutes, totalCookMinutes) ||
|
||||
other.totalCookMinutes == totalCookMinutes) &&
|
||||
(identical(other.activeCookHours, activeCookHours) ||
|
||||
other.activeCookHours == activeCookHours) &&
|
||||
(identical(other.activeCookMinutes, activeCookMinutes) ||
|
||||
other.activeCookMinutes == activeCookMinutes) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.videoUrl, videoUrl) ||
|
||||
other.videoUrl == videoUrl) &&
|
||||
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));
|
||||
|
||||
/// Create a copy of RecipeCreateEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipeCreateEntityImplCopyWith<_$RecipeCreateEntityImpl> get copyWith =>
|
||||
__$$RecipeCreateEntityImplCopyWithImpl<_$RecipeCreateEntityImpl>(
|
||||
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 _RecipeCreateEntity._() : super._();
|
||||
|
||||
@override
|
||||
String? get title;
|
||||
@override
|
||||
TypeOfRecipe? get typeOfRecipe;
|
||||
@override
|
||||
int? get countOfPortions;
|
||||
@override
|
||||
double? get energyInOnePortion;
|
||||
@override
|
||||
int? get totalCookHours;
|
||||
@override
|
||||
int? get totalCookMinutes;
|
||||
@override
|
||||
int? get activeCookHours;
|
||||
@override
|
||||
int? get activeCookMinutes;
|
||||
@override
|
||||
String? get description;
|
||||
@override
|
||||
File? get image;
|
||||
@override
|
||||
String? get videoUrl;
|
||||
@override
|
||||
List<Ingredient> get ingredients;
|
||||
@override
|
||||
List<StepEntity> get steps;
|
||||
@override
|
||||
List<String> get tags;
|
||||
|
||||
/// Create a copy of RecipeCreateEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipeCreateEntityImplCopyWith<_$RecipeCreateEntityImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$StepEntity {
|
||||
String? get description => throw _privateConstructorUsedError;
|
||||
File? get image => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of StepEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$StepEntityCopyWith<StepEntity> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $StepEntityCopyWith<$Res> {
|
||||
factory $StepEntityCopyWith(
|
||||
StepEntity value, $Res Function(StepEntity) then) =
|
||||
_$StepEntityCopyWithImpl<$Res, StepEntity>;
|
||||
@useResult
|
||||
$Res call({String? description, File? image});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$StepEntityCopyWithImpl<$Res, $Val extends StepEntity>
|
||||
implements $StepEntityCopyWith<$Res> {
|
||||
_$StepEntityCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _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(_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);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$StepEntityImplCopyWith<$Res>
|
||||
implements $StepEntityCopyWith<$Res> {
|
||||
factory _$$StepEntityImplCopyWith(
|
||||
_$StepEntityImpl value, $Res Function(_$StepEntityImpl) then) =
|
||||
__$$StepEntityImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String? description, File? image});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$StepEntityImplCopyWithImpl<$Res>
|
||||
extends _$StepEntityCopyWithImpl<$Res, _$StepEntityImpl>
|
||||
implements _$$StepEntityImplCopyWith<$Res> {
|
||||
__$$StepEntityImplCopyWithImpl(
|
||||
_$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?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$StepEntityImpl extends _StepEntity {
|
||||
const _$StepEntityImpl({this.description, this.image}) : super._();
|
||||
|
||||
@override
|
||||
final String? description;
|
||||
@override
|
||||
final File? image;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'StepEntity(description: $description, image: $image)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$StepEntityImpl &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
(identical(other.image, image) || other.image == image));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, description, image);
|
||||
|
||||
/// Create a copy of StepEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$StepEntityImplCopyWith<_$StepEntityImpl> get copyWith =>
|
||||
__$$StepEntityImplCopyWithImpl<_$StepEntityImpl>(this, _$identity);
|
||||
}
|
||||
|
||||
abstract class _StepEntity extends StepEntity {
|
||||
const factory _StepEntity({final String? description, final File? image}) =
|
||||
_$StepEntityImpl;
|
||||
const _StepEntity._() : super._();
|
||||
|
||||
@override
|
||||
String? get description;
|
||||
@override
|
||||
File? get image;
|
||||
|
||||
/// Create a copy of StepEntity
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$StepEntityImplCopyWith<_$StepEntityImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1,200 +0,0 @@
|
||||
// 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 'ingredient.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');
|
||||
|
||||
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 = 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);
|
||||
}
|
||||
}
|
||||
|
||||
/// @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 = 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,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$IngredientImpl implements _Ingredient {
|
||||
const _$IngredientImpl(
|
||||
{required this.name, required 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,
|
||||
required 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;
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'ingredient.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$IngredientImpl _$$IngredientImplFromJson(Map<String, dynamic> json) =>
|
||||
_$IngredientImpl(
|
||||
name: json['name'] as String,
|
||||
unit: json['unit'] as String,
|
||||
portion: json['portion'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'unit': instance.unit,
|
||||
'portion': instance.portion,
|
||||
};
|
||||
@@ -1,177 +0,0 @@
|
||||
// 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 'product.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');
|
||||
|
||||
Product _$ProductFromJson(Map<String, dynamic> json) {
|
||||
return _Product.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$Product {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Product to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of Product
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$ProductCopyWith<Product> get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ProductCopyWith<$Res> {
|
||||
factory $ProductCopyWith(Product value, $Res Function(Product) then) =
|
||||
_$ProductCopyWithImpl<$Res, Product>;
|
||||
@useResult
|
||||
$Res call({int id, String name});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ProductCopyWithImpl<$Res, $Val extends Product>
|
||||
implements $ProductCopyWith<$Res> {
|
||||
_$ProductCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _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(_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>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id, String name});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProductImplCopyWithImpl<$Res>
|
||||
extends _$ProductCopyWithImpl<$Res, _$ProductImpl>
|
||||
implements _$$ProductImplCopyWith<$Res> {
|
||||
__$$ProductImplCopyWithImpl(
|
||||
_$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,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$ProductImpl implements _Product {
|
||||
const _$ProductImpl({required this.id, required this.name});
|
||||
|
||||
factory _$ProductImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ProductImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@override
|
||||
final String name;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'Product(id: $id, name: $name)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$ProductImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.name, name) || other.name == name));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, name);
|
||||
|
||||
/// Create a copy of Product
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
|
||||
__$$ProductImplCopyWithImpl<_$ProductImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
return _$$ProductImplToJson(
|
||||
this,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _Product implements Product {
|
||||
const factory _Product({required final int id, required final String name}) =
|
||||
_$ProductImpl;
|
||||
|
||||
factory _Product.fromJson(Map<String, dynamic> json) = _$ProductImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
@override
|
||||
String get name;
|
||||
|
||||
/// Create a copy of Product
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'product.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ProductImpl _$$ProductImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ProductImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ProductImplToJson(_$ProductImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
};
|
||||
@@ -1,445 +0,0 @@
|
||||
// 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;
|
||||
}
|
||||
@@ -1,55 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'recipe_create_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$RecipeCreateModelImpl _$$RecipeCreateModelImplFromJson(
|
||||
Map<String, dynamic> json) =>
|
||||
_$RecipeCreateModelImpl(
|
||||
title: json['title'] as String,
|
||||
state: json['state'] as String,
|
||||
description: json['description_md'] 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>)
|
||||
.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_md': 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.firstMeals: 'firstMeals',
|
||||
RecipeType.secondMeals: 'secondMeals',
|
||||
RecipeType.salads: 'salads',
|
||||
RecipeType.snacks: 'snacks',
|
||||
RecipeType.sweets: 'sweets',
|
||||
RecipeType.drinks: 'drinks',
|
||||
RecipeType.other: 'other',
|
||||
};
|
||||
@@ -1,459 +0,0 @@
|
||||
// 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 {
|
||||
List<Ingredient?>? get ingredients => throw _privateConstructorUsedError;
|
||||
List<Step?>? get steps => throw _privateConstructorUsedError;
|
||||
List<String>? get tags => throw _privateConstructorUsedError;
|
||||
String? get type => throw _privateConstructorUsedError;
|
||||
String? get state => throw _privateConstructorUsedError;
|
||||
String? get title => throw _privateConstructorUsedError;
|
||||
String? get description => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: 'video_url')
|
||||
String? get videoUrl => throw _privateConstructorUsedError;
|
||||
String? get image => throw _privateConstructorUsedError;
|
||||
int? get totalCookingTime => throw _privateConstructorUsedError;
|
||||
int? get activeCookTime => throw _privateConstructorUsedError;
|
||||
int? get servings => throw _privateConstructorUsedError;
|
||||
int? get energyPerServing => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this RecipeModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of RecipeModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$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(
|
||||
{List<Ingredient?>? ingredients,
|
||||
List<Step?>? steps,
|
||||
List<String>? tags,
|
||||
String? type,
|
||||
String? state,
|
||||
String? title,
|
||||
String? description,
|
||||
@JsonKey(name: 'video_url') String? videoUrl,
|
||||
String? image,
|
||||
int? totalCookingTime,
|
||||
int? activeCookTime,
|
||||
int? servings,
|
||||
int? energyPerServing});
|
||||
}
|
||||
|
||||
/// @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;
|
||||
|
||||
/// Create a copy of RecipeModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? ingredients = freezed,
|
||||
Object? steps = freezed,
|
||||
Object? tags = freezed,
|
||||
Object? type = freezed,
|
||||
Object? state = freezed,
|
||||
Object? title = freezed,
|
||||
Object? description = freezed,
|
||||
Object? videoUrl = freezed,
|
||||
Object? image = freezed,
|
||||
Object? totalCookingTime = freezed,
|
||||
Object? activeCookTime = freezed,
|
||||
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?,
|
||||
videoUrl: freezed == videoUrl
|
||||
? _value.videoUrl
|
||||
: videoUrl // 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);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipeModelImplCopyWith<$Res>
|
||||
implements $RecipeModelCopyWith<$Res> {
|
||||
factory _$$RecipeModelImplCopyWith(
|
||||
_$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,
|
||||
@JsonKey(name: 'video_url') String? videoUrl,
|
||||
String? image,
|
||||
int? totalCookingTime,
|
||||
int? activeCookTime,
|
||||
int? servings,
|
||||
int? energyPerServing});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipeModelImplCopyWithImpl<$Res>
|
||||
extends _$RecipeModelCopyWithImpl<$Res, _$RecipeModelImpl>
|
||||
implements _$$RecipeModelImplCopyWith<$Res> {
|
||||
__$$RecipeModelImplCopyWithImpl(
|
||||
_$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.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? ingredients = freezed,
|
||||
Object? steps = freezed,
|
||||
Object? tags = freezed,
|
||||
Object? type = freezed,
|
||||
Object? state = freezed,
|
||||
Object? title = freezed,
|
||||
Object? description = freezed,
|
||||
Object? videoUrl = freezed,
|
||||
Object? image = freezed,
|
||||
Object? totalCookingTime = freezed,
|
||||
Object? activeCookTime = freezed,
|
||||
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?,
|
||||
videoUrl: freezed == videoUrl
|
||||
? _value.videoUrl
|
||||
: videoUrl // 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,
|
||||
@JsonKey(name: 'video_url') this.videoUrl,
|
||||
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);
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
final List<String>? _tags;
|
||||
@override
|
||||
List<String>? get tags {
|
||||
final value = _tags;
|
||||
if (value == null) return null;
|
||||
if (_tags is EqualUnmodifiableListView) return _tags;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
|
||||
@override
|
||||
final String? type;
|
||||
@override
|
||||
final String? state;
|
||||
@override
|
||||
final String? title;
|
||||
@override
|
||||
final String? description;
|
||||
@override
|
||||
@JsonKey(name: 'video_url')
|
||||
final String? videoUrl;
|
||||
@override
|
||||
final String? image;
|
||||
@override
|
||||
final int? totalCookingTime;
|
||||
@override
|
||||
final int? activeCookTime;
|
||||
@override
|
||||
final int? servings;
|
||||
@override
|
||||
final int? energyPerServing;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'RecipeModel(ingredients: $ingredients, steps: $steps, tags: $tags, type: $type, state: $state, title: $title, description: $description, videoUrl: $videoUrl, image: $image, totalCookingTime: $totalCookingTime, activeCookTime: $activeCookTime, servings: $servings, energyPerServing: $energyPerServing)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipeModelImpl &&
|
||||
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) &&
|
||||
(identical(other.state, state) || other.state == state) &&
|
||||
(identical(other.title, title) || other.title == title) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
(identical(other.videoUrl, videoUrl) ||
|
||||
other.videoUrl == videoUrl) &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.totalCookingTime, totalCookingTime) ||
|
||||
other.totalCookingTime == totalCookingTime) &&
|
||||
(identical(other.activeCookTime, activeCookTime) ||
|
||||
other.activeCookTime == activeCookTime) &&
|
||||
(identical(other.servings, servings) ||
|
||||
other.servings == servings) &&
|
||||
(identical(other.energyPerServing, energyPerServing) ||
|
||||
other.energyPerServing == energyPerServing));
|
||||
}
|
||||
|
||||
@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,
|
||||
videoUrl,
|
||||
image,
|
||||
totalCookingTime,
|
||||
activeCookTime,
|
||||
servings,
|
||||
energyPerServing);
|
||||
|
||||
/// Create a copy of RecipeModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@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 List<Ingredient?>? ingredients,
|
||||
final List<Step?>? steps,
|
||||
final List<String>? tags,
|
||||
final String? type,
|
||||
final String? state,
|
||||
final String? title,
|
||||
final String? description,
|
||||
@JsonKey(name: 'video_url') final String? videoUrl,
|
||||
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;
|
||||
|
||||
@override
|
||||
List<Ingredient?>? get ingredients;
|
||||
@override
|
||||
List<Step?>? get steps;
|
||||
@override
|
||||
List<String>? get tags;
|
||||
@override
|
||||
String? get type;
|
||||
@override
|
||||
String? get state;
|
||||
@override
|
||||
String? get title;
|
||||
@override
|
||||
String? get description;
|
||||
@override
|
||||
@JsonKey(name: 'video_url')
|
||||
String? get videoUrl;
|
||||
@override
|
||||
String? get image;
|
||||
@override
|
||||
int? get totalCookingTime;
|
||||
@override
|
||||
int? get activeCookTime;
|
||||
@override
|
||||
int? get servings;
|
||||
@override
|
||||
int? get energyPerServing;
|
||||
|
||||
/// Create a copy of RecipeModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipeModelImplCopyWith<_$RecipeModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'recipe_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$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(),
|
||||
tags: (json['tags'] as List<dynamic>?)?.map((e) => e as String).toList(),
|
||||
type: json['type'] as String?,
|
||||
state: json['state'] as String?,
|
||||
title: json['title'] as String?,
|
||||
description: json['description'] as String?,
|
||||
videoUrl: json['video_url'] as String?,
|
||||
image: json['image'] as String?,
|
||||
totalCookingTime: (json['totalCookingTime'] as num?)?.toInt(),
|
||||
activeCookTime: (json['activeCookTime'] as num?)?.toInt(),
|
||||
servings: (json['servings'] as num?)?.toInt(),
|
||||
energyPerServing: (json['energyPerServing'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$RecipeModelImplToJson(_$RecipeModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'ingredients': instance.ingredients,
|
||||
'steps': instance.steps,
|
||||
'tags': instance.tags,
|
||||
'type': instance.type,
|
||||
'state': instance.state,
|
||||
'title': instance.title,
|
||||
'description': instance.description,
|
||||
'video_url': instance.videoUrl,
|
||||
'image': instance.image,
|
||||
'totalCookingTime': instance.totalCookingTime,
|
||||
'activeCookTime': instance.activeCookTime,
|
||||
'servings': instance.servings,
|
||||
'energyPerServing': instance.energyPerServing,
|
||||
};
|
||||
@@ -1,506 +0,0 @@
|
||||
// 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_tag_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');
|
||||
|
||||
RecipeTagModel _$RecipeTagModelFromJson(Map<String, dynamic> json) {
|
||||
return _RecipeTagModel.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$RecipeTagModel {
|
||||
@JsonKey(name: "data")
|
||||
List<RecipeTag> get data => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "links")
|
||||
Links get links => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this RecipeTagModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of RecipeTagModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$RecipeTagModelCopyWith<RecipeTagModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipeTagModelCopyWith<$Res> {
|
||||
factory $RecipeTagModelCopyWith(
|
||||
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});
|
||||
|
||||
$LinksCopyWith<$Res> get links;
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel>
|
||||
implements $RecipeTagModelCopyWith<$Res> {
|
||||
_$RecipeTagModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _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(_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
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$LinksCopyWith<$Res> get links {
|
||||
return $LinksCopyWith<$Res>(_value.links, (value) {
|
||||
return _then(_value.copyWith(links: value) as $Val);
|
||||
});
|
||||
}
|
||||
|
||||
/// Create a copy of RecipeTagModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$MetaCopyWith<$Res> get meta {
|
||||
return $MetaCopyWith<$Res>(_value.meta, (value) {
|
||||
return _then(_value.copyWith(meta: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipeTagModelImplCopyWith<$Res>
|
||||
implements $RecipeTagModelCopyWith<$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});
|
||||
|
||||
@override
|
||||
$LinksCopyWith<$Res> get links;
|
||||
@override
|
||||
$MetaCopyWith<$Res> get meta;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipeTagModelImplCopyWithImpl<$Res>
|
||||
extends _$RecipeTagModelCopyWithImpl<$Res, _$RecipeTagModelImpl>
|
||||
implements _$$RecipeTagModelImplCopyWith<$Res> {
|
||||
__$$RecipeTagModelImplCopyWithImpl(
|
||||
_$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,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @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;
|
||||
|
||||
factory _$RecipeTagModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RecipeTagModelImplFromJson(json);
|
||||
|
||||
final List<RecipeTag> _data;
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<RecipeTag> get data {
|
||||
if (_data is EqualUnmodifiableListView) return _data;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_data);
|
||||
}
|
||||
|
||||
@override
|
||||
@JsonKey(name: "links")
|
||||
final Links links;
|
||||
@override
|
||||
@JsonKey(name: "meta")
|
||||
final Meta meta;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'RecipeTagModel(data: $data, links: $links, meta: $meta)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipeTagModelImpl &&
|
||||
const DeepCollectionEquality().equals(other._data, _data) &&
|
||||
(identical(other.links, links) || other.links == links) &&
|
||||
(identical(other.meta, meta) || other.meta == meta));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||
|
||||
/// Create a copy of RecipeTagModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith =>
|
||||
__$$RecipeTagModelImplCopyWithImpl<_$RecipeTagModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
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;
|
||||
|
||||
factory _RecipeTagModel.fromJson(Map<String, dynamic> json) =
|
||||
_$RecipeTagModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<RecipeTag> get data;
|
||||
@override
|
||||
@JsonKey(name: "links")
|
||||
Links get links;
|
||||
@override
|
||||
@JsonKey(name: "meta")
|
||||
Meta get meta;
|
||||
|
||||
/// Create a copy of RecipeTagModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
RecipeTag _$RecipeTagFromJson(Map<String, dynamic> json) {
|
||||
return _RecipeTag.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$RecipeTag {
|
||||
@JsonKey(name: "id")
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "name")
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "recipes_count")
|
||||
int get recipesCount => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this RecipeTag to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of RecipeTag
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$RecipeTagCopyWith<RecipeTag> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
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});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipeTagCopyWithImpl<$Res, $Val extends RecipeTag>
|
||||
implements $RecipeTagCopyWith<$Res> {
|
||||
_$RecipeTagCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of RecipeTag
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? name = null,
|
||||
Object? recipesCount = null,
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipeTagImplCopyWith<$Res>
|
||||
implements $RecipeTagCopyWith<$Res> {
|
||||
factory _$$RecipeTagImplCopyWith(
|
||||
_$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});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipeTagImplCopyWithImpl<$Res>
|
||||
extends _$RecipeTagCopyWithImpl<$Res, _$RecipeTagImpl>
|
||||
implements _$$RecipeTagImplCopyWith<$Res> {
|
||||
__$$RecipeTagImplCopyWithImpl(
|
||||
_$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.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? id = null,
|
||||
Object? name = null,
|
||||
Object? recipesCount = null,
|
||||
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,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @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});
|
||||
|
||||
factory _$RecipeTagImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RecipeTagImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
final int id;
|
||||
@override
|
||||
@JsonKey(name: "name")
|
||||
final String name;
|
||||
@override
|
||||
@JsonKey(name: "recipes_count")
|
||||
final int recipesCount;
|
||||
@override
|
||||
@JsonKey(name: "created_at")
|
||||
final DateTime createdAt;
|
||||
@override
|
||||
@JsonKey(name: "updated_at")
|
||||
final DateTime updatedAt;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'RecipeTag(id: $id, name: $name, recipesCount: $recipesCount, createdAt: $createdAt, updatedAt: $updatedAt)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipeTagImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.name, name) || other.name == name) &&
|
||||
(identical(other.recipesCount, recipesCount) ||
|
||||
other.recipesCount == recipesCount) &&
|
||||
(identical(other.createdAt, createdAt) ||
|
||||
other.createdAt == createdAt) &&
|
||||
(identical(other.updatedAt, updatedAt) ||
|
||||
other.updatedAt == updatedAt));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, name, recipesCount, createdAt, updatedAt);
|
||||
|
||||
/// Create a copy of RecipeTag
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith =>
|
||||
__$$RecipeTagImplCopyWithImpl<_$RecipeTagImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
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;
|
||||
|
||||
factory _RecipeTag.fromJson(Map<String, dynamic> json) =
|
||||
_$RecipeTagImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
int get id;
|
||||
@override
|
||||
@JsonKey(name: "name")
|
||||
String get name;
|
||||
@override
|
||||
@JsonKey(name: "recipes_count")
|
||||
int get recipesCount;
|
||||
@override
|
||||
@JsonKey(name: "created_at")
|
||||
DateTime get createdAt;
|
||||
@override
|
||||
@JsonKey(name: "updated_at")
|
||||
DateTime get updatedAt;
|
||||
|
||||
/// Create a copy of RecipeTag
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'recipe_tag_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$RecipeTagModelImpl _$$RecipeTagModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$RecipeTagModelImpl(
|
||||
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,
|
||||
};
|
||||
|
||||
_$RecipeTagImpl _$$RecipeTagImplFromJson(Map<String, dynamic> json) =>
|
||||
_$RecipeTagImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
recipesCount: (json['recipes_count'] as num).toInt(),
|
||||
createdAt: DateTime.parse(json['created_at'] as String),
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$RecipeTagImplToJson(_$RecipeTagImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'recipes_count': instance.recipesCount,
|
||||
'created_at': instance.createdAt.toIso8601String(),
|
||||
'updated_at': instance.updatedAt.toIso8601String(),
|
||||
};
|
||||
@@ -1,177 +0,0 @@
|
||||
// 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 'step.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');
|
||||
|
||||
Step _$StepFromJson(Map<String, dynamic> json) {
|
||||
return _Step.fromJson(json);
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
mixin _$Step {
|
||||
String? get image => throw _privateConstructorUsedError;
|
||||
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, 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 = 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>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String? image, 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 = 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?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$StepImpl implements _Step {
|
||||
const _$StepImpl({this.image, this.description});
|
||||
|
||||
factory _$StepImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$StepImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String? image;
|
||||
@override
|
||||
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({final String? image, final String? description}) =
|
||||
_$StepImpl;
|
||||
|
||||
factory _Step.fromJson(Map<String, dynamic> json) = _$StepImpl.fromJson;
|
||||
|
||||
@override
|
||||
String? get image;
|
||||
@override
|
||||
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;
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'step.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$StepImpl _$$StepImplFromJson(Map<String, dynamic> json) => _$StepImpl(
|
||||
image: json['image'] as String?,
|
||||
description: json['description'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'image': instance.image,
|
||||
'description': instance.description,
|
||||
};
|
||||
@@ -1,330 +0,0 @@
|
||||
// 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 'create_recipe_state.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');
|
||||
|
||||
/// @nodoc
|
||||
mixin _$CreateRecipeState {
|
||||
RecipeCreateEntity get entity => throw _privateConstructorUsedError;
|
||||
String? get titleValidationError => throw _privateConstructorUsedError;
|
||||
String? get descriptionValidationError => throw _privateConstructorUsedError;
|
||||
String? get cookingTimeValidationError => throw _privateConstructorUsedError;
|
||||
String? get activeTimeValidationError => throw _privateConstructorUsedError;
|
||||
String? get servingsValidationError => throw _privateConstructorUsedError;
|
||||
String? get energyPerServingValidationError =>
|
||||
throw _privateConstructorUsedError;
|
||||
String? get imageValidationError => throw _privateConstructorUsedError;
|
||||
|
||||
/// Create a copy of CreateRecipeState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$CreateRecipeStateCopyWith<CreateRecipeState> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $CreateRecipeStateCopyWith<$Res> {
|
||||
factory $CreateRecipeStateCopyWith(
|
||||
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});
|
||||
|
||||
$RecipeCreateEntityCopyWith<$Res> get entity;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$CreateRecipeStateCopyWithImpl<$Res, $Val extends CreateRecipeState>
|
||||
implements $CreateRecipeStateCopyWith<$Res> {
|
||||
_$CreateRecipeStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
/// Create a copy of CreateRecipeState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? entity = null,
|
||||
Object? titleValidationError = freezed,
|
||||
Object? descriptionValidationError = freezed,
|
||||
Object? cookingTimeValidationError = freezed,
|
||||
Object? activeTimeValidationError = freezed,
|
||||
Object? servingsValidationError = freezed,
|
||||
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);
|
||||
}
|
||||
|
||||
/// Create a copy of CreateRecipeState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$RecipeCreateEntityCopyWith<$Res> get entity {
|
||||
return $RecipeCreateEntityCopyWith<$Res>(_value.entity, (value) {
|
||||
return _then(_value.copyWith(entity: value) as $Val);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$CreateRecipeStateImplCopyWith<$Res>
|
||||
implements $CreateRecipeStateCopyWith<$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});
|
||||
|
||||
@override
|
||||
$RecipeCreateEntityCopyWith<$Res> get entity;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$CreateRecipeStateImplCopyWithImpl<$Res>
|
||||
extends _$CreateRecipeStateCopyWithImpl<$Res, _$CreateRecipeStateImpl>
|
||||
implements _$$CreateRecipeStateImplCopyWith<$Res> {
|
||||
__$$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.
|
||||
@pragma('vm:prefer-inline')
|
||||
@override
|
||||
$Res call({
|
||||
Object? entity = null,
|
||||
Object? titleValidationError = freezed,
|
||||
Object? descriptionValidationError = freezed,
|
||||
Object? cookingTimeValidationError = freezed,
|
||||
Object? activeTimeValidationError = freezed,
|
||||
Object? servingsValidationError = freezed,
|
||||
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?,
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
|
||||
class _$CreateRecipeStateImpl implements _CreateRecipeState {
|
||||
const _$CreateRecipeStateImpl(
|
||||
{required this.entity,
|
||||
this.titleValidationError,
|
||||
this.descriptionValidationError,
|
||||
this.cookingTimeValidationError,
|
||||
this.activeTimeValidationError,
|
||||
this.servingsValidationError,
|
||||
this.energyPerServingValidationError,
|
||||
this.imageValidationError});
|
||||
|
||||
@override
|
||||
final RecipeCreateEntity entity;
|
||||
@override
|
||||
final String? titleValidationError;
|
||||
@override
|
||||
final String? descriptionValidationError;
|
||||
@override
|
||||
final String? cookingTimeValidationError;
|
||||
@override
|
||||
final String? activeTimeValidationError;
|
||||
@override
|
||||
final String? servingsValidationError;
|
||||
@override
|
||||
final String? energyPerServingValidationError;
|
||||
@override
|
||||
final String? imageValidationError;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'CreateRecipeState(entity: $entity, titleValidationError: $titleValidationError, descriptionValidationError: $descriptionValidationError, cookingTimeValidationError: $cookingTimeValidationError, activeTimeValidationError: $activeTimeValidationError, servingsValidationError: $servingsValidationError, energyPerServingValidationError: $energyPerServingValidationError, imageValidationError: $imageValidationError)';
|
||||
}
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$CreateRecipeStateImpl &&
|
||||
(identical(other.entity, entity) || other.entity == entity) &&
|
||||
(identical(other.titleValidationError, titleValidationError) ||
|
||||
other.titleValidationError == titleValidationError) &&
|
||||
(identical(other.descriptionValidationError,
|
||||
descriptionValidationError) ||
|
||||
other.descriptionValidationError ==
|
||||
descriptionValidationError) &&
|
||||
(identical(other.cookingTimeValidationError,
|
||||
cookingTimeValidationError) ||
|
||||
other.cookingTimeValidationError ==
|
||||
cookingTimeValidationError) &&
|
||||
(identical(other.activeTimeValidationError,
|
||||
activeTimeValidationError) ||
|
||||
other.activeTimeValidationError == activeTimeValidationError) &&
|
||||
(identical(
|
||||
other.servingsValidationError, servingsValidationError) ||
|
||||
other.servingsValidationError == servingsValidationError) &&
|
||||
(identical(other.energyPerServingValidationError,
|
||||
energyPerServingValidationError) ||
|
||||
other.energyPerServingValidationError ==
|
||||
energyPerServingValidationError) &&
|
||||
(identical(other.imageValidationError, imageValidationError) ||
|
||||
other.imageValidationError == imageValidationError));
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(
|
||||
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.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$CreateRecipeStateImplCopyWith<_$CreateRecipeStateImpl> get copyWith =>
|
||||
__$$CreateRecipeStateImplCopyWithImpl<_$CreateRecipeStateImpl>(
|
||||
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;
|
||||
|
||||
@override
|
||||
RecipeCreateEntity get entity;
|
||||
@override
|
||||
String? get titleValidationError;
|
||||
@override
|
||||
String? get descriptionValidationError;
|
||||
@override
|
||||
String? get cookingTimeValidationError;
|
||||
@override
|
||||
String? get activeTimeValidationError;
|
||||
@override
|
||||
String? get servingsValidationError;
|
||||
@override
|
||||
String? get energyPerServingValidationError;
|
||||
@override
|
||||
String? get imageValidationError;
|
||||
|
||||
/// Create a copy of CreateRecipeState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$CreateRecipeStateImplCopyWith<_$CreateRecipeStateImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
@@ -1,242 +0,0 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'recipe_service.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// RetrofitGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// ignore_for_file: unnecessary_brace_in_string_interps,no_leading_underscores_for_local_identifiers,unused_element,unnecessary_string_interpolations
|
||||
|
||||
class _CreateRecipeService implements CreateRecipeService {
|
||||
_CreateRecipeService(this._dio, {this.baseUrl, this.errorLogger});
|
||||
|
||||
final Dio _dio;
|
||||
|
||||
String? baseUrl;
|
||||
|
||||
final ParseErrorLogger? errorLogger;
|
||||
|
||||
@override
|
||||
Future<void> likeRecipe({required String slug}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _options = _setStreamType<void>(
|
||||
Options(method: 'POST', headers: _headers, extra: _extra)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/recipes/${slug}/like',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)),
|
||||
);
|
||||
await _dio.fetch<void>(_options);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> addToFavorite({required String slug}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _options = _setStreamType<void>(
|
||||
Options(method: 'POST', headers: _headers, extra: _extra)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/recipes/${slug}/add_to_favorite',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)),
|
||||
);
|
||||
await _dio.fetch<void>(_options);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> removeFromFavorite({required String slug}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _options = _setStreamType<void>(
|
||||
Options(method: 'POST', headers: _headers, extra: _extra)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/recipes/${slug}/remove_from_favorite',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)),
|
||||
);
|
||||
await _dio.fetch<void>(_options);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<RecipeModel> getRecipe(String id) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _options = _setStreamType<RecipeModel>(
|
||||
Options(method: 'GET', headers: _headers, extra: _extra)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/recipes/show/${id}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)),
|
||||
);
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
|
||||
late RecipeModel _value;
|
||||
try {
|
||||
_value = RecipeModel.fromJson(_result.data!);
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
}
|
||||
return _value;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<Map<String, List<Product>>> getInputProduct(String name) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{r'name': name};
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _options = _setStreamType<Map<String, List<Product>>>(
|
||||
Options(method: 'GET', headers: _headers, extra: _extra)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/diary/product_nutritional_values/filter',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)),
|
||||
);
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
|
||||
late Map<String, List<Product>> _value;
|
||||
try {
|
||||
_value = _result.data!.map(
|
||||
(k, dynamic v) => MapEntry(
|
||||
k,
|
||||
(v as List)
|
||||
.map((i) => Product.fromJson(i as Map<String, dynamic>))
|
||||
.toList(),
|
||||
),
|
||||
);
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
}
|
||||
return _value;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<void> publishRecipe({required FormData formData}) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
final _data = formData;
|
||||
final _options = _setStreamType<void>(
|
||||
Options(
|
||||
method: 'POST',
|
||||
headers: _headers,
|
||||
extra: _extra,
|
||||
contentType: 'multipart/form-data',
|
||||
)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/recipes/create',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)),
|
||||
);
|
||||
await _dio.fetch<void>(_options);
|
||||
}
|
||||
|
||||
@override
|
||||
Future<RecipeModel> editRecipe(Map<String, Object?> recipe, String id) async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
final _data = FormData.fromMap(recipe);
|
||||
final _options = _setStreamType<RecipeModel>(
|
||||
Options(method: 'POST', headers: _headers, extra: _extra)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/recipes/update/{id}',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)),
|
||||
);
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
|
||||
late RecipeModel _value;
|
||||
try {
|
||||
_value = RecipeModel.fromJson(_result.data!);
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
}
|
||||
return _value;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<RecipeTagModel> getTags() async {
|
||||
final _extra = <String, dynamic>{};
|
||||
final queryParameters = <String, dynamic>{};
|
||||
final _headers = <String, dynamic>{};
|
||||
const Map<String, dynamic>? _data = null;
|
||||
final _options = _setStreamType<RecipeTagModel>(
|
||||
Options(method: 'GET', headers: _headers, extra: _extra)
|
||||
.compose(
|
||||
_dio.options,
|
||||
'/api/recipes/tags',
|
||||
queryParameters: queryParameters,
|
||||
data: _data,
|
||||
)
|
||||
.copyWith(baseUrl: _combineBaseUrls(_dio.options.baseUrl, baseUrl)),
|
||||
);
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
|
||||
late RecipeTagModel _value;
|
||||
try {
|
||||
_value = RecipeTagModel.fromJson(_result.data!);
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
}
|
||||
return _value;
|
||||
}
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
if (T != dynamic &&
|
||||
!(requestOptions.responseType == ResponseType.bytes ||
|
||||
requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T == String) {
|
||||
requestOptions.responseType = ResponseType.plain;
|
||||
} else {
|
||||
requestOptions.responseType = ResponseType.json;
|
||||
}
|
||||
}
|
||||
return requestOptions;
|
||||
}
|
||||
|
||||
String _combineBaseUrls(String dioBaseUrl, String? baseUrl) {
|
||||
if (baseUrl == null || baseUrl.trim().isEmpty) {
|
||||
return dioBaseUrl;
|
||||
}
|
||||
|
||||
final url = Uri.parse(baseUrl);
|
||||
|
||||
if (url.isAbsolute) {
|
||||
return url.toString();
|
||||
}
|
||||
|
||||
return Uri.parse(dioBaseUrl).resolveUri(url).toString();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user