AppFlowy/app_flowy/lib/workspace/application/doc/doc_bloc.freezed.dart

546 lines
14 KiB
Dart
Raw Normal View History

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.\nPlease 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
}
}
/// @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-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-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-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-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-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-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-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-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
}
/// @nodoc
2021-09-11 21:30:58 +08:00
class _$DocStateTearOff {
const _$DocStateTearOff();
_DocState call({required DocLoadState loadState}) {
2021-10-19 13:56:11 +08:00
return _DocState(
loadState: loadState,
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;
@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>;
$Res call({DocLoadState loadState});
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,
}) {
return _then(_value.copyWith(
loadState: loadState == freezed
? _value.loadState
: loadState // ignore: cast_nullable_to_non_nullable
as DocLoadState,
));
}
@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
$Res call({DocLoadState loadState});
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,
}) {
return _then(_DocState(
loadState: loadState == freezed
? _value.loadState
: loadState // ignore: cast_nullable_to_non_nullable
as DocLoadState,
));
}
2021-07-24 18:55:13 +08:00
}
/// @nodoc
2021-10-19 13:56:11 +08:00
class _$_DocState implements _DocState {
const _$_DocState({required this.loadState});
2021-10-19 13:56:11 +08:00
@override
final DocLoadState loadState;
2021-07-24 18:55:13 +08:00
@override
String toString() {
return 'DocState(loadState: $loadState)';
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()
.equals(other.loadState, loadState)));
2021-07-24 18:55:13 +08:00
}
@override
2021-10-19 13:56:11 +08:00
int get hashCode =>
runtimeType.hashCode ^ const DeepCollectionEquality().hash(loadState);
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 {
const factory _DocState({required DocLoadState loadState}) = _$_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
@JsonKey(ignore: true)
_$DocStateCopyWith<_DocState> get copyWith =>
throw _privateConstructorUsedError;
}
/// @nodoc
class _$DocLoadStateTearOff {
const _$DocLoadStateTearOff();
_Loading loading() {
return const _Loading();
}
_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,
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,
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,
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,
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>;
$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
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
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,
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,
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 {
const factory _Finish(Either<Unit, WorkspaceError> successOrFail) = _$_Finish;
2021-09-11 21:30:58 +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
}