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-09-12 22:19:59 +08:00
LoadDoc loadDoc ( ) {
return const LoadDoc ( ) ;
2021-07-24 18:55:13 +08:00
}
}
/// @nodoc
const $DocEvent = _ $DocEventTearOff ( ) ;
/// @nodoc
mixin _ $DocEvent {
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2021-09-12 22:19:59 +08:00
required TResult Function ( ) loadDoc ,
2021-07-24 18:55:13 +08:00
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2021-09-12 22:19:59 +08:00
TResult Function ( ) ? loadDoc ,
2021-07-24 18:55:13 +08:00
required TResult orElse ( ) ,
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
2021-09-12 22:19:59 +08:00
required TResult Function ( LoadDoc value ) loadDoc ,
2021-07-24 18:55:13 +08:00
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
2021-09-12 22:19:59 +08:00
TResult Function ( LoadDoc value ) ? loadDoc ,
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-09-12 22:19:59 +08:00
abstract class $LoadDocCopyWith < $Res > {
factory $LoadDocCopyWith ( LoadDoc value , $Res Function ( LoadDoc ) then ) =
_ $LoadDocCopyWithImpl < $Res > ;
2021-07-24 18:55:13 +08:00
}
/// @nodoc
2021-09-12 22:19:59 +08:00
class _ $LoadDocCopyWithImpl < $Res > extends _ $DocEventCopyWithImpl < $Res >
implements $LoadDocCopyWith < $Res > {
_ $LoadDocCopyWithImpl ( LoadDoc _value , $Res Function ( LoadDoc ) _then )
: super ( _value , ( v ) = > _then ( v as LoadDoc ) ) ;
2021-07-24 18:55:13 +08:00
@ override
2021-09-12 22:19:59 +08:00
LoadDoc get _value = > super . _value as LoadDoc ;
2021-07-24 18:55:13 +08:00
}
/// @nodoc
2021-09-12 22:19:59 +08:00
class _ $LoadDoc implements LoadDoc {
const _ $LoadDoc ( ) ;
2021-07-24 18:55:13 +08:00
@ override
String toString ( ) {
2021-09-12 22:19:59 +08:00
return ' DocEvent.loadDoc() ' ;
2021-07-24 18:55:13 +08:00
}
@ override
bool operator = = ( dynamic other ) {
2021-09-12 22:19:59 +08:00
return identical ( this , other ) | | ( other is LoadDoc ) ;
2021-07-24 18:55:13 +08:00
}
@ override
int get hashCode = > runtimeType . hashCode ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2021-09-12 22:19:59 +08:00
required TResult Function ( ) loadDoc ,
2021-07-24 18:55:13 +08:00
} ) {
2021-09-12 22:19:59 +08:00
return loadDoc ( ) ;
2021-07-24 18:55:13 +08:00
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2021-09-12 22:19:59 +08:00
TResult Function ( ) ? loadDoc ,
2021-07-24 18:55:13 +08:00
required TResult orElse ( ) ,
} ) {
2021-09-12 22:19:59 +08:00
if ( loadDoc ! = null ) {
return loadDoc ( ) ;
2021-07-24 18:55:13 +08:00
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
2021-09-12 22:19:59 +08:00
required TResult Function ( LoadDoc value ) loadDoc ,
2021-07-24 18:55:13 +08:00
} ) {
2021-09-12 22:19:59 +08:00
return loadDoc ( this ) ;
2021-07-24 18:55:13 +08:00
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
2021-09-12 22:19:59 +08:00
TResult Function ( LoadDoc value ) ? loadDoc ,
2021-07-24 18:55:13 +08:00
required TResult orElse ( ) ,
} ) {
2021-09-12 22:19:59 +08:00
if ( loadDoc ! = null ) {
return loadDoc ( this ) ;
2021-07-24 18:55:13 +08:00
}
return orElse ( ) ;
}
}
2021-09-12 22:19:59 +08:00
abstract class LoadDoc implements DocEvent {
const factory LoadDoc ( ) = _ $LoadDoc ;
2021-07-24 18:55:13 +08:00
}
/// @nodoc
2021-09-11 21:30:58 +08:00
class _ $DocStateTearOff {
const _ $DocStateTearOff ( ) ;
Loading loading ( ) {
return const Loading ( ) ;
}
2021-09-12 22:19:59 +08:00
LoadedDoc loadDoc ( FlowyDoc doc ) {
return LoadedDoc (
2021-09-11 21:30:58 +08:00
doc ,
) ;
}
LoadFail loadFail ( WorkspaceError error ) {
return LoadFail (
error ,
) ;
}
2021-07-24 18:55:13 +08:00
}
/// @nodoc
2021-09-11 21:30:58 +08:00
const $DocState = _ $DocStateTearOff ( ) ;
/// @nodoc
mixin _ $DocState {
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
required TResult Function ( ) loading ,
required TResult Function ( FlowyDoc doc ) loadDoc ,
required TResult Function ( WorkspaceError error ) loadFail ,
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
TResult Function ( ) ? loading ,
TResult Function ( FlowyDoc doc ) ? loadDoc ,
TResult Function ( WorkspaceError error ) ? loadFail ,
required TResult orElse ( ) ,
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( Loading value ) loading ,
2021-09-12 22:19:59 +08:00
required TResult Function ( LoadedDoc value ) loadDoc ,
2021-09-11 21:30:58 +08:00
required TResult Function ( LoadFail value ) loadFail ,
} ) = >
throw _privateConstructorUsedError ;
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( Loading value ) ? loading ,
2021-09-12 22:19:59 +08:00
TResult Function ( LoadedDoc value ) ? loadDoc ,
2021-09-11 21:30:58 +08:00
TResult Function ( LoadFail value ) ? loadFail ,
required TResult orElse ( ) ,
} ) = >
throw _privateConstructorUsedError ;
}
/// @nodoc
abstract class $DocStateCopyWith < $Res > {
factory $DocStateCopyWith ( DocState value , $Res Function ( DocState ) then ) =
_ $DocStateCopyWithImpl < $Res > ;
}
/// @nodoc
class _ $DocStateCopyWithImpl < $Res > implements $DocStateCopyWith < $Res > {
_ $DocStateCopyWithImpl ( this . _value , this . _then ) ;
final DocState _value ;
// ignore: unused_field
final $Res Function ( DocState ) _then ;
}
/// @nodoc
abstract class $LoadingCopyWith < $Res > {
factory $LoadingCopyWith ( Loading value , $Res Function ( Loading ) then ) =
_ $LoadingCopyWithImpl < $Res > ;
}
/// @nodoc
class _ $LoadingCopyWithImpl < $Res > extends _ $DocStateCopyWithImpl < $Res >
implements $LoadingCopyWith < $Res > {
_ $LoadingCopyWithImpl ( Loading _value , $Res Function ( Loading ) _then )
: super ( _value , ( v ) = > _then ( v as Loading ) ) ;
2021-07-24 18:55:13 +08:00
@ override
2021-09-11 21:30:58 +08:00
Loading get _value = > super . _value as Loading ;
2021-07-24 18:55:13 +08:00
}
/// @nodoc
2021-09-11 21:30:58 +08:00
class _ $Loading implements Loading {
const _ $Loading ( ) ;
2021-07-24 18:55:13 +08:00
@ override
String toString ( ) {
2021-09-11 21:30:58 +08:00
return ' DocState.loading() ' ;
2021-07-24 18:55:13 +08:00
}
@ override
bool operator = = ( dynamic other ) {
2021-09-11 21:30:58 +08:00
return identical ( this , other ) | | ( other is Loading ) ;
2021-07-24 18:55:13 +08:00
}
@ override
int get hashCode = > runtimeType . hashCode ;
@ override
@ optionalTypeArgs
TResult when < TResult extends Object ? > ( {
2021-09-11 21:30:58 +08:00
required TResult Function ( ) loading ,
required TResult Function ( FlowyDoc doc ) loadDoc ,
required TResult Function ( WorkspaceError error ) loadFail ,
2021-07-24 18:55:13 +08:00
} ) {
2021-09-11 21:30:58 +08:00
return loading ( ) ;
2021-07-24 18:55:13 +08:00
}
@ override
@ optionalTypeArgs
TResult maybeWhen < TResult extends Object ? > ( {
2021-09-11 21:30:58 +08:00
TResult Function ( ) ? loading ,
TResult Function ( FlowyDoc doc ) ? loadDoc ,
TResult Function ( WorkspaceError error ) ? loadFail ,
2021-07-24 18:55:13 +08:00
required TResult orElse ( ) ,
} ) {
2021-09-11 21:30:58 +08:00
if ( loading ! = null ) {
return loading ( ) ;
2021-07-24 18:55:13 +08:00
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
2021-09-11 21:30:58 +08:00
required TResult Function ( Loading value ) loading ,
2021-09-12 22:19:59 +08:00
required TResult Function ( LoadedDoc value ) loadDoc ,
2021-09-11 21:30:58 +08:00
required TResult Function ( LoadFail value ) loadFail ,
2021-07-24 18:55:13 +08:00
} ) {
2021-09-11 21:30:58 +08:00
return loading ( this ) ;
2021-07-24 18:55:13 +08:00
}
@ override
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
2021-09-11 21:30:58 +08:00
TResult Function ( Loading value ) ? loading ,
2021-09-12 22:19:59 +08:00
TResult Function ( LoadedDoc value ) ? loadDoc ,
2021-09-11 21:30:58 +08:00
TResult Function ( LoadFail value ) ? loadFail ,
2021-07-24 18:55:13 +08:00
required TResult orElse ( ) ,
} ) {
2021-09-11 21:30:58 +08:00
if ( loading ! = null ) {
return loading ( this ) ;
2021-07-24 18:55:13 +08:00
}
return orElse ( ) ;
}
}
2021-09-11 21:30:58 +08:00
abstract class Loading implements DocState {
const factory Loading ( ) = _ $Loading ;
2021-07-24 18:55:13 +08:00
}
/// @nodoc
2021-09-12 22:19:59 +08:00
abstract class $LoadedDocCopyWith < $Res > {
factory $LoadedDocCopyWith ( LoadedDoc value , $Res Function ( LoadedDoc ) then ) =
_ $LoadedDocCopyWithImpl < $Res > ;
2021-09-11 21:30:58 +08:00
$Res call ( { FlowyDoc doc } ) ;
}
2021-07-24 18:55:13 +08:00
2021-09-11 21:30:58 +08:00
/// @nodoc
2021-09-12 22:19:59 +08:00
class _ $LoadedDocCopyWithImpl < $Res > extends _ $DocStateCopyWithImpl < $Res >
implements $LoadedDocCopyWith < $Res > {
_ $LoadedDocCopyWithImpl ( LoadedDoc _value , $Res Function ( LoadedDoc ) _then )
: super ( _value , ( v ) = > _then ( v as LoadedDoc ) ) ;
2021-09-11 21:30:58 +08:00
@ override
2021-09-12 22:19:59 +08:00
LoadedDoc get _value = > super . _value as LoadedDoc ;
2021-09-11 21:30:58 +08:00
@ override
$Res call ( {
Object ? doc = freezed ,
} ) {
2021-09-12 22:19:59 +08:00
return _then ( LoadedDoc (
2021-09-11 21:30:58 +08:00
doc = = freezed
? _value . doc
: doc // ignore: cast_nullable_to_non_nullable
as FlowyDoc ,
) ) ;
2021-07-24 18:55:13 +08:00
}
}
/// @nodoc
2021-09-12 22:19:59 +08:00
class _ $LoadedDoc implements LoadedDoc {
const _ $LoadedDoc ( this . doc ) ;
2021-09-11 21:30:58 +08:00
@ override
final FlowyDoc doc ;
@ override
String toString ( ) {
return ' DocState.loadDoc(doc: $ doc ) ' ;
}
@ override
bool operator = = ( dynamic other ) {
return identical ( this , other ) | |
2021-09-12 22:19:59 +08:00
( other is LoadedDoc & &
2021-09-11 21:30:58 +08:00
( identical ( other . doc , doc ) | |
const DeepCollectionEquality ( ) . equals ( other . doc , doc ) ) ) ;
}
@ override
int get hashCode = >
runtimeType . hashCode ^ const DeepCollectionEquality ( ) . hash ( doc ) ;
2021-07-24 18:55:13 +08:00
@ JsonKey ( ignore: true )
2021-09-11 21:30:58 +08:00
@ override
2021-09-12 22:19:59 +08:00
$LoadedDocCopyWith < LoadedDoc > get copyWith = >
_ $LoadedDocCopyWithImpl < LoadedDoc > ( 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 ,
required TResult Function ( FlowyDoc doc ) loadDoc ,
required TResult Function ( WorkspaceError error ) loadFail ,
} ) {
return loadDoc ( doc ) ;
}
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 ,
TResult Function ( FlowyDoc doc ) ? loadDoc ,
TResult Function ( WorkspaceError error ) ? loadFail ,
required TResult orElse ( ) ,
} ) {
if ( loadDoc ! = null ) {
return loadDoc ( doc ) ;
}
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 ? > ( {
required TResult Function ( Loading value ) loading ,
2021-09-12 22:19:59 +08:00
required TResult Function ( LoadedDoc value ) loadDoc ,
2021-09-11 21:30:58 +08:00
required TResult Function ( LoadFail value ) loadFail ,
} ) {
return loadDoc ( this ) ;
}
2021-07-24 18:55:13 +08:00
@ override
2021-09-11 21:30:58 +08:00
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( Loading value ) ? loading ,
2021-09-12 22:19:59 +08:00
TResult Function ( LoadedDoc value ) ? loadDoc ,
2021-09-11 21:30:58 +08:00
TResult Function ( LoadFail value ) ? loadFail ,
required TResult orElse ( ) ,
2021-07-24 18:55:13 +08:00
} ) {
2021-09-11 21:30:58 +08:00
if ( loadDoc ! = null ) {
return loadDoc ( this ) ;
}
return orElse ( ) ;
2021-07-24 18:55:13 +08:00
}
}
2021-09-12 22:19:59 +08:00
abstract class LoadedDoc implements DocState {
const factory LoadedDoc ( FlowyDoc doc ) = _ $LoadedDoc ;
2021-09-11 21:30:58 +08:00
FlowyDoc get doc = > throw _privateConstructorUsedError ;
@ JsonKey ( ignore: true )
2021-09-12 22:19:59 +08:00
$LoadedDocCopyWith < LoadedDoc > get copyWith = >
throw _privateConstructorUsedError ;
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
abstract class $LoadFailCopyWith < $Res > {
factory $LoadFailCopyWith ( LoadFail value , $Res Function ( LoadFail ) then ) =
_ $LoadFailCopyWithImpl < $Res > ;
$Res call ( { WorkspaceError error } ) ;
2021-07-24 18:55:13 +08:00
}
/// @nodoc
2021-09-11 21:30:58 +08:00
class _ $LoadFailCopyWithImpl < $Res > extends _ $DocStateCopyWithImpl < $Res >
implements $LoadFailCopyWith < $Res > {
_ $LoadFailCopyWithImpl ( LoadFail _value , $Res Function ( LoadFail ) _then )
: super ( _value , ( v ) = > _then ( v as LoadFail ) ) ;
2021-07-24 18:55:13 +08:00
@ override
2021-09-11 21:30:58 +08:00
LoadFail get _value = > super . _value as LoadFail ;
2021-07-24 18:55:13 +08:00
@ override
$Res call ( {
2021-09-11 21:30:58 +08:00
Object ? error = freezed ,
2021-07-24 18:55:13 +08:00
} ) {
2021-09-11 21:30:58 +08:00
return _then ( LoadFail (
error = = freezed
? _value . error
: error // ignore: cast_nullable_to_non_nullable
as WorkspaceError ,
2021-07-24 18:55:13 +08:00
) ) ;
}
}
/// @nodoc
2021-09-11 21:30:58 +08:00
class _ $LoadFail implements LoadFail {
const _ $LoadFail ( this . error ) ;
2021-07-24 18:55:13 +08:00
@ override
2021-09-11 21:30:58 +08:00
final WorkspaceError error ;
2021-07-24 18:55:13 +08:00
@ override
String toString ( ) {
2021-09-11 21:30:58 +08:00
return ' DocState.loadFail(error: $ error ) ' ;
2021-07-24 18:55:13 +08:00
}
@ override
bool operator = = ( dynamic other ) {
return identical ( this , other ) | |
2021-09-11 21:30:58 +08:00
( other is LoadFail & &
( identical ( other . error , error ) | |
const DeepCollectionEquality ( ) . equals ( other . error , error ) ) ) ;
2021-07-24 18:55:13 +08:00
}
@ override
int get hashCode = >
2021-09-11 21:30:58 +08:00
runtimeType . hashCode ^ const DeepCollectionEquality ( ) . hash ( error ) ;
2021-07-24 18:55:13 +08:00
@ JsonKey ( ignore: true )
@ override
2021-09-11 21:30:58 +08:00
$LoadFailCopyWith < LoadFail > get copyWith = >
_ $LoadFailCopyWithImpl < LoadFail > ( 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 ,
required TResult Function ( FlowyDoc doc ) loadDoc ,
required TResult Function ( WorkspaceError error ) loadFail ,
} ) {
return loadFail ( error ) ;
}
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 ,
TResult Function ( FlowyDoc doc ) ? loadDoc ,
TResult Function ( WorkspaceError error ) ? loadFail ,
required TResult orElse ( ) ,
} ) {
if ( loadFail ! = null ) {
return loadFail ( error ) ;
}
return orElse ( ) ;
}
@ override
@ optionalTypeArgs
TResult map < TResult extends Object ? > ( {
required TResult Function ( Loading value ) loading ,
2021-09-12 22:19:59 +08:00
required TResult Function ( LoadedDoc value ) loadDoc ,
2021-09-11 21:30:58 +08:00
required TResult Function ( LoadFail value ) loadFail ,
} ) {
return loadFail ( this ) ;
}
2021-07-24 18:55:13 +08:00
@ override
2021-09-11 21:30:58 +08:00
@ optionalTypeArgs
TResult maybeMap < TResult extends Object ? > ( {
TResult Function ( Loading value ) ? loading ,
2021-09-12 22:19:59 +08:00
TResult Function ( LoadedDoc value ) ? loadDoc ,
2021-09-11 21:30:58 +08:00
TResult Function ( LoadFail value ) ? loadFail ,
required TResult orElse ( ) ,
} ) {
if ( loadFail ! = null ) {
return loadFail ( this ) ;
}
return orElse ( ) ;
}
}
abstract class LoadFail implements DocState {
const factory LoadFail ( WorkspaceError error ) = _ $LoadFail ;
WorkspaceError get error = > throw _privateConstructorUsedError ;
2021-07-24 18:55:13 +08:00
@ JsonKey ( ignore: true )
2021-09-11 21:30:58 +08:00
$LoadFailCopyWith < LoadFail > get copyWith = >
2021-07-24 18:55:13 +08:00
throw _privateConstructorUsedError ;
}