2021-07-24 18:55:13 +08:00
// GENERATED CODE - DO NOT MODIFY BY HAND
2021-07-28 13:41:39 +08:00
// 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
2021-07-24 18:55:13 +08:00
part of ' doc_bloc.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. \n Please check the documentation here for more informations: https://github.com/rrousselGit/freezed#custom-getters-and-methods ' ) ;
/// @nodoc
class _ $DocEventTearOff {
const _ $DocEventTearOff ( ) ;
2021-10-19 13:56:11 +08:00
Initial initial ( ) {
return const Initial ( ) ;
2021-07-24 18:55:13 +08:00
}
2021-10-31 17:24:55 +08:00
Deleted deleted ( ) {
return const Deleted ( ) ;
}
Restore restore ( ) {
return const Restore ( ) ;
}
2021-07-24 18:55:13 +08:00
}
/// @nodoc
const $DocEvent = _ $DocEventTearOff ( ) ;
/// @nodoc
mixin _ $DocEvent {
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2021-10-19 13:56:11 +08:00
required TResult Function ( ) initial ,
2021-10-31 17:24:55 +08:00
required TResult Function ( ) deleted ,
required TResult Function ( ) restore ,
2021-07-24 18:55:13 +08:00
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2021-10-19 13:56:11 +08:00
TResult Function ( ) ? initial ,
2021-10-31 17:24:55 +08:00
TResult Function ( ) ? deleted ,
TResult Function ( ) ? restore ,
2021-07-24 18:55:13 +08:00
required TResult orElse ( ) ,
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
2021-10-19 13:56:11 +08:00
required TResult Function ( Initial value ) initial ,
2021-10-31 17:24:55 +08:00
required TResult Function ( Deleted value ) deleted ,
required TResult Function ( Restore value ) restore ,
2021-07-24 18:55:13 +08:00
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
2021-10-19 13:56:11 +08:00
TResult Function ( Initial value ) ? initial ,
2021-10-31 17:24:55 +08:00
TResult Function ( Deleted value ) ? deleted ,
TResult Function ( Restore value ) ? restore ,
2021-07-24 18:55:13 +08:00
required TResult orElse ( ) ,
} ) = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $DocEventCopyWith < $Res > {
factory $DocEventCopyWith ( DocEvent value , $Res Function ( DocEvent ) then ) =
_ $DocEventCopyWithImpl < $Res > ;
}
/// @nodoc
class _ $DocEventCopyWithImpl < $Res > implements $DocEventCopyWith < $Res > {
_ $DocEventCopyWithImpl ( this . _value , this . _then ) ;
final DocEvent _value ;
// ignore: unused_field
final $Res Function ( DocEvent ) _then ;
}
/// @nodoc
2021-10-19 13:56:11 +08:00
abstract class $InitialCopyWith < $Res > {
factory $InitialCopyWith ( Initial value , $Res Function ( Initial ) then ) =
_ $InitialCopyWithImpl < $Res > ;
2021-07-24 18:55:13 +08:00
}
/// @nodoc
2021-10-19 13:56:11 +08:00
class _ $InitialCopyWithImpl < $Res > extends _ $DocEventCopyWithImpl < $Res >
implements $InitialCopyWith < $Res > {
_ $InitialCopyWithImpl ( Initial _value , $Res Function ( Initial ) _then )
: super ( _value , ( v ) = > _then ( v as Initial ) ) ;
2021-07-24 18:55:13 +08:00
@ override
2021-10-19 13:56:11 +08:00
Initial get _value = > super . _value as Initial ;
2021-07-24 18:55:13 +08:00
}
/// @nodoc
2021-10-19 13:56:11 +08:00
class _ $Initial implements Initial {
const _ $Initial ( ) ;
2021-07-24 18:55:13 +08:00
@ override
String toString ( ) {
2021-10-19 13:56:11 +08:00
return ' DocEvent.initial() ' ;
2021-07-24 18:55:13 +08:00
}
@ override
bool operator = = ( dynamic other ) {
2021-10-19 13:56:11 +08:00
return identical ( this , other ) | | ( other is Initial ) ;
2021-07-24 18:55:13 +08:00
}
@ override
int get hashCode = > runtimeType . hashCode ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2021-10-19 13:56:11 +08:00
required TResult Function ( ) initial ,
2021-10-31 17:24:55 +08:00
required TResult Function ( ) deleted ,
required TResult Function ( ) restore ,
2021-07-24 18:55:13 +08:00
} ) {
2021-10-19 13:56:11 +08:00
return initial ( ) ;
2021-07-24 18:55:13 +08:00
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2021-10-19 13:56:11 +08:00
TResult Function ( ) ? initial ,
2021-10-31 17:24:55 +08:00
TResult Function ( ) ? deleted ,
TResult Function ( ) ? restore ,
2021-07-24 18:55:13 +08:00
required TResult orElse ( ) ,
} ) {
2021-10-19 13:56:11 +08:00
if ( initial ! = null ) {
return initial ( ) ;
2021-07-24 18:55:13 +08:00
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
2021-10-19 13:56:11 +08:00
required TResult Function ( Initial value ) initial ,
2021-10-31 17:24:55 +08:00
required TResult Function ( Deleted value ) deleted ,
required TResult Function ( Restore value ) restore ,
2021-07-24 18:55:13 +08:00
} ) {
2021-10-19 13:56:11 +08:00
return initial ( this ) ;
2021-07-24 18:55:13 +08:00
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
2021-10-19 13:56:11 +08:00
TResult Function ( Initial value ) ? initial ,
2021-10-31 17:24:55 +08:00
TResult Function ( Deleted value ) ? deleted ,
TResult Function ( Restore value ) ? restore ,
2021-07-24 18:55:13 +08:00
required TResult orElse ( ) ,
} ) {
2021-10-19 13:56:11 +08:00
if ( initial ! = null ) {
return initial ( this ) ;
2021-07-24 18:55:13 +08:00
}
return orElse ( ) ;
}
}
2021-10-19 13:56:11 +08:00
abstract class Initial implements DocEvent {
const factory Initial ( ) = _ $Initial ;
2021-07-24 18:55:13 +08:00
}
2021-10-31 17:24:55 +08:00
/// @nodoc
abstract class $DeletedCopyWith < $Res > {
factory $DeletedCopyWith ( Deleted value , $Res Function ( Deleted ) then ) =
_ $DeletedCopyWithImpl < $Res > ;
}
/// @nodoc
class _ $DeletedCopyWithImpl < $Res > extends _ $DocEventCopyWithImpl < $Res >
implements $DeletedCopyWith < $Res > {
_ $DeletedCopyWithImpl ( Deleted _value , $Res Function ( Deleted ) _then )
: super ( _value , ( v ) = > _then ( v as Deleted ) ) ;
@ override
Deleted get _value = > super . _value as Deleted ;
}
/// @nodoc
class _ $Deleted implements Deleted {
const _ $Deleted ( ) ;
@ override
String toString ( ) {
return ' DocEvent.deleted() ' ;
}
@ override
bool operator = = ( dynamic other ) {
return identical ( this , other ) | | ( other is Deleted ) ;
}
@ override
int get hashCode = > runtimeType . hashCode ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ) initial ,
required TResult Function ( ) deleted ,
required TResult Function ( ) restore ,
} ) {
return deleted ( ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ) ? initial ,
TResult Function ( ) ? deleted ,
TResult Function ( ) ? restore ,
required TResult orElse ( ) ,
} ) {
if ( deleted ! = null ) {
return deleted ( ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( Initial value ) initial ,
required TResult Function ( Deleted value ) deleted ,
required TResult Function ( Restore value ) restore ,
} ) {
return deleted ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( Initial value ) ? initial ,
TResult Function ( Deleted value ) ? deleted ,
TResult Function ( Restore value ) ? restore ,
required TResult orElse ( ) ,
} ) {
if ( deleted ! = null ) {
return deleted ( this ) ;
}
return orElse ( ) ;
}
}
abstract class Deleted implements DocEvent {
const factory Deleted ( ) = _ $Deleted ;
}
/// @nodoc
abstract class $RestoreCopyWith < $Res > {
factory $RestoreCopyWith ( Restore value , $Res Function ( Restore ) then ) =
_ $RestoreCopyWithImpl < $Res > ;
}
/// @nodoc
class _ $RestoreCopyWithImpl < $Res > extends _ $DocEventCopyWithImpl < $Res >
implements $RestoreCopyWith < $Res > {
_ $RestoreCopyWithImpl ( Restore _value , $Res Function ( Restore ) _then )
: super ( _value , ( v ) = > _then ( v as Restore ) ) ;
@ override
Restore get _value = > super . _value as Restore ;
}
/// @nodoc
class _ $Restore implements Restore {
const _ $Restore ( ) ;
@ override
String toString ( ) {
return ' DocEvent.restore() ' ;
}
@ override
bool operator = = ( dynamic other ) {
return identical ( this , other ) | | ( other is Restore ) ;
}
@ override
int get hashCode = > runtimeType . hashCode ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ) initial ,
required TResult Function ( ) deleted ,
required TResult Function ( ) restore ,
} ) {
return restore ( ) ;
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ) ? initial ,
TResult Function ( ) ? deleted ,
TResult Function ( ) ? restore ,
required TResult orElse ( ) ,
} ) {
if ( restore ! = null ) {
return restore ( ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( Initial value ) initial ,
required TResult Function ( Deleted value ) deleted ,
required TResult Function ( Restore value ) restore ,
} ) {
return restore ( this ) ;
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( Initial value ) ? initial ,
TResult Function ( Deleted value ) ? deleted ,
TResult Function ( Restore value ) ? restore ,
required TResult orElse ( ) ,
} ) {
if ( restore ! = null ) {
return restore ( this ) ;
}
return orElse ( ) ;
}
}
abstract class Restore implements DocEvent {
const factory Restore ( ) = _ $Restore ;
}
2021-07-24 18:55:13 +08:00
/// @nodoc
2021-09-11 21:30:58 +08:00
class _ $DocStateTearOff {
const _ $DocStateTearOff ( ) ;
2021-10-31 17:24:55 +08:00
_DocState call ( { required DocLoadState loadState , required bool isDeleted } ) {
2021-10-19 13:56:11 +08:00
return _DocState (
loadState: loadState ,
2021-10-31 17:24:55 +08:00
isDeleted: isDeleted ,
2021-09-11 21:30:58 +08:00
) ;
}
2021-07-24 18:55:13 +08:00
}
/// @nodoc
2021-09-11 21:30:58 +08:00
const $DocState = _ $DocStateTearOff ( ) ;
/// @nodoc
mixin _ $DocState {
2021-10-19 13:56:11 +08:00
DocLoadState get loadState = > throw _privateConstructorUsedError ;
2021-10-31 17:24:55 +08:00
bool get isDeleted = > throw _privateConstructorUsedError ;
2021-10-19 13:56:11 +08:00
@ JsonKey ( ignore: true )
$DocStateCopyWith < DocState > get copyWith = >
2021-09-11 21:30:58 +08:00
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $DocStateCopyWith < $Res > {
factory $DocStateCopyWith ( DocState value , $Res Function ( DocState ) then ) =
_ $DocStateCopyWithImpl < $Res > ;
2021-10-31 17:24:55 +08:00
$Res call ( { DocLoadState loadState , bool isDeleted } ) ;
2021-10-19 13:56:11 +08:00
$DocLoadStateCopyWith < $Res > get loadState ;
2021-09-11 21:30:58 +08:00
}
/// @nodoc
class _ $DocStateCopyWithImpl < $Res > implements $DocStateCopyWith < $Res > {
_ $DocStateCopyWithImpl ( this . _value , this . _then ) ;
final DocState _value ;
// ignore: unused_field
final $Res Function ( DocState ) _then ;
2021-10-19 13:56:11 +08:00
@ override
$Res call ( {
Object ? loadState = freezed ,
2021-10-31 17:24:55 +08:00
Object ? isDeleted = freezed ,
2021-10-19 13:56:11 +08:00
} ) {
return _then ( _value . copyWith (
loadState: loadState = = freezed
? _value . loadState
: loadState // ignore: cast_nullable_to_non_nullable
as DocLoadState ,
2021-10-31 17:24:55 +08:00
isDeleted: isDeleted = = freezed
? _value . isDeleted
: isDeleted // ignore: cast_nullable_to_non_nullable
as bool ,
2021-10-19 13:56:11 +08:00
) ) ;
}
@ override
$DocLoadStateCopyWith < $Res > get loadState {
return $DocLoadStateCopyWith < $Res > ( _value . loadState , ( value ) {
return _then ( _value . copyWith ( loadState: value ) ) ;
} ) ;
}
2021-09-11 21:30:58 +08:00
}
/// @nodoc
2021-10-19 13:56:11 +08:00
abstract class _ $DocStateCopyWith < $Res > implements $DocStateCopyWith < $Res > {
factory _ $DocStateCopyWith ( _DocState value , $Res Function ( _DocState ) then ) =
__ $DocStateCopyWithImpl < $Res > ;
@ override
2021-10-31 17:24:55 +08:00
$Res call ( { DocLoadState loadState , bool isDeleted } ) ;
2021-10-19 13:56:11 +08:00
@ override
$DocLoadStateCopyWith < $Res > get loadState ;
2021-09-11 21:30:58 +08:00
}
/// @nodoc
2021-10-19 13:56:11 +08:00
class __ $DocStateCopyWithImpl < $Res > extends _ $DocStateCopyWithImpl < $Res >
implements _ $DocStateCopyWith < $Res > {
__ $DocStateCopyWithImpl ( _DocState _value , $Res Function ( _DocState ) _then )
: super ( _value , ( v ) = > _then ( v as _DocState ) ) ;
2021-07-24 18:55:13 +08:00
@ override
2021-10-19 13:56:11 +08:00
_DocState get _value = > super . _value as _DocState ;
@ override
$Res call ( {
Object ? loadState = freezed ,
2021-10-31 17:24:55 +08:00
Object ? isDeleted = freezed ,
2021-10-19 13:56:11 +08:00
} ) {
return _then ( _DocState (
loadState: loadState = = freezed
? _value . loadState
: loadState // ignore: cast_nullable_to_non_nullable
as DocLoadState ,
2021-10-31 17:24:55 +08:00
isDeleted: isDeleted = = freezed
? _value . isDeleted
: isDeleted // ignore: cast_nullable_to_non_nullable
as bool ,
2021-10-19 13:56:11 +08:00
) ) ;
}
2021-07-24 18:55:13 +08:00
}
/// @nodoc
2021-10-19 13:56:11 +08:00
class _ $_DocState implements _DocState {
2021-10-31 17:24:55 +08:00
const _ $_DocState ( { required this . loadState , required this . isDeleted } ) ;
2021-10-19 13:56:11 +08:00
@ override
final DocLoadState loadState ;
2021-10-31 17:24:55 +08:00
@ override
final bool isDeleted ;
2021-07-24 18:55:13 +08:00
@ override
String toString ( ) {
2021-10-31 17:24:55 +08:00
return ' DocState(loadState: $ loadState , isDeleted: $ isDeleted ) ' ;
2021-07-24 18:55:13 +08:00
}
@ override
bool operator = = ( dynamic other ) {
2021-10-19 13:56:11 +08:00
return identical ( this , other ) | |
( other is _DocState & &
( identical ( other . loadState , loadState ) | |
const DeepCollectionEquality ( )
2021-10-31 17:24:55 +08:00
. equals ( other . loadState , loadState ) ) & &
( identical ( other . isDeleted , isDeleted ) | |
const DeepCollectionEquality ( )
. equals ( other . isDeleted , isDeleted ) ) ) ;
2021-07-24 18:55:13 +08:00
}
@ override
2021-10-19 13:56:11 +08:00
int get hashCode = >
2021-10-31 17:24:55 +08:00
runtimeType . hashCode ^
const DeepCollectionEquality ( ) . hash ( loadState ) ^
const DeepCollectionEquality ( ) . hash ( isDeleted ) ;
2021-07-24 18:55:13 +08:00
2021-10-19 13:56:11 +08:00
@ JsonKey ( ignore: true )
@ override
_ $DocStateCopyWith < _DocState > get copyWith = >
__ $DocStateCopyWithImpl < _DocState > ( this , _ $identity ) ;
}
abstract class _DocState implements DocState {
2021-10-31 17:24:55 +08:00
const factory _DocState (
{ required DocLoadState loadState , required bool isDeleted } ) = _ $_DocState ;
2021-10-19 13:56:11 +08:00
2021-07-24 18:55:13 +08:00
@ override
2021-10-19 13:56:11 +08:00
DocLoadState get loadState = > throw _privateConstructorUsedError ;
@ override
2021-10-31 17:24:55 +08:00
bool get isDeleted = > throw _privateConstructorUsedError ;
@ override
2021-10-19 13:56:11 +08:00
@ JsonKey ( ignore: true )
_ $DocStateCopyWith < _DocState > get copyWith = >
throw _privateConstructorUsedError ;
}
/// @nodoc
class _ $DocLoadStateTearOff {
const _ $DocLoadStateTearOff ( ) ;
_Loading loading ( ) {
return const _Loading ( ) ;
}
2021-10-20 22:19:01 +08:00
_Finish finish ( Either < Unit , WorkspaceError > successOrFail ) {
2021-10-19 13:56:11 +08:00
return _Finish (
successOrFail ,
) ;
}
}
/// @nodoc
const $DocLoadState = _ $DocLoadStateTearOff ( ) ;
/// @nodoc
mixin _ $DocLoadState {
2021-07-24 18:55:13 +08:00
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2021-09-11 21:30:58 +08:00
required TResult Function ( ) loading ,
2021-10-20 22:19:01 +08:00
required TResult Function ( Either < Unit , WorkspaceError > successOrFail )
2021-10-19 13:56:11 +08:00
finish ,
} ) = >
throw _privateConstructorUsedError ;
2021-07-24 18:55:13 +08:00
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2021-09-11 21:30:58 +08:00
TResult Function ( ) ? loading ,
2021-10-20 22:19:01 +08:00
TResult Function ( Either < Unit , WorkspaceError > successOrFail ) ? finish ,
2021-07-24 18:55:13 +08:00
required TResult orElse ( ) ,
2021-10-19 13:56:11 +08:00
} ) = >
throw _privateConstructorUsedError ;
2021-07-24 18:55:13 +08:00
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
2021-10-19 13:56:11 +08:00
required TResult Function ( _Loading value ) loading ,
required TResult Function ( _Finish value ) finish ,
} ) = >
throw _privateConstructorUsedError ;
2021-07-24 18:55:13 +08:00
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
2021-10-19 13:56:11 +08:00
TResult Function ( _Loading value ) ? loading ,
TResult Function ( _Finish value ) ? finish ,
2021-07-24 18:55:13 +08:00
required TResult orElse ( ) ,
2021-10-19 13:56:11 +08:00
} ) = >
throw _privateConstructorUsedError ;
2021-07-24 18:55:13 +08:00
}
2021-10-19 13:56:11 +08:00
/// @nodoc
abstract class $DocLoadStateCopyWith < $Res > {
factory $DocLoadStateCopyWith (
DocLoadState value , $Res Function ( DocLoadState ) then ) =
_ $DocLoadStateCopyWithImpl < $Res > ;
2021-07-24 18:55:13 +08:00
}
/// @nodoc
2021-10-19 13:56:11 +08:00
class _ $DocLoadStateCopyWithImpl < $Res > implements $DocLoadStateCopyWith < $Res > {
_ $DocLoadStateCopyWithImpl ( this . _value , this . _then ) ;
final DocLoadState _value ;
// ignore: unused_field
final $Res Function ( DocLoadState ) _then ;
2021-09-11 21:30:58 +08:00
}
2021-07-24 18:55:13 +08:00
2021-09-11 21:30:58 +08:00
/// @nodoc
2021-10-19 13:56:11 +08:00
abstract class _ $LoadingCopyWith < $Res > {
factory _ $LoadingCopyWith ( _Loading value , $Res Function ( _Loading ) then ) =
__ $LoadingCopyWithImpl < $Res > ;
}
2021-09-11 21:30:58 +08:00
2021-10-19 13:56:11 +08:00
/// @nodoc
class __ $LoadingCopyWithImpl < $Res > extends _ $DocLoadStateCopyWithImpl < $Res >
implements _ $LoadingCopyWith < $Res > {
__ $LoadingCopyWithImpl ( _Loading _value , $Res Function ( _Loading ) _then )
: super ( _value , ( v ) = > _then ( v as _Loading ) ) ;
2021-09-11 21:30:58 +08:00
@ override
2021-10-19 13:56:11 +08:00
_Loading get _value = > super . _value as _Loading ;
2021-07-24 18:55:13 +08:00
}
/// @nodoc
2021-10-19 13:56:11 +08:00
class _ $_Loading implements _Loading {
const _ $_Loading ( ) ;
2021-09-11 21:30:58 +08:00
@ override
String toString ( ) {
2021-10-19 13:56:11 +08:00
return ' DocLoadState.loading() ' ;
2021-09-11 21:30:58 +08:00
}
@ override
bool operator = = ( dynamic other ) {
2021-10-19 13:56:11 +08:00
return identical ( this , other ) | | ( other is _Loading ) ;
2021-09-11 21:30:58 +08:00
}
@ override
2021-10-19 13:56:11 +08:00
int get hashCode = > runtimeType . hashCode ;
2021-07-24 18:55:13 +08:00
2021-09-11 21:30:58 +08:00
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ) loading ,
2021-10-20 22:19:01 +08:00
required TResult Function ( Either < Unit , WorkspaceError > successOrFail )
2021-10-19 13:56:11 +08:00
finish ,
2021-09-11 21:30:58 +08:00
} ) {
2021-10-19 13:56:11 +08:00
return loading ( ) ;
2021-09-11 21:30:58 +08:00
}
2021-07-24 18:55:13 +08:00
2021-09-11 21:30:58 +08:00
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ) ? loading ,
2021-10-20 22:19:01 +08:00
TResult Function ( Either < Unit , WorkspaceError > successOrFail ) ? finish ,
2021-09-11 21:30:58 +08:00
required TResult orElse ( ) ,
} ) {
2021-10-19 13:56:11 +08:00
if ( loading ! = null ) {
return loading ( ) ;
2021-09-11 21:30:58 +08:00
}
return orElse ( ) ;
}
2021-07-24 18:55:13 +08:00
2021-09-11 21:30:58 +08:00
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
2021-10-19 13:56:11 +08:00
required TResult Function ( _Loading value ) loading ,
required TResult Function ( _Finish value ) finish ,
2021-09-11 21:30:58 +08:00
} ) {
2021-10-19 13:56:11 +08:00
return loading ( this ) ;
2021-09-11 21:30:58 +08:00
}
2021-07-24 18:55:13 +08:00
@ override
2021-09-11 21:30:58 +08:00
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
2021-10-19 13:56:11 +08:00
TResult Function ( _Loading value ) ? loading ,
TResult Function ( _Finish value ) ? finish ,
2021-09-11 21:30:58 +08:00
required TResult orElse ( ) ,
2021-07-24 18:55:13 +08:00
} ) {
2021-10-19 13:56:11 +08:00
if ( loading ! = null ) {
return loading ( this ) ;
2021-09-11 21:30:58 +08:00
}
return orElse ( ) ;
2021-07-24 18:55:13 +08:00
}
}
2021-10-19 13:56:11 +08:00
abstract class _Loading implements DocLoadState {
const factory _Loading ( ) = _ $_Loading ;
2021-09-11 21:30:58 +08:00
}
2021-07-24 18:55:13 +08:00
/// @nodoc
2021-10-19 13:56:11 +08:00
abstract class _ $FinishCopyWith < $Res > {
factory _ $FinishCopyWith ( _Finish value , $Res Function ( _Finish ) then ) =
__ $FinishCopyWithImpl < $Res > ;
2021-10-20 22:19:01 +08:00
$Res call ( { Either < Unit , WorkspaceError > successOrFail } ) ;
2021-07-24 18:55:13 +08:00
}
/// @nodoc
2021-10-19 13:56:11 +08:00
class __ $FinishCopyWithImpl < $Res > extends _ $DocLoadStateCopyWithImpl < $Res >
implements _ $FinishCopyWith < $Res > {
__ $FinishCopyWithImpl ( _Finish _value , $Res Function ( _Finish ) _then )
: super ( _value , ( v ) = > _then ( v as _Finish ) ) ;
2021-07-24 18:55:13 +08:00
@ override
2021-10-19 13:56:11 +08:00
_Finish get _value = > super . _value as _Finish ;
2021-07-24 18:55:13 +08:00
@ override
$Res call ( {
2021-10-19 13:56:11 +08:00
Object ? successOrFail = freezed ,
2021-07-24 18:55:13 +08:00
} ) {
2021-10-19 13:56:11 +08:00
return _then ( _Finish (
successOrFail = = freezed
? _value . successOrFail
: successOrFail // ignore: cast_nullable_to_non_nullable
2021-10-20 22:19:01 +08:00
as Either < Unit , WorkspaceError > ,
2021-07-24 18:55:13 +08:00
) ) ;
}
}
/// @nodoc
2021-10-19 13:56:11 +08:00
class _ $_Finish implements _Finish {
const _ $_Finish ( this . successOrFail ) ;
2021-07-24 18:55:13 +08:00
@ override
2021-10-20 22:19:01 +08:00
final Either < Unit , WorkspaceError > successOrFail ;
2021-07-24 18:55:13 +08:00
@ override
String toString ( ) {
2021-10-19 13:56:11 +08:00
return ' DocLoadState.finish(successOrFail: $ successOrFail ) ' ;
2021-07-24 18:55:13 +08:00
}
@ override
bool operator = = ( dynamic other ) {
return identical ( this , other ) | |
2021-10-19 13:56:11 +08:00
( other is _Finish & &
( identical ( other . successOrFail , successOrFail ) | |
const DeepCollectionEquality ( )
. equals ( other . successOrFail , successOrFail ) ) ) ;
2021-07-24 18:55:13 +08:00
}
@ override
int get hashCode = >
2021-10-19 13:56:11 +08:00
runtimeType . hashCode ^ const DeepCollectionEquality ( ) . hash ( successOrFail ) ;
2021-07-24 18:55:13 +08:00
@ JsonKey ( ignore: true )
@ override
2021-10-19 13:56:11 +08:00
_ $FinishCopyWith < _Finish > get copyWith = >
__ $FinishCopyWithImpl < _Finish > ( this , _ $identity ) ;
2021-07-24 18:55:13 +08:00
2021-09-11 21:30:58 +08:00
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ) loading ,
2021-10-20 22:19:01 +08:00
required TResult Function ( Either < Unit , WorkspaceError > successOrFail )
2021-10-19 13:56:11 +08:00
finish ,
2021-09-11 21:30:58 +08:00
} ) {
2021-10-19 13:56:11 +08:00
return finish ( successOrFail ) ;
2021-09-11 21:30:58 +08:00
}
2021-07-24 18:55:13 +08:00
@ override
2021-09-11 21:30:58 +08:00
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ) ? loading ,
2021-10-20 22:19:01 +08:00
TResult Function ( Either < Unit , WorkspaceError > successOrFail ) ? finish ,
2021-09-11 21:30:58 +08:00
required TResult orElse ( ) ,
} ) {
2021-10-19 13:56:11 +08:00
if ( finish ! = null ) {
return finish ( successOrFail ) ;
2021-09-11 21:30:58 +08:00
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
2021-10-19 13:56:11 +08:00
required TResult Function ( _Loading value ) loading ,
required TResult Function ( _Finish value ) finish ,
2021-09-11 21:30:58 +08:00
} ) {
2021-10-19 13:56:11 +08:00
return finish ( this ) ;
2021-09-11 21:30:58 +08:00
}
2021-07-24 18:55:13 +08:00
@ override
2021-09-11 21:30:58 +08:00
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
2021-10-19 13:56:11 +08:00
TResult Function ( _Loading value ) ? loading ,
TResult Function ( _Finish value ) ? finish ,
2021-09-11 21:30:58 +08:00
required TResult orElse ( ) ,
} ) {
2021-10-19 13:56:11 +08:00
if ( finish ! = null ) {
return finish ( this ) ;
2021-09-11 21:30:58 +08:00
}
return orElse ( ) ;
}
}
2021-10-19 13:56:11 +08:00
abstract class _Finish implements DocLoadState {
2021-10-20 22:19:01 +08:00
const factory _Finish ( Either < Unit , WorkspaceError > successOrFail ) = _ $_Finish ;
2021-09-11 21:30:58 +08:00
2021-10-20 22:19:01 +08:00
Either < Unit , WorkspaceError > get successOrFail = >
2021-07-24 18:55:13 +08:00
throw _privateConstructorUsedError ;
2021-10-19 13:56:11 +08:00
@ JsonKey ( ignore: true )
_ $FinishCopyWith < _Finish > get copyWith = > throw _privateConstructorUsedError ;
2021-07-24 18:55:13 +08:00
}