From d6770c6690abe7603f6770b5a966ff101d2c8112 Mon Sep 17 00:00:00 2001 From: appflowy <annie@appflowy.io> Date: Sat, 26 Feb 2022 16:49:55 +0800 Subject: [PATCH] chore: delete freeze files --- .../application/doc/doc_bloc.freezed.dart | 1225 ----------------- .../application/menu/menu_bloc.freezed.dart | 1049 -------------- .../application/trash/trash_bloc.freezed.dart | 1129 --------------- .../application/view/view_bloc.freezed.dart | 1155 ---------------- .../workspace/welcome_bloc.freezed.dart | 890 ------------ 5 files changed, 5448 deletions(-) delete mode 100644 frontend/app_flowy/lib/workspace/application/doc/doc_bloc.freezed.dart delete mode 100644 frontend/app_flowy/lib/workspace/application/menu/menu_bloc.freezed.dart delete mode 100644 frontend/app_flowy/lib/workspace/application/trash/trash_bloc.freezed.dart delete mode 100644 frontend/app_flowy/lib/workspace/application/view/view_bloc.freezed.dart delete mode 100644 frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.freezed.dart diff --git a/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.freezed.dart b/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.freezed.dart deleted file mode 100644 index 80804e8836..0000000000 --- a/frontend/app_flowy/lib/workspace/application/doc/doc_bloc.freezed.dart +++ /dev/null @@ -1,1225 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// 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 - -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 _$DocumentEventTearOff { - const _$DocumentEventTearOff(); - - Initial initial() { - return const Initial(); - } - - Deleted deleted() { - return const Deleted(); - } - - Restore restore() { - return const Restore(); - } - - RestorePage restorePage() { - return const RestorePage(); - } - - DeletePermanently deletePermanently() { - return const DeletePermanently(); - } -} - -/// @nodoc -const $DocumentEvent = _$DocumentEventTearOff(); - -/// @nodoc -mixin _$DocumentEvent { - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function() deleted, - required TResult Function() restore, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(Deleted value) deleted, - required TResult Function(Restore value) restore, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DocumentEventCopyWith<$Res> { - factory $DocumentEventCopyWith( - DocumentEvent value, $Res Function(DocumentEvent) then) = - _$DocumentEventCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DocumentEventCopyWithImpl<$Res> - implements $DocumentEventCopyWith<$Res> { - _$DocumentEventCopyWithImpl(this._value, this._then); - - final DocumentEvent _value; - // ignore: unused_field - final $Res Function(DocumentEvent) _then; -} - -/// @nodoc -abstract class $InitialCopyWith<$Res> { - factory $InitialCopyWith(Initial value, $Res Function(Initial) then) = - _$InitialCopyWithImpl<$Res>; -} - -/// @nodoc -class _$InitialCopyWithImpl<$Res> extends _$DocumentEventCopyWithImpl<$Res> - implements $InitialCopyWith<$Res> { - _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then) - : super(_value, (v) => _then(v as Initial)); - - @override - Initial get _value => super._value as Initial; -} - -/// @nodoc - -class _$Initial implements Initial { - const _$Initial(); - - @override - String toString() { - return 'DocumentEvent.initial()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Initial); - } - - @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, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) { - return initial(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) { - return initial?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - required TResult orElse(), - }) { - if (initial != null) { - return initial(); - } - 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, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) { - return initial(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) { - return initial?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) { - if (initial != null) { - return initial(this); - } - return orElse(); - } -} - -abstract class Initial implements DocumentEvent { - const factory Initial() = _$Initial; -} - -/// @nodoc -abstract class $DeletedCopyWith<$Res> { - factory $DeletedCopyWith(Deleted value, $Res Function(Deleted) then) = - _$DeletedCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DeletedCopyWithImpl<$Res> extends _$DocumentEventCopyWithImpl<$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 'DocumentEvent.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, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) { - return deleted(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) { - return deleted?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - 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, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) { - return deleted(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) { - return deleted?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) { - if (deleted != null) { - return deleted(this); - } - return orElse(); - } -} - -abstract class Deleted implements DocumentEvent { - const factory Deleted() = _$Deleted; -} - -/// @nodoc -abstract class $RestoreCopyWith<$Res> { - factory $RestoreCopyWith(Restore value, $Res Function(Restore) then) = - _$RestoreCopyWithImpl<$Res>; -} - -/// @nodoc -class _$RestoreCopyWithImpl<$Res> extends _$DocumentEventCopyWithImpl<$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 'DocumentEvent.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, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) { - return restore(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) { - return restore?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - 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, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) { - return restore(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) { - return restore?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) { - if (restore != null) { - return restore(this); - } - return orElse(); - } -} - -abstract class Restore implements DocumentEvent { - const factory Restore() = _$Restore; -} - -/// @nodoc -abstract class $RestorePageCopyWith<$Res> { - factory $RestorePageCopyWith( - RestorePage value, $Res Function(RestorePage) then) = - _$RestorePageCopyWithImpl<$Res>; -} - -/// @nodoc -class _$RestorePageCopyWithImpl<$Res> extends _$DocumentEventCopyWithImpl<$Res> - implements $RestorePageCopyWith<$Res> { - _$RestorePageCopyWithImpl( - RestorePage _value, $Res Function(RestorePage) _then) - : super(_value, (v) => _then(v as RestorePage)); - - @override - RestorePage get _value => super._value as RestorePage; -} - -/// @nodoc - -class _$RestorePage implements RestorePage { - const _$RestorePage(); - - @override - String toString() { - return 'DocumentEvent.restorePage()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is RestorePage); - } - - @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, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) { - return restorePage(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) { - return restorePage?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - required TResult orElse(), - }) { - if (restorePage != null) { - return restorePage(); - } - 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, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) { - return restorePage(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) { - return restorePage?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) { - if (restorePage != null) { - return restorePage(this); - } - return orElse(); - } -} - -abstract class RestorePage implements DocumentEvent { - const factory RestorePage() = _$RestorePage; -} - -/// @nodoc -abstract class $DeletePermanentlyCopyWith<$Res> { - factory $DeletePermanentlyCopyWith( - DeletePermanently value, $Res Function(DeletePermanently) then) = - _$DeletePermanentlyCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DeletePermanentlyCopyWithImpl<$Res> - extends _$DocumentEventCopyWithImpl<$Res> - implements $DeletePermanentlyCopyWith<$Res> { - _$DeletePermanentlyCopyWithImpl( - DeletePermanently _value, $Res Function(DeletePermanently) _then) - : super(_value, (v) => _then(v as DeletePermanently)); - - @override - DeletePermanently get _value => super._value as DeletePermanently; -} - -/// @nodoc - -class _$DeletePermanently implements DeletePermanently { - const _$DeletePermanently(); - - @override - String toString() { - return 'DocumentEvent.deletePermanently()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is DeletePermanently); - } - - @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, - required TResult Function() restorePage, - required TResult Function() deletePermanently, - }) { - return deletePermanently(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - }) { - return deletePermanently?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? deleted, - TResult Function()? restore, - TResult Function()? restorePage, - TResult Function()? deletePermanently, - required TResult orElse(), - }) { - if (deletePermanently != null) { - return deletePermanently(); - } - 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, - required TResult Function(RestorePage value) restorePage, - required TResult Function(DeletePermanently value) deletePermanently, - }) { - return deletePermanently(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - }) { - return deletePermanently?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(Deleted value)? deleted, - TResult Function(Restore value)? restore, - TResult Function(RestorePage value)? restorePage, - TResult Function(DeletePermanently value)? deletePermanently, - required TResult orElse(), - }) { - if (deletePermanently != null) { - return deletePermanently(this); - } - return orElse(); - } -} - -abstract class DeletePermanently implements DocumentEvent { - const factory DeletePermanently() = _$DeletePermanently; -} - -/// @nodoc -class _$DocumentStateTearOff { - const _$DocumentStateTearOff(); - - _DocumentState call( - {required DocumentLoadingState loadingState, - required bool isDeleted, - required bool forceClose}) { - return _DocumentState( - loadingState: loadingState, - isDeleted: isDeleted, - forceClose: forceClose, - ); - } -} - -/// @nodoc -const $DocumentState = _$DocumentStateTearOff(); - -/// @nodoc -mixin _$DocumentState { - DocumentLoadingState get loadingState => throw _privateConstructorUsedError; - bool get isDeleted => throw _privateConstructorUsedError; - bool get forceClose => throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $DocumentStateCopyWith<DocumentState> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DocumentStateCopyWith<$Res> { - factory $DocumentStateCopyWith( - DocumentState value, $Res Function(DocumentState) then) = - _$DocumentStateCopyWithImpl<$Res>; - $Res call( - {DocumentLoadingState loadingState, bool isDeleted, bool forceClose}); - - $DocumentLoadingStateCopyWith<$Res> get loadingState; -} - -/// @nodoc -class _$DocumentStateCopyWithImpl<$Res> - implements $DocumentStateCopyWith<$Res> { - _$DocumentStateCopyWithImpl(this._value, this._then); - - final DocumentState _value; - // ignore: unused_field - final $Res Function(DocumentState) _then; - - @override - $Res call({ - Object? loadingState = freezed, - Object? isDeleted = freezed, - Object? forceClose = freezed, - }) { - return _then(_value.copyWith( - loadingState: loadingState == freezed - ? _value.loadingState - : loadingState // ignore: cast_nullable_to_non_nullable - as DocumentLoadingState, - isDeleted: isDeleted == freezed - ? _value.isDeleted - : isDeleted // ignore: cast_nullable_to_non_nullable - as bool, - forceClose: forceClose == freezed - ? _value.forceClose - : forceClose // ignore: cast_nullable_to_non_nullable - as bool, - )); - } - - @override - $DocumentLoadingStateCopyWith<$Res> get loadingState { - return $DocumentLoadingStateCopyWith<$Res>(_value.loadingState, (value) { - return _then(_value.copyWith(loadingState: value)); - }); - } -} - -/// @nodoc -abstract class _$DocumentStateCopyWith<$Res> - implements $DocumentStateCopyWith<$Res> { - factory _$DocumentStateCopyWith( - _DocumentState value, $Res Function(_DocumentState) then) = - __$DocumentStateCopyWithImpl<$Res>; - @override - $Res call( - {DocumentLoadingState loadingState, bool isDeleted, bool forceClose}); - - @override - $DocumentLoadingStateCopyWith<$Res> get loadingState; -} - -/// @nodoc -class __$DocumentStateCopyWithImpl<$Res> - extends _$DocumentStateCopyWithImpl<$Res> - implements _$DocumentStateCopyWith<$Res> { - __$DocumentStateCopyWithImpl( - _DocumentState _value, $Res Function(_DocumentState) _then) - : super(_value, (v) => _then(v as _DocumentState)); - - @override - _DocumentState get _value => super._value as _DocumentState; - - @override - $Res call({ - Object? loadingState = freezed, - Object? isDeleted = freezed, - Object? forceClose = freezed, - }) { - return _then(_DocumentState( - loadingState: loadingState == freezed - ? _value.loadingState - : loadingState // ignore: cast_nullable_to_non_nullable - as DocumentLoadingState, - isDeleted: isDeleted == freezed - ? _value.isDeleted - : isDeleted // ignore: cast_nullable_to_non_nullable - as bool, - forceClose: forceClose == freezed - ? _value.forceClose - : forceClose // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - -/// @nodoc - -class _$_DocumentState implements _DocumentState { - const _$_DocumentState( - {required this.loadingState, - required this.isDeleted, - required this.forceClose}); - - @override - final DocumentLoadingState loadingState; - @override - final bool isDeleted; - @override - final bool forceClose; - - @override - String toString() { - return 'DocumentState(loadingState: $loadingState, isDeleted: $isDeleted, forceClose: $forceClose)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _DocumentState && - (identical(other.loadingState, loadingState) || - const DeepCollectionEquality() - .equals(other.loadingState, loadingState)) && - (identical(other.isDeleted, isDeleted) || - const DeepCollectionEquality() - .equals(other.isDeleted, isDeleted)) && - (identical(other.forceClose, forceClose) || - const DeepCollectionEquality() - .equals(other.forceClose, forceClose))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(loadingState) ^ - const DeepCollectionEquality().hash(isDeleted) ^ - const DeepCollectionEquality().hash(forceClose); - - @JsonKey(ignore: true) - @override - _$DocumentStateCopyWith<_DocumentState> get copyWith => - __$DocumentStateCopyWithImpl<_DocumentState>(this, _$identity); -} - -abstract class _DocumentState implements DocumentState { - const factory _DocumentState( - {required DocumentLoadingState loadingState, - required bool isDeleted, - required bool forceClose}) = _$_DocumentState; - - @override - DocumentLoadingState get loadingState => throw _privateConstructorUsedError; - @override - bool get isDeleted => throw _privateConstructorUsedError; - @override - bool get forceClose => throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$DocumentStateCopyWith<_DocumentState> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -class _$DocumentLoadingStateTearOff { - const _$DocumentLoadingStateTearOff(); - - _Loading loading() { - return const _Loading(); - } - - _Finish finish(Either<Unit, FlowyError> successOrFail) { - return _Finish( - successOrFail, - ); - } -} - -/// @nodoc -const $DocumentLoadingState = _$DocumentLoadingStateTearOff(); - -/// @nodoc -mixin _$DocumentLoadingState { - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() loading, - required TResult Function(Either<Unit, FlowyError> successOrFail) finish, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? loading, - TResult Function(Either<Unit, FlowyError> successOrFail)? finish, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? loading, - TResult Function(Either<Unit, FlowyError> successOrFail)? finish, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(_Loading value) loading, - required TResult Function(_Finish value) finish, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DocumentLoadingStateCopyWith<$Res> { - factory $DocumentLoadingStateCopyWith(DocumentLoadingState value, - $Res Function(DocumentLoadingState) then) = - _$DocumentLoadingStateCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DocumentLoadingStateCopyWithImpl<$Res> - implements $DocumentLoadingStateCopyWith<$Res> { - _$DocumentLoadingStateCopyWithImpl(this._value, this._then); - - final DocumentLoadingState _value; - // ignore: unused_field - final $Res Function(DocumentLoadingState) _then; -} - -/// @nodoc -abstract class _$LoadingCopyWith<$Res> { - factory _$LoadingCopyWith(_Loading value, $Res Function(_Loading) then) = - __$LoadingCopyWithImpl<$Res>; -} - -/// @nodoc -class __$LoadingCopyWithImpl<$Res> - extends _$DocumentLoadingStateCopyWithImpl<$Res> - implements _$LoadingCopyWith<$Res> { - __$LoadingCopyWithImpl(_Loading _value, $Res Function(_Loading) _then) - : super(_value, (v) => _then(v as _Loading)); - - @override - _Loading get _value => super._value as _Loading; -} - -/// @nodoc - -class _$_Loading implements _Loading { - const _$_Loading(); - - @override - String toString() { - return 'DocumentLoadingState.loading()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is _Loading); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() loading, - required TResult Function(Either<Unit, FlowyError> successOrFail) finish, - }) { - return loading(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? loading, - TResult Function(Either<Unit, FlowyError> successOrFail)? finish, - }) { - return loading?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? loading, - TResult Function(Either<Unit, FlowyError> successOrFail)? finish, - required TResult orElse(), - }) { - if (loading != null) { - return loading(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(_Loading value) loading, - required TResult Function(_Finish value) finish, - }) { - return loading(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - }) { - return loading?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - required TResult orElse(), - }) { - if (loading != null) { - return loading(this); - } - return orElse(); - } -} - -abstract class _Loading implements DocumentLoadingState { - const factory _Loading() = _$_Loading; -} - -/// @nodoc -abstract class _$FinishCopyWith<$Res> { - factory _$FinishCopyWith(_Finish value, $Res Function(_Finish) then) = - __$FinishCopyWithImpl<$Res>; - $Res call({Either<Unit, FlowyError> successOrFail}); -} - -/// @nodoc -class __$FinishCopyWithImpl<$Res> - extends _$DocumentLoadingStateCopyWithImpl<$Res> - implements _$FinishCopyWith<$Res> { - __$FinishCopyWithImpl(_Finish _value, $Res Function(_Finish) _then) - : super(_value, (v) => _then(v as _Finish)); - - @override - _Finish get _value => super._value as _Finish; - - @override - $Res call({ - Object? successOrFail = freezed, - }) { - return _then(_Finish( - successOrFail == freezed - ? _value.successOrFail - : successOrFail // ignore: cast_nullable_to_non_nullable - as Either<Unit, FlowyError>, - )); - } -} - -/// @nodoc - -class _$_Finish implements _Finish { - const _$_Finish(this.successOrFail); - - @override - final Either<Unit, FlowyError> successOrFail; - - @override - String toString() { - return 'DocumentLoadingState.finish(successOrFail: $successOrFail)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _Finish && - (identical(other.successOrFail, successOrFail) || - const DeepCollectionEquality() - .equals(other.successOrFail, successOrFail))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(successOrFail); - - @JsonKey(ignore: true) - @override - _$FinishCopyWith<_Finish> get copyWith => - __$FinishCopyWithImpl<_Finish>(this, _$identity); - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() loading, - required TResult Function(Either<Unit, FlowyError> successOrFail) finish, - }) { - return finish(successOrFail); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? loading, - TResult Function(Either<Unit, FlowyError> successOrFail)? finish, - }) { - return finish?.call(successOrFail); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? loading, - TResult Function(Either<Unit, FlowyError> successOrFail)? finish, - required TResult orElse(), - }) { - if (finish != null) { - return finish(successOrFail); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(_Loading value) loading, - required TResult Function(_Finish value) finish, - }) { - return finish(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - }) { - return finish?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(_Loading value)? loading, - TResult Function(_Finish value)? finish, - required TResult orElse(), - }) { - if (finish != null) { - return finish(this); - } - return orElse(); - } -} - -abstract class _Finish implements DocumentLoadingState { - const factory _Finish(Either<Unit, FlowyError> successOrFail) = _$_Finish; - - Either<Unit, FlowyError> get successOrFail => - throw _privateConstructorUsedError; - @JsonKey(ignore: true) - _$FinishCopyWith<_Finish> get copyWith => throw _privateConstructorUsedError; -} diff --git a/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.freezed.dart b/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.freezed.dart deleted file mode 100644 index 0eefbf12c8..0000000000 --- a/frontend/app_flowy/lib/workspace/application/menu/menu_bloc.freezed.dart +++ /dev/null @@ -1,1049 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// 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 - -part of 'menu_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 _$MenuEventTearOff { - const _$MenuEventTearOff(); - - _Initial initial() { - return const _Initial(); - } - - Collapse collapse() { - return const Collapse(); - } - - OpenPage openPage(HomeStackContext<dynamic, dynamic> context) { - return OpenPage( - context, - ); - } - - CreateApp createApp(String name, {String? desc}) { - return CreateApp( - name, - desc: desc, - ); - } - - ReceiveApps didReceiveApps(Either<List<App>, FlowyError> appsOrFail) { - return ReceiveApps( - appsOrFail, - ); - } -} - -/// @nodoc -const $MenuEvent = _$MenuEventTearOff(); - -/// @nodoc -mixin _$MenuEvent { - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function() collapse, - required TResult Function(HomeStackContext<dynamic, dynamic> context) - openPage, - required TResult Function(String name, String? desc) createApp, - required TResult Function(Either<List<App>, FlowyError> appsOrFail) - didReceiveApps, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext<dynamic, dynamic> context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either<List<App>, FlowyError> appsOrFail)? didReceiveApps, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext<dynamic, dynamic> context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either<List<App>, FlowyError> appsOrFail)? didReceiveApps, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(_Initial value) initial, - required TResult Function(Collapse value) collapse, - required TResult Function(OpenPage value) openPage, - required TResult Function(CreateApp value) createApp, - required TResult Function(ReceiveApps value) didReceiveApps, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $MenuEventCopyWith<$Res> { - factory $MenuEventCopyWith(MenuEvent value, $Res Function(MenuEvent) then) = - _$MenuEventCopyWithImpl<$Res>; -} - -/// @nodoc -class _$MenuEventCopyWithImpl<$Res> implements $MenuEventCopyWith<$Res> { - _$MenuEventCopyWithImpl(this._value, this._then); - - final MenuEvent _value; - // ignore: unused_field - final $Res Function(MenuEvent) _then; -} - -/// @nodoc -abstract class _$InitialCopyWith<$Res> { - factory _$InitialCopyWith(_Initial value, $Res Function(_Initial) then) = - __$InitialCopyWithImpl<$Res>; -} - -/// @nodoc -class __$InitialCopyWithImpl<$Res> extends _$MenuEventCopyWithImpl<$Res> - implements _$InitialCopyWith<$Res> { - __$InitialCopyWithImpl(_Initial _value, $Res Function(_Initial) _then) - : super(_value, (v) => _then(v as _Initial)); - - @override - _Initial get _value => super._value as _Initial; -} - -/// @nodoc - -class _$_Initial implements _Initial { - const _$_Initial(); - - @override - String toString() { - return 'MenuEvent.initial()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is _Initial); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function() collapse, - required TResult Function(HomeStackContext<dynamic, dynamic> context) - openPage, - required TResult Function(String name, String? desc) createApp, - required TResult Function(Either<List<App>, FlowyError> appsOrFail) - didReceiveApps, - }) { - return initial(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext<dynamic, dynamic> context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either<List<App>, FlowyError> appsOrFail)? didReceiveApps, - }) { - return initial?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext<dynamic, dynamic> context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either<List<App>, FlowyError> appsOrFail)? didReceiveApps, - required TResult orElse(), - }) { - if (initial != null) { - return initial(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(_Initial value) initial, - required TResult Function(Collapse value) collapse, - required TResult Function(OpenPage value) openPage, - required TResult Function(CreateApp value) createApp, - required TResult Function(ReceiveApps value) didReceiveApps, - }) { - return initial(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - }) { - return initial?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - required TResult orElse(), - }) { - if (initial != null) { - return initial(this); - } - return orElse(); - } -} - -abstract class _Initial implements MenuEvent { - const factory _Initial() = _$_Initial; -} - -/// @nodoc -abstract class $CollapseCopyWith<$Res> { - factory $CollapseCopyWith(Collapse value, $Res Function(Collapse) then) = - _$CollapseCopyWithImpl<$Res>; -} - -/// @nodoc -class _$CollapseCopyWithImpl<$Res> extends _$MenuEventCopyWithImpl<$Res> - implements $CollapseCopyWith<$Res> { - _$CollapseCopyWithImpl(Collapse _value, $Res Function(Collapse) _then) - : super(_value, (v) => _then(v as Collapse)); - - @override - Collapse get _value => super._value as Collapse; -} - -/// @nodoc - -class _$Collapse implements Collapse { - const _$Collapse(); - - @override - String toString() { - return 'MenuEvent.collapse()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Collapse); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function() collapse, - required TResult Function(HomeStackContext<dynamic, dynamic> context) - openPage, - required TResult Function(String name, String? desc) createApp, - required TResult Function(Either<List<App>, FlowyError> appsOrFail) - didReceiveApps, - }) { - return collapse(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext<dynamic, dynamic> context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either<List<App>, FlowyError> appsOrFail)? didReceiveApps, - }) { - return collapse?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext<dynamic, dynamic> context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either<List<App>, FlowyError> appsOrFail)? didReceiveApps, - required TResult orElse(), - }) { - if (collapse != null) { - return collapse(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(_Initial value) initial, - required TResult Function(Collapse value) collapse, - required TResult Function(OpenPage value) openPage, - required TResult Function(CreateApp value) createApp, - required TResult Function(ReceiveApps value) didReceiveApps, - }) { - return collapse(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - }) { - return collapse?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - required TResult orElse(), - }) { - if (collapse != null) { - return collapse(this); - } - return orElse(); - } -} - -abstract class Collapse implements MenuEvent { - const factory Collapse() = _$Collapse; -} - -/// @nodoc -abstract class $OpenPageCopyWith<$Res> { - factory $OpenPageCopyWith(OpenPage value, $Res Function(OpenPage) then) = - _$OpenPageCopyWithImpl<$Res>; - $Res call({HomeStackContext<dynamic, dynamic> context}); -} - -/// @nodoc -class _$OpenPageCopyWithImpl<$Res> extends _$MenuEventCopyWithImpl<$Res> - implements $OpenPageCopyWith<$Res> { - _$OpenPageCopyWithImpl(OpenPage _value, $Res Function(OpenPage) _then) - : super(_value, (v) => _then(v as OpenPage)); - - @override - OpenPage get _value => super._value as OpenPage; - - @override - $Res call({ - Object? context = freezed, - }) { - return _then(OpenPage( - context == freezed - ? _value.context - : context // ignore: cast_nullable_to_non_nullable - as HomeStackContext<dynamic, dynamic>, - )); - } -} - -/// @nodoc - -class _$OpenPage implements OpenPage { - const _$OpenPage(this.context); - - @override - final HomeStackContext<dynamic, dynamic> context; - - @override - String toString() { - return 'MenuEvent.openPage(context: $context)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is OpenPage && - (identical(other.context, context) || - const DeepCollectionEquality().equals(other.context, context))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(context); - - @JsonKey(ignore: true) - @override - $OpenPageCopyWith<OpenPage> get copyWith => - _$OpenPageCopyWithImpl<OpenPage>(this, _$identity); - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function() collapse, - required TResult Function(HomeStackContext<dynamic, dynamic> context) - openPage, - required TResult Function(String name, String? desc) createApp, - required TResult Function(Either<List<App>, FlowyError> appsOrFail) - didReceiveApps, - }) { - return openPage(context); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext<dynamic, dynamic> context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either<List<App>, FlowyError> appsOrFail)? didReceiveApps, - }) { - return openPage?.call(context); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext<dynamic, dynamic> context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either<List<App>, FlowyError> appsOrFail)? didReceiveApps, - required TResult orElse(), - }) { - if (openPage != null) { - return openPage(context); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(_Initial value) initial, - required TResult Function(Collapse value) collapse, - required TResult Function(OpenPage value) openPage, - required TResult Function(CreateApp value) createApp, - required TResult Function(ReceiveApps value) didReceiveApps, - }) { - return openPage(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - }) { - return openPage?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - required TResult orElse(), - }) { - if (openPage != null) { - return openPage(this); - } - return orElse(); - } -} - -abstract class OpenPage implements MenuEvent { - const factory OpenPage(HomeStackContext<dynamic, dynamic> context) = - _$OpenPage; - - HomeStackContext<dynamic, dynamic> get context => - throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $OpenPageCopyWith<OpenPage> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $CreateAppCopyWith<$Res> { - factory $CreateAppCopyWith(CreateApp value, $Res Function(CreateApp) then) = - _$CreateAppCopyWithImpl<$Res>; - $Res call({String name, String? desc}); -} - -/// @nodoc -class _$CreateAppCopyWithImpl<$Res> extends _$MenuEventCopyWithImpl<$Res> - implements $CreateAppCopyWith<$Res> { - _$CreateAppCopyWithImpl(CreateApp _value, $Res Function(CreateApp) _then) - : super(_value, (v) => _then(v as CreateApp)); - - @override - CreateApp get _value => super._value as CreateApp; - - @override - $Res call({ - Object? name = freezed, - Object? desc = freezed, - }) { - return _then(CreateApp( - name == freezed - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - desc: desc == freezed - ? _value.desc - : desc // ignore: cast_nullable_to_non_nullable - as String?, - )); - } -} - -/// @nodoc - -class _$CreateApp implements CreateApp { - const _$CreateApp(this.name, {this.desc}); - - @override - final String name; - @override - final String? desc; - - @override - String toString() { - return 'MenuEvent.createApp(name: $name, desc: $desc)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is CreateApp && - (identical(other.name, name) || - const DeepCollectionEquality().equals(other.name, name)) && - (identical(other.desc, desc) || - const DeepCollectionEquality().equals(other.desc, desc))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(name) ^ - const DeepCollectionEquality().hash(desc); - - @JsonKey(ignore: true) - @override - $CreateAppCopyWith<CreateApp> get copyWith => - _$CreateAppCopyWithImpl<CreateApp>(this, _$identity); - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function() collapse, - required TResult Function(HomeStackContext<dynamic, dynamic> context) - openPage, - required TResult Function(String name, String? desc) createApp, - required TResult Function(Either<List<App>, FlowyError> appsOrFail) - didReceiveApps, - }) { - return createApp(name, desc); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext<dynamic, dynamic> context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either<List<App>, FlowyError> appsOrFail)? didReceiveApps, - }) { - return createApp?.call(name, desc); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext<dynamic, dynamic> context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either<List<App>, FlowyError> appsOrFail)? didReceiveApps, - required TResult orElse(), - }) { - if (createApp != null) { - return createApp(name, desc); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(_Initial value) initial, - required TResult Function(Collapse value) collapse, - required TResult Function(OpenPage value) openPage, - required TResult Function(CreateApp value) createApp, - required TResult Function(ReceiveApps value) didReceiveApps, - }) { - return createApp(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - }) { - return createApp?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - required TResult orElse(), - }) { - if (createApp != null) { - return createApp(this); - } - return orElse(); - } -} - -abstract class CreateApp implements MenuEvent { - const factory CreateApp(String name, {String? desc}) = _$CreateApp; - - String get name => throw _privateConstructorUsedError; - String? get desc => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $CreateAppCopyWith<CreateApp> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $ReceiveAppsCopyWith<$Res> { - factory $ReceiveAppsCopyWith( - ReceiveApps value, $Res Function(ReceiveApps) then) = - _$ReceiveAppsCopyWithImpl<$Res>; - $Res call({Either<List<App>, FlowyError> appsOrFail}); -} - -/// @nodoc -class _$ReceiveAppsCopyWithImpl<$Res> extends _$MenuEventCopyWithImpl<$Res> - implements $ReceiveAppsCopyWith<$Res> { - _$ReceiveAppsCopyWithImpl( - ReceiveApps _value, $Res Function(ReceiveApps) _then) - : super(_value, (v) => _then(v as ReceiveApps)); - - @override - ReceiveApps get _value => super._value as ReceiveApps; - - @override - $Res call({ - Object? appsOrFail = freezed, - }) { - return _then(ReceiveApps( - appsOrFail == freezed - ? _value.appsOrFail - : appsOrFail // ignore: cast_nullable_to_non_nullable - as Either<List<App>, FlowyError>, - )); - } -} - -/// @nodoc - -class _$ReceiveApps implements ReceiveApps { - const _$ReceiveApps(this.appsOrFail); - - @override - final Either<List<App>, FlowyError> appsOrFail; - - @override - String toString() { - return 'MenuEvent.didReceiveApps(appsOrFail: $appsOrFail)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is ReceiveApps && - (identical(other.appsOrFail, appsOrFail) || - const DeepCollectionEquality() - .equals(other.appsOrFail, appsOrFail))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(appsOrFail); - - @JsonKey(ignore: true) - @override - $ReceiveAppsCopyWith<ReceiveApps> get copyWith => - _$ReceiveAppsCopyWithImpl<ReceiveApps>(this, _$identity); - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function() collapse, - required TResult Function(HomeStackContext<dynamic, dynamic> context) - openPage, - required TResult Function(String name, String? desc) createApp, - required TResult Function(Either<List<App>, FlowyError> appsOrFail) - didReceiveApps, - }) { - return didReceiveApps(appsOrFail); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext<dynamic, dynamic> context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either<List<App>, FlowyError> appsOrFail)? didReceiveApps, - }) { - return didReceiveApps?.call(appsOrFail); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function()? collapse, - TResult Function(HomeStackContext<dynamic, dynamic> context)? openPage, - TResult Function(String name, String? desc)? createApp, - TResult Function(Either<List<App>, FlowyError> appsOrFail)? didReceiveApps, - required TResult orElse(), - }) { - if (didReceiveApps != null) { - return didReceiveApps(appsOrFail); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(_Initial value) initial, - required TResult Function(Collapse value) collapse, - required TResult Function(OpenPage value) openPage, - required TResult Function(CreateApp value) createApp, - required TResult Function(ReceiveApps value) didReceiveApps, - }) { - return didReceiveApps(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - }) { - return didReceiveApps?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(_Initial value)? initial, - TResult Function(Collapse value)? collapse, - TResult Function(OpenPage value)? openPage, - TResult Function(CreateApp value)? createApp, - TResult Function(ReceiveApps value)? didReceiveApps, - required TResult orElse(), - }) { - if (didReceiveApps != null) { - return didReceiveApps(this); - } - return orElse(); - } -} - -abstract class ReceiveApps implements MenuEvent { - const factory ReceiveApps(Either<List<App>, FlowyError> appsOrFail) = - _$ReceiveApps; - - Either<List<App>, FlowyError> get appsOrFail => - throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $ReceiveAppsCopyWith<ReceiveApps> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -class _$MenuStateTearOff { - const _$MenuStateTearOff(); - - _MenuState call( - {required bool isCollapse, - required Option<List<App>> apps, - required Either<Unit, FlowyError> successOrFailure, - required HomeStackContext<dynamic, dynamic> stackContext}) { - return _MenuState( - isCollapse: isCollapse, - apps: apps, - successOrFailure: successOrFailure, - stackContext: stackContext, - ); - } -} - -/// @nodoc -const $MenuState = _$MenuStateTearOff(); - -/// @nodoc -mixin _$MenuState { - bool get isCollapse => throw _privateConstructorUsedError; - Option<List<App>> get apps => throw _privateConstructorUsedError; - Either<Unit, FlowyError> get successOrFailure => - throw _privateConstructorUsedError; - HomeStackContext<dynamic, dynamic> get stackContext => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $MenuStateCopyWith<MenuState> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $MenuStateCopyWith<$Res> { - factory $MenuStateCopyWith(MenuState value, $Res Function(MenuState) then) = - _$MenuStateCopyWithImpl<$Res>; - $Res call( - {bool isCollapse, - Option<List<App>> apps, - Either<Unit, FlowyError> successOrFailure, - HomeStackContext<dynamic, dynamic> stackContext}); -} - -/// @nodoc -class _$MenuStateCopyWithImpl<$Res> implements $MenuStateCopyWith<$Res> { - _$MenuStateCopyWithImpl(this._value, this._then); - - final MenuState _value; - // ignore: unused_field - final $Res Function(MenuState) _then; - - @override - $Res call({ - Object? isCollapse = freezed, - Object? apps = freezed, - Object? successOrFailure = freezed, - Object? stackContext = freezed, - }) { - return _then(_value.copyWith( - isCollapse: isCollapse == freezed - ? _value.isCollapse - : isCollapse // ignore: cast_nullable_to_non_nullable - as bool, - apps: apps == freezed - ? _value.apps - : apps // ignore: cast_nullable_to_non_nullable - as Option<List<App>>, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either<Unit, FlowyError>, - stackContext: stackContext == freezed - ? _value.stackContext - : stackContext // ignore: cast_nullable_to_non_nullable - as HomeStackContext<dynamic, dynamic>, - )); - } -} - -/// @nodoc -abstract class _$MenuStateCopyWith<$Res> implements $MenuStateCopyWith<$Res> { - factory _$MenuStateCopyWith( - _MenuState value, $Res Function(_MenuState) then) = - __$MenuStateCopyWithImpl<$Res>; - @override - $Res call( - {bool isCollapse, - Option<List<App>> apps, - Either<Unit, FlowyError> successOrFailure, - HomeStackContext<dynamic, dynamic> stackContext}); -} - -/// @nodoc -class __$MenuStateCopyWithImpl<$Res> extends _$MenuStateCopyWithImpl<$Res> - implements _$MenuStateCopyWith<$Res> { - __$MenuStateCopyWithImpl(_MenuState _value, $Res Function(_MenuState) _then) - : super(_value, (v) => _then(v as _MenuState)); - - @override - _MenuState get _value => super._value as _MenuState; - - @override - $Res call({ - Object? isCollapse = freezed, - Object? apps = freezed, - Object? successOrFailure = freezed, - Object? stackContext = freezed, - }) { - return _then(_MenuState( - isCollapse: isCollapse == freezed - ? _value.isCollapse - : isCollapse // ignore: cast_nullable_to_non_nullable - as bool, - apps: apps == freezed - ? _value.apps - : apps // ignore: cast_nullable_to_non_nullable - as Option<List<App>>, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either<Unit, FlowyError>, - stackContext: stackContext == freezed - ? _value.stackContext - : stackContext // ignore: cast_nullable_to_non_nullable - as HomeStackContext<dynamic, dynamic>, - )); - } -} - -/// @nodoc - -class _$_MenuState implements _MenuState { - const _$_MenuState( - {required this.isCollapse, - required this.apps, - required this.successOrFailure, - required this.stackContext}); - - @override - final bool isCollapse; - @override - final Option<List<App>> apps; - @override - final Either<Unit, FlowyError> successOrFailure; - @override - final HomeStackContext<dynamic, dynamic> stackContext; - - @override - String toString() { - return 'MenuState(isCollapse: $isCollapse, apps: $apps, successOrFailure: $successOrFailure, stackContext: $stackContext)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _MenuState && - (identical(other.isCollapse, isCollapse) || - const DeepCollectionEquality() - .equals(other.isCollapse, isCollapse)) && - (identical(other.apps, apps) || - const DeepCollectionEquality().equals(other.apps, apps)) && - (identical(other.successOrFailure, successOrFailure) || - const DeepCollectionEquality() - .equals(other.successOrFailure, successOrFailure)) && - (identical(other.stackContext, stackContext) || - const DeepCollectionEquality() - .equals(other.stackContext, stackContext))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(isCollapse) ^ - const DeepCollectionEquality().hash(apps) ^ - const DeepCollectionEquality().hash(successOrFailure) ^ - const DeepCollectionEquality().hash(stackContext); - - @JsonKey(ignore: true) - @override - _$MenuStateCopyWith<_MenuState> get copyWith => - __$MenuStateCopyWithImpl<_MenuState>(this, _$identity); -} - -abstract class _MenuState implements MenuState { - const factory _MenuState( - {required bool isCollapse, - required Option<List<App>> apps, - required Either<Unit, FlowyError> successOrFailure, - required HomeStackContext<dynamic, dynamic> stackContext}) = _$_MenuState; - - @override - bool get isCollapse => throw _privateConstructorUsedError; - @override - Option<List<App>> get apps => throw _privateConstructorUsedError; - @override - Either<Unit, FlowyError> get successOrFailure => - throw _privateConstructorUsedError; - @override - HomeStackContext<dynamic, dynamic> get stackContext => - throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$MenuStateCopyWith<_MenuState> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.freezed.dart b/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.freezed.dart deleted file mode 100644 index 2a2d9bcaa3..0000000000 --- a/frontend/app_flowy/lib/workspace/application/trash/trash_bloc.freezed.dart +++ /dev/null @@ -1,1129 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// 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 - -part of 'trash_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 _$TrashEventTearOff { - const _$TrashEventTearOff(); - - Initial initial() { - return const Initial(); - } - - ReceiveTrash didReceiveTrash(List<Trash> trash) { - return ReceiveTrash( - trash, - ); - } - - Putback putback(String trashId) { - return Putback( - trashId, - ); - } - - Delete delete(Trash trash) { - return Delete( - trash, - ); - } - - RestoreAll restoreAll() { - return const RestoreAll(); - } - - DeleteAll deleteAll() { - return const DeleteAll(); - } -} - -/// @nodoc -const $TrashEvent = _$TrashEventTearOff(); - -/// @nodoc -mixin _$TrashEvent { - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(List<Trash> trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(List<Trash> trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(List<Trash> trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $TrashEventCopyWith<$Res> { - factory $TrashEventCopyWith( - TrashEvent value, $Res Function(TrashEvent) then) = - _$TrashEventCopyWithImpl<$Res>; -} - -/// @nodoc -class _$TrashEventCopyWithImpl<$Res> implements $TrashEventCopyWith<$Res> { - _$TrashEventCopyWithImpl(this._value, this._then); - - final TrashEvent _value; - // ignore: unused_field - final $Res Function(TrashEvent) _then; -} - -/// @nodoc -abstract class $InitialCopyWith<$Res> { - factory $InitialCopyWith(Initial value, $Res Function(Initial) then) = - _$InitialCopyWithImpl<$Res>; -} - -/// @nodoc -class _$InitialCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $InitialCopyWith<$Res> { - _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then) - : super(_value, (v) => _then(v as Initial)); - - @override - Initial get _value => super._value as Initial; -} - -/// @nodoc - -class _$Initial implements Initial { - const _$Initial(); - - @override - String toString() { - return 'TrashEvent.initial()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Initial); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(List<Trash> trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return initial(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(List<Trash> trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return initial?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(List<Trash> trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (initial != null) { - return initial(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return initial(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return initial?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (initial != null) { - return initial(this); - } - return orElse(); - } -} - -abstract class Initial implements TrashEvent { - const factory Initial() = _$Initial; -} - -/// @nodoc -abstract class $ReceiveTrashCopyWith<$Res> { - factory $ReceiveTrashCopyWith( - ReceiveTrash value, $Res Function(ReceiveTrash) then) = - _$ReceiveTrashCopyWithImpl<$Res>; - $Res call({List<Trash> trash}); -} - -/// @nodoc -class _$ReceiveTrashCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $ReceiveTrashCopyWith<$Res> { - _$ReceiveTrashCopyWithImpl( - ReceiveTrash _value, $Res Function(ReceiveTrash) _then) - : super(_value, (v) => _then(v as ReceiveTrash)); - - @override - ReceiveTrash get _value => super._value as ReceiveTrash; - - @override - $Res call({ - Object? trash = freezed, - }) { - return _then(ReceiveTrash( - trash == freezed - ? _value.trash - : trash // ignore: cast_nullable_to_non_nullable - as List<Trash>, - )); - } -} - -/// @nodoc - -class _$ReceiveTrash implements ReceiveTrash { - const _$ReceiveTrash(this.trash); - - @override - final List<Trash> trash; - - @override - String toString() { - return 'TrashEvent.didReceiveTrash(trash: $trash)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is ReceiveTrash && - (identical(other.trash, trash) || - const DeepCollectionEquality().equals(other.trash, trash))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(trash); - - @JsonKey(ignore: true) - @override - $ReceiveTrashCopyWith<ReceiveTrash> get copyWith => - _$ReceiveTrashCopyWithImpl<ReceiveTrash>(this, _$identity); - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(List<Trash> trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return didReceiveTrash(trash); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(List<Trash> trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return didReceiveTrash?.call(trash); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(List<Trash> trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (didReceiveTrash != null) { - return didReceiveTrash(trash); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return didReceiveTrash(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return didReceiveTrash?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (didReceiveTrash != null) { - return didReceiveTrash(this); - } - return orElse(); - } -} - -abstract class ReceiveTrash implements TrashEvent { - const factory ReceiveTrash(List<Trash> trash) = _$ReceiveTrash; - - List<Trash> get trash => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $ReceiveTrashCopyWith<ReceiveTrash> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $PutbackCopyWith<$Res> { - factory $PutbackCopyWith(Putback value, $Res Function(Putback) then) = - _$PutbackCopyWithImpl<$Res>; - $Res call({String trashId}); -} - -/// @nodoc -class _$PutbackCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $PutbackCopyWith<$Res> { - _$PutbackCopyWithImpl(Putback _value, $Res Function(Putback) _then) - : super(_value, (v) => _then(v as Putback)); - - @override - Putback get _value => super._value as Putback; - - @override - $Res call({ - Object? trashId = freezed, - }) { - return _then(Putback( - trashId == freezed - ? _value.trashId - : trashId // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$Putback implements Putback { - const _$Putback(this.trashId); - - @override - final String trashId; - - @override - String toString() { - return 'TrashEvent.putback(trashId: $trashId)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is Putback && - (identical(other.trashId, trashId) || - const DeepCollectionEquality().equals(other.trashId, trashId))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(trashId); - - @JsonKey(ignore: true) - @override - $PutbackCopyWith<Putback> get copyWith => - _$PutbackCopyWithImpl<Putback>(this, _$identity); - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(List<Trash> trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return putback(trashId); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(List<Trash> trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return putback?.call(trashId); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(List<Trash> trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (putback != null) { - return putback(trashId); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return putback(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return putback?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (putback != null) { - return putback(this); - } - return orElse(); - } -} - -abstract class Putback implements TrashEvent { - const factory Putback(String trashId) = _$Putback; - - String get trashId => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $PutbackCopyWith<Putback> get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DeleteCopyWith<$Res> { - factory $DeleteCopyWith(Delete value, $Res Function(Delete) then) = - _$DeleteCopyWithImpl<$Res>; - $Res call({Trash trash}); -} - -/// @nodoc -class _$DeleteCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $DeleteCopyWith<$Res> { - _$DeleteCopyWithImpl(Delete _value, $Res Function(Delete) _then) - : super(_value, (v) => _then(v as Delete)); - - @override - Delete get _value => super._value as Delete; - - @override - $Res call({ - Object? trash = freezed, - }) { - return _then(Delete( - trash == freezed - ? _value.trash - : trash // ignore: cast_nullable_to_non_nullable - as Trash, - )); - } -} - -/// @nodoc - -class _$Delete implements Delete { - const _$Delete(this.trash); - - @override - final Trash trash; - - @override - String toString() { - return 'TrashEvent.delete(trash: $trash)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is Delete && - (identical(other.trash, trash) || - const DeepCollectionEquality().equals(other.trash, trash))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(trash); - - @JsonKey(ignore: true) - @override - $DeleteCopyWith<Delete> get copyWith => - _$DeleteCopyWithImpl<Delete>(this, _$identity); - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(List<Trash> trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return delete(trash); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(List<Trash> trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return delete?.call(trash); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(List<Trash> trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (delete != null) { - return delete(trash); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return delete(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return delete?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (delete != null) { - return delete(this); - } - return orElse(); - } -} - -abstract class Delete implements TrashEvent { - const factory Delete(Trash trash) = _$Delete; - - Trash get trash => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $DeleteCopyWith<Delete> get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $RestoreAllCopyWith<$Res> { - factory $RestoreAllCopyWith( - RestoreAll value, $Res Function(RestoreAll) then) = - _$RestoreAllCopyWithImpl<$Res>; -} - -/// @nodoc -class _$RestoreAllCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $RestoreAllCopyWith<$Res> { - _$RestoreAllCopyWithImpl(RestoreAll _value, $Res Function(RestoreAll) _then) - : super(_value, (v) => _then(v as RestoreAll)); - - @override - RestoreAll get _value => super._value as RestoreAll; -} - -/// @nodoc - -class _$RestoreAll implements RestoreAll { - const _$RestoreAll(); - - @override - String toString() { - return 'TrashEvent.restoreAll()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is RestoreAll); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(List<Trash> trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return restoreAll(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(List<Trash> trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return restoreAll?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(List<Trash> trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (restoreAll != null) { - return restoreAll(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return restoreAll(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return restoreAll?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (restoreAll != null) { - return restoreAll(this); - } - return orElse(); - } -} - -abstract class RestoreAll implements TrashEvent { - const factory RestoreAll() = _$RestoreAll; -} - -/// @nodoc -abstract class $DeleteAllCopyWith<$Res> { - factory $DeleteAllCopyWith(DeleteAll value, $Res Function(DeleteAll) then) = - _$DeleteAllCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DeleteAllCopyWithImpl<$Res> extends _$TrashEventCopyWithImpl<$Res> - implements $DeleteAllCopyWith<$Res> { - _$DeleteAllCopyWithImpl(DeleteAll _value, $Res Function(DeleteAll) _then) - : super(_value, (v) => _then(v as DeleteAll)); - - @override - DeleteAll get _value => super._value as DeleteAll; -} - -/// @nodoc - -class _$DeleteAll implements DeleteAll { - const _$DeleteAll(); - - @override - String toString() { - return 'TrashEvent.deleteAll()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is DeleteAll); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(List<Trash> trash) didReceiveTrash, - required TResult Function(String trashId) putback, - required TResult Function(Trash trash) delete, - required TResult Function() restoreAll, - required TResult Function() deleteAll, - }) { - return deleteAll(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(List<Trash> trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - }) { - return deleteAll?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(List<Trash> trash)? didReceiveTrash, - TResult Function(String trashId)? putback, - TResult Function(Trash trash)? delete, - TResult Function()? restoreAll, - TResult Function()? deleteAll, - required TResult orElse(), - }) { - if (deleteAll != null) { - return deleteAll(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(ReceiveTrash value) didReceiveTrash, - required TResult Function(Putback value) putback, - required TResult Function(Delete value) delete, - required TResult Function(RestoreAll value) restoreAll, - required TResult Function(DeleteAll value) deleteAll, - }) { - return deleteAll(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - }) { - return deleteAll?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(ReceiveTrash value)? didReceiveTrash, - TResult Function(Putback value)? putback, - TResult Function(Delete value)? delete, - TResult Function(RestoreAll value)? restoreAll, - TResult Function(DeleteAll value)? deleteAll, - required TResult orElse(), - }) { - if (deleteAll != null) { - return deleteAll(this); - } - return orElse(); - } -} - -abstract class DeleteAll implements TrashEvent { - const factory DeleteAll() = _$DeleteAll; -} - -/// @nodoc -class _$TrashStateTearOff { - const _$TrashStateTearOff(); - - _TrashState call( - {required List<Trash> objects, - required Either<Unit, FlowyError> successOrFailure}) { - return _TrashState( - objects: objects, - successOrFailure: successOrFailure, - ); - } -} - -/// @nodoc -const $TrashState = _$TrashStateTearOff(); - -/// @nodoc -mixin _$TrashState { - List<Trash> get objects => throw _privateConstructorUsedError; - Either<Unit, FlowyError> get successOrFailure => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $TrashStateCopyWith<TrashState> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $TrashStateCopyWith<$Res> { - factory $TrashStateCopyWith( - TrashState value, $Res Function(TrashState) then) = - _$TrashStateCopyWithImpl<$Res>; - $Res call({List<Trash> objects, Either<Unit, FlowyError> successOrFailure}); -} - -/// @nodoc -class _$TrashStateCopyWithImpl<$Res> implements $TrashStateCopyWith<$Res> { - _$TrashStateCopyWithImpl(this._value, this._then); - - final TrashState _value; - // ignore: unused_field - final $Res Function(TrashState) _then; - - @override - $Res call({ - Object? objects = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_value.copyWith( - objects: objects == freezed - ? _value.objects - : objects // ignore: cast_nullable_to_non_nullable - as List<Trash>, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either<Unit, FlowyError>, - )); - } -} - -/// @nodoc -abstract class _$TrashStateCopyWith<$Res> implements $TrashStateCopyWith<$Res> { - factory _$TrashStateCopyWith( - _TrashState value, $Res Function(_TrashState) then) = - __$TrashStateCopyWithImpl<$Res>; - @override - $Res call({List<Trash> objects, Either<Unit, FlowyError> successOrFailure}); -} - -/// @nodoc -class __$TrashStateCopyWithImpl<$Res> extends _$TrashStateCopyWithImpl<$Res> - implements _$TrashStateCopyWith<$Res> { - __$TrashStateCopyWithImpl( - _TrashState _value, $Res Function(_TrashState) _then) - : super(_value, (v) => _then(v as _TrashState)); - - @override - _TrashState get _value => super._value as _TrashState; - - @override - $Res call({ - Object? objects = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_TrashState( - objects: objects == freezed - ? _value.objects - : objects // ignore: cast_nullable_to_non_nullable - as List<Trash>, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either<Unit, FlowyError>, - )); - } -} - -/// @nodoc - -class _$_TrashState implements _TrashState { - const _$_TrashState({required this.objects, required this.successOrFailure}); - - @override - final List<Trash> objects; - @override - final Either<Unit, FlowyError> successOrFailure; - - @override - String toString() { - return 'TrashState(objects: $objects, successOrFailure: $successOrFailure)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _TrashState && - (identical(other.objects, objects) || - const DeepCollectionEquality() - .equals(other.objects, objects)) && - (identical(other.successOrFailure, successOrFailure) || - const DeepCollectionEquality() - .equals(other.successOrFailure, successOrFailure))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(objects) ^ - const DeepCollectionEquality().hash(successOrFailure); - - @JsonKey(ignore: true) - @override - _$TrashStateCopyWith<_TrashState> get copyWith => - __$TrashStateCopyWithImpl<_TrashState>(this, _$identity); -} - -abstract class _TrashState implements TrashState { - const factory _TrashState( - {required List<Trash> objects, - required Either<Unit, FlowyError> successOrFailure}) = _$_TrashState; - - @override - List<Trash> get objects => throw _privateConstructorUsedError; - @override - Either<Unit, FlowyError> get successOrFailure => - throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$TrashStateCopyWith<_TrashState> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/frontend/app_flowy/lib/workspace/application/view/view_bloc.freezed.dart b/frontend/app_flowy/lib/workspace/application/view/view_bloc.freezed.dart deleted file mode 100644 index 51729bca73..0000000000 --- a/frontend/app_flowy/lib/workspace/application/view/view_bloc.freezed.dart +++ /dev/null @@ -1,1155 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// 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 - -part of 'view_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 _$ViewEventTearOff { - const _$ViewEventTearOff(); - - Initial initial() { - return const Initial(); - } - - SetEditing setIsEditing(bool isEditing) { - return SetEditing( - isEditing, - ); - } - - Rename rename(String newName) { - return Rename( - newName, - ); - } - - Delete delete() { - return const Delete(); - } - - Duplicate duplicate() { - return const Duplicate(); - } - - ViewDidUpdate viewDidUpdate(Either<View, FlowyError> result) { - return ViewDidUpdate( - result, - ); - } -} - -/// @nodoc -const $ViewEvent = _$ViewEventTearOff(); - -/// @nodoc -mixin _$ViewEvent { - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either<View, FlowyError> result) viewDidUpdate, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either<View, FlowyError> result)? viewDidUpdate, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either<View, FlowyError> result)? viewDidUpdate, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $ViewEventCopyWith<$Res> { - factory $ViewEventCopyWith(ViewEvent value, $Res Function(ViewEvent) then) = - _$ViewEventCopyWithImpl<$Res>; -} - -/// @nodoc -class _$ViewEventCopyWithImpl<$Res> implements $ViewEventCopyWith<$Res> { - _$ViewEventCopyWithImpl(this._value, this._then); - - final ViewEvent _value; - // ignore: unused_field - final $Res Function(ViewEvent) _then; -} - -/// @nodoc -abstract class $InitialCopyWith<$Res> { - factory $InitialCopyWith(Initial value, $Res Function(Initial) then) = - _$InitialCopyWithImpl<$Res>; -} - -/// @nodoc -class _$InitialCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $InitialCopyWith<$Res> { - _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then) - : super(_value, (v) => _then(v as Initial)); - - @override - Initial get _value => super._value as Initial; -} - -/// @nodoc - -class _$Initial implements Initial { - const _$Initial(); - - @override - String toString() { - return 'ViewEvent.initial()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Initial); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either<View, FlowyError> result) viewDidUpdate, - }) { - return initial(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either<View, FlowyError> result)? viewDidUpdate, - }) { - return initial?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either<View, FlowyError> result)? viewDidUpdate, - required TResult orElse(), - }) { - if (initial != null) { - return initial(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return initial(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return initial?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (initial != null) { - return initial(this); - } - return orElse(); - } -} - -abstract class Initial implements ViewEvent { - const factory Initial() = _$Initial; -} - -/// @nodoc -abstract class $SetEditingCopyWith<$Res> { - factory $SetEditingCopyWith( - SetEditing value, $Res Function(SetEditing) then) = - _$SetEditingCopyWithImpl<$Res>; - $Res call({bool isEditing}); -} - -/// @nodoc -class _$SetEditingCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $SetEditingCopyWith<$Res> { - _$SetEditingCopyWithImpl(SetEditing _value, $Res Function(SetEditing) _then) - : super(_value, (v) => _then(v as SetEditing)); - - @override - SetEditing get _value => super._value as SetEditing; - - @override - $Res call({ - Object? isEditing = freezed, - }) { - return _then(SetEditing( - isEditing == freezed - ? _value.isEditing - : isEditing // ignore: cast_nullable_to_non_nullable - as bool, - )); - } -} - -/// @nodoc - -class _$SetEditing implements SetEditing { - const _$SetEditing(this.isEditing); - - @override - final bool isEditing; - - @override - String toString() { - return 'ViewEvent.setIsEditing(isEditing: $isEditing)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is SetEditing && - (identical(other.isEditing, isEditing) || - const DeepCollectionEquality() - .equals(other.isEditing, isEditing))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(isEditing); - - @JsonKey(ignore: true) - @override - $SetEditingCopyWith<SetEditing> get copyWith => - _$SetEditingCopyWithImpl<SetEditing>(this, _$identity); - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either<View, FlowyError> result) viewDidUpdate, - }) { - return setIsEditing(isEditing); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either<View, FlowyError> result)? viewDidUpdate, - }) { - return setIsEditing?.call(isEditing); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either<View, FlowyError> result)? viewDidUpdate, - required TResult orElse(), - }) { - if (setIsEditing != null) { - return setIsEditing(isEditing); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return setIsEditing(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return setIsEditing?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (setIsEditing != null) { - return setIsEditing(this); - } - return orElse(); - } -} - -abstract class SetEditing implements ViewEvent { - const factory SetEditing(bool isEditing) = _$SetEditing; - - bool get isEditing => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $SetEditingCopyWith<SetEditing> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $RenameCopyWith<$Res> { - factory $RenameCopyWith(Rename value, $Res Function(Rename) then) = - _$RenameCopyWithImpl<$Res>; - $Res call({String newName}); -} - -/// @nodoc -class _$RenameCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $RenameCopyWith<$Res> { - _$RenameCopyWithImpl(Rename _value, $Res Function(Rename) _then) - : super(_value, (v) => _then(v as Rename)); - - @override - Rename get _value => super._value as Rename; - - @override - $Res call({ - Object? newName = freezed, - }) { - return _then(Rename( - newName == freezed - ? _value.newName - : newName // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$Rename implements Rename { - const _$Rename(this.newName); - - @override - final String newName; - - @override - String toString() { - return 'ViewEvent.rename(newName: $newName)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is Rename && - (identical(other.newName, newName) || - const DeepCollectionEquality().equals(other.newName, newName))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(newName); - - @JsonKey(ignore: true) - @override - $RenameCopyWith<Rename> get copyWith => - _$RenameCopyWithImpl<Rename>(this, _$identity); - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either<View, FlowyError> result) viewDidUpdate, - }) { - return rename(newName); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either<View, FlowyError> result)? viewDidUpdate, - }) { - return rename?.call(newName); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either<View, FlowyError> result)? viewDidUpdate, - required TResult orElse(), - }) { - if (rename != null) { - return rename(newName); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return rename(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return rename?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (rename != null) { - return rename(this); - } - return orElse(); - } -} - -abstract class Rename implements ViewEvent { - const factory Rename(String newName) = _$Rename; - - String get newName => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $RenameCopyWith<Rename> get copyWith => throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $DeleteCopyWith<$Res> { - factory $DeleteCopyWith(Delete value, $Res Function(Delete) then) = - _$DeleteCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DeleteCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $DeleteCopyWith<$Res> { - _$DeleteCopyWithImpl(Delete _value, $Res Function(Delete) _then) - : super(_value, (v) => _then(v as Delete)); - - @override - Delete get _value => super._value as Delete; -} - -/// @nodoc - -class _$Delete implements Delete { - const _$Delete(); - - @override - String toString() { - return 'ViewEvent.delete()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Delete); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either<View, FlowyError> result) viewDidUpdate, - }) { - return delete(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either<View, FlowyError> result)? viewDidUpdate, - }) { - return delete?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either<View, FlowyError> result)? viewDidUpdate, - required TResult orElse(), - }) { - if (delete != null) { - return delete(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return delete(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return delete?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (delete != null) { - return delete(this); - } - return orElse(); - } -} - -abstract class Delete implements ViewEvent { - const factory Delete() = _$Delete; -} - -/// @nodoc -abstract class $DuplicateCopyWith<$Res> { - factory $DuplicateCopyWith(Duplicate value, $Res Function(Duplicate) then) = - _$DuplicateCopyWithImpl<$Res>; -} - -/// @nodoc -class _$DuplicateCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $DuplicateCopyWith<$Res> { - _$DuplicateCopyWithImpl(Duplicate _value, $Res Function(Duplicate) _then) - : super(_value, (v) => _then(v as Duplicate)); - - @override - Duplicate get _value => super._value as Duplicate; -} - -/// @nodoc - -class _$Duplicate implements Duplicate { - const _$Duplicate(); - - @override - String toString() { - return 'ViewEvent.duplicate()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Duplicate); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either<View, FlowyError> result) viewDidUpdate, - }) { - return duplicate(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either<View, FlowyError> result)? viewDidUpdate, - }) { - return duplicate?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either<View, FlowyError> result)? viewDidUpdate, - required TResult orElse(), - }) { - if (duplicate != null) { - return duplicate(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return duplicate(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return duplicate?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (duplicate != null) { - return duplicate(this); - } - return orElse(); - } -} - -abstract class Duplicate implements ViewEvent { - const factory Duplicate() = _$Duplicate; -} - -/// @nodoc -abstract class $ViewDidUpdateCopyWith<$Res> { - factory $ViewDidUpdateCopyWith( - ViewDidUpdate value, $Res Function(ViewDidUpdate) then) = - _$ViewDidUpdateCopyWithImpl<$Res>; - $Res call({Either<View, FlowyError> result}); -} - -/// @nodoc -class _$ViewDidUpdateCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res> - implements $ViewDidUpdateCopyWith<$Res> { - _$ViewDidUpdateCopyWithImpl( - ViewDidUpdate _value, $Res Function(ViewDidUpdate) _then) - : super(_value, (v) => _then(v as ViewDidUpdate)); - - @override - ViewDidUpdate get _value => super._value as ViewDidUpdate; - - @override - $Res call({ - Object? result = freezed, - }) { - return _then(ViewDidUpdate( - result == freezed - ? _value.result - : result // ignore: cast_nullable_to_non_nullable - as Either<View, FlowyError>, - )); - } -} - -/// @nodoc - -class _$ViewDidUpdate implements ViewDidUpdate { - const _$ViewDidUpdate(this.result); - - @override - final Either<View, FlowyError> result; - - @override - String toString() { - return 'ViewEvent.viewDidUpdate(result: $result)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is ViewDidUpdate && - (identical(other.result, result) || - const DeepCollectionEquality().equals(other.result, result))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(result); - - @JsonKey(ignore: true) - @override - $ViewDidUpdateCopyWith<ViewDidUpdate> get copyWith => - _$ViewDidUpdateCopyWithImpl<ViewDidUpdate>(this, _$identity); - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(bool isEditing) setIsEditing, - required TResult Function(String newName) rename, - required TResult Function() delete, - required TResult Function() duplicate, - required TResult Function(Either<View, FlowyError> result) viewDidUpdate, - }) { - return viewDidUpdate(result); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either<View, FlowyError> result)? viewDidUpdate, - }) { - return viewDidUpdate?.call(result); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(bool isEditing)? setIsEditing, - TResult Function(String newName)? rename, - TResult Function()? delete, - TResult Function()? duplicate, - TResult Function(Either<View, FlowyError> result)? viewDidUpdate, - required TResult orElse(), - }) { - if (viewDidUpdate != null) { - return viewDidUpdate(result); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(SetEditing value) setIsEditing, - required TResult Function(Rename value) rename, - required TResult Function(Delete value) delete, - required TResult Function(Duplicate value) duplicate, - required TResult Function(ViewDidUpdate value) viewDidUpdate, - }) { - return viewDidUpdate(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - }) { - return viewDidUpdate?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(SetEditing value)? setIsEditing, - TResult Function(Rename value)? rename, - TResult Function(Delete value)? delete, - TResult Function(Duplicate value)? duplicate, - TResult Function(ViewDidUpdate value)? viewDidUpdate, - required TResult orElse(), - }) { - if (viewDidUpdate != null) { - return viewDidUpdate(this); - } - return orElse(); - } -} - -abstract class ViewDidUpdate implements ViewEvent { - const factory ViewDidUpdate(Either<View, FlowyError> result) = - _$ViewDidUpdate; - - Either<View, FlowyError> get result => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $ViewDidUpdateCopyWith<ViewDidUpdate> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -class _$ViewStateTearOff { - const _$ViewStateTearOff(); - - _ViewState call( - {required View view, - required bool isEditing, - required Either<Unit, FlowyError> successOrFailure}) { - return _ViewState( - view: view, - isEditing: isEditing, - successOrFailure: successOrFailure, - ); - } -} - -/// @nodoc -const $ViewState = _$ViewStateTearOff(); - -/// @nodoc -mixin _$ViewState { - View get view => throw _privateConstructorUsedError; - bool get isEditing => throw _privateConstructorUsedError; - Either<Unit, FlowyError> get successOrFailure => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $ViewStateCopyWith<ViewState> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $ViewStateCopyWith<$Res> { - factory $ViewStateCopyWith(ViewState value, $Res Function(ViewState) then) = - _$ViewStateCopyWithImpl<$Res>; - $Res call( - {View view, bool isEditing, Either<Unit, FlowyError> successOrFailure}); -} - -/// @nodoc -class _$ViewStateCopyWithImpl<$Res> implements $ViewStateCopyWith<$Res> { - _$ViewStateCopyWithImpl(this._value, this._then); - - final ViewState _value; - // ignore: unused_field - final $Res Function(ViewState) _then; - - @override - $Res call({ - Object? view = freezed, - Object? isEditing = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_value.copyWith( - view: view == freezed - ? _value.view - : view // ignore: cast_nullable_to_non_nullable - as View, - isEditing: isEditing == freezed - ? _value.isEditing - : isEditing // ignore: cast_nullable_to_non_nullable - as bool, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either<Unit, FlowyError>, - )); - } -} - -/// @nodoc -abstract class _$ViewStateCopyWith<$Res> implements $ViewStateCopyWith<$Res> { - factory _$ViewStateCopyWith( - _ViewState value, $Res Function(_ViewState) then) = - __$ViewStateCopyWithImpl<$Res>; - @override - $Res call( - {View view, bool isEditing, Either<Unit, FlowyError> successOrFailure}); -} - -/// @nodoc -class __$ViewStateCopyWithImpl<$Res> extends _$ViewStateCopyWithImpl<$Res> - implements _$ViewStateCopyWith<$Res> { - __$ViewStateCopyWithImpl(_ViewState _value, $Res Function(_ViewState) _then) - : super(_value, (v) => _then(v as _ViewState)); - - @override - _ViewState get _value => super._value as _ViewState; - - @override - $Res call({ - Object? view = freezed, - Object? isEditing = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_ViewState( - view: view == freezed - ? _value.view - : view // ignore: cast_nullable_to_non_nullable - as View, - isEditing: isEditing == freezed - ? _value.isEditing - : isEditing // ignore: cast_nullable_to_non_nullable - as bool, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either<Unit, FlowyError>, - )); - } -} - -/// @nodoc - -class _$_ViewState implements _ViewState { - const _$_ViewState( - {required this.view, - required this.isEditing, - required this.successOrFailure}); - - @override - final View view; - @override - final bool isEditing; - @override - final Either<Unit, FlowyError> successOrFailure; - - @override - String toString() { - return 'ViewState(view: $view, isEditing: $isEditing, successOrFailure: $successOrFailure)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _ViewState && - (identical(other.view, view) || - const DeepCollectionEquality().equals(other.view, view)) && - (identical(other.isEditing, isEditing) || - const DeepCollectionEquality() - .equals(other.isEditing, isEditing)) && - (identical(other.successOrFailure, successOrFailure) || - const DeepCollectionEquality() - .equals(other.successOrFailure, successOrFailure))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(view) ^ - const DeepCollectionEquality().hash(isEditing) ^ - const DeepCollectionEquality().hash(successOrFailure); - - @JsonKey(ignore: true) - @override - _$ViewStateCopyWith<_ViewState> get copyWith => - __$ViewStateCopyWithImpl<_ViewState>(this, _$identity); -} - -abstract class _ViewState implements ViewState { - const factory _ViewState( - {required View view, - required bool isEditing, - required Either<Unit, FlowyError> successOrFailure}) = _$_ViewState; - - @override - View get view => throw _privateConstructorUsedError; - @override - bool get isEditing => throw _privateConstructorUsedError; - @override - Either<Unit, FlowyError> get successOrFailure => - throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$ViewStateCopyWith<_ViewState> get copyWith => - throw _privateConstructorUsedError; -} diff --git a/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.freezed.dart b/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.freezed.dart deleted file mode 100644 index b82475bc73..0000000000 --- a/frontend/app_flowy/lib/workspace/application/workspace/welcome_bloc.freezed.dart +++ /dev/null @@ -1,890 +0,0 @@ -// coverage:ignore-file -// GENERATED CODE - DO NOT MODIFY BY HAND -// 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 - -part of 'welcome_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 _$WelcomeEventTearOff { - const _$WelcomeEventTearOff(); - - Initial initial() { - return const Initial(); - } - - CreateWorkspace createWorkspace(String name, String desc) { - return CreateWorkspace( - name, - desc, - ); - } - - OpenWorkspace openWorkspace(Workspace workspace) { - return OpenWorkspace( - workspace, - ); - } - - WorkspacesReceived workspacesReveived( - Either<List<Workspace>, FlowyError> workspacesOrFail) { - return WorkspacesReceived( - workspacesOrFail, - ); - } -} - -/// @nodoc -const $WelcomeEvent = _$WelcomeEventTearOff(); - -/// @nodoc -mixin _$WelcomeEvent { - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(String name, String desc) createWorkspace, - required TResult Function(Workspace workspace) openWorkspace, - required TResult Function( - Either<List<Workspace>, FlowyError> workspacesOrFail) - workspacesReveived, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either<List<Workspace>, FlowyError> workspacesOrFail)? - workspacesReveived, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either<List<Workspace>, FlowyError> workspacesOrFail)? - workspacesReveived, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(CreateWorkspace value) createWorkspace, - required TResult Function(OpenWorkspace value) openWorkspace, - required TResult Function(WorkspacesReceived value) workspacesReveived, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - }) => - throw _privateConstructorUsedError; - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - required TResult orElse(), - }) => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $WelcomeEventCopyWith<$Res> { - factory $WelcomeEventCopyWith( - WelcomeEvent value, $Res Function(WelcomeEvent) then) = - _$WelcomeEventCopyWithImpl<$Res>; -} - -/// @nodoc -class _$WelcomeEventCopyWithImpl<$Res> implements $WelcomeEventCopyWith<$Res> { - _$WelcomeEventCopyWithImpl(this._value, this._then); - - final WelcomeEvent _value; - // ignore: unused_field - final $Res Function(WelcomeEvent) _then; -} - -/// @nodoc -abstract class $InitialCopyWith<$Res> { - factory $InitialCopyWith(Initial value, $Res Function(Initial) then) = - _$InitialCopyWithImpl<$Res>; -} - -/// @nodoc -class _$InitialCopyWithImpl<$Res> extends _$WelcomeEventCopyWithImpl<$Res> - implements $InitialCopyWith<$Res> { - _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then) - : super(_value, (v) => _then(v as Initial)); - - @override - Initial get _value => super._value as Initial; -} - -/// @nodoc - -class _$Initial implements Initial { - const _$Initial(); - - @override - String toString() { - return 'WelcomeEvent.initial()'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || (other is Initial); - } - - @override - int get hashCode => runtimeType.hashCode; - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(String name, String desc) createWorkspace, - required TResult Function(Workspace workspace) openWorkspace, - required TResult Function( - Either<List<Workspace>, FlowyError> workspacesOrFail) - workspacesReveived, - }) { - return initial(); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either<List<Workspace>, FlowyError> workspacesOrFail)? - workspacesReveived, - }) { - return initial?.call(); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either<List<Workspace>, FlowyError> workspacesOrFail)? - workspacesReveived, - required TResult orElse(), - }) { - if (initial != null) { - return initial(); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(CreateWorkspace value) createWorkspace, - required TResult Function(OpenWorkspace value) openWorkspace, - required TResult Function(WorkspacesReceived value) workspacesReveived, - }) { - return initial(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - }) { - return initial?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - required TResult orElse(), - }) { - if (initial != null) { - return initial(this); - } - return orElse(); - } -} - -abstract class Initial implements WelcomeEvent { - const factory Initial() = _$Initial; -} - -/// @nodoc -abstract class $CreateWorkspaceCopyWith<$Res> { - factory $CreateWorkspaceCopyWith( - CreateWorkspace value, $Res Function(CreateWorkspace) then) = - _$CreateWorkspaceCopyWithImpl<$Res>; - $Res call({String name, String desc}); -} - -/// @nodoc -class _$CreateWorkspaceCopyWithImpl<$Res> - extends _$WelcomeEventCopyWithImpl<$Res> - implements $CreateWorkspaceCopyWith<$Res> { - _$CreateWorkspaceCopyWithImpl( - CreateWorkspace _value, $Res Function(CreateWorkspace) _then) - : super(_value, (v) => _then(v as CreateWorkspace)); - - @override - CreateWorkspace get _value => super._value as CreateWorkspace; - - @override - $Res call({ - Object? name = freezed, - Object? desc = freezed, - }) { - return _then(CreateWorkspace( - name == freezed - ? _value.name - : name // ignore: cast_nullable_to_non_nullable - as String, - desc == freezed - ? _value.desc - : desc // ignore: cast_nullable_to_non_nullable - as String, - )); - } -} - -/// @nodoc - -class _$CreateWorkspace implements CreateWorkspace { - const _$CreateWorkspace(this.name, this.desc); - - @override - final String name; - @override - final String desc; - - @override - String toString() { - return 'WelcomeEvent.createWorkspace(name: $name, desc: $desc)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is CreateWorkspace && - (identical(other.name, name) || - const DeepCollectionEquality().equals(other.name, name)) && - (identical(other.desc, desc) || - const DeepCollectionEquality().equals(other.desc, desc))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(name) ^ - const DeepCollectionEquality().hash(desc); - - @JsonKey(ignore: true) - @override - $CreateWorkspaceCopyWith<CreateWorkspace> get copyWith => - _$CreateWorkspaceCopyWithImpl<CreateWorkspace>(this, _$identity); - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(String name, String desc) createWorkspace, - required TResult Function(Workspace workspace) openWorkspace, - required TResult Function( - Either<List<Workspace>, FlowyError> workspacesOrFail) - workspacesReveived, - }) { - return createWorkspace(name, desc); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either<List<Workspace>, FlowyError> workspacesOrFail)? - workspacesReveived, - }) { - return createWorkspace?.call(name, desc); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either<List<Workspace>, FlowyError> workspacesOrFail)? - workspacesReveived, - required TResult orElse(), - }) { - if (createWorkspace != null) { - return createWorkspace(name, desc); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(CreateWorkspace value) createWorkspace, - required TResult Function(OpenWorkspace value) openWorkspace, - required TResult Function(WorkspacesReceived value) workspacesReveived, - }) { - return createWorkspace(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - }) { - return createWorkspace?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - required TResult orElse(), - }) { - if (createWorkspace != null) { - return createWorkspace(this); - } - return orElse(); - } -} - -abstract class CreateWorkspace implements WelcomeEvent { - const factory CreateWorkspace(String name, String desc) = _$CreateWorkspace; - - String get name => throw _privateConstructorUsedError; - String get desc => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $CreateWorkspaceCopyWith<CreateWorkspace> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $OpenWorkspaceCopyWith<$Res> { - factory $OpenWorkspaceCopyWith( - OpenWorkspace value, $Res Function(OpenWorkspace) then) = - _$OpenWorkspaceCopyWithImpl<$Res>; - $Res call({Workspace workspace}); -} - -/// @nodoc -class _$OpenWorkspaceCopyWithImpl<$Res> extends _$WelcomeEventCopyWithImpl<$Res> - implements $OpenWorkspaceCopyWith<$Res> { - _$OpenWorkspaceCopyWithImpl( - OpenWorkspace _value, $Res Function(OpenWorkspace) _then) - : super(_value, (v) => _then(v as OpenWorkspace)); - - @override - OpenWorkspace get _value => super._value as OpenWorkspace; - - @override - $Res call({ - Object? workspace = freezed, - }) { - return _then(OpenWorkspace( - workspace == freezed - ? _value.workspace - : workspace // ignore: cast_nullable_to_non_nullable - as Workspace, - )); - } -} - -/// @nodoc - -class _$OpenWorkspace implements OpenWorkspace { - const _$OpenWorkspace(this.workspace); - - @override - final Workspace workspace; - - @override - String toString() { - return 'WelcomeEvent.openWorkspace(workspace: $workspace)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is OpenWorkspace && - (identical(other.workspace, workspace) || - const DeepCollectionEquality() - .equals(other.workspace, workspace))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ const DeepCollectionEquality().hash(workspace); - - @JsonKey(ignore: true) - @override - $OpenWorkspaceCopyWith<OpenWorkspace> get copyWith => - _$OpenWorkspaceCopyWithImpl<OpenWorkspace>(this, _$identity); - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(String name, String desc) createWorkspace, - required TResult Function(Workspace workspace) openWorkspace, - required TResult Function( - Either<List<Workspace>, FlowyError> workspacesOrFail) - workspacesReveived, - }) { - return openWorkspace(workspace); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either<List<Workspace>, FlowyError> workspacesOrFail)? - workspacesReveived, - }) { - return openWorkspace?.call(workspace); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either<List<Workspace>, FlowyError> workspacesOrFail)? - workspacesReveived, - required TResult orElse(), - }) { - if (openWorkspace != null) { - return openWorkspace(workspace); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(CreateWorkspace value) createWorkspace, - required TResult Function(OpenWorkspace value) openWorkspace, - required TResult Function(WorkspacesReceived value) workspacesReveived, - }) { - return openWorkspace(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - }) { - return openWorkspace?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - required TResult orElse(), - }) { - if (openWorkspace != null) { - return openWorkspace(this); - } - return orElse(); - } -} - -abstract class OpenWorkspace implements WelcomeEvent { - const factory OpenWorkspace(Workspace workspace) = _$OpenWorkspace; - - Workspace get workspace => throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $OpenWorkspaceCopyWith<OpenWorkspace> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $WorkspacesReceivedCopyWith<$Res> { - factory $WorkspacesReceivedCopyWith( - WorkspacesReceived value, $Res Function(WorkspacesReceived) then) = - _$WorkspacesReceivedCopyWithImpl<$Res>; - $Res call({Either<List<Workspace>, FlowyError> workspacesOrFail}); -} - -/// @nodoc -class _$WorkspacesReceivedCopyWithImpl<$Res> - extends _$WelcomeEventCopyWithImpl<$Res> - implements $WorkspacesReceivedCopyWith<$Res> { - _$WorkspacesReceivedCopyWithImpl( - WorkspacesReceived _value, $Res Function(WorkspacesReceived) _then) - : super(_value, (v) => _then(v as WorkspacesReceived)); - - @override - WorkspacesReceived get _value => super._value as WorkspacesReceived; - - @override - $Res call({ - Object? workspacesOrFail = freezed, - }) { - return _then(WorkspacesReceived( - workspacesOrFail == freezed - ? _value.workspacesOrFail - : workspacesOrFail // ignore: cast_nullable_to_non_nullable - as Either<List<Workspace>, FlowyError>, - )); - } -} - -/// @nodoc - -class _$WorkspacesReceived implements WorkspacesReceived { - const _$WorkspacesReceived(this.workspacesOrFail); - - @override - final Either<List<Workspace>, FlowyError> workspacesOrFail; - - @override - String toString() { - return 'WelcomeEvent.workspacesReveived(workspacesOrFail: $workspacesOrFail)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is WorkspacesReceived && - (identical(other.workspacesOrFail, workspacesOrFail) || - const DeepCollectionEquality() - .equals(other.workspacesOrFail, workspacesOrFail))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(workspacesOrFail); - - @JsonKey(ignore: true) - @override - $WorkspacesReceivedCopyWith<WorkspacesReceived> get copyWith => - _$WorkspacesReceivedCopyWithImpl<WorkspacesReceived>(this, _$identity); - - @override - @optionalTypeArgs - TResult when<TResult extends Object?>({ - required TResult Function() initial, - required TResult Function(String name, String desc) createWorkspace, - required TResult Function(Workspace workspace) openWorkspace, - required TResult Function( - Either<List<Workspace>, FlowyError> workspacesOrFail) - workspacesReveived, - }) { - return workspacesReveived(workspacesOrFail); - } - - @override - @optionalTypeArgs - TResult? whenOrNull<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either<List<Workspace>, FlowyError> workspacesOrFail)? - workspacesReveived, - }) { - return workspacesReveived?.call(workspacesOrFail); - } - - @override - @optionalTypeArgs - TResult maybeWhen<TResult extends Object?>({ - TResult Function()? initial, - TResult Function(String name, String desc)? createWorkspace, - TResult Function(Workspace workspace)? openWorkspace, - TResult Function(Either<List<Workspace>, FlowyError> workspacesOrFail)? - workspacesReveived, - required TResult orElse(), - }) { - if (workspacesReveived != null) { - return workspacesReveived(workspacesOrFail); - } - return orElse(); - } - - @override - @optionalTypeArgs - TResult map<TResult extends Object?>({ - required TResult Function(Initial value) initial, - required TResult Function(CreateWorkspace value) createWorkspace, - required TResult Function(OpenWorkspace value) openWorkspace, - required TResult Function(WorkspacesReceived value) workspacesReveived, - }) { - return workspacesReveived(this); - } - - @override - @optionalTypeArgs - TResult? mapOrNull<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - }) { - return workspacesReveived?.call(this); - } - - @override - @optionalTypeArgs - TResult maybeMap<TResult extends Object?>({ - TResult Function(Initial value)? initial, - TResult Function(CreateWorkspace value)? createWorkspace, - TResult Function(OpenWorkspace value)? openWorkspace, - TResult Function(WorkspacesReceived value)? workspacesReveived, - required TResult orElse(), - }) { - if (workspacesReveived != null) { - return workspacesReveived(this); - } - return orElse(); - } -} - -abstract class WorkspacesReceived implements WelcomeEvent { - const factory WorkspacesReceived( - Either<List<Workspace>, FlowyError> workspacesOrFail) = - _$WorkspacesReceived; - - Either<List<Workspace>, FlowyError> get workspacesOrFail => - throw _privateConstructorUsedError; - @JsonKey(ignore: true) - $WorkspacesReceivedCopyWith<WorkspacesReceived> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -class _$WelcomeStateTearOff { - const _$WelcomeStateTearOff(); - - _WelcomeState call( - {required bool isLoading, - required List<Workspace> workspaces, - required Either<Unit, FlowyError> successOrFailure}) { - return _WelcomeState( - isLoading: isLoading, - workspaces: workspaces, - successOrFailure: successOrFailure, - ); - } -} - -/// @nodoc -const $WelcomeState = _$WelcomeStateTearOff(); - -/// @nodoc -mixin _$WelcomeState { - bool get isLoading => throw _privateConstructorUsedError; - List<Workspace> get workspaces => throw _privateConstructorUsedError; - Either<Unit, FlowyError> get successOrFailure => - throw _privateConstructorUsedError; - - @JsonKey(ignore: true) - $WelcomeStateCopyWith<WelcomeState> get copyWith => - throw _privateConstructorUsedError; -} - -/// @nodoc -abstract class $WelcomeStateCopyWith<$Res> { - factory $WelcomeStateCopyWith( - WelcomeState value, $Res Function(WelcomeState) then) = - _$WelcomeStateCopyWithImpl<$Res>; - $Res call( - {bool isLoading, - List<Workspace> workspaces, - Either<Unit, FlowyError> successOrFailure}); -} - -/// @nodoc -class _$WelcomeStateCopyWithImpl<$Res> implements $WelcomeStateCopyWith<$Res> { - _$WelcomeStateCopyWithImpl(this._value, this._then); - - final WelcomeState _value; - // ignore: unused_field - final $Res Function(WelcomeState) _then; - - @override - $Res call({ - Object? isLoading = freezed, - Object? workspaces = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_value.copyWith( - isLoading: isLoading == freezed - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - workspaces: workspaces == freezed - ? _value.workspaces - : workspaces // ignore: cast_nullable_to_non_nullable - as List<Workspace>, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either<Unit, FlowyError>, - )); - } -} - -/// @nodoc -abstract class _$WelcomeStateCopyWith<$Res> - implements $WelcomeStateCopyWith<$Res> { - factory _$WelcomeStateCopyWith( - _WelcomeState value, $Res Function(_WelcomeState) then) = - __$WelcomeStateCopyWithImpl<$Res>; - @override - $Res call( - {bool isLoading, - List<Workspace> workspaces, - Either<Unit, FlowyError> successOrFailure}); -} - -/// @nodoc -class __$WelcomeStateCopyWithImpl<$Res> extends _$WelcomeStateCopyWithImpl<$Res> - implements _$WelcomeStateCopyWith<$Res> { - __$WelcomeStateCopyWithImpl( - _WelcomeState _value, $Res Function(_WelcomeState) _then) - : super(_value, (v) => _then(v as _WelcomeState)); - - @override - _WelcomeState get _value => super._value as _WelcomeState; - - @override - $Res call({ - Object? isLoading = freezed, - Object? workspaces = freezed, - Object? successOrFailure = freezed, - }) { - return _then(_WelcomeState( - isLoading: isLoading == freezed - ? _value.isLoading - : isLoading // ignore: cast_nullable_to_non_nullable - as bool, - workspaces: workspaces == freezed - ? _value.workspaces - : workspaces // ignore: cast_nullable_to_non_nullable - as List<Workspace>, - successOrFailure: successOrFailure == freezed - ? _value.successOrFailure - : successOrFailure // ignore: cast_nullable_to_non_nullable - as Either<Unit, FlowyError>, - )); - } -} - -/// @nodoc - -class _$_WelcomeState implements _WelcomeState { - const _$_WelcomeState( - {required this.isLoading, - required this.workspaces, - required this.successOrFailure}); - - @override - final bool isLoading; - @override - final List<Workspace> workspaces; - @override - final Either<Unit, FlowyError> successOrFailure; - - @override - String toString() { - return 'WelcomeState(isLoading: $isLoading, workspaces: $workspaces, successOrFailure: $successOrFailure)'; - } - - @override - bool operator ==(dynamic other) { - return identical(this, other) || - (other is _WelcomeState && - (identical(other.isLoading, isLoading) || - const DeepCollectionEquality() - .equals(other.isLoading, isLoading)) && - (identical(other.workspaces, workspaces) || - const DeepCollectionEquality() - .equals(other.workspaces, workspaces)) && - (identical(other.successOrFailure, successOrFailure) || - const DeepCollectionEquality() - .equals(other.successOrFailure, successOrFailure))); - } - - @override - int get hashCode => - runtimeType.hashCode ^ - const DeepCollectionEquality().hash(isLoading) ^ - const DeepCollectionEquality().hash(workspaces) ^ - const DeepCollectionEquality().hash(successOrFailure); - - @JsonKey(ignore: true) - @override - _$WelcomeStateCopyWith<_WelcomeState> get copyWith => - __$WelcomeStateCopyWithImpl<_WelcomeState>(this, _$identity); -} - -abstract class _WelcomeState implements WelcomeState { - const factory _WelcomeState( - {required bool isLoading, - required List<Workspace> workspaces, - required Either<Unit, FlowyError> successOrFailure}) = _$_WelcomeState; - - @override - bool get isLoading => throw _privateConstructorUsedError; - @override - List<Workspace> get workspaces => throw _privateConstructorUsedError; - @override - Either<Unit, FlowyError> get successOrFailure => - throw _privateConstructorUsedError; - @override - @JsonKey(ignore: true) - _$WelcomeStateCopyWith<_WelcomeState> get copyWith => - throw _privateConstructorUsedError; -}