bible-tracker/lib/models/tracker.freezed.dart
2026-04-20 14:39:49 -04:00

272 lines
8.3 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 'tracker.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',
);
Tracker _$TrackerFromJson(Map<String, dynamic> json) {
return _Tracker.fromJson(json);
}
/// @nodoc
mixin _$Tracker {
String get id => throw _privateConstructorUsedError;
String get name => throw _privateConstructorUsedError;
int get colorValue => throw _privateConstructorUsedError;
DateTime get startDate => throw _privateConstructorUsedError;
Set<String> get readChapters => throw _privateConstructorUsedError;
/// Serializes this Tracker to a JSON map.
Map<String, dynamic> toJson() => throw _privateConstructorUsedError;
/// Create a copy of Tracker
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
$TrackerCopyWith<Tracker> get copyWith => throw _privateConstructorUsedError;
}
/// @nodoc
abstract class $TrackerCopyWith<$Res> {
factory $TrackerCopyWith(Tracker value, $Res Function(Tracker) then) =
_$TrackerCopyWithImpl<$Res, Tracker>;
@useResult
$Res call({
String id,
String name,
int colorValue,
DateTime startDate,
Set<String> readChapters,
});
}
/// @nodoc
class _$TrackerCopyWithImpl<$Res, $Val extends Tracker>
implements $TrackerCopyWith<$Res> {
_$TrackerCopyWithImpl(this._value, this._then);
// ignore: unused_field
final $Val _value;
// ignore: unused_field
final $Res Function($Val) _then;
/// Create a copy of Tracker
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? colorValue = null,
Object? startDate = null,
Object? readChapters = null,
}) {
return _then(
_value.copyWith(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
colorValue: null == colorValue
? _value.colorValue
: colorValue // ignore: cast_nullable_to_non_nullable
as int,
startDate: null == startDate
? _value.startDate
: startDate // ignore: cast_nullable_to_non_nullable
as DateTime,
readChapters: null == readChapters
? _value.readChapters
: readChapters // ignore: cast_nullable_to_non_nullable
as Set<String>,
)
as $Val,
);
}
}
/// @nodoc
abstract class _$$TrackerImplCopyWith<$Res> implements $TrackerCopyWith<$Res> {
factory _$$TrackerImplCopyWith(
_$TrackerImpl value,
$Res Function(_$TrackerImpl) then,
) = __$$TrackerImplCopyWithImpl<$Res>;
@override
@useResult
$Res call({
String id,
String name,
int colorValue,
DateTime startDate,
Set<String> readChapters,
});
}
/// @nodoc
class __$$TrackerImplCopyWithImpl<$Res>
extends _$TrackerCopyWithImpl<$Res, _$TrackerImpl>
implements _$$TrackerImplCopyWith<$Res> {
__$$TrackerImplCopyWithImpl(
_$TrackerImpl _value,
$Res Function(_$TrackerImpl) _then,
) : super(_value, _then);
/// Create a copy of Tracker
/// with the given fields replaced by the non-null parameter values.
@pragma('vm:prefer-inline')
@override
$Res call({
Object? id = null,
Object? name = null,
Object? colorValue = null,
Object? startDate = null,
Object? readChapters = null,
}) {
return _then(
_$TrackerImpl(
id: null == id
? _value.id
: id // ignore: cast_nullable_to_non_nullable
as String,
name: null == name
? _value.name
: name // ignore: cast_nullable_to_non_nullable
as String,
colorValue: null == colorValue
? _value.colorValue
: colorValue // ignore: cast_nullable_to_non_nullable
as int,
startDate: null == startDate
? _value.startDate
: startDate // ignore: cast_nullable_to_non_nullable
as DateTime,
readChapters: null == readChapters
? _value._readChapters
: readChapters // ignore: cast_nullable_to_non_nullable
as Set<String>,
),
);
}
}
/// @nodoc
@JsonSerializable()
class _$TrackerImpl implements _Tracker {
const _$TrackerImpl({
required this.id,
required this.name,
required this.colorValue,
required this.startDate,
final Set<String> readChapters = const <String>{},
}) : _readChapters = readChapters;
factory _$TrackerImpl.fromJson(Map<String, dynamic> json) =>
_$$TrackerImplFromJson(json);
@override
final String id;
@override
final String name;
@override
final int colorValue;
@override
final DateTime startDate;
final Set<String> _readChapters;
@override
@JsonKey()
Set<String> get readChapters {
if (_readChapters is EqualUnmodifiableSetView) return _readChapters;
// ignore: implicit_dynamic_type
return EqualUnmodifiableSetView(_readChapters);
}
@override
String toString() {
return 'Tracker(id: $id, name: $name, colorValue: $colorValue, startDate: $startDate, readChapters: $readChapters)';
}
@override
bool operator ==(Object other) {
return identical(this, other) ||
(other.runtimeType == runtimeType &&
other is _$TrackerImpl &&
(identical(other.id, id) || other.id == id) &&
(identical(other.name, name) || other.name == name) &&
(identical(other.colorValue, colorValue) ||
other.colorValue == colorValue) &&
(identical(other.startDate, startDate) ||
other.startDate == startDate) &&
const DeepCollectionEquality().equals(
other._readChapters,
_readChapters,
));
}
@JsonKey(includeFromJson: false, includeToJson: false)
@override
int get hashCode => Object.hash(
runtimeType,
id,
name,
colorValue,
startDate,
const DeepCollectionEquality().hash(_readChapters),
);
/// Create a copy of Tracker
/// with the given fields replaced by the non-null parameter values.
@JsonKey(includeFromJson: false, includeToJson: false)
@override
@pragma('vm:prefer-inline')
_$$TrackerImplCopyWith<_$TrackerImpl> get copyWith =>
__$$TrackerImplCopyWithImpl<_$TrackerImpl>(this, _$identity);
@override
Map<String, dynamic> toJson() {
return _$$TrackerImplToJson(this);
}
}
abstract class _Tracker implements Tracker {
const factory _Tracker({
required final String id,
required final String name,
required final int colorValue,
required final DateTime startDate,
final Set<String> readChapters,
}) = _$TrackerImpl;
factory _Tracker.fromJson(Map<String, dynamic> json) = _$TrackerImpl.fromJson;
@override
String get id;
@override
String get name;
@override
int get colorValue;
@override
DateTime get startDate;
@override
Set<String> get readChapters;
/// Create a copy of Tracker
/// with the given fields replaced by the non-null parameter values.
@override
@JsonKey(includeFromJson: false, includeToJson: false)
_$$TrackerImplCopyWith<_$TrackerImpl> get copyWith =>
throw _privateConstructorUsedError;
}