trailing comma rule added

This commit is contained in:
Username1548
2024-11-12 19:05:30 +07:00
parent c5e1c5d9b8
commit 4d8f6464d7
43 changed files with 1923 additions and 459 deletions

View File

@@ -284,6 +284,10 @@ mixin _$Diet {
int get totalViews => throw _privateConstructorUsedError;
@JsonKey(name: "total_comments")
int get totalComments => throw _privateConstructorUsedError;
@JsonKey(name: "was_liked_by_me")
bool get wasLikedByMe => throw _privateConstructorUsedError;
@JsonKey(name: "is_favorite")
bool get isFavorite => throw _privateConstructorUsedError;
/// Serializes this Diet to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@@ -312,7 +316,9 @@ abstract class $DietCopyWith<$Res> {
@JsonKey(name: "author") Author author,
@JsonKey(name: "total_likes") int totalLikes,
@JsonKey(name: "total_views") int totalViews,
@JsonKey(name: "total_comments") int totalComments});
@JsonKey(name: "total_comments") int totalComments,
@JsonKey(name: "was_liked_by_me") bool wasLikedByMe,
@JsonKey(name: "is_favorite") bool isFavorite});
$DietTypeCopyWith<$Res> get type;
$AuthorCopyWith<$Res> get author;
@@ -345,6 +351,8 @@ class _$DietCopyWithImpl<$Res, $Val extends Diet>
Object? totalLikes = null,
Object? totalViews = null,
Object? totalComments = null,
Object? wasLikedByMe = null,
Object? isFavorite = null,
}) {
return _then(_value.copyWith(
id: null == id
@@ -395,6 +403,14 @@ class _$DietCopyWithImpl<$Res, $Val extends Diet>
? _value.totalComments
: totalComments // ignore: cast_nullable_to_non_nullable
as int,
wasLikedByMe: null == wasLikedByMe
? _value.wasLikedByMe
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
as bool,
isFavorite: null == isFavorite
? _value.isFavorite
: isFavorite // ignore: cast_nullable_to_non_nullable
as bool,
) as $Val);
}
@@ -439,7 +455,9 @@ abstract class _$$DietImplCopyWith<$Res> implements $DietCopyWith<$Res> {
@JsonKey(name: "author") Author author,
@JsonKey(name: "total_likes") int totalLikes,
@JsonKey(name: "total_views") int totalViews,
@JsonKey(name: "total_comments") int totalComments});
@JsonKey(name: "total_comments") int totalComments,
@JsonKey(name: "was_liked_by_me") bool wasLikedByMe,
@JsonKey(name: "is_favorite") bool isFavorite});
@override
$DietTypeCopyWith<$Res> get type;
@@ -471,6 +489,8 @@ class __$$DietImplCopyWithImpl<$Res>
Object? totalLikes = null,
Object? totalViews = null,
Object? totalComments = null,
Object? wasLikedByMe = null,
Object? isFavorite = null,
}) {
return _then(_$DietImpl(
id: null == id
@@ -521,6 +541,14 @@ class __$$DietImplCopyWithImpl<$Res>
? _value.totalComments
: totalComments // ignore: cast_nullable_to_non_nullable
as int,
wasLikedByMe: null == wasLikedByMe
? _value.wasLikedByMe
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
as bool,
isFavorite: null == isFavorite
? _value.isFavorite
: isFavorite // ignore: cast_nullable_to_non_nullable
as bool,
));
}
}
@@ -541,7 +569,9 @@ class _$DietImpl implements _Diet {
@JsonKey(name: "author") required this.author,
@JsonKey(name: "total_likes") required this.totalLikes,
@JsonKey(name: "total_views") required this.totalViews,
@JsonKey(name: "total_comments") required this.totalComments})
@JsonKey(name: "total_comments") required this.totalComments,
@JsonKey(name: "was_liked_by_me") required this.wasLikedByMe,
@JsonKey(name: "is_favorite") required this.isFavorite})
: _dailySchedule = dailySchedule;
factory _$DietImpl.fromJson(Map<String, dynamic> json) =>
@@ -589,10 +619,16 @@ class _$DietImpl implements _Diet {
@override
@JsonKey(name: "total_comments")
final int totalComments;
@override
@JsonKey(name: "was_liked_by_me")
final bool wasLikedByMe;
@override
@JsonKey(name: "is_favorite")
final bool isFavorite;
@override
String toString() {
return 'Diet(id: $id, name: $name, image: $image, duration: $duration, state: $state, type: $type, details: $details, dailySchedule: $dailySchedule, author: $author, totalLikes: $totalLikes, totalViews: $totalViews, totalComments: $totalComments)';
return 'Diet(id: $id, name: $name, image: $image, duration: $duration, state: $state, type: $type, details: $details, dailySchedule: $dailySchedule, author: $author, totalLikes: $totalLikes, totalViews: $totalViews, totalComments: $totalComments, wasLikedByMe: $wasLikedByMe, isFavorite: $isFavorite)';
}
@override
@@ -616,7 +652,11 @@ class _$DietImpl implements _Diet {
(identical(other.totalViews, totalViews) ||
other.totalViews == totalViews) &&
(identical(other.totalComments, totalComments) ||
other.totalComments == totalComments));
other.totalComments == totalComments) &&
(identical(other.wasLikedByMe, wasLikedByMe) ||
other.wasLikedByMe == wasLikedByMe) &&
(identical(other.isFavorite, isFavorite) ||
other.isFavorite == isFavorite));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@@ -634,7 +674,9 @@ class _$DietImpl implements _Diet {
author,
totalLikes,
totalViews,
totalComments);
totalComments,
wasLikedByMe,
isFavorite);
/// Create a copy of Diet
/// with the given fields replaced by the non-null parameter values.
@@ -666,7 +708,9 @@ abstract class _Diet implements Diet {
@JsonKey(name: "author") required final Author author,
@JsonKey(name: "total_likes") required final int totalLikes,
@JsonKey(name: "total_views") required final int totalViews,
@JsonKey(name: "total_comments") required final int totalComments}) =
@JsonKey(name: "total_comments") required final int totalComments,
@JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe,
@JsonKey(name: "is_favorite") required final bool isFavorite}) =
_$DietImpl;
factory _Diet.fromJson(Map<String, dynamic> json) = _$DietImpl.fromJson;
@@ -707,6 +751,12 @@ abstract class _Diet implements Diet {
@override
@JsonKey(name: "total_comments")
int get totalComments;
@override
@JsonKey(name: "was_liked_by_me")
bool get wasLikedByMe;
@override
@JsonKey(name: "is_favorite")
bool get isFavorite;
/// Create a copy of Diet
/// with the given fields replaced by the non-null parameter values.