forked from eatvio/eatvio_app
plans filters ready
This commit is contained in:
@@ -294,6 +294,7 @@ mixin _$PlanModel {
|
||||
int get totalComments => throw _privateConstructorUsedError;
|
||||
@JsonKey(name: "is_favorite")
|
||||
bool get isFavorite => throw _privateConstructorUsedError;
|
||||
bool get wasLikedByMe => throw _privateConstructorUsedError;
|
||||
|
||||
/// Serializes this PlanModel to a JSON map.
|
||||
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
||||
@@ -327,7 +328,8 @@ abstract class $PlanModelCopyWith<$Res> {
|
||||
@JsonKey(name: "total_likes") int totalLikes,
|
||||
@JsonKey(name: "total_views") int totalViews,
|
||||
@JsonKey(name: "total_comments") int totalComments,
|
||||
@JsonKey(name: "is_favorite") bool isFavorite});
|
||||
@JsonKey(name: "is_favorite") bool isFavorite,
|
||||
bool wasLikedByMe});
|
||||
|
||||
$PlanTypeCopyWith<$Res> get type;
|
||||
$PacketOptionsCopyWith<$Res>? get packet1Options;
|
||||
@@ -368,6 +370,7 @@ class _$PlanModelCopyWithImpl<$Res, $Val extends PlanModel>
|
||||
Object? totalViews = null,
|
||||
Object? totalComments = null,
|
||||
Object? isFavorite = null,
|
||||
Object? wasLikedByMe = null,
|
||||
}) {
|
||||
return _then(_value.copyWith(
|
||||
id: null == id
|
||||
@@ -438,6 +441,10 @@ class _$PlanModelCopyWithImpl<$Res, $Val extends PlanModel>
|
||||
? _value.isFavorite
|
||||
: isFavorite // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
wasLikedByMe: null == wasLikedByMe
|
||||
? _value.wasLikedByMe
|
||||
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
) as $Val);
|
||||
}
|
||||
|
||||
@@ -529,7 +536,8 @@ abstract class _$$PlanModelImplCopyWith<$Res>
|
||||
@JsonKey(name: "total_likes") int totalLikes,
|
||||
@JsonKey(name: "total_views") int totalViews,
|
||||
@JsonKey(name: "total_comments") int totalComments,
|
||||
@JsonKey(name: "is_favorite") bool isFavorite});
|
||||
@JsonKey(name: "is_favorite") bool isFavorite,
|
||||
bool wasLikedByMe});
|
||||
|
||||
@override
|
||||
$PlanTypeCopyWith<$Res> get type;
|
||||
@@ -573,6 +581,7 @@ class __$$PlanModelImplCopyWithImpl<$Res>
|
||||
Object? totalViews = null,
|
||||
Object? totalComments = null,
|
||||
Object? isFavorite = null,
|
||||
Object? wasLikedByMe = null,
|
||||
}) {
|
||||
return _then(_$PlanModelImpl(
|
||||
id: null == id
|
||||
@@ -643,6 +652,10 @@ class __$$PlanModelImplCopyWithImpl<$Res>
|
||||
? _value.isFavorite
|
||||
: isFavorite // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
wasLikedByMe: null == wasLikedByMe
|
||||
? _value.wasLikedByMe
|
||||
: wasLikedByMe // ignore: cast_nullable_to_non_nullable
|
||||
as bool,
|
||||
));
|
||||
}
|
||||
}
|
||||
@@ -667,7 +680,8 @@ class _$PlanModelImpl implements _PlanModel {
|
||||
@JsonKey(name: "total_likes") required this.totalLikes,
|
||||
@JsonKey(name: "total_views") required this.totalViews,
|
||||
@JsonKey(name: "total_comments") required this.totalComments,
|
||||
@JsonKey(name: "is_favorite") required this.isFavorite});
|
||||
@JsonKey(name: "is_favorite") required this.isFavorite,
|
||||
this.wasLikedByMe = false});
|
||||
|
||||
factory _$PlanModelImpl.fromJson(Map<String, dynamic> json) =>
|
||||
_$$PlanModelImplFromJson(json);
|
||||
@@ -723,10 +737,13 @@ class _$PlanModelImpl implements _PlanModel {
|
||||
@override
|
||||
@JsonKey(name: "is_favorite")
|
||||
final bool isFavorite;
|
||||
@override
|
||||
@JsonKey()
|
||||
final bool wasLikedByMe;
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return 'PlanModel(id: $id, slug: $slug, name: $name, image: $image, duration: $duration, state: $state, type: $type, details: $details, packetsCount: $packetsCount, packet1Options: $packet1Options, packet2Options: $packet2Options, packet3Options: $packet3Options, author: $author, totalLikes: $totalLikes, totalViews: $totalViews, totalComments: $totalComments, isFavorite: $isFavorite)';
|
||||
return 'PlanModel(id: $id, slug: $slug, name: $name, image: $image, duration: $duration, state: $state, type: $type, details: $details, packetsCount: $packetsCount, packet1Options: $packet1Options, packet2Options: $packet2Options, packet3Options: $packet3Options, author: $author, totalLikes: $totalLikes, totalViews: $totalViews, totalComments: $totalComments, isFavorite: $isFavorite, wasLikedByMe: $wasLikedByMe)';
|
||||
}
|
||||
|
||||
@override
|
||||
@@ -759,7 +776,9 @@ class _$PlanModelImpl implements _PlanModel {
|
||||
(identical(other.totalComments, totalComments) ||
|
||||
other.totalComments == totalComments) &&
|
||||
(identical(other.isFavorite, isFavorite) ||
|
||||
other.isFavorite == isFavorite));
|
||||
other.isFavorite == isFavorite) &&
|
||||
(identical(other.wasLikedByMe, wasLikedByMe) ||
|
||||
other.wasLikedByMe == wasLikedByMe));
|
||||
}
|
||||
|
||||
@JsonKey(includeFromJson: false, includeToJson: false)
|
||||
@@ -782,7 +801,8 @@ class _$PlanModelImpl implements _PlanModel {
|
||||
totalLikes,
|
||||
totalViews,
|
||||
totalComments,
|
||||
isFavorite);
|
||||
isFavorite,
|
||||
wasLikedByMe);
|
||||
|
||||
/// Create a copy of PlanModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
@@ -802,24 +822,24 @@ class _$PlanModelImpl implements _PlanModel {
|
||||
|
||||
abstract class _PlanModel implements PlanModel {
|
||||
const factory _PlanModel(
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "slug") required final String slug,
|
||||
@JsonKey(name: "name") required final String name,
|
||||
@JsonKey(name: "image") required final String image,
|
||||
@JsonKey(name: "duration") required final int duration,
|
||||
@JsonKey(name: "state") required final String state,
|
||||
@JsonKey(name: "type") required final PlanType type,
|
||||
@JsonKey(name: "details") required final String details,
|
||||
@JsonKey(name: "packets_count") required final int packetsCount,
|
||||
@JsonKey(name: "packet1_options") final PacketOptions? packet1Options,
|
||||
@JsonKey(name: "packet2_options") final PacketOptions? packet2Options,
|
||||
@JsonKey(name: "packet3_options") final PacketOptions? packet3Options,
|
||||
@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: "is_favorite") required final bool isFavorite}) =
|
||||
_$PlanModelImpl;
|
||||
{@JsonKey(name: "id") required final int id,
|
||||
@JsonKey(name: "slug") required final String slug,
|
||||
@JsonKey(name: "name") required final String name,
|
||||
@JsonKey(name: "image") required final String image,
|
||||
@JsonKey(name: "duration") required final int duration,
|
||||
@JsonKey(name: "state") required final String state,
|
||||
@JsonKey(name: "type") required final PlanType type,
|
||||
@JsonKey(name: "details") required final String details,
|
||||
@JsonKey(name: "packets_count") required final int packetsCount,
|
||||
@JsonKey(name: "packet1_options") final PacketOptions? packet1Options,
|
||||
@JsonKey(name: "packet2_options") final PacketOptions? packet2Options,
|
||||
@JsonKey(name: "packet3_options") final PacketOptions? packet3Options,
|
||||
@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: "is_favorite") required final bool isFavorite,
|
||||
final bool wasLikedByMe}) = _$PlanModelImpl;
|
||||
|
||||
factory _PlanModel.fromJson(Map<String, dynamic> json) =
|
||||
_$PlanModelImpl.fromJson;
|
||||
@@ -875,6 +895,8 @@ abstract class _PlanModel implements PlanModel {
|
||||
@override
|
||||
@JsonKey(name: "is_favorite")
|
||||
bool get isFavorite;
|
||||
@override
|
||||
bool get wasLikedByMe;
|
||||
|
||||
/// Create a copy of PlanModel
|
||||
/// with the given fields replaced by the non-null parameter values.
|
||||
|
||||
Reference in New Issue
Block a user