forked from eatvio/eatvio_app
feat(profile): add profile charts models, requests. Max length of description in posts, recipes, diets = 200
This commit is contained in:
@@ -21,9 +21,7 @@ Ingredient _$IngredientFromJson(Map<String, dynamic> 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.
|
||||
@@ -32,24 +30,26 @@ mixin _$Ingredient {
|
||||
/// 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;
|
||||
$IngredientCopyWith<Ingredient> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $IngredientCopyWith<$Res> {
|
||||
factory $IngredientCopyWith(Ingredient value, $Res Function(Ingredient) then) = _$IngredientCopyWithImpl<$Res, Ingredient>;
|
||||
|
||||
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> {
|
||||
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;
|
||||
|
||||
@@ -80,17 +80,23 @@ class _$IngredientCopyWithImpl<$Res, $Val extends Ingredient> implements $Ingred
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$IngredientImplCopyWith<$Res> implements $IngredientCopyWith<$Res> {
|
||||
factory _$$IngredientImplCopyWith(_$IngredientImpl value, $Res Function(_$IngredientImpl) then) = __$$IngredientImplCopyWithImpl<$Res>;
|
||||
|
||||
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);
|
||||
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.
|
||||
@@ -121,9 +127,11 @@ class __$$IngredientImplCopyWithImpl<$Res> extends _$IngredientCopyWithImpl<$Res
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$IngredientImpl implements _Ingredient {
|
||||
const _$IngredientImpl({required this.name, required this.unit, required this.portion});
|
||||
const _$IngredientImpl(
|
||||
{required this.name, required this.unit, required this.portion});
|
||||
|
||||
factory _$IngredientImpl.fromJson(Map<String, dynamic> json) => _$$IngredientImplFromJson(json);
|
||||
factory _$IngredientImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$IngredientImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String name;
|
||||
@@ -156,7 +164,8 @@ class _$IngredientImpl implements _Ingredient {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith => __$$IngredientImplCopyWithImpl<_$IngredientImpl>(this, _$identity);
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
||||
__$$IngredientImplCopyWithImpl<_$IngredientImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -167,16 +176,18 @@ class _$IngredientImpl implements _Ingredient {
|
||||
}
|
||||
|
||||
abstract class _Ingredient implements Ingredient {
|
||||
const factory _Ingredient({required final String name, required final String unit, required final String portion}) = _$IngredientImpl;
|
||||
const factory _Ingredient(
|
||||
{required final String name,
|
||||
required final String unit,
|
||||
required final String portion}) = _$IngredientImpl;
|
||||
|
||||
factory _Ingredient.fromJson(Map<String, dynamic> json) = _$IngredientImpl.fromJson;
|
||||
factory _Ingredient.fromJson(Map<String, dynamic> json) =
|
||||
_$IngredientImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
|
||||
@override
|
||||
String get unit;
|
||||
|
||||
@override
|
||||
String get portion;
|
||||
|
||||
@@ -184,5 +195,6 @@ abstract class _Ingredient implements Ingredient {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$IngredientImplCopyWith<_$IngredientImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,13 +6,15 @@ part of 'ingredient.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$IngredientImpl _$$IngredientImplFromJson(Map<String, dynamic> json) => _$IngredientImpl(
|
||||
_$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>{
|
||||
Map<String, dynamic> _$$IngredientImplToJson(_$IngredientImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'name': instance.name,
|
||||
'unit': instance.unit,
|
||||
'portion': instance.portion,
|
||||
|
||||
@@ -21,21 +21,13 @@ RecipeModel _$RecipeModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$RecipeModel {
|
||||
List<Ingredient?>? get ingredients => throw _privateConstructorUsedError;
|
||||
|
||||
List<Step?>? get steps => throw _privateConstructorUsedError;
|
||||
|
||||
String? get type => throw _privateConstructorUsedError;
|
||||
|
||||
String? get state => throw _privateConstructorUsedError;
|
||||
|
||||
String? get title => throw _privateConstructorUsedError;
|
||||
|
||||
String? get description => throw _privateConstructorUsedError;
|
||||
|
||||
String? get video_url => throw _privateConstructorUsedError;
|
||||
|
||||
String? get image => throw _privateConstructorUsedError;
|
||||
|
||||
int? get cooking_time => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this RecipeModel to a JSON map.
|
||||
@@ -44,13 +36,15 @@ mixin _$RecipeModel {
|
||||
/// 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;
|
||||
$RecipeModelCopyWith<RecipeModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipeModelCopyWith<$Res> {
|
||||
factory $RecipeModelCopyWith(RecipeModel value, $Res Function(RecipeModel) then) = _$RecipeModelCopyWithImpl<$Res, RecipeModel>;
|
||||
|
||||
factory $RecipeModelCopyWith(
|
||||
RecipeModel value, $Res Function(RecipeModel) then) =
|
||||
_$RecipeModelCopyWithImpl<$Res, RecipeModel>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{List<Ingredient?>? ingredients,
|
||||
@@ -65,12 +59,12 @@ abstract class $RecipeModelCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipeModelCopyWithImpl<$Res, $Val extends RecipeModel> implements $RecipeModelCopyWith<$Res> {
|
||||
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;
|
||||
|
||||
@@ -131,9 +125,11 @@ class _$RecipeModelCopyWithImpl<$Res, $Val extends RecipeModel> implements $Reci
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipeModelImplCopyWith<$Res> implements $RecipeModelCopyWith<$Res> {
|
||||
factory _$$RecipeModelImplCopyWith(_$RecipeModelImpl value, $Res Function(_$RecipeModelImpl) then) = __$$RecipeModelImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$RecipeModelImplCopyWith<$Res>
|
||||
implements $RecipeModelCopyWith<$Res> {
|
||||
factory _$$RecipeModelImplCopyWith(
|
||||
_$RecipeModelImpl value, $Res Function(_$RecipeModelImpl) then) =
|
||||
__$$RecipeModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -149,8 +145,12 @@ abstract class _$$RecipeModelImplCopyWith<$Res> implements $RecipeModelCopyWith<
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipeModelImplCopyWithImpl<$Res> extends _$RecipeModelCopyWithImpl<$Res, _$RecipeModelImpl> implements _$$RecipeModelImplCopyWith<$Res> {
|
||||
__$$RecipeModelImplCopyWithImpl(_$RecipeModelImpl _value, $Res Function(_$RecipeModelImpl) _then) : super(_value, _then);
|
||||
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.
|
||||
@@ -224,10 +224,10 @@ class _$RecipeModelImpl implements _RecipeModel {
|
||||
: _ingredients = ingredients,
|
||||
_steps = steps;
|
||||
|
||||
factory _$RecipeModelImpl.fromJson(Map<String, dynamic> json) => _$$RecipeModelImplFromJson(json);
|
||||
factory _$RecipeModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RecipeModelImplFromJson(json);
|
||||
|
||||
final List<Ingredient?>? _ingredients;
|
||||
|
||||
@override
|
||||
List<Ingredient?>? get ingredients {
|
||||
final value = _ingredients;
|
||||
@@ -238,7 +238,6 @@ class _$RecipeModelImpl implements _RecipeModel {
|
||||
}
|
||||
|
||||
final List<Step?>? _steps;
|
||||
|
||||
@override
|
||||
List<Step?>? get steps {
|
||||
final value = _steps;
|
||||
@@ -273,28 +272,42 @@ class _$RecipeModelImpl implements _RecipeModel {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipeModelImpl &&
|
||||
const DeepCollectionEquality().equals(other._ingredients, _ingredients) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._ingredients, _ingredients) &&
|
||||
const DeepCollectionEquality().equals(other._steps, _steps) &&
|
||||
(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.video_url, video_url) || other.video_url == video_url) &&
|
||||
(identical(other.description, description) ||
|
||||
other.description == description) &&
|
||||
(identical(other.video_url, video_url) ||
|
||||
other.video_url == video_url) &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.cooking_time, cooking_time) || other.cooking_time == cooking_time));
|
||||
(identical(other.cooking_time, cooking_time) ||
|
||||
other.cooking_time == cooking_time));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_ingredients), const DeepCollectionEquality().hash(_steps), type, state,
|
||||
title, description, video_url, image, cooking_time);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
const DeepCollectionEquality().hash(_ingredients),
|
||||
const DeepCollectionEquality().hash(_steps),
|
||||
type,
|
||||
state,
|
||||
title,
|
||||
description,
|
||||
video_url,
|
||||
image,
|
||||
cooking_time);
|
||||
|
||||
/// 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);
|
||||
_$$RecipeModelImplCopyWith<_$RecipeModelImpl> get copyWith =>
|
||||
__$$RecipeModelImplCopyWithImpl<_$RecipeModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -316,32 +329,25 @@ abstract class _RecipeModel implements RecipeModel {
|
||||
final String? image,
|
||||
final int? cooking_time}) = _$RecipeModelImpl;
|
||||
|
||||
factory _RecipeModel.fromJson(Map<String, dynamic> json) = _$RecipeModelImpl.fromJson;
|
||||
factory _RecipeModel.fromJson(Map<String, dynamic> json) =
|
||||
_$RecipeModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
List<Ingredient?>? get ingredients;
|
||||
|
||||
@override
|
||||
List<Step?>? get steps;
|
||||
|
||||
@override
|
||||
String? get type;
|
||||
|
||||
@override
|
||||
String? get state;
|
||||
|
||||
@override
|
||||
String? get title;
|
||||
|
||||
@override
|
||||
String? get description;
|
||||
|
||||
@override
|
||||
String? get video_url;
|
||||
|
||||
@override
|
||||
String? get image;
|
||||
|
||||
@override
|
||||
int? get cooking_time;
|
||||
|
||||
@@ -349,5 +355,6 @@ abstract class _RecipeModel implements RecipeModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipeModelImplCopyWith<_$RecipeModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$RecipeModelImplCopyWith<_$RecipeModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,9 +6,16 @@ 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(),
|
||||
_$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(),
|
||||
type: json['type'] as String?,
|
||||
state: json['state'] as String?,
|
||||
title: json['title'] as String?,
|
||||
@@ -18,7 +25,8 @@ _$RecipeModelImpl _$$RecipeModelImplFromJson(Map<String, dynamic> json) => _$Rec
|
||||
cooking_time: (json['cooking_time'] as num?)?.toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$RecipeModelImplToJson(_$RecipeModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$RecipeModelImplToJson(_$RecipeModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'ingredients': instance.ingredients,
|
||||
'steps': instance.steps,
|
||||
'type': instance.type,
|
||||
|
||||
@@ -22,10 +22,8 @@ RecipeTagModel _$RecipeTagModelFromJson(Map<String, dynamic> json) {
|
||||
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;
|
||||
|
||||
@@ -35,28 +33,32 @@ mixin _$RecipeTagModel {
|
||||
/// 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;
|
||||
$RecipeTagModelCopyWith<RecipeTagModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipeTagModelCopyWith<$Res> {
|
||||
factory $RecipeTagModelCopyWith(RecipeTagModel value, $Res Function(RecipeTagModel) then) = _$RecipeTagModelCopyWithImpl<$Res, RecipeTagModel>;
|
||||
|
||||
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});
|
||||
$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> {
|
||||
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;
|
||||
|
||||
@@ -107,23 +109,31 @@ class _$RecipeTagModelCopyWithImpl<$Res, $Val extends RecipeTagModel> implements
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipeTagModelImplCopyWith<$Res> implements $RecipeTagModelCopyWith<$Res> {
|
||||
factory _$$RecipeTagModelImplCopyWith(_$RecipeTagModelImpl value, $Res Function(_$RecipeTagModelImpl) then) = __$$RecipeTagModelImplCopyWithImpl<$Res>;
|
||||
|
||||
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});
|
||||
$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);
|
||||
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.
|
||||
@@ -155,13 +165,15 @@ class __$$RecipeTagModelImplCopyWithImpl<$Res> extends _$RecipeTagModelCopyWithI
|
||||
@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})
|
||||
{@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);
|
||||
factory _$RecipeTagModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RecipeTagModelImplFromJson(json);
|
||||
|
||||
final List<RecipeTag> _data;
|
||||
|
||||
@override
|
||||
@JsonKey(name: "data")
|
||||
List<RecipeTag> get data {
|
||||
@@ -194,14 +206,17 @@ class _$RecipeTagModelImpl implements _RecipeTagModel {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, const DeepCollectionEquality().hash(_data), links, meta);
|
||||
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);
|
||||
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith =>
|
||||
__$$RecipeTagModelImplCopyWithImpl<_$RecipeTagModelImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -217,16 +232,15 @@ abstract class _RecipeTagModel implements RecipeTagModel {
|
||||
@JsonKey(name: "links") required final Links links,
|
||||
@JsonKey(name: "meta") required final Meta meta}) = _$RecipeTagModelImpl;
|
||||
|
||||
factory _RecipeTagModel.fromJson(Map<String, dynamic> json) = _$RecipeTagModelImpl.fromJson;
|
||||
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;
|
||||
@@ -235,7 +249,8 @@ abstract class _RecipeTagModel implements RecipeTagModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$RecipeTagModelImplCopyWith<_$RecipeTagModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
RecipeTag _$RecipeTagFromJson(Map<String, dynamic> json) {
|
||||
@@ -246,16 +261,12 @@ RecipeTag _$RecipeTagFromJson(Map<String, dynamic> json) {
|
||||
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;
|
||||
|
||||
@@ -265,13 +276,14 @@ mixin _$RecipeTag {
|
||||
/// 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;
|
||||
$RecipeTagCopyWith<RecipeTag> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipeTagCopyWith<$Res> {
|
||||
factory $RecipeTagCopyWith(RecipeTag value, $Res Function(RecipeTag) then) = _$RecipeTagCopyWithImpl<$Res, RecipeTag>;
|
||||
|
||||
factory $RecipeTagCopyWith(RecipeTag value, $Res Function(RecipeTag) then) =
|
||||
_$RecipeTagCopyWithImpl<$Res, RecipeTag>;
|
||||
@useResult
|
||||
$Res call(
|
||||
{@JsonKey(name: "id") int id,
|
||||
@@ -282,12 +294,12 @@ abstract class $RecipeTagCopyWith<$Res> {
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipeTagCopyWithImpl<$Res, $Val extends RecipeTag> implements $RecipeTagCopyWith<$Res> {
|
||||
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;
|
||||
|
||||
@@ -328,9 +340,11 @@ class _$RecipeTagCopyWithImpl<$Res, $Val extends RecipeTag> implements $RecipeTa
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipeTagImplCopyWith<$Res> implements $RecipeTagCopyWith<$Res> {
|
||||
factory _$$RecipeTagImplCopyWith(_$RecipeTagImpl value, $Res Function(_$RecipeTagImpl) then) = __$$RecipeTagImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$RecipeTagImplCopyWith<$Res>
|
||||
implements $RecipeTagCopyWith<$Res> {
|
||||
factory _$$RecipeTagImplCopyWith(
|
||||
_$RecipeTagImpl value, $Res Function(_$RecipeTagImpl) then) =
|
||||
__$$RecipeTagImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call(
|
||||
@@ -342,8 +356,12 @@ abstract class _$$RecipeTagImplCopyWith<$Res> implements $RecipeTagCopyWith<$Res
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipeTagImplCopyWithImpl<$Res> extends _$RecipeTagCopyWithImpl<$Res, _$RecipeTagImpl> implements _$$RecipeTagImplCopyWith<$Res> {
|
||||
__$$RecipeTagImplCopyWithImpl(_$RecipeTagImpl _value, $Res Function(_$RecipeTagImpl) _then) : super(_value, _then);
|
||||
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.
|
||||
@@ -391,7 +409,8 @@ class _$RecipeTagImpl implements _RecipeTag {
|
||||
@JsonKey(name: "created_at") required this.createdAt,
|
||||
@JsonKey(name: "updated_at") required this.updatedAt});
|
||||
|
||||
factory _$RecipeTagImpl.fromJson(Map<String, dynamic> json) => _$$RecipeTagImplFromJson(json);
|
||||
factory _$RecipeTagImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$RecipeTagImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: "id")
|
||||
@@ -421,21 +440,26 @@ class _$RecipeTagImpl implements _RecipeTag {
|
||||
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));
|
||||
(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);
|
||||
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);
|
||||
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith =>
|
||||
__$$RecipeTagImplCopyWithImpl<_$RecipeTagImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -447,30 +471,28 @@ class _$RecipeTagImpl implements _RecipeTag {
|
||||
|
||||
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;
|
||||
{@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;
|
||||
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;
|
||||
@@ -479,5 +501,6 @@ abstract class _RecipeTag implements RecipeTag {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$RecipeTagImplCopyWith<_$RecipeTagImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,19 +6,25 @@ 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(),
|
||||
_$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>{
|
||||
Map<String, dynamic> _$$RecipeTagModelImplToJson(
|
||||
_$RecipeTagModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'data': instance.data,
|
||||
'links': instance.links,
|
||||
'meta': instance.meta,
|
||||
};
|
||||
|
||||
_$RecipeTagImpl _$$RecipeTagImplFromJson(Map<String, dynamic> json) => _$RecipeTagImpl(
|
||||
_$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(),
|
||||
@@ -26,7 +32,8 @@ _$RecipeTagImpl _$$RecipeTagImplFromJson(Map<String, dynamic> json) => _$RecipeT
|
||||
updatedAt: DateTime.parse(json['updated_at'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$RecipeTagImplToJson(_$RecipeTagImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$RecipeTagImplToJson(_$RecipeTagImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
'recipes_count': instance.recipesCount,
|
||||
|
||||
@@ -21,7 +21,6 @@ Step _$StepFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Step {
|
||||
String? get image => throw _privateConstructorUsedError;
|
||||
|
||||
String? get description => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Step to a JSON map.
|
||||
@@ -35,19 +34,19 @@ mixin _$Step {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $StepCopyWith<$Res> {
|
||||
factory $StepCopyWith(Step value, $Res Function(Step) then) = _$StepCopyWithImpl<$Res, Step>;
|
||||
|
||||
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> {
|
||||
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;
|
||||
|
||||
@@ -74,16 +73,20 @@ class _$StepCopyWithImpl<$Res, $Val extends Step> implements $StepCopyWith<$Res>
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$StepImplCopyWith<$Res> implements $StepCopyWith<$Res> {
|
||||
factory _$$StepImplCopyWith(_$StepImpl value, $Res Function(_$StepImpl) then) = __$$StepImplCopyWithImpl<$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);
|
||||
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.
|
||||
@@ -111,7 +114,8 @@ class __$$StepImplCopyWithImpl<$Res> extends _$StepCopyWithImpl<$Res, _$StepImpl
|
||||
class _$StepImpl implements _Step {
|
||||
const _$StepImpl({this.image, this.description});
|
||||
|
||||
factory _$StepImpl.fromJson(Map<String, dynamic> json) => _$$StepImplFromJson(json);
|
||||
factory _$StepImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$StepImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String? image;
|
||||
@@ -129,7 +133,8 @@ class _$StepImpl implements _Step {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$StepImpl &&
|
||||
(identical(other.image, image) || other.image == image) &&
|
||||
(identical(other.description, description) || other.description == description));
|
||||
(identical(other.description, description) ||
|
||||
other.description == description));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -141,7 +146,8 @@ class _$StepImpl implements _Step {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$StepImplCopyWith<_$StepImpl> get copyWith => __$$StepImplCopyWithImpl<_$StepImpl>(this, _$identity);
|
||||
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
|
||||
__$$StepImplCopyWithImpl<_$StepImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -152,13 +158,13 @@ class _$StepImpl implements _Step {
|
||||
}
|
||||
|
||||
abstract class _Step implements Step {
|
||||
const factory _Step({final String? image, final String? description}) = _$StepImpl;
|
||||
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;
|
||||
|
||||
@@ -166,5 +172,6 @@ abstract class _Step implements Step {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$StepImplCopyWith<_$StepImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$StepImplCopyWith<_$StepImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,8 @@ _$StepImpl _$$StepImplFromJson(Map<String, dynamic> json) => _$StepImpl(
|
||||
description: json['description'] as String?,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$StepImplToJson(_$StepImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'image': instance.image,
|
||||
'description': instance.description,
|
||||
};
|
||||
|
||||
@@ -45,7 +45,6 @@ mixin _$RecipeCreateState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -134,16 +133,18 @@ mixin _$RecipeCreateState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $RecipeCreateStateCopyWith<$Res> {
|
||||
factory $RecipeCreateStateCopyWith(RecipeCreateState value, $Res Function(RecipeCreateState) then) = _$RecipeCreateStateCopyWithImpl<$Res, RecipeCreateState>;
|
||||
factory $RecipeCreateStateCopyWith(
|
||||
RecipeCreateState value, $Res Function(RecipeCreateState) then) =
|
||||
_$RecipeCreateStateCopyWithImpl<$Res, RecipeCreateState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$RecipeCreateStateCopyWithImpl<$Res, $Val extends RecipeCreateState> implements $RecipeCreateStateCopyWith<$Res> {
|
||||
class _$RecipeCreateStateCopyWithImpl<$Res, $Val extends RecipeCreateState>
|
||||
implements $RecipeCreateStateCopyWith<$Res> {
|
||||
_$RecipeCreateStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -153,14 +154,18 @@ class _$RecipeCreateStateCopyWithImpl<$Res, $Val extends RecipeCreateState> impl
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipeCreateStateImplCopyWith<$Res> {
|
||||
factory _$$RecipeCreateStateImplCopyWith(_$RecipeCreateStateImpl value, $Res Function(_$RecipeCreateStateImpl) then) =
|
||||
factory _$$RecipeCreateStateImplCopyWith(_$RecipeCreateStateImpl value,
|
||||
$Res Function(_$RecipeCreateStateImpl) then) =
|
||||
__$$RecipeCreateStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipeCreateStateImplCopyWithImpl<$Res> extends _$RecipeCreateStateCopyWithImpl<$Res, _$RecipeCreateStateImpl>
|
||||
class __$$RecipeCreateStateImplCopyWithImpl<$Res>
|
||||
extends _$RecipeCreateStateCopyWithImpl<$Res, _$RecipeCreateStateImpl>
|
||||
implements _$$RecipeCreateStateImplCopyWith<$Res> {
|
||||
__$$RecipeCreateStateImplCopyWithImpl(_$RecipeCreateStateImpl _value, $Res Function(_$RecipeCreateStateImpl) _then) : super(_value, _then);
|
||||
__$$RecipeCreateStateImplCopyWithImpl(_$RecipeCreateStateImpl _value,
|
||||
$Res Function(_$RecipeCreateStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -178,7 +183,8 @@ class _$RecipeCreateStateImpl implements _RecipeCreateState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$RecipeCreateStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$RecipeCreateStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -328,14 +334,20 @@ abstract class _RecipeCreateState implements RecipeCreateState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipeCreateStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$RecipeCreateStateLoadingImplCopyWith(_$RecipeCreateStateLoadingImpl value, $Res Function(_$RecipeCreateStateLoadingImpl) then) =
|
||||
factory _$$RecipeCreateStateLoadingImplCopyWith(
|
||||
_$RecipeCreateStateLoadingImpl value,
|
||||
$Res Function(_$RecipeCreateStateLoadingImpl) then) =
|
||||
__$$RecipeCreateStateLoadingImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipeCreateStateLoadingImplCopyWithImpl<$Res> extends _$RecipeCreateStateCopyWithImpl<$Res, _$RecipeCreateStateLoadingImpl>
|
||||
class __$$RecipeCreateStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$RecipeCreateStateCopyWithImpl<$Res,
|
||||
_$RecipeCreateStateLoadingImpl>
|
||||
implements _$$RecipeCreateStateLoadingImplCopyWith<$Res> {
|
||||
__$$RecipeCreateStateLoadingImplCopyWithImpl(_$RecipeCreateStateLoadingImpl _value, $Res Function(_$RecipeCreateStateLoadingImpl) _then)
|
||||
__$$RecipeCreateStateLoadingImplCopyWithImpl(
|
||||
_$RecipeCreateStateLoadingImpl _value,
|
||||
$Res Function(_$RecipeCreateStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
@@ -354,7 +366,9 @@ class _$RecipeCreateStateLoadingImpl implements RecipeCreateStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$RecipeCreateStateLoadingImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipeCreateStateLoadingImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -504,9 +518,10 @@ abstract class RecipeCreateStateLoading implements RecipeCreateState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipeCreateStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$RecipeCreateStateLoadedImplCopyWith(_$RecipeCreateStateLoadedImpl value, $Res Function(_$RecipeCreateStateLoadedImpl) then) =
|
||||
factory _$$RecipeCreateStateLoadedImplCopyWith(
|
||||
_$RecipeCreateStateLoadedImpl value,
|
||||
$Res Function(_$RecipeCreateStateLoadedImpl) then) =
|
||||
__$$RecipeCreateStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{RecipeModel? recipe,
|
||||
@@ -531,18 +546,19 @@ abstract class _$$RecipeCreateStateLoadedImplCopyWith<$Res> {
|
||||
SelectionPopupModel selectedStatus});
|
||||
|
||||
$RecipeModelCopyWith<$Res>? get recipe;
|
||||
|
||||
$SelectionPopupModelCopyWith<$Res> get selectedType;
|
||||
|
||||
$SelectionPopupModelCopyWith<$Res> get selectedCookingTime;
|
||||
|
||||
$SelectionPopupModelCopyWith<$Res> get selectedStatus;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipeCreateStateLoadedImplCopyWithImpl<$Res> extends _$RecipeCreateStateCopyWithImpl<$Res, _$RecipeCreateStateLoadedImpl>
|
||||
class __$$RecipeCreateStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$RecipeCreateStateCopyWithImpl<$Res, _$RecipeCreateStateLoadedImpl>
|
||||
implements _$$RecipeCreateStateLoadedImplCopyWith<$Res> {
|
||||
__$$RecipeCreateStateLoadedImplCopyWithImpl(_$RecipeCreateStateLoadedImpl _value, $Res Function(_$RecipeCreateStateLoadedImpl) _then) : super(_value, _then);
|
||||
__$$RecipeCreateStateLoadedImplCopyWithImpl(
|
||||
_$RecipeCreateStateLoadedImpl _value,
|
||||
$Res Function(_$RecipeCreateStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -683,7 +699,8 @@ class __$$RecipeCreateStateLoadedImplCopyWithImpl<$Res> extends _$RecipeCreateSt
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SelectionPopupModelCopyWith<$Res> get selectedCookingTime {
|
||||
return $SelectionPopupModelCopyWith<$Res>(_value.selectedCookingTime, (value) {
|
||||
return $SelectionPopupModelCopyWith<$Res>(_value.selectedCookingTime,
|
||||
(value) {
|
||||
return _then(_value.copyWith(selectedCookingTime: value));
|
||||
});
|
||||
}
|
||||
@@ -746,7 +763,6 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded {
|
||||
@override
|
||||
final TextEditingController youtubeLinkController;
|
||||
final List<TextEditingController> _stepControllers;
|
||||
|
||||
@override
|
||||
List<TextEditingController> get stepControllers {
|
||||
if (_stepControllers is EqualUnmodifiableListView) return _stepControllers;
|
||||
@@ -757,7 +773,6 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded {
|
||||
@override
|
||||
final XFile? recipeImage;
|
||||
final List<XFile?> _stepImages;
|
||||
|
||||
@override
|
||||
List<XFile?> get stepImages {
|
||||
if (_stepImages is EqualUnmodifiableListView) return _stepImages;
|
||||
@@ -766,7 +781,6 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded {
|
||||
}
|
||||
|
||||
final List<Ingredient> _ingredients;
|
||||
|
||||
@override
|
||||
List<Ingredient> get ingredients {
|
||||
if (_ingredients is EqualUnmodifiableListView) return _ingredients;
|
||||
@@ -775,10 +789,10 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded {
|
||||
}
|
||||
|
||||
final List<Product> _autocompleteList;
|
||||
|
||||
@override
|
||||
List<Product> get autocompleteList {
|
||||
if (_autocompleteList is EqualUnmodifiableListView) return _autocompleteList;
|
||||
if (_autocompleteList is EqualUnmodifiableListView)
|
||||
return _autocompleteList;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_autocompleteList);
|
||||
}
|
||||
@@ -788,7 +802,6 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded {
|
||||
@override
|
||||
final bool ingredientAsItems;
|
||||
final List<SelectionPopupModel> _types;
|
||||
|
||||
@override
|
||||
List<SelectionPopupModel> get types {
|
||||
if (_types is EqualUnmodifiableListView) return _types;
|
||||
@@ -797,7 +810,6 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded {
|
||||
}
|
||||
|
||||
final List<SelectionPopupModel> _cookingTimes;
|
||||
|
||||
@override
|
||||
List<SelectionPopupModel> get cookingTimes {
|
||||
if (_cookingTimes is EqualUnmodifiableListView) return _cookingTimes;
|
||||
@@ -806,7 +818,6 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded {
|
||||
}
|
||||
|
||||
final List<SelectionPopupModel> _statuses;
|
||||
|
||||
@override
|
||||
List<SelectionPopupModel> get statuses {
|
||||
if (_statuses is EqualUnmodifiableListView) return _statuses;
|
||||
@@ -833,24 +844,41 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded {
|
||||
other is _$RecipeCreateStateLoadedImpl &&
|
||||
(identical(other.recipe, recipe) || other.recipe == recipe) &&
|
||||
(identical(other.picker, picker) || other.picker == picker) &&
|
||||
(identical(other.titleController, titleController) || other.titleController == titleController) &&
|
||||
(identical(other.productNameController, productNameController) || other.productNameController == productNameController) &&
|
||||
(identical(other.ingredientController, ingredientController) || other.ingredientController == ingredientController) &&
|
||||
(identical(other.stepDescriptionController, stepDescriptionController) || other.stepDescriptionController == stepDescriptionController) &&
|
||||
(identical(other.youtubeLinkController, youtubeLinkController) || other.youtubeLinkController == youtubeLinkController) &&
|
||||
const DeepCollectionEquality().equals(other._stepControllers, _stepControllers) &&
|
||||
(identical(other.recipeImage, recipeImage) || other.recipeImage == recipeImage) &&
|
||||
const DeepCollectionEquality().equals(other._stepImages, _stepImages) &&
|
||||
const DeepCollectionEquality().equals(other._ingredients, _ingredients) &&
|
||||
const DeepCollectionEquality().equals(other._autocompleteList, _autocompleteList) &&
|
||||
(identical(other.numberOfSteps, numberOfSteps) || other.numberOfSteps == numberOfSteps) &&
|
||||
(identical(other.ingredientAsItems, ingredientAsItems) || other.ingredientAsItems == ingredientAsItems) &&
|
||||
(identical(other.titleController, titleController) ||
|
||||
other.titleController == titleController) &&
|
||||
(identical(other.productNameController, productNameController) ||
|
||||
other.productNameController == productNameController) &&
|
||||
(identical(other.ingredientController, ingredientController) ||
|
||||
other.ingredientController == ingredientController) &&
|
||||
(identical(other.stepDescriptionController,
|
||||
stepDescriptionController) ||
|
||||
other.stepDescriptionController == stepDescriptionController) &&
|
||||
(identical(other.youtubeLinkController, youtubeLinkController) ||
|
||||
other.youtubeLinkController == youtubeLinkController) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._stepControllers, _stepControllers) &&
|
||||
(identical(other.recipeImage, recipeImage) ||
|
||||
other.recipeImage == recipeImage) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._stepImages, _stepImages) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._ingredients, _ingredients) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._autocompleteList, _autocompleteList) &&
|
||||
(identical(other.numberOfSteps, numberOfSteps) ||
|
||||
other.numberOfSteps == numberOfSteps) &&
|
||||
(identical(other.ingredientAsItems, ingredientAsItems) ||
|
||||
other.ingredientAsItems == ingredientAsItems) &&
|
||||
const DeepCollectionEquality().equals(other._types, _types) &&
|
||||
const DeepCollectionEquality().equals(other._cookingTimes, _cookingTimes) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._cookingTimes, _cookingTimes) &&
|
||||
const DeepCollectionEquality().equals(other._statuses, _statuses) &&
|
||||
(identical(other.selectedType, selectedType) || other.selectedType == selectedType) &&
|
||||
(identical(other.selectedCookingTime, selectedCookingTime) || other.selectedCookingTime == selectedCookingTime) &&
|
||||
(identical(other.selectedStatus, selectedStatus) || other.selectedStatus == selectedStatus));
|
||||
(identical(other.selectedType, selectedType) ||
|
||||
other.selectedType == selectedType) &&
|
||||
(identical(other.selectedCookingTime, selectedCookingTime) ||
|
||||
other.selectedCookingTime == selectedCookingTime) &&
|
||||
(identical(other.selectedStatus, selectedStatus) ||
|
||||
other.selectedStatus == selectedStatus));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -883,8 +911,9 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipeCreateStateLoadedImplCopyWith<_$RecipeCreateStateLoadedImpl> get copyWith =>
|
||||
__$$RecipeCreateStateLoadedImplCopyWithImpl<_$RecipeCreateStateLoadedImpl>(this, _$identity);
|
||||
_$$RecipeCreateStateLoadedImplCopyWith<_$RecipeCreateStateLoadedImpl>
|
||||
get copyWith => __$$RecipeCreateStateLoadedImplCopyWithImpl<
|
||||
_$RecipeCreateStateLoadedImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -1086,86 +1115,74 @@ class _$RecipeCreateStateLoadedImpl implements RecipeCreateStateLoaded {
|
||||
|
||||
abstract class RecipeCreateStateLoaded implements RecipeCreateState {
|
||||
const factory RecipeCreateStateLoaded(
|
||||
{final RecipeModel? recipe,
|
||||
required final ImagePicker picker,
|
||||
required final TextEditingController titleController,
|
||||
required final TextEditingController productNameController,
|
||||
required final TextEditingController ingredientController,
|
||||
required final TextEditingController stepDescriptionController,
|
||||
required final TextEditingController youtubeLinkController,
|
||||
required final List<TextEditingController> stepControllers,
|
||||
final XFile? recipeImage,
|
||||
required final List<XFile?> stepImages,
|
||||
required final List<Ingredient> ingredients,
|
||||
required final List<Product> autocompleteList,
|
||||
required final int numberOfSteps,
|
||||
required final bool ingredientAsItems,
|
||||
required final List<SelectionPopupModel> types,
|
||||
required final List<SelectionPopupModel> cookingTimes,
|
||||
required final List<SelectionPopupModel> statuses,
|
||||
required final SelectionPopupModel selectedType,
|
||||
required final SelectionPopupModel selectedCookingTime,
|
||||
required final SelectionPopupModel selectedStatus}) = _$RecipeCreateStateLoadedImpl;
|
||||
{final RecipeModel? recipe,
|
||||
required final ImagePicker picker,
|
||||
required final TextEditingController titleController,
|
||||
required final TextEditingController productNameController,
|
||||
required final TextEditingController ingredientController,
|
||||
required final TextEditingController stepDescriptionController,
|
||||
required final TextEditingController youtubeLinkController,
|
||||
required final List<TextEditingController> stepControllers,
|
||||
final XFile? recipeImage,
|
||||
required final List<XFile?> stepImages,
|
||||
required final List<Ingredient> ingredients,
|
||||
required final List<Product> autocompleteList,
|
||||
required final int numberOfSteps,
|
||||
required final bool ingredientAsItems,
|
||||
required final List<SelectionPopupModel> types,
|
||||
required final List<SelectionPopupModel> cookingTimes,
|
||||
required final List<SelectionPopupModel> statuses,
|
||||
required final SelectionPopupModel selectedType,
|
||||
required final SelectionPopupModel selectedCookingTime,
|
||||
required final SelectionPopupModel selectedStatus}) =
|
||||
_$RecipeCreateStateLoadedImpl;
|
||||
|
||||
RecipeModel? get recipe;
|
||||
|
||||
ImagePicker get picker;
|
||||
|
||||
TextEditingController get titleController;
|
||||
|
||||
TextEditingController get productNameController;
|
||||
|
||||
TextEditingController get ingredientController;
|
||||
|
||||
TextEditingController get stepDescriptionController;
|
||||
|
||||
TextEditingController get youtubeLinkController;
|
||||
|
||||
List<TextEditingController> get stepControllers;
|
||||
|
||||
XFile? get recipeImage;
|
||||
|
||||
List<XFile?> get stepImages;
|
||||
|
||||
List<Ingredient> get ingredients;
|
||||
|
||||
List<Product> get autocompleteList;
|
||||
|
||||
int get numberOfSteps;
|
||||
|
||||
bool get ingredientAsItems;
|
||||
|
||||
List<SelectionPopupModel> get types;
|
||||
|
||||
List<SelectionPopupModel> get cookingTimes;
|
||||
|
||||
List<SelectionPopupModel> get statuses;
|
||||
|
||||
SelectionPopupModel get selectedType;
|
||||
|
||||
SelectionPopupModel get selectedCookingTime;
|
||||
|
||||
SelectionPopupModel get selectedStatus;
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipeCreateStateLoadedImplCopyWith<_$RecipeCreateStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$RecipeCreateStateLoadedImplCopyWith<_$RecipeCreateStateLoadedImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$RecipeCreateStateErrorImplCopyWith<$Res> {
|
||||
factory _$$RecipeCreateStateErrorImplCopyWith(_$RecipeCreateStateErrorImpl value, $Res Function(_$RecipeCreateStateErrorImpl) then) =
|
||||
factory _$$RecipeCreateStateErrorImplCopyWith(
|
||||
_$RecipeCreateStateErrorImpl value,
|
||||
$Res Function(_$RecipeCreateStateErrorImpl) then) =
|
||||
__$$RecipeCreateStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$RecipeCreateStateErrorImplCopyWithImpl<$Res> extends _$RecipeCreateStateCopyWithImpl<$Res, _$RecipeCreateStateErrorImpl>
|
||||
class __$$RecipeCreateStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$RecipeCreateStateCopyWithImpl<$Res, _$RecipeCreateStateErrorImpl>
|
||||
implements _$$RecipeCreateStateErrorImplCopyWith<$Res> {
|
||||
__$$RecipeCreateStateErrorImplCopyWithImpl(_$RecipeCreateStateErrorImpl _value, $Res Function(_$RecipeCreateStateErrorImpl) _then) : super(_value, _then);
|
||||
__$$RecipeCreateStateErrorImplCopyWithImpl(
|
||||
_$RecipeCreateStateErrorImpl _value,
|
||||
$Res Function(_$RecipeCreateStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -1201,7 +1218,8 @@ class _$RecipeCreateStateErrorImpl implements RecipeCreateStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$RecipeCreateStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -1212,8 +1230,9 @@ class _$RecipeCreateStateErrorImpl implements RecipeCreateStateError {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$RecipeCreateStateErrorImplCopyWith<_$RecipeCreateStateErrorImpl> get copyWith =>
|
||||
__$$RecipeCreateStateErrorImplCopyWithImpl<_$RecipeCreateStateErrorImpl>(this, _$identity);
|
||||
_$$RecipeCreateStateErrorImplCopyWith<_$RecipeCreateStateErrorImpl>
|
||||
get copyWith => __$$RecipeCreateStateErrorImplCopyWithImpl<
|
||||
_$RecipeCreateStateErrorImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -1354,12 +1373,14 @@ class _$RecipeCreateStateErrorImpl implements RecipeCreateStateError {
|
||||
}
|
||||
|
||||
abstract class RecipeCreateStateError implements RecipeCreateState {
|
||||
const factory RecipeCreateStateError({required final String errorMessage}) = _$RecipeCreateStateErrorImpl;
|
||||
const factory RecipeCreateStateError({required final String errorMessage}) =
|
||||
_$RecipeCreateStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of RecipeCreateState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$RecipeCreateStateErrorImplCopyWith<_$RecipeCreateStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$RecipeCreateStateErrorImplCopyWith<_$RecipeCreateStateErrorImpl>
|
||||
get copyWith => throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,11 @@ class _RecipeService implements RecipeService {
|
||||
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()));
|
||||
_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;
|
||||
@@ -250,7 +254,9 @@ class _RecipeService implements RecipeService {
|
||||
}
|
||||
|
||||
RequestOptions _setStreamType<T>(RequestOptions requestOptions) {
|
||||
if (T != dynamic && !(requestOptions.responseType == ResponseType.bytes || requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T != dynamic &&
|
||||
!(requestOptions.responseType == ResponseType.bytes ||
|
||||
requestOptions.responseType == ResponseType.stream)) {
|
||||
if (T == String) {
|
||||
requestOptions.responseType = ResponseType.plain;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user