forked from eatvio/eatvio_app
feat(plans): plan creating has been completed
This commit is contained in:
@@ -36,6 +36,7 @@ class MealComment with _$MealComment {
|
||||
|
||||
factory MealComment({
|
||||
required String comment,
|
||||
required int typeNo,
|
||||
}) = _MealComment;
|
||||
|
||||
factory MealComment.fromJson(Map<String, dynamic> json) => _$MealCommentFromJson(json);
|
||||
@@ -45,7 +46,7 @@ class MealComment with _$MealComment {
|
||||
class PortionComment with _$PortionComment {
|
||||
|
||||
factory PortionComment({
|
||||
@JsonKey(name: 'commentable_id') required int portionId,
|
||||
@JsonKey(name: 'id') required int portionId,
|
||||
required String comment,
|
||||
}) = _PortionComment;
|
||||
|
||||
|
||||
@@ -479,6 +479,7 @@ MealComment _$MealCommentFromJson(Map<String, dynamic> json) {
|
||||
/// @nodoc
|
||||
mixin _$MealComment {
|
||||
String get comment => throw _privateConstructorUsedError;
|
||||
int get typeNo => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this MealComment to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@@ -496,7 +497,7 @@ abstract class $MealCommentCopyWith<$Res> {
|
||||
MealComment value, $Res Function(MealComment) then) =
|
||||
_$MealCommentCopyWithImpl<$Res, MealComment>;
|
||||
@useResult
|
||||
$Res call({String comment});
|
||||
$Res call({String comment, int typeNo});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -515,12 +516,17 @@ class _$MealCommentCopyWithImpl<$Res, $Val extends MealComment>
|
||||
@override
|
||||
$Res call({
|
||||
Object? comment = null,
|
||||
Object? typeNo = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
comment: null == comment
|
||||
? _value.comment
|
||||
: comment // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
typeNo: null == typeNo
|
||||
? _value.typeNo
|
||||
: typeNo // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
) as $Val);
|
||||
}
|
||||
}
|
||||
@@ -533,7 +539,7 @@ abstract class _$$MealCommentImplCopyWith<$Res>
|
||||
__$$MealCommentImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({String comment});
|
||||
$Res call({String comment, int typeNo});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -550,12 +556,17 @@ class __$$MealCommentImplCopyWithImpl<$Res>
|
||||
@override
|
||||
$Res call({
|
||||
Object? comment = null,
|
||||
Object? typeNo = null,
|
||||
}) {
|
||||
return _then(_$MealCommentImpl(
|
||||
comment: null == comment
|
||||
? _value.comment
|
||||
: comment // ignore: cast_nullable_to_non_nullable
|
||||
as String,
|
||||
typeNo: null == typeNo
|
||||
? _value.typeNo
|
||||
: typeNo // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -563,17 +574,19 @@ class __$$MealCommentImplCopyWithImpl<$Res>
|
||||
/// @nodoc
|
||||
@JsonSerializable()
|
||||
class _$MealCommentImpl implements _MealComment {
|
||||
_$MealCommentImpl({required this.comment});
|
||||
_$MealCommentImpl({required this.comment, required this.typeNo});
|
||||
|
||||
factory _$MealCommentImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$MealCommentImplFromJson(json);
|
||||
|
||||
@override
|
||||
final String comment;
|
||||
@override
|
||||
final int typeNo;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'MealComment(comment: $comment)';
|
||||
return 'MealComment(comment: $comment, typeNo: $typeNo)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -581,12 +594,13 @@ class _$MealCommentImpl implements _MealComment {
|
||||
return identical(this, other) ||
|
||||
(other.runtimeType == runtimeType &&
|
||||
other is _$MealCommentImpl &&
|
||||
(identical(other.comment, comment) || other.comment == comment));
|
||||
(identical(other.comment, comment) || other.comment == comment) &&
|
||||
(identical(other.typeNo, typeNo) || other.typeNo == typeNo));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@override
|
||||
int get hashCode => Object.hash(runtimeType, comment);
|
||||
int get hashCode => Object.hash(runtimeType, comment, typeNo);
|
||||
|
||||
/// Create a copy of MealComment
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -605,13 +619,17 @@ class _$MealCommentImpl implements _MealComment {
|
||||
}
|
||||
|
||||
abstract class _MealComment implements MealComment {
|
||||
factory _MealComment({required final String comment}) = _$MealCommentImpl;
|
||||
factory _MealComment(
|
||||
{required final String comment,
|
||||
required final int typeNo}) = _$MealCommentImpl;
|
||||
|
||||
factory _MealComment.fromJson(Map<String, dynamic> json) =
|
||||
_$MealCommentImpl.fromJson;
|
||||
|
||||
@override
|
||||
String get comment;
|
||||
@override
|
||||
int get typeNo;
|
||||
|
||||
/// Create a copy of MealComment
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -627,7 +645,7 @@ PortionComment _$PortionCommentFromJson(Map<String, dynamic> json) {
|
||||
|
||||
/// @nodoc
|
||||
mixin _$PortionComment {
|
||||
@JsonKey(name: 'commentable_id')
|
||||
@JsonKey(name: 'id')
|
||||
int get portionId => throw _privateConstructorUsedError;
|
||||
String get comment => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -647,7 +665,7 @@ abstract class $PortionCommentCopyWith<$Res> {
|
||||
PortionComment value, $Res Function(PortionComment) then) =
|
||||
_$PortionCommentCopyWithImpl<$Res, PortionComment>;
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'commentable_id') int portionId, String comment});
|
||||
$Res call({@JsonKey(name: 'id') int portionId, String comment});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -689,7 +707,7 @@ abstract class _$$PortionCommentImplCopyWith<$Res>
|
||||
__$$PortionCommentImplCopyWithImpl<$Res>;
|
||||
@override
|
||||
@useResult
|
||||
$Res call({@JsonKey(name: 'commentable_id') int portionId, String comment});
|
||||
$Res call({@JsonKey(name: 'id') int portionId, String comment});
|
||||
}
|
||||
|
||||
/// @nodoc
|
||||
@@ -725,14 +743,13 @@ class __$$PortionCommentImplCopyWithImpl<$Res>
|
||||
@JsonSerializable()
|
||||
class _$PortionCommentImpl implements _PortionComment {
|
||||
_$PortionCommentImpl(
|
||||
{@JsonKey(name: 'commentable_id') required this.portionId,
|
||||
required this.comment});
|
||||
{@JsonKey(name: 'id') required this.portionId, required this.comment});
|
||||
|
||||
factory _$PortionCommentImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$PortionCommentImplFromJson(json);
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'commentable_id')
|
||||
@JsonKey(name: 'id')
|
||||
final int portionId;
|
||||
@override
|
||||
final String comment;
|
||||
@@ -775,14 +792,14 @@ class _$PortionCommentImpl implements _PortionComment {
|
||||
|
||||
abstract class _PortionComment implements PortionComment {
|
||||
factory _PortionComment(
|
||||
{@JsonKey(name: 'commentable_id') required final int portionId,
|
||||
{@JsonKey(name: 'id') required final int portionId,
|
||||
required final String comment}) = _$PortionCommentImpl;
|
||||
|
||||
factory _PortionComment.fromJson(Map<String, dynamic> json) =
|
||||
_$PortionCommentImpl.fromJson;
|
||||
|
||||
@override
|
||||
@JsonKey(name: 'commentable_id')
|
||||
@JsonKey(name: 'id')
|
||||
int get portionId;
|
||||
@override
|
||||
String get comment;
|
||||
|
||||
@@ -48,22 +48,24 @@ Map<String, dynamic> _$$ConsultantCommentsImplToJson(
|
||||
_$MealCommentImpl _$$MealCommentImplFromJson(Map<String, dynamic> json) =>
|
||||
_$MealCommentImpl(
|
||||
comment: json['comment'] as String,
|
||||
typeNo: (json['typeNo'] as num).toInt(),
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$MealCommentImplToJson(_$MealCommentImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'comment': instance.comment,
|
||||
'typeNo': instance.typeNo,
|
||||
};
|
||||
|
||||
_$PortionCommentImpl _$$PortionCommentImplFromJson(Map<String, dynamic> json) =>
|
||||
_$PortionCommentImpl(
|
||||
portionId: (json['commentable_id'] as num).toInt(),
|
||||
portionId: (json['id'] as num).toInt(),
|
||||
comment: json['comment'] as String,
|
||||
);
|
||||
|
||||
Map<String, dynamic> _$$PortionCommentImplToJson(
|
||||
_$PortionCommentImpl instance) =>
|
||||
<String, dynamic>{
|
||||
'commentable_id': instance.portionId,
|
||||
'id': instance.portionId,
|
||||
'comment': instance.comment,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user