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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user