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,19 +21,12 @@ DiaryModel _$DiaryModelFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$DiaryModel {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
DateTime get date => throw _privateConstructorUsedError;
|
||||
|
||||
int get closed => throw _privateConstructorUsedError;
|
||||
|
||||
List<Meal> get meals => throw _privateConstructorUsedError;
|
||||
|
||||
State get state => throw _privateConstructorUsedError;
|
||||
|
||||
String? get comment => throw _privateConstructorUsedError;
|
||||
|
||||
DateTime? get wakeup => throw _privateConstructorUsedError;
|
||||
|
||||
DateTime? get retire => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this DiaryModel to a JSON map.
|
||||
@@ -42,26 +35,36 @@ mixin _$DiaryModel {
|
||||
/// Create a copy of DiaryModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
$DiaryModelCopyWith<DiaryModel> get copyWith => throw _privateConstructorUsedError;
|
||||
$DiaryModelCopyWith<DiaryModel> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class $DiaryModelCopyWith<$Res> {
|
||||
factory $DiaryModelCopyWith(DiaryModel value, $Res Function(DiaryModel) then) = _$DiaryModelCopyWithImpl<$Res, DiaryModel>;
|
||||
|
||||
factory $DiaryModelCopyWith(
|
||||
DiaryModel value, $Res Function(DiaryModel) then) =
|
||||
_$DiaryModelCopyWithImpl<$Res, DiaryModel>;
|
||||
@useResult
|
||||
$Res call({int id, DateTime date, int closed, List<Meal> meals, State state, String? comment, DateTime? wakeup, DateTime? retire});
|
||||
$Res call(
|
||||
{int id,
|
||||
DateTime date,
|
||||
int closed,
|
||||
List<Meal> meals,
|
||||
State state,
|
||||
String? comment,
|
||||
DateTime? wakeup,
|
||||
DateTime? retire});
|
||||
|
||||
$StateCopyWith<$Res> get state;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel> implements $DiaryModelCopyWith<$Res> {
|
||||
class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel>
|
||||
implements $DiaryModelCopyWith<$Res> {
|
||||
_$DiaryModelCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -127,20 +130,34 @@ class _$DiaryModelCopyWithImpl<$Res, $Val extends DiaryModel> implements $DiaryM
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DiaryModelImplCopyWith<$Res> implements $DiaryModelCopyWith<$Res> {
|
||||
factory _$$DiaryModelImplCopyWith(_$DiaryModelImpl value, $Res Function(_$DiaryModelImpl) then) = __$$DiaryModelImplCopyWithImpl<$Res>;
|
||||
|
||||
abstract class _$$DiaryModelImplCopyWith<$Res>
|
||||
implements $DiaryModelCopyWith<$Res> {
|
||||
factory _$$DiaryModelImplCopyWith(
|
||||
_$DiaryModelImpl value, $Res Function(_$DiaryModelImpl) then) =
|
||||
__$$DiaryModelImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id, DateTime date, int closed, List<Meal> meals, State state, String? comment, DateTime? wakeup, DateTime? retire});
|
||||
$Res call(
|
||||
{int id,
|
||||
DateTime date,
|
||||
int closed,
|
||||
List<Meal> meals,
|
||||
State state,
|
||||
String? comment,
|
||||
DateTime? wakeup,
|
||||
DateTime? retire});
|
||||
|
||||
@override
|
||||
$StateCopyWith<$Res> get state;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DiaryModelImplCopyWithImpl<$Res> extends _$DiaryModelCopyWithImpl<$Res, _$DiaryModelImpl> implements _$$DiaryModelImplCopyWith<$Res> {
|
||||
__$$DiaryModelImplCopyWithImpl(_$DiaryModelImpl _value, $Res Function(_$DiaryModelImpl) _then) : super(_value, _then);
|
||||
class __$$DiaryModelImplCopyWithImpl<$Res>
|
||||
extends _$DiaryModelCopyWithImpl<$Res, _$DiaryModelImpl>
|
||||
implements _$$DiaryModelImplCopyWith<$Res> {
|
||||
__$$DiaryModelImplCopyWithImpl(
|
||||
_$DiaryModelImpl _value, $Res Function(_$DiaryModelImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DiaryModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -207,7 +224,8 @@ class _$DiaryModelImpl implements _DiaryModel {
|
||||
this.retire})
|
||||
: _meals = meals;
|
||||
|
||||
factory _$DiaryModelImpl.fromJson(Map<String, dynamic> json) => _$$DiaryModelImplFromJson(json);
|
||||
factory _$DiaryModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$DiaryModelImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -216,7 +234,6 @@ class _$DiaryModelImpl implements _DiaryModel {
|
||||
@override
|
||||
final int closed;
|
||||
final List<Meal> _meals;
|
||||
|
||||
@override
|
||||
List<Meal> get meals {
|
||||
if (_meals is EqualUnmodifiableListView) return _meals;
|
||||
@@ -255,14 +272,24 @@ class _$DiaryModelImpl implements _DiaryModel {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, date, closed, const DeepCollectionEquality().hash(_meals), state, comment, wakeup, retire);
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
date,
|
||||
closed,
|
||||
const DeepCollectionEquality().hash(_meals),
|
||||
state,
|
||||
comment,
|
||||
wakeup,
|
||||
retire);
|
||||
|
||||
/// Create a copy of DiaryModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith => __$$DiaryModelImplCopyWithImpl<_$DiaryModelImpl>(this, _$identity);
|
||||
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
|
||||
__$$DiaryModelImplCopyWithImpl<_$DiaryModelImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -283,29 +310,23 @@ abstract class _DiaryModel implements DiaryModel {
|
||||
final DateTime? wakeup,
|
||||
final DateTime? retire}) = _$DiaryModelImpl;
|
||||
|
||||
factory _DiaryModel.fromJson(Map<String, dynamic> json) = _$DiaryModelImpl.fromJson;
|
||||
factory _DiaryModel.fromJson(Map<String, dynamic> json) =
|
||||
_$DiaryModelImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
DateTime get date;
|
||||
|
||||
@override
|
||||
int get closed;
|
||||
|
||||
@override
|
||||
List<Meal> get meals;
|
||||
|
||||
@override
|
||||
State get state;
|
||||
|
||||
@override
|
||||
String? get comment;
|
||||
|
||||
@override
|
||||
DateTime? get wakeup;
|
||||
|
||||
@override
|
||||
DateTime? get retire;
|
||||
|
||||
@@ -313,5 +334,6 @@ abstract class _DiaryModel implements DiaryModel {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DiaryModelImplCopyWith<_$DiaryModelImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,18 +6,26 @@ part of 'diary_model.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$DiaryModelImpl _$$DiaryModelImplFromJson(Map<String, dynamic> json) => _$DiaryModelImpl(
|
||||
_$DiaryModelImpl _$$DiaryModelImplFromJson(Map<String, dynamic> json) =>
|
||||
_$DiaryModelImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
date: DateTime.parse(json['date'] as String),
|
||||
closed: (json['closed'] as num).toInt(),
|
||||
meals: (json['meals'] as List<dynamic>).map((e) => Meal.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
meals: (json['meals'] as List<dynamic>)
|
||||
.map((e) => Meal.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
state: State.fromJson(json['state'] as Map<String, dynamic>),
|
||||
comment: json['comment'] as String?,
|
||||
wakeup: json['wakeup'] == null ? null : DateTime.parse(json['wakeup'] as String),
|
||||
retire: json['retire'] == null ? null : DateTime.parse(json['retire'] as String),
|
||||
wakeup: json['wakeup'] == null
|
||||
? null
|
||||
: DateTime.parse(json['wakeup'] as String),
|
||||
retire: json['retire'] == null
|
||||
? null
|
||||
: DateTime.parse(json['retire'] as String),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$DiaryModelImplToJson(_$DiaryModelImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$DiaryModelImplToJson(_$DiaryModelImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'date': instance.date.toIso8601String(),
|
||||
'closed': instance.closed,
|
||||
|
||||
@@ -21,17 +21,11 @@ Meal _$MealFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Meal {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get time => throw _privateConstructorUsedError;
|
||||
|
||||
int get type => throw _privateConstructorUsedError;
|
||||
|
||||
int get satiety => throw _privateConstructorUsedError;
|
||||
|
||||
int get mood => throw _privateConstructorUsedError;
|
||||
|
||||
List<Portion> get portions => throw _privateConstructorUsedError;
|
||||
|
||||
List<Photo> get photos => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Meal to a JSON map.
|
||||
@@ -45,19 +39,26 @@ mixin _$Meal {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $MealCopyWith<$Res> {
|
||||
factory $MealCopyWith(Meal value, $Res Function(Meal) then) = _$MealCopyWithImpl<$Res, Meal>;
|
||||
|
||||
factory $MealCopyWith(Meal value, $Res Function(Meal) then) =
|
||||
_$MealCopyWithImpl<$Res, Meal>;
|
||||
@useResult
|
||||
$Res call({int id, String time, int type, int satiety, int mood, List<Portion> portions, List<Photo> photos});
|
||||
$Res call(
|
||||
{int id,
|
||||
String time,
|
||||
int type,
|
||||
int satiety,
|
||||
int mood,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$MealCopyWithImpl<$Res, $Val extends Meal> implements $MealCopyWith<$Res> {
|
||||
class _$MealCopyWithImpl<$Res, $Val extends Meal>
|
||||
implements $MealCopyWith<$Res> {
|
||||
_$MealCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -109,16 +110,27 @@ class _$MealCopyWithImpl<$Res, $Val extends Meal> implements $MealCopyWith<$Res>
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$MealImplCopyWith<$Res> implements $MealCopyWith<$Res> {
|
||||
factory _$$MealImplCopyWith(_$MealImpl value, $Res Function(_$MealImpl) then) = __$$MealImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$MealImplCopyWith(
|
||||
_$MealImpl value, $Res Function(_$MealImpl) then) =
|
||||
__$$MealImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id, String time, int type, int satiety, int mood, List<Portion> portions, List<Photo> photos});
|
||||
$Res call(
|
||||
{int id,
|
||||
String time,
|
||||
int type,
|
||||
int satiety,
|
||||
int mood,
|
||||
List<Portion> portions,
|
||||
List<Photo> photos});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$MealImplCopyWithImpl<$Res> extends _$MealCopyWithImpl<$Res, _$MealImpl> implements _$$MealImplCopyWith<$Res> {
|
||||
__$$MealImplCopyWithImpl(_$MealImpl _value, $Res Function(_$MealImpl) _then) : super(_value, _then);
|
||||
class __$$MealImplCopyWithImpl<$Res>
|
||||
extends _$MealCopyWithImpl<$Res, _$MealImpl>
|
||||
implements _$$MealImplCopyWith<$Res> {
|
||||
__$$MealImplCopyWithImpl(_$MealImpl _value, $Res Function(_$MealImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Meal
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -180,7 +192,8 @@ class _$MealImpl implements _Meal {
|
||||
: _portions = portions,
|
||||
_photos = photos;
|
||||
|
||||
factory _$MealImpl.fromJson(Map<String, dynamic> json) => _$$MealImplFromJson(json);
|
||||
factory _$MealImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$MealImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -193,7 +206,6 @@ class _$MealImpl implements _Meal {
|
||||
@override
|
||||
final int mood;
|
||||
final List<Portion> _portions;
|
||||
|
||||
@override
|
||||
List<Portion> get portions {
|
||||
if (_portions is EqualUnmodifiableListView) return _portions;
|
||||
@@ -202,7 +214,6 @@ class _$MealImpl implements _Meal {
|
||||
}
|
||||
|
||||
final List<Photo> _photos;
|
||||
|
||||
@override
|
||||
List<Photo> get photos {
|
||||
if (_photos is EqualUnmodifiableListView) return _photos;
|
||||
@@ -231,15 +242,23 @@ class _$MealImpl implements _Meal {
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, time, type, satiety, mood, const DeepCollectionEquality().hash(_portions), const DeepCollectionEquality().hash(_photos));
|
||||
int get hashCode => Object.hash(
|
||||
runtimeType,
|
||||
id,
|
||||
time,
|
||||
type,
|
||||
satiety,
|
||||
mood,
|
||||
const DeepCollectionEquality().hash(_portions),
|
||||
const DeepCollectionEquality().hash(_photos));
|
||||
|
||||
/// Create a copy of Meal
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$MealImplCopyWith<_$MealImpl> get copyWith => __$$MealImplCopyWithImpl<_$MealImpl>(this, _$identity);
|
||||
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
|
||||
__$$MealImplCopyWithImpl<_$MealImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -263,22 +282,16 @@ abstract class _Meal implements Meal {
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get time;
|
||||
|
||||
@override
|
||||
int get type;
|
||||
|
||||
@override
|
||||
int get satiety;
|
||||
|
||||
@override
|
||||
int get mood;
|
||||
|
||||
@override
|
||||
List<Portion> get portions;
|
||||
|
||||
@override
|
||||
List<Photo> get photos;
|
||||
|
||||
@@ -286,5 +299,6 @@ abstract class _Meal implements Meal {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$MealImplCopyWith<_$MealImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$MealImplCopyWith<_$MealImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -12,11 +12,16 @@ _$MealImpl _$$MealImplFromJson(Map<String, dynamic> json) => _$MealImpl(
|
||||
type: (json['type'] as num).toInt(),
|
||||
satiety: (json['satiety'] as num).toInt(),
|
||||
mood: (json['mood'] as num).toInt(),
|
||||
portions: (json['portions'] as List<dynamic>).map((e) => Portion.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
photos: (json['photos'] as List<dynamic>).map((e) => Photo.fromJson(e as Map<String, dynamic>)).toList(),
|
||||
portions: (json['portions'] as List<dynamic>)
|
||||
.map((e) => Portion.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
photos: (json['photos'] as List<dynamic>)
|
||||
.map((e) => Photo.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$MealImplToJson(_$MealImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$MealImplToJson(_$MealImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'time': instance.time,
|
||||
'type': instance.type,
|
||||
|
||||
@@ -21,10 +21,8 @@ Photo _$PhotoFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Photo {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
@JsonKey(name: 'original_name')
|
||||
String get originalName => throw _privateConstructorUsedError;
|
||||
|
||||
String get path => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Photo to a JSON map.
|
||||
@@ -38,19 +36,22 @@ mixin _$Photo {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $PhotoCopyWith<$Res> {
|
||||
factory $PhotoCopyWith(Photo value, $Res Function(Photo) then) = _$PhotoCopyWithImpl<$Res, Photo>;
|
||||
|
||||
factory $PhotoCopyWith(Photo value, $Res Function(Photo) then) =
|
||||
_$PhotoCopyWithImpl<$Res, Photo>;
|
||||
@useResult
|
||||
$Res call({int id, @JsonKey(name: 'original_name') String originalName, String path});
|
||||
$Res call(
|
||||
{int id,
|
||||
@JsonKey(name: 'original_name') String originalName,
|
||||
String path});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$PhotoCopyWithImpl<$Res, $Val extends Photo> implements $PhotoCopyWith<$Res> {
|
||||
class _$PhotoCopyWithImpl<$Res, $Val extends Photo>
|
||||
implements $PhotoCopyWith<$Res> {
|
||||
_$PhotoCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -82,16 +83,24 @@ class _$PhotoCopyWithImpl<$Res, $Val extends Photo> implements $PhotoCopyWith<$R
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PhotoImplCopyWith<$Res> implements $PhotoCopyWith<$Res> {
|
||||
factory _$$PhotoImplCopyWith(_$PhotoImpl value, $Res Function(_$PhotoImpl) then) = __$$PhotoImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$PhotoImplCopyWith(
|
||||
_$PhotoImpl value, $Res Function(_$PhotoImpl) then) =
|
||||
__$$PhotoImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id, @JsonKey(name: 'original_name') String originalName, String path});
|
||||
$Res call(
|
||||
{int id,
|
||||
@JsonKey(name: 'original_name') String originalName,
|
||||
String path});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PhotoImplCopyWithImpl<$Res> extends _$PhotoCopyWithImpl<$Res, _$PhotoImpl> implements _$$PhotoImplCopyWith<$Res> {
|
||||
__$$PhotoImplCopyWithImpl(_$PhotoImpl _value, $Res Function(_$PhotoImpl) _then) : super(_value, _then);
|
||||
class __$$PhotoImplCopyWithImpl<$Res>
|
||||
extends _$PhotoCopyWithImpl<$Res, _$PhotoImpl>
|
||||
implements _$$PhotoImplCopyWith<$Res> {
|
||||
__$$PhotoImplCopyWithImpl(
|
||||
_$PhotoImpl _value, $Res Function(_$PhotoImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Photo
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -122,9 +131,13 @@ class __$$PhotoImplCopyWithImpl<$Res> extends _$PhotoCopyWithImpl<$Res, _$PhotoI
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$PhotoImpl implements _Photo {
|
||||
const _$PhotoImpl({required this.id, @JsonKey(name: 'original_name') required this.originalName, required this.path});
|
||||
const _$PhotoImpl(
|
||||
{required this.id,
|
||||
@JsonKey(name: 'original_name') required this.originalName,
|
||||
required this.path});
|
||||
|
||||
factory _$PhotoImpl.fromJson(Map<String, dynamic> json) => _$$PhotoImplFromJson(json);
|
||||
factory _$PhotoImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$PhotoImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -145,7 +158,8 @@ class _$PhotoImpl implements _Photo {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$PhotoImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.originalName, originalName) || other.originalName == originalName) &&
|
||||
(identical(other.originalName, originalName) ||
|
||||
other.originalName == originalName) &&
|
||||
(identical(other.path, path) || other.path == path));
|
||||
}
|
||||
|
||||
@@ -158,7 +172,8 @@ class _$PhotoImpl implements _Photo {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith => __$$PhotoImplCopyWithImpl<_$PhotoImpl>(this, _$identity);
|
||||
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
|
||||
__$$PhotoImplCopyWithImpl<_$PhotoImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -169,17 +184,18 @@ class _$PhotoImpl implements _Photo {
|
||||
}
|
||||
|
||||
abstract class _Photo implements Photo {
|
||||
const factory _Photo({required final int id, @JsonKey(name: 'original_name') required final String originalName, required final String path}) = _$PhotoImpl;
|
||||
const factory _Photo(
|
||||
{required final int id,
|
||||
@JsonKey(name: 'original_name') required final String originalName,
|
||||
required final String path}) = _$PhotoImpl;
|
||||
|
||||
factory _Photo.fromJson(Map<String, dynamic> json) = _$PhotoImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'original_name')
|
||||
String get originalName;
|
||||
|
||||
@override
|
||||
String get path;
|
||||
|
||||
@@ -187,5 +203,6 @@ abstract class _Photo implements Photo {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$PhotoImplCopyWith<_$PhotoImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -12,7 +12,8 @@ _$PhotoImpl _$$PhotoImplFromJson(Map<String, dynamic> json) => _$PhotoImpl(
|
||||
path: json['path'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$PhotoImplToJson(_$PhotoImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$PhotoImplToJson(_$PhotoImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'original_name': instance.originalName,
|
||||
'path': instance.path,
|
||||
|
||||
@@ -21,13 +21,9 @@ Portion _$PortionFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Portion {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get product_name => throw _privateConstructorUsedError;
|
||||
|
||||
int get quantity => throw _privateConstructorUsedError;
|
||||
|
||||
String get portion => throw _privateConstructorUsedError;
|
||||
|
||||
bool get from_diet => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Portion to a JSON map.
|
||||
@@ -41,19 +37,24 @@ mixin _$Portion {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $PortionCopyWith<$Res> {
|
||||
factory $PortionCopyWith(Portion value, $Res Function(Portion) then) = _$PortionCopyWithImpl<$Res, Portion>;
|
||||
|
||||
factory $PortionCopyWith(Portion value, $Res Function(Portion) then) =
|
||||
_$PortionCopyWithImpl<$Res, Portion>;
|
||||
@useResult
|
||||
$Res call({int id, String product_name, int quantity, String portion, bool from_diet});
|
||||
$Res call(
|
||||
{int id,
|
||||
String product_name,
|
||||
int quantity,
|
||||
String portion,
|
||||
bool from_diet});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$PortionCopyWithImpl<$Res, $Val extends Portion> implements $PortionCopyWith<$Res> {
|
||||
class _$PortionCopyWithImpl<$Res, $Val extends Portion>
|
||||
implements $PortionCopyWith<$Res> {
|
||||
_$PortionCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -95,16 +96,26 @@ class _$PortionCopyWithImpl<$Res, $Val extends Portion> implements $PortionCopyW
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$PortionImplCopyWith<$Res> implements $PortionCopyWith<$Res> {
|
||||
factory _$$PortionImplCopyWith(_$PortionImpl value, $Res Function(_$PortionImpl) then) = __$$PortionImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$PortionImplCopyWith(
|
||||
_$PortionImpl value, $Res Function(_$PortionImpl) then) =
|
||||
__$$PortionImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id, String product_name, int quantity, String portion, bool from_diet});
|
||||
$Res call(
|
||||
{int id,
|
||||
String product_name,
|
||||
int quantity,
|
||||
String portion,
|
||||
bool from_diet});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$PortionImplCopyWithImpl<$Res> extends _$PortionCopyWithImpl<$Res, _$PortionImpl> implements _$$PortionImplCopyWith<$Res> {
|
||||
__$$PortionImplCopyWithImpl(_$PortionImpl _value, $Res Function(_$PortionImpl) _then) : super(_value, _then);
|
||||
class __$$PortionImplCopyWithImpl<$Res>
|
||||
extends _$PortionCopyWithImpl<$Res, _$PortionImpl>
|
||||
implements _$$PortionImplCopyWith<$Res> {
|
||||
__$$PortionImplCopyWithImpl(
|
||||
_$PortionImpl _value, $Res Function(_$PortionImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Portion
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -145,9 +156,15 @@ class __$$PortionImplCopyWithImpl<$Res> extends _$PortionCopyWithImpl<$Res, _$Po
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$PortionImpl implements _Portion {
|
||||
const _$PortionImpl({required this.id, required this.product_name, required this.quantity, required this.portion, required this.from_diet});
|
||||
const _$PortionImpl(
|
||||
{required this.id,
|
||||
required this.product_name,
|
||||
required this.quantity,
|
||||
required this.portion,
|
||||
required this.from_diet});
|
||||
|
||||
factory _$PortionImpl.fromJson(Map<String, dynamic> json) => _$$PortionImplFromJson(json);
|
||||
factory _$PortionImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$PortionImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -171,22 +188,27 @@ class _$PortionImpl implements _Portion {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$PortionImpl &&
|
||||
(identical(other.id, id) || other.id == id) &&
|
||||
(identical(other.product_name, product_name) || other.product_name == product_name) &&
|
||||
(identical(other.quantity, quantity) || other.quantity == quantity) &&
|
||||
(identical(other.product_name, product_name) ||
|
||||
other.product_name == product_name) &&
|
||||
(identical(other.quantity, quantity) ||
|
||||
other.quantity == quantity) &&
|
||||
(identical(other.portion, portion) || other.portion == portion) &&
|
||||
(identical(other.from_diet, from_diet) || other.from_diet == from_diet));
|
||||
(identical(other.from_diet, from_diet) ||
|
||||
other.from_diet == from_diet));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, id, product_name, quantity, portion, from_diet);
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, id, product_name, quantity, portion, from_diet);
|
||||
|
||||
/// Create a copy of Portion
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$PortionImplCopyWith<_$PortionImpl> get copyWith => __$$PortionImplCopyWithImpl<_$PortionImpl>(this, _$identity);
|
||||
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
|
||||
__$$PortionImplCopyWithImpl<_$PortionImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -208,16 +230,12 @@ abstract class _Portion implements Portion {
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get product_name;
|
||||
|
||||
@override
|
||||
int get quantity;
|
||||
|
||||
@override
|
||||
String get portion;
|
||||
|
||||
@override
|
||||
bool get from_diet;
|
||||
|
||||
@@ -225,5 +243,6 @@ abstract class _Portion implements Portion {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$PortionImplCopyWith<_$PortionImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$PortionImplCopyWith<_$PortionImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,8 @@ part of 'portion.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$PortionImpl _$$PortionImplFromJson(Map<String, dynamic> json) => _$PortionImpl(
|
||||
_$PortionImpl _$$PortionImplFromJson(Map<String, dynamic> json) =>
|
||||
_$PortionImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
product_name: json['product_name'] as String,
|
||||
quantity: (json['quantity'] as num).toInt(),
|
||||
@@ -14,7 +15,8 @@ _$PortionImpl _$$PortionImplFromJson(Map<String, dynamic> json) => _$PortionImpl
|
||||
from_diet: json['from_diet'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$PortionImplToJson(_$PortionImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$PortionImplToJson(_$PortionImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'product_name': instance.product_name,
|
||||
'quantity': instance.quantity,
|
||||
|
||||
@@ -21,7 +21,6 @@ Product _$ProductFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$Product {
|
||||
int get id => throw _privateConstructorUsedError;
|
||||
|
||||
String get name => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this Product to a JSON map.
|
||||
@@ -35,19 +34,19 @@ mixin _$Product {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $ProductCopyWith<$Res> {
|
||||
factory $ProductCopyWith(Product value, $Res Function(Product) then) = _$ProductCopyWithImpl<$Res, Product>;
|
||||
|
||||
factory $ProductCopyWith(Product value, $Res Function(Product) then) =
|
||||
_$ProductCopyWithImpl<$Res, Product>;
|
||||
@useResult
|
||||
$Res call({int id, String name});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$ProductCopyWithImpl<$Res, $Val extends Product> implements $ProductCopyWith<$Res> {
|
||||
class _$ProductCopyWithImpl<$Res, $Val extends Product>
|
||||
implements $ProductCopyWith<$Res> {
|
||||
_$ProductCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -74,16 +73,21 @@ class _$ProductCopyWithImpl<$Res, $Val extends Product> implements $ProductCopyW
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$ProductImplCopyWith<$Res> implements $ProductCopyWith<$Res> {
|
||||
factory _$$ProductImplCopyWith(_$ProductImpl value, $Res Function(_$ProductImpl) then) = __$$ProductImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$ProductImplCopyWith(
|
||||
_$ProductImpl value, $Res Function(_$ProductImpl) then) =
|
||||
__$$ProductImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({int id, String name});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$ProductImplCopyWithImpl<$Res> extends _$ProductCopyWithImpl<$Res, _$ProductImpl> implements _$$ProductImplCopyWith<$Res> {
|
||||
__$$ProductImplCopyWithImpl(_$ProductImpl _value, $Res Function(_$ProductImpl) _then) : super(_value, _then);
|
||||
class __$$ProductImplCopyWithImpl<$Res>
|
||||
extends _$ProductCopyWithImpl<$Res, _$ProductImpl>
|
||||
implements _$$ProductImplCopyWith<$Res> {
|
||||
__$$ProductImplCopyWithImpl(
|
||||
_$ProductImpl _value, $Res Function(_$ProductImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of Product
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -111,7 +115,8 @@ class __$$ProductImplCopyWithImpl<$Res> extends _$ProductCopyWithImpl<$Res, _$Pr
|
||||
class _$ProductImpl implements _Product {
|
||||
const _$ProductImpl({required this.id, required this.name});
|
||||
|
||||
factory _$ProductImpl.fromJson(Map<String, dynamic> json) => _$$ProductImplFromJson(json);
|
||||
factory _$ProductImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$ProductImplFromJson(json);
|
||||
|
||||
@override
|
||||
final int id;
|
||||
@@ -141,7 +146,8 @@ class _$ProductImpl implements _Product {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$ProductImplCopyWith<_$ProductImpl> get copyWith => __$$ProductImplCopyWithImpl<_$ProductImpl>(this, _$identity);
|
||||
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
|
||||
__$$ProductImplCopyWithImpl<_$ProductImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -152,13 +158,13 @@ class _$ProductImpl implements _Product {
|
||||
}
|
||||
|
||||
abstract class _Product implements Product {
|
||||
const factory _Product({required final int id, required final String name}) = _$ProductImpl;
|
||||
const factory _Product({required final int id, required final String name}) =
|
||||
_$ProductImpl;
|
||||
|
||||
factory _Product.fromJson(Map<String, dynamic> json) = _$ProductImpl.fromJson;
|
||||
|
||||
@override
|
||||
int get id;
|
||||
|
||||
@override
|
||||
String get name;
|
||||
|
||||
@@ -166,5 +172,6 @@ abstract class _Product implements Product {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$ProductImplCopyWith<_$ProductImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$ProductImplCopyWith<_$ProductImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -6,12 +6,14 @@ part of 'product.dart';
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
_$ProductImpl _$$ProductImplFromJson(Map<String, dynamic> json) => _$ProductImpl(
|
||||
_$ProductImpl _$$ProductImplFromJson(Map<String, dynamic> json) =>
|
||||
_$ProductImpl(
|
||||
id: (json['id'] as num).toInt(),
|
||||
name: json['name'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$ProductImplToJson(_$ProductImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$ProductImplToJson(_$ProductImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'name': instance.name,
|
||||
};
|
||||
|
||||
@@ -21,7 +21,6 @@ State _$StateFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$State {
|
||||
bool get has_chosen_diet => throw _privateConstructorUsedError;
|
||||
|
||||
bool get has_chosen_plan => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this State to a JSON map.
|
||||
@@ -35,19 +34,19 @@ mixin _$State {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $StateCopyWith<$Res> {
|
||||
factory $StateCopyWith(State value, $Res Function(State) then) = _$StateCopyWithImpl<$Res, State>;
|
||||
|
||||
factory $StateCopyWith(State value, $Res Function(State) then) =
|
||||
_$StateCopyWithImpl<$Res, State>;
|
||||
@useResult
|
||||
$Res call({bool has_chosen_diet, bool has_chosen_plan});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$StateCopyWithImpl<$Res, $Val extends State> implements $StateCopyWith<$Res> {
|
||||
class _$StateCopyWithImpl<$Res, $Val extends State>
|
||||
implements $StateCopyWith<$Res> {
|
||||
_$StateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -74,16 +73,21 @@ class _$StateCopyWithImpl<$Res, $Val extends State> implements $StateCopyWith<$R
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$StateImplCopyWith<$Res> implements $StateCopyWith<$Res> {
|
||||
factory _$$StateImplCopyWith(_$StateImpl value, $Res Function(_$StateImpl) then) = __$$StateImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$StateImplCopyWith(
|
||||
_$StateImpl value, $Res Function(_$StateImpl) then) =
|
||||
__$$StateImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({bool has_chosen_diet, bool has_chosen_plan});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$StateImplCopyWithImpl<$Res> extends _$StateCopyWithImpl<$Res, _$StateImpl> implements _$$StateImplCopyWith<$Res> {
|
||||
__$$StateImplCopyWithImpl(_$StateImpl _value, $Res Function(_$StateImpl) _then) : super(_value, _then);
|
||||
class __$$StateImplCopyWithImpl<$Res>
|
||||
extends _$StateCopyWithImpl<$Res, _$StateImpl>
|
||||
implements _$$StateImplCopyWith<$Res> {
|
||||
__$$StateImplCopyWithImpl(
|
||||
_$StateImpl _value, $Res Function(_$StateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of State
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -109,9 +113,11 @@ class __$$StateImplCopyWithImpl<$Res> extends _$StateCopyWithImpl<$Res, _$StateI
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$StateImpl implements _State {
|
||||
const _$StateImpl({required this.has_chosen_diet, required this.has_chosen_plan});
|
||||
const _$StateImpl(
|
||||
{required this.has_chosen_diet, required this.has_chosen_plan});
|
||||
|
||||
factory _$StateImpl.fromJson(Map<String, dynamic> json) => _$$StateImplFromJson(json);
|
||||
factory _$StateImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$StateImplFromJson(json);
|
||||
|
||||
@override
|
||||
final bool has_chosen_diet;
|
||||
@@ -128,20 +134,24 @@ class _$StateImpl implements _State {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$StateImpl &&
|
||||
(identical(other.has_chosen_diet, has_chosen_diet) || other.has_chosen_diet == has_chosen_diet) &&
|
||||
(identical(other.has_chosen_plan, has_chosen_plan) || other.has_chosen_plan == has_chosen_plan));
|
||||
(identical(other.has_chosen_diet, has_chosen_diet) ||
|
||||
other.has_chosen_diet == has_chosen_diet) &&
|
||||
(identical(other.has_chosen_plan, has_chosen_plan) ||
|
||||
other.has_chosen_plan == has_chosen_plan));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, has_chosen_diet, has_chosen_plan);
|
||||
int get hashCode =>
|
||||
Object.hash(runtimeType, has_chosen_diet, has_chosen_plan);
|
||||
|
||||
/// Create a copy of State
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$StateImplCopyWith<_$StateImpl> get copyWith => __$$StateImplCopyWithImpl<_$StateImpl>(this, _$identity);
|
||||
_$$StateImplCopyWith<_$StateImpl> get copyWith =>
|
||||
__$$StateImplCopyWithImpl<_$StateImpl>(this, _$identity);
|
||||
|
||||
@override
|
||||
Map<String, dynamic> toJson() {
|
||||
@@ -152,13 +162,14 @@ class _$StateImpl implements _State {
|
||||
}
|
||||
|
||||
abstract class _State implements State {
|
||||
const factory _State({required final bool has_chosen_diet, required final bool has_chosen_plan}) = _$StateImpl;
|
||||
const factory _State(
|
||||
{required final bool has_chosen_diet,
|
||||
required final bool has_chosen_plan}) = _$StateImpl;
|
||||
|
||||
factory _State.fromJson(Map<String, dynamic> json) = _$StateImpl.fromJson;
|
||||
|
||||
@override
|
||||
bool get has_chosen_diet;
|
||||
|
||||
@override
|
||||
bool get has_chosen_plan;
|
||||
|
||||
@@ -166,5 +177,6 @@ abstract class _State implements State {
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@override
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$StateImplCopyWith<_$StateImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$StateImplCopyWith<_$StateImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -11,7 +11,8 @@ _$StateImpl _$$StateImplFromJson(Map<String, dynamic> json) => _$StateImpl(
|
||||
has_chosen_plan: json['has_chosen_plan'] as bool,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$StateImplToJson(_$StateImpl instance) => <String, dynamic>{
|
||||
Map<String, dynamic> _$$StateImplToJson(_$StateImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'has_chosen_diet': instance.has_chosen_diet,
|
||||
'has_chosen_plan': instance.has_chosen_plan,
|
||||
};
|
||||
|
||||
@@ -54,7 +54,6 @@ mixin _$DiaryState {
|
||||
required TResult Function(String errorMessage) error,
|
||||
}) =>
|
||||
throw _privateConstructorUsedError;
|
||||
|
||||
@optionalTypeArgs
|
||||
TResult? whenOrNull<TResult extends Object?>(
|
||||
TResult? Function()? $default, {
|
||||
@@ -161,16 +160,18 @@ mixin _$DiaryState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class $DiaryStateCopyWith<$Res> {
|
||||
factory $DiaryStateCopyWith(DiaryState value, $Res Function(DiaryState) then) = _$DiaryStateCopyWithImpl<$Res, DiaryState>;
|
||||
factory $DiaryStateCopyWith(
|
||||
DiaryState value, $Res Function(DiaryState) then) =
|
||||
_$DiaryStateCopyWithImpl<$Res, DiaryState>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class _$DiaryStateCopyWithImpl<$Res, $Val extends DiaryState> implements $DiaryStateCopyWith<$Res> {
|
||||
class _$DiaryStateCopyWithImpl<$Res, $Val extends DiaryState>
|
||||
implements $DiaryStateCopyWith<$Res> {
|
||||
_$DiaryStateCopyWithImpl(this._value, this._then);
|
||||
|
||||
// ignore: unused_field
|
||||
final $Val _value;
|
||||
|
||||
// ignore: unused_field
|
||||
final $Res Function($Val) _then;
|
||||
|
||||
@@ -180,12 +181,18 @@ class _$DiaryStateCopyWithImpl<$Res, $Val extends DiaryState> implements $DiaryS
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DiaryStateImplCopyWith<$Res> {
|
||||
factory _$$DiaryStateImplCopyWith(_$DiaryStateImpl value, $Res Function(_$DiaryStateImpl) then) = __$$DiaryStateImplCopyWithImpl<$Res>;
|
||||
factory _$$DiaryStateImplCopyWith(
|
||||
_$DiaryStateImpl value, $Res Function(_$DiaryStateImpl) then) =
|
||||
__$$DiaryStateImplCopyWithImpl<$Res>;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DiaryStateImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateImpl> implements _$$DiaryStateImplCopyWith<$Res> {
|
||||
__$$DiaryStateImplCopyWithImpl(_$DiaryStateImpl _value, $Res Function(_$DiaryStateImpl) _then) : super(_value, _then);
|
||||
class __$$DiaryStateImplCopyWithImpl<$Res>
|
||||
extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateImpl>
|
||||
implements _$$DiaryStateImplCopyWith<$Res> {
|
||||
__$$DiaryStateImplCopyWithImpl(
|
||||
_$DiaryStateImpl _value, $Res Function(_$DiaryStateImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -203,7 +210,8 @@ class _$DiaryStateImpl implements _DiaryState {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$DiaryStateImpl);
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType && other is _$DiaryStateImpl);
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -380,17 +388,20 @@ abstract class _DiaryState implements DiaryState {
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DiaryStateLoadingImplCopyWith<$Res> {
|
||||
factory _$$DiaryStateLoadingImplCopyWith(_$DiaryStateLoadingImpl value, $Res Function(_$DiaryStateLoadingImpl) then) =
|
||||
factory _$$DiaryStateLoadingImplCopyWith(_$DiaryStateLoadingImpl value,
|
||||
$Res Function(_$DiaryStateLoadingImpl) then) =
|
||||
__$$DiaryStateLoadingImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call({int? id});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DiaryStateLoadingImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateLoadingImpl>
|
||||
class __$$DiaryStateLoadingImplCopyWithImpl<$Res>
|
||||
extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateLoadingImpl>
|
||||
implements _$$DiaryStateLoadingImplCopyWith<$Res> {
|
||||
__$$DiaryStateLoadingImplCopyWithImpl(_$DiaryStateLoadingImpl _value, $Res Function(_$DiaryStateLoadingImpl) _then) : super(_value, _then);
|
||||
__$$DiaryStateLoadingImplCopyWithImpl(_$DiaryStateLoadingImpl _value,
|
||||
$Res Function(_$DiaryStateLoadingImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -423,7 +434,10 @@ class _$DiaryStateLoadingImpl implements DiaryStateLoading {
|
||||
|
||||
@override
|
||||
bool operator ==(Object other) {
|
||||
return identical(this, other) || (other.runtimeType == runtimeType && other is _$DiaryStateLoadingImpl && (identical(other.id, id) || other.id == id));
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$DiaryStateLoadingImpl &&
|
||||
(identical(other.id, id) || other.id == id));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -434,7 +448,9 @@ class _$DiaryStateLoadingImpl implements DiaryStateLoading {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith => __$$DiaryStateLoadingImplCopyWithImpl<_$DiaryStateLoadingImpl>(this, _$identity);
|
||||
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith =>
|
||||
__$$DiaryStateLoadingImplCopyWithImpl<_$DiaryStateLoadingImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -609,14 +625,15 @@ abstract class DiaryStateLoading implements DiaryState {
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DiaryStateLoadingImplCopyWith<_$DiaryStateLoadingImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DiaryStateLoadedImplCopyWith<$Res> {
|
||||
factory _$$DiaryStateLoadedImplCopyWith(_$DiaryStateLoadedImpl value, $Res Function(_$DiaryStateLoadedImpl) then) =
|
||||
factory _$$DiaryStateLoadedImplCopyWith(_$DiaryStateLoadedImpl value,
|
||||
$Res Function(_$DiaryStateLoadedImpl) then) =
|
||||
__$$DiaryStateLoadedImplCopyWithImpl<$Res>;
|
||||
|
||||
@useResult
|
||||
$Res call(
|
||||
{DiaryModel diary,
|
||||
@@ -650,16 +667,17 @@ abstract class _$$DiaryStateLoadedImplCopyWith<$Res> {
|
||||
List<NutritionData>? chartDataCounted});
|
||||
|
||||
$DiaryModelCopyWith<$Res> get diary;
|
||||
|
||||
$MealCopyWith<$Res> get currentMeal;
|
||||
|
||||
$SelectionPopupModelCopyWith<$Res> get portionController;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DiaryStateLoadedImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateLoadedImpl>
|
||||
class __$$DiaryStateLoadedImplCopyWithImpl<$Res>
|
||||
extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateLoadedImpl>
|
||||
implements _$$DiaryStateLoadedImplCopyWith<$Res> {
|
||||
__$$DiaryStateLoadedImplCopyWithImpl(_$DiaryStateLoadedImpl _value, $Res Function(_$DiaryStateLoadedImpl) _then) : super(_value, _then);
|
||||
__$$DiaryStateLoadedImplCopyWithImpl(_$DiaryStateLoadedImpl _value,
|
||||
$Res Function(_$DiaryStateLoadedImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -841,7 +859,8 @@ class __$$DiaryStateLoadedImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImp
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
$SelectionPopupModelCopyWith<$Res> get portionController {
|
||||
return $SelectionPopupModelCopyWith<$Res>(_value.portionController, (value) {
|
||||
return $SelectionPopupModelCopyWith<$Res>(_value.portionController,
|
||||
(value) {
|
||||
return _then(_value.copyWith(portionController: value));
|
||||
});
|
||||
}
|
||||
@@ -894,25 +913,24 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
@override
|
||||
final String? diaryDate;
|
||||
final List<int> _recommendedChartValues;
|
||||
|
||||
@override
|
||||
List<int> get recommendedChartValues {
|
||||
if (_recommendedChartValues is EqualUnmodifiableListView) return _recommendedChartValues;
|
||||
if (_recommendedChartValues is EqualUnmodifiableListView)
|
||||
return _recommendedChartValues;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_recommendedChartValues);
|
||||
}
|
||||
|
||||
final List<int> _consumedChartValues;
|
||||
|
||||
@override
|
||||
List<int> get consumedChartValues {
|
||||
if (_consumedChartValues is EqualUnmodifiableListView) return _consumedChartValues;
|
||||
if (_consumedChartValues is EqualUnmodifiableListView)
|
||||
return _consumedChartValues;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(_consumedChartValues);
|
||||
}
|
||||
|
||||
final List<Portion> _portions;
|
||||
|
||||
@override
|
||||
List<Portion> get portions {
|
||||
if (_portions is EqualUnmodifiableListView) return _portions;
|
||||
@@ -921,7 +939,6 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
}
|
||||
|
||||
final List<SelectionPopupModel> _mealList;
|
||||
|
||||
@override
|
||||
List<SelectionPopupModel> get mealList {
|
||||
if (_mealList is EqualUnmodifiableListView) return _mealList;
|
||||
@@ -930,7 +947,6 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
}
|
||||
|
||||
final List<SelectionPopupModel> _portionList;
|
||||
|
||||
@override
|
||||
List<SelectionPopupModel> get portionList {
|
||||
if (_portionList is EqualUnmodifiableListView) return _portionList;
|
||||
@@ -939,16 +955,15 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
final Map<String, dynamic> _chartData;
|
||||
|
||||
@override
|
||||
Map<String, dynamic> get chartData {
|
||||
if (_chartData is EqualUnmodifiableMapView) return _chartData;
|
||||
@@ -995,12 +1010,12 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
@override
|
||||
final bool isAdded;
|
||||
final List<NutritionData>? _chartDataCounted;
|
||||
|
||||
@override
|
||||
List<NutritionData>? get chartDataCounted {
|
||||
final value = _chartDataCounted;
|
||||
if (value == null) return null;
|
||||
if (_chartDataCounted is EqualUnmodifiableListView) return _chartDataCounted;
|
||||
if (_chartDataCounted is EqualUnmodifiableListView)
|
||||
return _chartDataCounted;
|
||||
// ignore: implicit_dynamic_type
|
||||
return EqualUnmodifiableListView(value);
|
||||
}
|
||||
@@ -1016,34 +1031,60 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$DiaryStateLoadedImpl &&
|
||||
(identical(other.diary, diary) || other.diary == diary) &&
|
||||
(identical(other.diaryDate, diaryDate) || other.diaryDate == diaryDate) &&
|
||||
const DeepCollectionEquality().equals(other._recommendedChartValues, _recommendedChartValues) &&
|
||||
const DeepCollectionEquality().equals(other._consumedChartValues, _consumedChartValues) &&
|
||||
(identical(other.diaryDate, diaryDate) ||
|
||||
other.diaryDate == diaryDate) &&
|
||||
const DeepCollectionEquality().equals(
|
||||
other._recommendedChartValues, _recommendedChartValues) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._consumedChartValues, _consumedChartValues) &&
|
||||
const DeepCollectionEquality().equals(other._portions, _portions) &&
|
||||
const DeepCollectionEquality().equals(other._mealList, _mealList) &&
|
||||
const DeepCollectionEquality().equals(other._portionList, _portionList) &&
|
||||
const DeepCollectionEquality().equals(other._autocompleteList, _autocompleteList) &&
|
||||
const DeepCollectionEquality().equals(other._chartData, _chartData) &&
|
||||
(identical(other.currentMeal, currentMeal) || other.currentMeal == currentMeal) &&
|
||||
(identical(other.portionController, portionController) || other.portionController == portionController) &&
|
||||
(identical(other.wakeupController, wakeupController) || other.wakeupController == wakeupController) &&
|
||||
(identical(other.retireController, retireController) || other.retireController == retireController) &&
|
||||
(identical(other.mealTimeController, mealTimeController) || other.mealTimeController == mealTimeController) &&
|
||||
(identical(other.commentController, commentController) || other.commentController == commentController) &&
|
||||
(identical(other.product_nameController, product_nameController) || other.product_nameController == product_nameController) &&
|
||||
(identical(other.productQuantityController, productQuantityController) || other.productQuantityController == productQuantityController) &&
|
||||
(identical(other.caloriesController, caloriesController) || other.caloriesController == caloriesController) &&
|
||||
(identical(other.fatsController, fatsController) || other.fatsController == fatsController) &&
|
||||
(identical(other.proteinsController, proteinsController) || other.proteinsController == proteinsController) &&
|
||||
(identical(other.carbsController, carbsController) || other.carbsController == carbsController) &&
|
||||
(identical(other.selectedMood, selectedMood) || other.selectedMood == selectedMood) &&
|
||||
(identical(other.selectedSatiety, selectedSatiety) || other.selectedSatiety == selectedSatiety) &&
|
||||
(identical(other.wakeupExpanded, wakeupExpanded) || other.wakeupExpanded == wakeupExpanded) &&
|
||||
(identical(other.moderationExpanded, moderationExpanded) || other.moderationExpanded == moderationExpanded) &&
|
||||
(identical(other.moodExpanded, moodExpanded) || other.moodExpanded == moodExpanded) &&
|
||||
(identical(other.isLoading, isLoading) || other.isLoading == isLoading) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._portionList, _portionList) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._autocompleteList, _autocompleteList) &&
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._chartData, _chartData) &&
|
||||
(identical(other.currentMeal, currentMeal) ||
|
||||
other.currentMeal == currentMeal) &&
|
||||
(identical(other.portionController, portionController) ||
|
||||
other.portionController == portionController) &&
|
||||
(identical(other.wakeupController, wakeupController) ||
|
||||
other.wakeupController == wakeupController) &&
|
||||
(identical(other.retireController, retireController) ||
|
||||
other.retireController == retireController) &&
|
||||
(identical(other.mealTimeController, mealTimeController) ||
|
||||
other.mealTimeController == mealTimeController) &&
|
||||
(identical(other.commentController, commentController) ||
|
||||
other.commentController == commentController) &&
|
||||
(identical(other.product_nameController, product_nameController) ||
|
||||
other.product_nameController == product_nameController) &&
|
||||
(identical(other.productQuantityController,
|
||||
productQuantityController) ||
|
||||
other.productQuantityController == productQuantityController) &&
|
||||
(identical(other.caloriesController, caloriesController) ||
|
||||
other.caloriesController == caloriesController) &&
|
||||
(identical(other.fatsController, fatsController) ||
|
||||
other.fatsController == fatsController) &&
|
||||
(identical(other.proteinsController, proteinsController) ||
|
||||
other.proteinsController == proteinsController) &&
|
||||
(identical(other.carbsController, carbsController) ||
|
||||
other.carbsController == carbsController) &&
|
||||
(identical(other.selectedMood, selectedMood) ||
|
||||
other.selectedMood == selectedMood) &&
|
||||
(identical(other.selectedSatiety, selectedSatiety) ||
|
||||
other.selectedSatiety == selectedSatiety) &&
|
||||
(identical(other.wakeupExpanded, wakeupExpanded) ||
|
||||
other.wakeupExpanded == wakeupExpanded) &&
|
||||
(identical(other.moderationExpanded, moderationExpanded) ||
|
||||
other.moderationExpanded == moderationExpanded) &&
|
||||
(identical(other.moodExpanded, moodExpanded) ||
|
||||
other.moodExpanded == moodExpanded) &&
|
||||
(identical(other.isLoading, isLoading) ||
|
||||
other.isLoading == isLoading) &&
|
||||
(identical(other.isAdded, isAdded) || other.isAdded == isAdded) &&
|
||||
const DeepCollectionEquality().equals(other._chartDataCounted, _chartDataCounted));
|
||||
const DeepCollectionEquality()
|
||||
.equals(other._chartDataCounted, _chartDataCounted));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -1085,7 +1126,9 @@ class _$DiaryStateLoadedImpl implements DiaryStateLoaded {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith => __$$DiaryStateLoadedImplCopyWithImpl<_$DiaryStateLoadedImpl>(this, _$identity);
|
||||
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
|
||||
__$$DiaryStateLoadedImplCopyWithImpl<_$DiaryStateLoadedImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -1372,80 +1415,58 @@ abstract class DiaryStateLoaded implements DiaryState {
|
||||
final List<NutritionData>? chartDataCounted}) = _$DiaryStateLoadedImpl;
|
||||
|
||||
DiaryModel get diary;
|
||||
|
||||
String? get diaryDate;
|
||||
|
||||
List<int> get recommendedChartValues;
|
||||
|
||||
List<int> get consumedChartValues;
|
||||
|
||||
List<Portion> get portions;
|
||||
|
||||
List<SelectionPopupModel> get mealList;
|
||||
|
||||
List<SelectionPopupModel> get portionList;
|
||||
|
||||
List<Product> get autocompleteList;
|
||||
|
||||
Map<String, dynamic> get chartData;
|
||||
|
||||
Meal get currentMeal;
|
||||
|
||||
SelectionPopupModel get portionController;
|
||||
|
||||
TimeOfDay get wakeupController;
|
||||
|
||||
TimeOfDay get retireController;
|
||||
|
||||
TimeOfDay? get mealTimeController;
|
||||
|
||||
TextEditingController get commentController;
|
||||
|
||||
TextEditingController get product_nameController;
|
||||
|
||||
TextEditingController get productQuantityController;
|
||||
|
||||
TextEditingController get caloriesController;
|
||||
|
||||
TextEditingController get fatsController;
|
||||
|
||||
TextEditingController get proteinsController;
|
||||
|
||||
TextEditingController get carbsController;
|
||||
|
||||
int get selectedMood;
|
||||
|
||||
int get selectedSatiety;
|
||||
|
||||
bool get wakeupExpanded;
|
||||
|
||||
bool get moderationExpanded;
|
||||
|
||||
bool get moodExpanded;
|
||||
|
||||
bool get isLoading;
|
||||
|
||||
bool get isAdded;
|
||||
|
||||
List<NutritionData>? get chartDataCounted;
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DiaryStateLoadedImplCopyWith<_$DiaryStateLoadedImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
abstract class _$$DiaryStateErrorImplCopyWith<$Res> {
|
||||
factory _$$DiaryStateErrorImplCopyWith(_$DiaryStateErrorImpl value, $Res Function(_$DiaryStateErrorImpl) then) = __$$DiaryStateErrorImplCopyWithImpl<$Res>;
|
||||
|
||||
factory _$$DiaryStateErrorImplCopyWith(_$DiaryStateErrorImpl value,
|
||||
$Res Function(_$DiaryStateErrorImpl) then) =
|
||||
__$$DiaryStateErrorImplCopyWithImpl<$Res>;
|
||||
@useResult
|
||||
$Res call({String errorMessage});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
class __$$DiaryStateErrorImplCopyWithImpl<$Res> extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateErrorImpl> implements _$$DiaryStateErrorImplCopyWith<$Res> {
|
||||
__$$DiaryStateErrorImplCopyWithImpl(_$DiaryStateErrorImpl _value, $Res Function(_$DiaryStateErrorImpl) _then) : super(_value, _then);
|
||||
class __$$DiaryStateErrorImplCopyWithImpl<$Res>
|
||||
extends _$DiaryStateCopyWithImpl<$Res, _$DiaryStateErrorImpl>
|
||||
implements _$$DiaryStateErrorImplCopyWith<$Res> {
|
||||
__$$DiaryStateErrorImplCopyWithImpl(
|
||||
_$DiaryStateErrorImpl _value, $Res Function(_$DiaryStateErrorImpl) _then)
|
||||
: super(_value, _then);
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -1481,7 +1502,8 @@ class _$DiaryStateErrorImpl implements DiaryStateError {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$DiaryStateErrorImpl &&
|
||||
(identical(other.errorMessage, errorMessage) || other.errorMessage == errorMessage));
|
||||
(identical(other.errorMessage, errorMessage) ||
|
||||
other.errorMessage == errorMessage));
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -1492,7 +1514,9 @@ class _$DiaryStateErrorImpl implements DiaryStateError {
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
@pragma('vm:prefer-inline')
|
||||
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith => __$$DiaryStateErrorImplCopyWithImpl<_$DiaryStateErrorImpl>(this, _$identity);
|
||||
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith =>
|
||||
__$$DiaryStateErrorImplCopyWithImpl<_$DiaryStateErrorImpl>(
|
||||
this, _$identity);
|
||||
|
||||
@override
|
||||
@optionalTypeArgs
|
||||
@@ -1660,12 +1684,14 @@ class _$DiaryStateErrorImpl implements DiaryStateError {
|
||||
}
|
||||
|
||||
abstract class DiaryStateError implements DiaryState {
|
||||
const factory DiaryStateError({required final String errorMessage}) = _$DiaryStateErrorImpl;
|
||||
const factory DiaryStateError({required final String errorMessage}) =
|
||||
_$DiaryStateErrorImpl;
|
||||
|
||||
String get errorMessage;
|
||||
|
||||
/// Create a copy of DiaryState
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith => throw _privateConstructorUsedError;
|
||||
_$$DiaryStateErrorImplCopyWith<_$DiaryStateErrorImpl> get copyWith =>
|
||||
throw _privateConstructorUsedError;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,8 @@ class _DiaryService implements DiaryService {
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
|
||||
late Map<String, DiaryModel> _value;
|
||||
try {
|
||||
_value = _result.data!.map((k, dynamic v) => MapEntry(k, DiaryModel.fromJson(v as Map<String, dynamic>)));
|
||||
_value = _result.data!.map((k, dynamic v) =>
|
||||
MapEntry(k, DiaryModel.fromJson(v as Map<String, dynamic>)));
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
@@ -139,7 +140,11 @@ class _DiaryService implements DiaryService {
|
||||
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;
|
||||
@@ -328,7 +333,8 @@ class _DiaryService implements DiaryService {
|
||||
final _result = await _dio.fetch<Map<String, dynamic>>(_options);
|
||||
late Map<String, Portion> _value;
|
||||
try {
|
||||
_value = _result.data!.map((k, dynamic v) => MapEntry(k, Portion.fromJson(v as Map<String, dynamic>)));
|
||||
_value = _result.data!.map((k, dynamic v) =>
|
||||
MapEntry(k, Portion.fromJson(v as Map<String, dynamic>)));
|
||||
} on Object catch (e, s) {
|
||||
errorLogger?.logError(e, s, _options);
|
||||
rethrow;
|
||||
@@ -505,7 +511,9 @@ class _DiaryService implements DiaryService {
|
||||
}
|
||||
|
||||
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