430 lines
11 KiB
Dart
430 lines
11 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 'timer_state.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',
|
|
);
|
|
|
|
/// @nodoc
|
|
mixin _$TimerState {
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>({
|
|
required TResult Function() idle,
|
|
required TResult Function(
|
|
int entryId,
|
|
DateTime startTime,
|
|
Project project,
|
|
String? note,
|
|
)
|
|
running,
|
|
}) => throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? idle,
|
|
TResult? Function(
|
|
int entryId,
|
|
DateTime startTime,
|
|
Project project,
|
|
String? note,
|
|
)?
|
|
running,
|
|
}) => throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? idle,
|
|
TResult Function(
|
|
int entryId,
|
|
DateTime startTime,
|
|
Project project,
|
|
String? note,
|
|
)?
|
|
running,
|
|
required TResult orElse(),
|
|
}) => throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>({
|
|
required TResult Function(TimerIdle value) idle,
|
|
required TResult Function(TimerRunning value) running,
|
|
}) => throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
TResult? Function(TimerIdle value)? idle,
|
|
TResult? Function(TimerRunning value)? running,
|
|
}) => throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>({
|
|
TResult Function(TimerIdle value)? idle,
|
|
TResult Function(TimerRunning value)? running,
|
|
required TResult orElse(),
|
|
}) => throw _privateConstructorUsedError;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class $TimerStateCopyWith<$Res> {
|
|
factory $TimerStateCopyWith(
|
|
TimerState value,
|
|
$Res Function(TimerState) then,
|
|
) = _$TimerStateCopyWithImpl<$Res, TimerState>;
|
|
}
|
|
|
|
/// @nodoc
|
|
class _$TimerStateCopyWithImpl<$Res, $Val extends TimerState>
|
|
implements $TimerStateCopyWith<$Res> {
|
|
_$TimerStateCopyWithImpl(this._value, this._then);
|
|
|
|
// ignore: unused_field
|
|
final $Val _value;
|
|
// ignore: unused_field
|
|
final $Res Function($Val) _then;
|
|
|
|
/// Create a copy of TimerState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$TimerIdleImplCopyWith<$Res> {
|
|
factory _$$TimerIdleImplCopyWith(
|
|
_$TimerIdleImpl value,
|
|
$Res Function(_$TimerIdleImpl) then,
|
|
) = __$$TimerIdleImplCopyWithImpl<$Res>;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$TimerIdleImplCopyWithImpl<$Res>
|
|
extends _$TimerStateCopyWithImpl<$Res, _$TimerIdleImpl>
|
|
implements _$$TimerIdleImplCopyWith<$Res> {
|
|
__$$TimerIdleImplCopyWithImpl(
|
|
_$TimerIdleImpl _value,
|
|
$Res Function(_$TimerIdleImpl) _then,
|
|
) : super(_value, _then);
|
|
|
|
/// Create a copy of TimerState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$TimerIdleImpl implements TimerIdle {
|
|
const _$TimerIdleImpl();
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TimerState.idle()';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType && other is _$TimerIdleImpl);
|
|
}
|
|
|
|
@override
|
|
int get hashCode => runtimeType.hashCode;
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>({
|
|
required TResult Function() idle,
|
|
required TResult Function(
|
|
int entryId,
|
|
DateTime startTime,
|
|
Project project,
|
|
String? note,
|
|
)
|
|
running,
|
|
}) {
|
|
return idle();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? idle,
|
|
TResult? Function(
|
|
int entryId,
|
|
DateTime startTime,
|
|
Project project,
|
|
String? note,
|
|
)?
|
|
running,
|
|
}) {
|
|
return idle?.call();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? idle,
|
|
TResult Function(
|
|
int entryId,
|
|
DateTime startTime,
|
|
Project project,
|
|
String? note,
|
|
)?
|
|
running,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (idle != null) {
|
|
return idle();
|
|
}
|
|
return orElse();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>({
|
|
required TResult Function(TimerIdle value) idle,
|
|
required TResult Function(TimerRunning value) running,
|
|
}) {
|
|
return idle(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
TResult? Function(TimerIdle value)? idle,
|
|
TResult? Function(TimerRunning value)? running,
|
|
}) {
|
|
return idle?.call(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>({
|
|
TResult Function(TimerIdle value)? idle,
|
|
TResult Function(TimerRunning value)? running,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (idle != null) {
|
|
return idle(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class TimerIdle implements TimerState {
|
|
const factory TimerIdle() = _$TimerIdleImpl;
|
|
}
|
|
|
|
/// @nodoc
|
|
abstract class _$$TimerRunningImplCopyWith<$Res> {
|
|
factory _$$TimerRunningImplCopyWith(
|
|
_$TimerRunningImpl value,
|
|
$Res Function(_$TimerRunningImpl) then,
|
|
) = __$$TimerRunningImplCopyWithImpl<$Res>;
|
|
@useResult
|
|
$Res call({int entryId, DateTime startTime, Project project, String? note});
|
|
|
|
$ProjectCopyWith<$Res> get project;
|
|
}
|
|
|
|
/// @nodoc
|
|
class __$$TimerRunningImplCopyWithImpl<$Res>
|
|
extends _$TimerStateCopyWithImpl<$Res, _$TimerRunningImpl>
|
|
implements _$$TimerRunningImplCopyWith<$Res> {
|
|
__$$TimerRunningImplCopyWithImpl(
|
|
_$TimerRunningImpl _value,
|
|
$Res Function(_$TimerRunningImpl) _then,
|
|
) : super(_value, _then);
|
|
|
|
/// Create a copy of TimerState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@pragma('vm:prefer-inline')
|
|
@override
|
|
$Res call({
|
|
Object? entryId = null,
|
|
Object? startTime = null,
|
|
Object? project = null,
|
|
Object? note = freezed,
|
|
}) {
|
|
return _then(
|
|
_$TimerRunningImpl(
|
|
entryId: null == entryId
|
|
? _value.entryId
|
|
: entryId // ignore: cast_nullable_to_non_nullable
|
|
as int,
|
|
startTime: null == startTime
|
|
? _value.startTime
|
|
: startTime // ignore: cast_nullable_to_non_nullable
|
|
as DateTime,
|
|
project: null == project
|
|
? _value.project
|
|
: project // ignore: cast_nullable_to_non_nullable
|
|
as Project,
|
|
note: freezed == note
|
|
? _value.note
|
|
: note // ignore: cast_nullable_to_non_nullable
|
|
as String?,
|
|
),
|
|
);
|
|
}
|
|
|
|
/// Create a copy of TimerState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
$ProjectCopyWith<$Res> get project {
|
|
return $ProjectCopyWith<$Res>(_value.project, (value) {
|
|
return _then(_value.copyWith(project: value));
|
|
});
|
|
}
|
|
}
|
|
|
|
/// @nodoc
|
|
|
|
class _$TimerRunningImpl implements TimerRunning {
|
|
const _$TimerRunningImpl({
|
|
required this.entryId,
|
|
required this.startTime,
|
|
required this.project,
|
|
this.note,
|
|
});
|
|
|
|
@override
|
|
final int entryId;
|
|
@override
|
|
final DateTime startTime;
|
|
@override
|
|
final Project project;
|
|
@override
|
|
final String? note;
|
|
|
|
@override
|
|
String toString() {
|
|
return 'TimerState.running(entryId: $entryId, startTime: $startTime, project: $project, note: $note)';
|
|
}
|
|
|
|
@override
|
|
bool operator ==(Object other) {
|
|
return identical(this, other) ||
|
|
(other.runtimeType == runtimeType &&
|
|
other is _$TimerRunningImpl &&
|
|
(identical(other.entryId, entryId) || other.entryId == entryId) &&
|
|
(identical(other.startTime, startTime) ||
|
|
other.startTime == startTime) &&
|
|
(identical(other.project, project) || other.project == project) &&
|
|
(identical(other.note, note) || other.note == note));
|
|
}
|
|
|
|
@override
|
|
int get hashCode =>
|
|
Object.hash(runtimeType, entryId, startTime, project, note);
|
|
|
|
/// Create a copy of TimerState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
@override
|
|
@pragma('vm:prefer-inline')
|
|
_$$TimerRunningImplCopyWith<_$TimerRunningImpl> get copyWith =>
|
|
__$$TimerRunningImplCopyWithImpl<_$TimerRunningImpl>(this, _$identity);
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>({
|
|
required TResult Function() idle,
|
|
required TResult Function(
|
|
int entryId,
|
|
DateTime startTime,
|
|
Project project,
|
|
String? note,
|
|
)
|
|
running,
|
|
}) {
|
|
return running(entryId, startTime, project, note);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? whenOrNull<TResult extends Object?>({
|
|
TResult? Function()? idle,
|
|
TResult? Function(
|
|
int entryId,
|
|
DateTime startTime,
|
|
Project project,
|
|
String? note,
|
|
)?
|
|
running,
|
|
}) {
|
|
return running?.call(entryId, startTime, project, note);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult Function()? idle,
|
|
TResult Function(
|
|
int entryId,
|
|
DateTime startTime,
|
|
Project project,
|
|
String? note,
|
|
)?
|
|
running,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (running != null) {
|
|
return running(entryId, startTime, project, note);
|
|
}
|
|
return orElse();
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>({
|
|
required TResult Function(TimerIdle value) idle,
|
|
required TResult Function(TimerRunning value) running,
|
|
}) {
|
|
return running(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult? mapOrNull<TResult extends Object?>({
|
|
TResult? Function(TimerIdle value)? idle,
|
|
TResult? Function(TimerRunning value)? running,
|
|
}) {
|
|
return running?.call(this);
|
|
}
|
|
|
|
@override
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>({
|
|
TResult Function(TimerIdle value)? idle,
|
|
TResult Function(TimerRunning value)? running,
|
|
required TResult orElse(),
|
|
}) {
|
|
if (running != null) {
|
|
return running(this);
|
|
}
|
|
return orElse();
|
|
}
|
|
}
|
|
|
|
abstract class TimerRunning implements TimerState {
|
|
const factory TimerRunning({
|
|
required final int entryId,
|
|
required final DateTime startTime,
|
|
required final Project project,
|
|
final String? note,
|
|
}) = _$TimerRunningImpl;
|
|
|
|
int get entryId;
|
|
DateTime get startTime;
|
|
Project get project;
|
|
String? get note;
|
|
|
|
/// Create a copy of TimerState
|
|
/// with the given fields replaced by the non-null parameter values.
|
|
@JsonKey(includeFromJson: false, includeToJson: false)
|
|
_$$TimerRunningImplCopyWith<_$TimerRunningImpl> get copyWith =>
|
|
throw _privateConstructorUsedError;
|
|
}
|