326 lines
10 KiB
Dart
326 lines
10 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 'todo_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');
|
|
|
|
TodoModel _$TodoModelFromJson(Map<String, dynamic> json) {
|
|
return _TodoModel.fromJson(json);
|
|
}
|
|
|
|
/// @nodoc
|
|
mixin _$TodoModel {
|
|
int get id => throw _privateConstructorUsedError;
|
|
String get title => throw _privateConstructorUsedError;
|
|
String? get description => throw _privateConstructorUsedError;
|
|
bool get completed => throw _privateConstructorUsedError;
|
|
String get userId => throw _privateConstructorUsedError;
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
Map<String, dynamic>? get user => throw _privateConstructorUsedError;
|
|
DateTime? get createdAt => throw _privateConstructorUsedError;
|
|
DateTime? get updatedAt => throw _privateConstructorUsedError;
|
|
|
|
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
|
|
@JsonKey(ignore: true)
|
|
$TodoModelCopyWith<TodoModel> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $TodoModelCopyWith<$Res> {
|
|
factory $TodoModelCopyWith(TodoModel value, $Res Function(TodoModel) then) =
|
|
_$TodoModelCopyWithImpl<$Res, TodoModel>;
|
|
@useResult
|
|
$Res call(
|
|
{int id,
|
|
String title,
|
|
String? description,
|
|
bool completed,
|
|
String userId,
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
Map<String, dynamic>? user,
|
|
DateTime? createdAt,
|
|
DateTime? updatedAt});
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$TodoModelCopyWithImpl<$Res, $Val extends TodoModel>
|
|
implements $TodoModelCopyWith<$Res> {
|
|
_$TodoModelCopyWithImpl(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? title = null,
|
|
Object? description = freezed,
|
|
Object? completed = null,
|
|
Object? userId = null,
|
|
Object? user = freezed,
|
|
Object? createdAt = freezed,
|
|
Object? updatedAt = freezed,
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
title: null == title
|
|
? _value.title
|
|
: title // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
description: freezed == description
|
|
? _value.description
|
|
: description // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
completed: null == completed
|
|
? _value.completed
|
|
: completed // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
userId: null == userId
|
|
? _value.userId
|
|
: userId // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
user: freezed == user
|
|
? _value.user
|
|
: user // ignore: cast_nullable_to_non_nullable
|
|
as Map<String, dynamic>?,
|
|
createdAt: freezed == createdAt
|
|
? _value.createdAt
|
|
: createdAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
updatedAt: freezed == updatedAt
|
|
? _value.updatedAt
|
|
: updatedAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
) as $Val);
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$TodoModelImplCopyWith<$Res>
|
|
implements $TodoModelCopyWith<$Res> {
|
|
factory _$$TodoModelImplCopyWith(
|
|
_$TodoModelImpl value, $Res Function(_$TodoModelImpl) then) =
|
|
__$$TodoModelImplCopyWithImpl<$Res>;
|
|
@override
|
|
@useResult
|
|
$Res call(
|
|
{int id,
|
|
String title,
|
|
String? description,
|
|
bool completed,
|
|
String userId,
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
Map<String, dynamic>? user,
|
|
DateTime? createdAt,
|
|
DateTime? updatedAt});
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$TodoModelImplCopyWithImpl<$Res>
|
|
extends _$TodoModelCopyWithImpl<$Res, _$TodoModelImpl>
|
|
implements _$$TodoModelImplCopyWith<$Res> {
|
|
__$$TodoModelImplCopyWithImpl(
|
|
_$TodoModelImpl _value, $Res Function(_$TodoModelImpl) _then)
|
|
: super(_value, _then);
|
|
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? id = null,
|
|
Object? title = null,
|
|
Object? description = freezed,
|
|
Object? completed = null,
|
|
Object? userId = null,
|
|
Object? user = freezed,
|
|
Object? createdAt = freezed,
|
|
Object? updatedAt = freezed,
|
|
}) {
|
|
return _then(_$TodoModelImpl(
|
|
id: null == id
|
|
? _value.id
|
|
: id // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
title: null == title
|
|
? _value.title
|
|
: title // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
description: freezed == description
|
|
? _value.description
|
|
: description // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
completed: null == completed
|
|
? _value.completed
|
|
: completed // ignore: cast_nullable_to_non_nullable
|
|
as bool,
|
|
userId: null == userId
|
|
? _value.userId
|
|
: userId // ignore: cast_nullable_to_non_nullable
|
|
as String,
|
|
user: freezed == user
|
|
? _value._user
|
|
: user // ignore: cast_nullable_to_non_nullable
|
|
as Map<String, dynamic>?,
|
|
createdAt: freezed == createdAt
|
|
? _value.createdAt
|
|
: createdAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
updatedAt: freezed == updatedAt
|
|
? _value.updatedAt
|
|
: updatedAt // ignore: cast_nullable_to_non_nullable
|
|
as DateTime?,
|
|
));
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
@JsonSerializable()
|
|
class _$TodoModelImpl extends _TodoModel {
|
|
const _$TodoModelImpl(
|
|
{required this.id,
|
|
required this.title,
|
|
this.description,
|
|
required this.completed,
|
|
required this.userId,
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
final Map<String, dynamic>? user,
|
|
this.createdAt,
|
|
this.updatedAt})
|
|
: _user = user,
|
|
super._();
|
|
|
|
factory _$TodoModelImpl.fromJson(Map<String, dynamic> json) =>
|
|
_$$TodoModelImplFromJson(json);
|
|
|
|
@override
|
|
final int id;
|
|
@override
|
|
final String title;
|
|
@override
|
|
final String? description;
|
|
@override
|
|
final bool completed;
|
|
@override
|
|
final String userId;
|
|
final Map<String, dynamic>? _user;
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
Map<String, dynamic>? get user {
|
|
final value = _user;
|
|
if (value == null) return null;
|
|
if (_user is EqualUnmodifiableMapView) return _user;
|
|
// ignore: implicit_dynamic_type
|
|
return EqualUnmodifiableMapView(value);
|
|
}
|
|
|
|
@override
|
|
final DateTime? createdAt;
|
|
@override
|
|
final DateTime? updatedAt;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TodoModel(id: $id, title: $title, description: $description, completed: $completed, userId: $userId, user: $user, createdAt: $createdAt, updatedAt: $updatedAt)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$TodoModelImpl &&
|
|
(identical(other.id, id) || other.id == id) &&
|
|
(identical(other.title, title) || other.title == title) &&
|
|
(identical(other.description, description) ||
|
|
other.description == description) &&
|
|
(identical(other.completed, completed) ||
|
|
other.completed == completed) &&
|
|
(identical(other.userId, userId) || other.userId == userId) &&
|
|
const DeepCollectionEquality().equals(other._user, _user) &&
|
|
(identical(other.createdAt, createdAt) ||
|
|
other.createdAt == createdAt) &&
|
|
(identical(other.updatedAt, updatedAt) ||
|
|
other.updatedAt == updatedAt));
|
|
}
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
int get hashCode => Object.hash(
|
|
runtimeType,
|
|
id,
|
|
title,
|
|
description,
|
|
completed,
|
|
userId,
|
|
const DeepCollectionEquality().hash(_user),
|
|
createdAt,
|
|
updatedAt);
|
|
|
|
@JsonKey(ignore: true)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$TodoModelImplCopyWith<_$TodoModelImpl> get copyWith =>
|
|
__$$TodoModelImplCopyWithImpl<_$TodoModelImpl>(this, _$identity);
|
|
|
|
@override
|
|
Map<String, dynamic> toJson() {
|
|
return _$$TodoModelImplToJson(
|
|
this,
|
|
);
|
|
}
|
|
}
|
|
|
|
abstract class _TodoModel extends TodoModel {
|
|
const factory _TodoModel(
|
|
{required final int id,
|
|
required final String title,
|
|
final String? description,
|
|
required final bool completed,
|
|
required final String userId,
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
final Map<String, dynamic>? user,
|
|
final DateTime? createdAt,
|
|
final DateTime? updatedAt}) = _$TodoModelImpl;
|
|
const _TodoModel._() : super._();
|
|
|
|
factory _TodoModel.fromJson(Map<String, dynamic> json) =
|
|
_$TodoModelImpl.fromJson;
|
|
|
|
@override
|
|
int get id;
|
|
@override
|
|
String get title;
|
|
@override
|
|
String? get description;
|
|
@override
|
|
bool get completed;
|
|
@override
|
|
String get userId;
|
|
@override
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
Map<String, dynamic>? get user;
|
|
@override
|
|
DateTime? get createdAt;
|
|
@override
|
|
DateTime? get updatedAt;
|
|
@override
|
|
@JsonKey(ignore: true)
|
|
_$$TodoModelImplCopyWith<_$TodoModelImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|