Files
eatvio_app/lib/features/blog_post/models/blog_post_model.freezed.dart

352 lines
12 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 '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');
BlogPostModel _$BlogPostModelFromJson(Map<String, dynamic> json) {
return _BlogPostModel.fromJson(json);
}
/// @nodoc
mixin _$BlogPostModel {
int get id => throw _privateConstructorUsedError;
String get state => throw _privateConstructorUsedError;
String? get image => throw _privateConstructorUsedError;
String get description => throw _privateConstructorUsedError;
String? get author_name => throw _privateConstructorUsedError;
String? get author_avatar_path => throw _privateConstructorUsedError;
@JsonKey(name: "youtube_url")
String get youtubeUrl => throw _privateConstructorUsedError;
@JsonKey(name: "created_at")
DateTime get createdAt => throw _privateConstructorUsedError;
@JsonKey(name: "updated_at")
DateTime get updatedAt => throw _privateConstructorUsedError;
String get title => throw _privateConstructorUsedError;
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
@JsonKey(ignore: true)
$BlogPostModelCopyWith<BlogPostModel> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $BlogPostModelCopyWith<$Res> {
factory $BlogPostModelCopyWith(
BlogPostModel value, $Res Function(BlogPostModel) then) =
_$BlogPostModelCopyWithImpl<$Res, BlogPostModel>;
@useResult
$Res call(
{int id,
String state,
String? image,
String description,
String? author_name,
String? author_avatar_path,
@JsonKey(name: "youtube_url") String youtubeUrl,
@JsonKey(name: "created_at") DateTime createdAt,
@JsonKey(name: "updated_at") DateTime updatedAt,
String title});
}
/// @nodoc
class _$BlogPostModelCopyWithImpl<$Res, $Val extends BlogPostModel>
implements $BlogPostModelCopyWith<$Res> {
_$BlogPostModelCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? state = null,
Object? image = freezed,
Object? description = null,
Object? author_name = freezed,
Object? author_avatar_path = freezed,
Object? youtubeUrl = null,
Object? createdAt = null,
Object? updatedAt = null,
Object? title = 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: freezed == 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_name: freezed == author_name
? _value.author_name
: author_name // ignore: cast_nullable_to_non_nullable
as String?,
author_avatar_path: freezed == author_avatar_path
? _value.author_avatar_path
: author_avatar_path // ignore: cast_nullable_to_non_nullable
as String?,
youtubeUrl: null == youtubeUrl
? _value.youtubeUrl
: youtubeUrl // 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,
) as $Val);
}
}
/// @nodoc
abstract class _$$BlogPostModelImplCopyWith<$Res>
implements $BlogPostModelCopyWith<$Res> {
factory _$$BlogPostModelImplCopyWith(
_$BlogPostModelImpl value, $Res Function(_$BlogPostModelImpl) then) =
__$$BlogPostModelImplCopyWithImpl<$Res>;
@override
@useResult
$Res call(
{int id,
String state,
String? image,
String description,
String? author_name,
String? author_avatar_path,
@JsonKey(name: "youtube_url") String youtubeUrl,
@JsonKey(name: "created_at") DateTime createdAt,
@JsonKey(name: "updated_at") DateTime updatedAt,
String title});
}
/// @nodoc
class __$$BlogPostModelImplCopyWithImpl<$Res>
extends _$BlogPostModelCopyWithImpl<$Res, _$BlogPostModelImpl>
implements _$$BlogPostModelImplCopyWith<$Res> {
__$$BlogPostModelImplCopyWithImpl(
_$BlogPostModelImpl _value, $Res Function(_$BlogPostModelImpl) _then)
: super(_value, _then);
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? state = null,
Object? image = freezed,
Object? description = null,
Object? author_name = freezed,
Object? author_avatar_path = freezed,
Object? youtubeUrl = null,
Object? createdAt = null,
Object? updatedAt = null,
Object? title = null,
}) {
return _then(_$BlogPostModelImpl(
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: freezed == 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_name: freezed == author_name
? _value.author_name
: author_name // ignore: cast_nullable_to_non_nullable
as String?,
author_avatar_path: freezed == author_avatar_path
? _value.author_avatar_path
: author_avatar_path // ignore: cast_nullable_to_non_nullable
as String?,
youtubeUrl: null == youtubeUrl
? _value.youtubeUrl
: youtubeUrl // 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,
));
}
}
/// @nodoc
@JsonSerializable()
class _$BlogPostModelImpl implements _BlogPostModel {
const _$BlogPostModelImpl(
{required this.id,
required this.state,
this.image,
required this.description,
this.author_name,
this.author_avatar_path,
@JsonKey(name: "youtube_url") required this.youtubeUrl,
@JsonKey(name: "created_at") required this.createdAt,
@JsonKey(name: "updated_at") required this.updatedAt,
required this.title});
factory _$BlogPostModelImpl.fromJson(Map<String, dynamic> json) =>
_$$BlogPostModelImplFromJson(json);
@override
final int id;
@override
final String state;
@override
final String? image;
@override
final String description;
@override
final String? author_name;
@override
final String? author_avatar_path;
@override
@JsonKey(name: "youtube_url")
final String youtubeUrl;
@override
@JsonKey(name: "created_at")
final DateTime createdAt;
@override
@JsonKey(name: "updated_at")
final DateTime updatedAt;
@override
final String title;
@override
String toString() {
return 'BlogPostModel(id: $id, state: $state, image: $image, description: $description, author_name: $author_name, author_avatar_path: $author_avatar_path, youtubeUrl: $youtubeUrl, createdAt: $createdAt, updatedAt: $updatedAt, title: $title)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$BlogPostModelImpl &&
(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_name, author_name) ||
other.author_name == author_name) &&
(identical(other.author_avatar_path, author_avatar_path) ||
other.author_avatar_path == author_avatar_path) &&
(identical(other.youtubeUrl, youtubeUrl) ||
other.youtubeUrl == youtubeUrl) &&
(identical(other.createdAt, createdAt) ||
other.createdAt == createdAt) &&
(identical(other.updatedAt, updatedAt) ||
other.updatedAt == updatedAt) &&
(identical(other.title, title) || other.title == title));
}
@JsonKey(ignore: true)
@override
int get hashCode => Object.hash(runtimeType, id, state, image, description,
author_name, author_avatar_path, youtubeUrl, createdAt, updatedAt, title);
@JsonKey(ignore: true)
@override
@pragma('vm:prefer-inline')
_$$BlogPostModelImplCopyWith<_$BlogPostModelImpl> get copyWith =>
__$$BlogPostModelImplCopyWithImpl<_$BlogPostModelImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$BlogPostModelImplToJson(
this,
);
}
}
abstract class _BlogPostModel implements BlogPostModel {
const factory _BlogPostModel(
{required final int id,
required final String state,
final String? image,
required final String description,
final String? author_name,
final String? author_avatar_path,
@JsonKey(name: "youtube_url") required final String youtubeUrl,
@JsonKey(name: "created_at") required final DateTime createdAt,
@JsonKey(name: "updated_at") required final DateTime updatedAt,
required final String title}) = _$BlogPostModelImpl;
factory _BlogPostModel.fromJson(Map<String, dynamic> json) =
_$BlogPostModelImpl.fromJson;
@override
int get id;
@override
String get state;
@override
String? get image;
@override
String get description;
@override
String? get author_name;
@override
String? get author_avatar_path;
@override
@JsonKey(name: "youtube_url")
String get youtubeUrl;
@override
@JsonKey(name: "created_at")
DateTime get createdAt;
@override
@JsonKey(name: "updated_at")
DateTime get updatedAt;
@override
String get title;
@override
@JsonKey(ignore: true)
_$$BlogPostModelImplCopyWith<_$BlogPostModelImpl> get copyWith =>
throw _privateConstructorUsedError;
}