forked from eatvio/eatvio_app
feat: recipe like
This commit is contained in:
@@ -18,7 +18,7 @@ class FeedBlogPostModel with _$FeedBlogPostModel {
|
||||
required String title,
|
||||
@JsonKey(name: "total_likes") required int totalLikes,
|
||||
@JsonKey(name: "total_views") required int totalViews,
|
||||
@JsonKey(name: "total_comments") int? totalComments,
|
||||
@JsonKey(name: "total_comments") required int totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") required bool wasLikedByMe,
|
||||
}) = _FeedBlogPostModel;
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ mixin _$FeedBlogPostModel {
|
||||
@JsonKey(name: "total_views")
|
||||
int get totalViews => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "total_comments")
|
||||
int? get totalComments => throw _privateConstructorUsedError;
|
||||
int get totalComments => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "was_liked_by_me")
|
||||
bool get wasLikedByMe => throw _privateConstructorUsedError;
|
||||
|
||||
@@ -69,7 +69,7 @@ abstract class $FeedBlogPostModelCopyWith<$Res> {
|
||||
String title,
|
||||
@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});
|
||||
|
||||
$AuthorCopyWith<$Res> get author;
|
||||
@@ -101,7 +101,7 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
|
||||
Object? title = null,
|
||||
Object? totalLikes = null,
|
||||
Object? totalViews = null,
|
||||
Object? totalComments = freezed,
|
||||
Object? totalComments = null,
|
||||
Object? wasLikedByMe = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
@@ -149,10 +149,10 @@ class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
|
||||
? _value.totalViews
|
||||
: totalViews // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalComments: freezed == totalComments
|
||||
totalComments: null == totalComments
|
||||
? _value.totalComments
|
||||
: totalComments // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
as int,
|
||||
wasLikedByMe: null == wasLikedByMe
|
||||
? _value.wasLikedByMe
|
||||
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
|
||||
@@ -191,7 +191,7 @@ abstract class _$$FeedBlogPostModelImplCopyWith<$Res>
|
||||
String title,
|
||||
@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});
|
||||
|
||||
@override
|
||||
@@ -222,7 +222,7 @@ class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
|
||||
Object? title = null,
|
||||
Object? totalLikes = null,
|
||||
Object? totalViews = null,
|
||||
Object? totalComments = freezed,
|
||||
Object? totalComments = null,
|
||||
Object? wasLikedByMe = null,
|
||||
}) {
|
||||
return _then(_$FeedBlogPostModelImpl(
|
||||
@@ -270,10 +270,10 @@ class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
|
||||
? _value.totalViews
|
||||
: totalViews // ignore: cast_nullable_to_non_nullable
|
||||
as int,
|
||||
totalComments: freezed == totalComments
|
||||
totalComments: null == totalComments
|
||||
? _value.totalComments
|
||||
: totalComments // ignore: cast_nullable_to_non_nullable
|
||||
as int?,
|
||||
as int,
|
||||
wasLikedByMe: null == wasLikedByMe
|
||||
? _value.wasLikedByMe
|
||||
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
|
||||
@@ -297,7 +297,7 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
||||
required this.title,
|
||||
@JsonKey(name: "total_likes") required this.totalLikes,
|
||||
@JsonKey(name: "total_views") required this.totalViews,
|
||||
@JsonKey(name: "total_comments") this.totalComments,
|
||||
@JsonKey(name: "total_comments") required this.totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") required this.wasLikedByMe});
|
||||
|
||||
factory _$FeedBlogPostModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
@@ -332,7 +332,7 @@ class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
|
||||
final int totalViews;
|
||||
@override
|
||||
@JsonKey(name: "total_comments")
|
||||
final int? totalComments;
|
||||
final int totalComments;
|
||||
@override
|
||||
@JsonKey(name: "was_liked_by_me")
|
||||
final bool wasLikedByMe;
|
||||
@@ -420,7 +420,7 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel {
|
||||
required final String title,
|
||||
@JsonKey(name: "total_likes") required final int totalLikes,
|
||||
@JsonKey(name: "total_views") required final int totalViews,
|
||||
@JsonKey(name: "total_comments") final int? totalComments,
|
||||
@JsonKey(name: "total_comments") required final int totalComments,
|
||||
@JsonKey(name: "was_liked_by_me") required final bool wasLikedByMe}) =
|
||||
_$FeedBlogPostModelImpl;
|
||||
|
||||
@@ -456,7 +456,7 @@ abstract class _FeedBlogPostModel implements FeedBlogPostModel {
|
||||
int get totalViews;
|
||||
@override
|
||||
@JsonKey(name: "total_comments")
|
||||
int? get totalComments;
|
||||
int get totalComments;
|
||||
@override
|
||||
@JsonKey(name: "was_liked_by_me")
|
||||
bool get wasLikedByMe;
|
||||
|
||||
@@ -20,7 +20,7 @@ _$FeedBlogPostModelImpl _$$FeedBlogPostModelImplFromJson(
|
||||
title: json['title'] as String,
|
||||
totalLikes: (json['total_likes'] as num).toInt(),
|
||||
totalViews: (json['total_views'] as num).toInt(),
|
||||
totalComments: (json['total_comments'] as num?)?.toInt(),
|
||||
totalComments: (json['total_comments'] as num).toInt(),
|
||||
wasLikedByMe: json['was_liked_by_me'] as bool,
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user