Files
eatvio_app/lib/features/feed/models/feed_blog_post_model.freezed.dart
2025-03-18 14:33:51 +07:00

510 lines
17 KiB
Dart

// coverage:ignore-file
// GENERATED CODE - DO NOT MODIFY BY HAND
// ignore_for_file: type=lint
// ignore_for_file: unused_element, deprecated_member_use, deprecated_member_use_from_same_package, use_function_type_syntax_for_parameters, unnecessary_const, avoid_init_to_null, invalid_override_different_default_values_named, prefer_expression_function_bodies, annotate_overrides, invalid_annotation_target, unnecessary_question_mark
part of 'feed_blog_post_model.dart';
// **************************************************************************
// FreezedGenerator
// **************************************************************************
T _$identity<T>(T value) => value;
final _privateConstructorUsedError = UnsupportedError(
'It seems like you constructed your class using `MyClass._()`. This constructor is only meant to be used by freezed and you are not supposed to need it nor use it.\nPlease check the documentation here for more information: https://github.com/rrousselGit/freezed#adding-getters-and-methods-to-our-models',
);
FeedBlogPostModel _$FeedBlogPostModelFromJson(Map<String, dynamic> json) {
return _FeedBlogPostModel.fromJson(json);
}
/// @nodoc
mixin _$FeedBlogPostModel {
int get id => throw _privateConstructorUsedError;
String get state => throw _privateConstructorUsedError;
String get image => throw _privateConstructorUsedError;
String get description => throw _privateConstructorUsedError;
Author get author => throw _privateConstructorUsedError;
@JsonKey(name: "video_url")
String get videoUrl => throw _privateConstructorUsedError;
@JsonKey(name: "created_at", fromJson: parseDate)
DateTime get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at", fromJson: parseDate)
DateTime get updatedAt => throw _privateConstructorUsedError;
String get title => throw _privateConstructorUsedError;
@JsonKey(name: "total_likes")
int get totalLikes => throw _privateConstructorUsedError;
@JsonKey(name: "total_views")
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;
/// Serializes this FeedBlogPostModel to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of FeedBlogPostModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$FeedBlogPostModelCopyWith<FeedBlogPostModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $FeedBlogPostModelCopyWith<$Res> {
factory $FeedBlogPostModelCopyWith(
FeedBlogPostModel value,
$Res Function(FeedBlogPostModel) then,
) = _$FeedBlogPostModelCopyWithImpl<$Res, FeedBlogPostModel>;
@useResult
$Res call({
int id,
String state,
String image,
String description,
Author author,
@JsonKey(name: "video_url") String videoUrl,
@JsonKey(name: "created_at", fromJson: parseDate) DateTime createdAt,
@JsonKey(name: "updated_at", fromJson: parseDate) DateTime updatedAt,
String title,
@JsonKey(name: "total_likes") int totalLikes,
@JsonKey(name: "total_views") int totalViews,
@JsonKey(name: "total_comments") int totalComments,
@JsonKey(name: "was_liked_by_me") bool wasLikedByMe,
});
$AuthorCopyWith<$Res> get author;
}
/// @nodoc
class _$FeedBlogPostModelCopyWithImpl<$Res, $Val extends FeedBlogPostModel>
implements $FeedBlogPostModelCopyWith<$Res> {
_$FeedBlogPostModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of FeedBlogPostModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? state = null,
Object? image = null,
Object? description = null,
Object? author = null,
Object? videoUrl = null,
Object? createdAt = null,
Object? updatedAt = null,
Object? title = null,
Object? totalLikes = null,
Object? totalViews = null,
Object? totalComments = null,
Object? wasLikedByMe = null,
}) {
return _then(
_value.copyWith(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
state:
null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String,
image:
null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
description:
null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
author:
null == author
? _value.author
: author // ignore: cast_nullable_to_non_nullable
as Author,
videoUrl:
null == videoUrl
? _value.videoUrl
: videoUrl // ignore: cast_nullable_to_non_nullable
as String,
createdAt:
null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt:
null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
title:
null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
totalLikes:
null == totalLikes
? _value.totalLikes
: totalLikes // ignore: cast_nullable_to_non_nullable
as int,
totalViews:
null == totalViews
? _value.totalViews
: totalViews // ignore: cast_nullable_to_non_nullable
as int,
totalComments:
null == totalComments
? _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,
)
as $Val,
);
}
/// Create a copy of FeedBlogPostModel
/// with the given fields replaced by the non-null parameter values.
@override
@pragma('vm:prefer-inline')
$AuthorCopyWith<$Res> get author {
return $AuthorCopyWith<$Res>(_value.author, (value) {
return _then(_value.copyWith(author: value) as $Val);
});
}
}
/// @nodoc
abstract class _$$FeedBlogPostModelImplCopyWith<$Res>
implements $FeedBlogPostModelCopyWith<$Res> {
factory _$$FeedBlogPostModelImplCopyWith(
_$FeedBlogPostModelImpl value,
$Res Function(_$FeedBlogPostModelImpl) then,
) = __$$FeedBlogPostModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
int id,
String state,
String image,
String description,
Author author,
@JsonKey(name: "video_url") String videoUrl,
@JsonKey(name: "created_at", fromJson: parseDate) DateTime createdAt,
@JsonKey(name: "updated_at", fromJson: parseDate) DateTime updatedAt,
String title,
@JsonKey(name: "total_likes") int totalLikes,
@JsonKey(name: "total_views") int totalViews,
@JsonKey(name: "total_comments") int totalComments,
@JsonKey(name: "was_liked_by_me") bool wasLikedByMe,
});
@override
$AuthorCopyWith<$Res> get author;
}
/// @nodoc
class __$$FeedBlogPostModelImplCopyWithImpl<$Res>
extends _$FeedBlogPostModelCopyWithImpl<$Res, _$FeedBlogPostModelImpl>
implements _$$FeedBlogPostModelImplCopyWith<$Res> {
__$$FeedBlogPostModelImplCopyWithImpl(
_$FeedBlogPostModelImpl _value,
$Res Function(_$FeedBlogPostModelImpl) _then,
) : super(_value, _then);
/// Create a copy of FeedBlogPostModel
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? state = null,
Object? image = null,
Object? description = null,
Object? author = null,
Object? videoUrl = null,
Object? createdAt = null,
Object? updatedAt = null,
Object? title = null,
Object? totalLikes = null,
Object? totalViews = null,
Object? totalComments = null,
Object? wasLikedByMe = null,
}) {
return _then(
_$FeedBlogPostModelImpl(
id:
null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as int,
state:
null == state
? _value.state
: state // ignore: cast_nullable_to_non_nullable
as String,
image:
null == image
? _value.image
: image // ignore: cast_nullable_to_non_nullable
as String,
description:
null == description
? _value.description
: description // ignore: cast_nullable_to_non_nullable
as String,
author:
null == author
? _value.author
: author // ignore: cast_nullable_to_non_nullable
as Author,
videoUrl:
null == videoUrl
? _value.videoUrl
: videoUrl // ignore: cast_nullable_to_non_nullable
as String,
createdAt:
null == createdAt
? _value.createdAt
: createdAt // ignore: cast_nullable_to_non_nullable
as DateTime,
updatedAt:
null == updatedAt
? _value.updatedAt
: updatedAt // ignore: cast_nullable_to_non_nullable
as DateTime,
title:
null == title
? _value.title
: title // ignore: cast_nullable_to_non_nullable
as String,
totalLikes:
null == totalLikes
? _value.totalLikes
: totalLikes // ignore: cast_nullable_to_non_nullable
as int,
totalViews:
null == totalViews
? _value.totalViews
: totalViews // ignore: cast_nullable_to_non_nullable
as int,
totalComments:
null == totalComments
? _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,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$FeedBlogPostModelImpl implements _FeedBlogPostModel {
const _$FeedBlogPostModelImpl({
required this.id,
required this.state,
required this.image,
required this.description,
required this.author,
@JsonKey(name: "video_url") required this.videoUrl,
@JsonKey(name: "created_at", fromJson: parseDate) required this.createdAt,
@JsonKey(name: "updated_at", fromJson: parseDate) required this.updatedAt,
required this.title,
@JsonKey(name: "total_likes") required this.totalLikes,
@JsonKey(name: "total_views") required this.totalViews,
@JsonKey(name: "total_comments") required this.totalComments,
@JsonKey(name: "was_liked_by_me") required this.wasLikedByMe,
});
factory _$FeedBlogPostModelImpl.fromJson(Map<String, dynamic> json) =>
_$$FeedBlogPostModelImplFromJson(json);
@override
final int id;
@override
final String state;
@override
final String image;
@override
final String description;
@override
final Author author;
@override
@JsonKey(name: "video_url")
final String videoUrl;
@override
@JsonKey(name: "created_at", fromJson: parseDate)
final DateTime createdAt;
@override
@JsonKey(name: "updated_at", fromJson: parseDate)
final DateTime updatedAt;
@override
final String title;
@override
@JsonKey(name: "total_likes")
final int totalLikes;
@override
@JsonKey(name: "total_views")
final int totalViews;
@override
@JsonKey(name: "total_comments")
final int totalComments;
@override
@JsonKey(name: "was_liked_by_me")
final bool wasLikedByMe;
@override
String toString() {
return 'FeedBlogPostModel(id: $id, state: $state, image: $image, description: $description, author: $author, videoUrl: $videoUrl, createdAt: $createdAt, updatedAt: $updatedAt, title: $title, totalLikes: $totalLikes, totalViews: $totalViews, totalComments: $totalComments, wasLikedByMe: $wasLikedByMe)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$FeedBlogPostModelImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.state, state) || other.state == state) &&
(identical(other.image, image) || other.image == image) &&
(identical(other.description, description) ||
other.description == description) &&
(identical(other.author, author) || other.author == author) &&
(identical(other.videoUrl, videoUrl) ||
other.videoUrl == videoUrl) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.title, title) || other.title == title) &&
(identical(other.totalLikes, totalLikes) ||
other.totalLikes == totalLikes) &&
(identical(other.totalViews, totalViews) ||
other.totalViews == totalViews) &&
(identical(other.totalComments, totalComments) ||
other.totalComments == totalComments) &&
(identical(other.wasLikedByMe, wasLikedByMe) ||
other.wasLikedByMe == wasLikedByMe));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
state,
image,
description,
author,
videoUrl,
createdAt,
updatedAt,
title,
totalLikes,
totalViews,
totalComments,
wasLikedByMe,
);
/// Create a copy of FeedBlogPostModel
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
__$$FeedBlogPostModelImplCopyWithImpl<_$FeedBlogPostModelImpl>(
this,
_$identity,
);
@override
Map<String, dynamic> toJson() {
return _$$FeedBlogPostModelImplToJson(this);
}
}
abstract class _FeedBlogPostModel implements FeedBlogPostModel {
const factory _FeedBlogPostModel({
required final int id,
required final String state,
required final String image,
required final String description,
required final Author author,
@JsonKey(name: "video_url") required final String videoUrl,
@JsonKey(name: "created_at", fromJson: parseDate)
required final DateTime createdAt,
@JsonKey(name: "updated_at", fromJson: parseDate)
required final DateTime updatedAt,
required final String title,
@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: "was_liked_by_me") required final bool wasLikedByMe,
}) = _$FeedBlogPostModelImpl;
factory _FeedBlogPostModel.fromJson(Map<String, dynamic> json) =
_$FeedBlogPostModelImpl.fromJson;
@override
int get id;
@override
String get state;
@override
String get image;
@override
String get description;
@override
Author get author;
@override
@JsonKey(name: "video_url")
String get videoUrl;
@override
@JsonKey(name: "created_at", fromJson: parseDate)
DateTime get createdAt;
@override
@JsonKey(name: "updated_at", fromJson: parseDate)
DateTime get updatedAt;
@override
String get title;
@override
@JsonKey(name: "total_likes")
int get totalLikes;
@override
@JsonKey(name: "total_views")
int get totalViews;
@override
@JsonKey(name: "total_comments")
int get totalComments;
@override
@JsonKey(name: "was_liked_by_me")
bool get wasLikedByMe;
/// Create a copy of FeedBlogPostModel
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$FeedBlogPostModelImplCopyWith<_$FeedBlogPostModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}