|
@@ -16,8 +16,22 @@ final _privateConstructorUsedError = UnsupportedError(
|
|
class _$ViewEventTearOff {
|
|
class _$ViewEventTearOff {
|
|
const _$ViewEventTearOff();
|
|
const _$ViewEventTearOff();
|
|
|
|
|
|
- Initial initial() {
|
|
|
|
- return const Initial();
|
|
|
|
|
|
+ SetSelected setIsSelected(bool isSelected) {
|
|
|
|
+ return SetSelected(
|
|
|
|
+ isSelected,
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ SetEditing setIsEditing(bool isEditing) {
|
|
|
|
+ return SetEditing(
|
|
|
|
+ isEditing,
|
|
|
|
+ );
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ SetAction setAction(Option<ViewAction> action) {
|
|
|
|
+ return SetAction(
|
|
|
|
+ action,
|
|
|
|
+ );
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -28,23 +42,31 @@ const $ViewEvent = _$ViewEventTearOff();
|
|
mixin _$ViewEvent {
|
|
mixin _$ViewEvent {
|
|
@optionalTypeArgs
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>({
|
|
TResult when<TResult extends Object?>({
|
|
- required TResult Function() initial,
|
|
|
|
|
|
+ required TResult Function(bool isSelected) setIsSelected,
|
|
|
|
+ required TResult Function(bool isEditing) setIsEditing,
|
|
|
|
+ required TResult Function(Option<ViewAction> action) setAction,
|
|
}) =>
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
- TResult Function()? initial,
|
|
|
|
|
|
+ TResult Function(bool isSelected)? setIsSelected,
|
|
|
|
+ TResult Function(bool isEditing)? setIsEditing,
|
|
|
|
+ TResult Function(Option<ViewAction> action)? setAction,
|
|
required TResult orElse(),
|
|
required TResult orElse(),
|
|
}) =>
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>({
|
|
TResult map<TResult extends Object?>({
|
|
- required TResult Function(Initial value) initial,
|
|
|
|
|
|
+ required TResult Function(SetSelected value) setIsSelected,
|
|
|
|
+ required TResult Function(SetEditing value) setIsEditing,
|
|
|
|
+ required TResult Function(SetAction value) setAction,
|
|
}) =>
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
throw _privateConstructorUsedError;
|
|
@optionalTypeArgs
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>({
|
|
TResult maybeMap<TResult extends Object?>({
|
|
- TResult Function(Initial value)? initial,
|
|
|
|
|
|
+ TResult Function(SetSelected value)? setIsSelected,
|
|
|
|
+ TResult Function(SetEditing value)? setIsEditing,
|
|
|
|
+ TResult Function(SetAction value)? setAction,
|
|
required TResult orElse(),
|
|
required TResult orElse(),
|
|
}) =>
|
|
}) =>
|
|
throw _privateConstructorUsedError;
|
|
throw _privateConstructorUsedError;
|
|
@@ -66,55 +88,323 @@ class _$ViewEventCopyWithImpl<$Res> implements $ViewEventCopyWith<$Res> {
|
|
}
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
/// @nodoc
|
|
-abstract class $InitialCopyWith<$Res> {
|
|
|
|
- factory $InitialCopyWith(Initial value, $Res Function(Initial) then) =
|
|
|
|
- _$InitialCopyWithImpl<$Res>;
|
|
|
|
|
|
+abstract class $SetSelectedCopyWith<$Res> {
|
|
|
|
+ factory $SetSelectedCopyWith(
|
|
|
|
+ SetSelected value, $Res Function(SetSelected) then) =
|
|
|
|
+ _$SetSelectedCopyWithImpl<$Res>;
|
|
|
|
+ $Res call({bool isSelected});
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/// @nodoc
|
|
|
|
+class _$SetSelectedCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res>
|
|
|
|
+ implements $SetSelectedCopyWith<$Res> {
|
|
|
|
+ _$SetSelectedCopyWithImpl(
|
|
|
|
+ SetSelected _value, $Res Function(SetSelected) _then)
|
|
|
|
+ : super(_value, (v) => _then(v as SetSelected));
|
|
|
|
+
|
|
|
|
+ @override
|
|
|
|
+ SetSelected get _value => super._value as SetSelected;
|
|
|
|
+
|
|
|
|
+ @override
|
|
|
|
+ $Res call({
|
|
|
|
+ Object? isSelected = freezed,
|
|
|
|
+ }) {
|
|
|
|
+ return _then(SetSelected(
|
|
|
|
+ isSelected == freezed
|
|
|
|
+ ? _value.isSelected
|
|
|
|
+ : isSelected // ignore: cast_nullable_to_non_nullable
|
|
|
|
+ as bool,
|
|
|
|
+ ));
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/// @nodoc
|
|
|
|
+
|
|
|
|
+class _$SetSelected implements SetSelected {
|
|
|
|
+ const _$SetSelected(this.isSelected);
|
|
|
|
+
|
|
|
|
+ @override
|
|
|
|
+ final bool isSelected;
|
|
|
|
+
|
|
|
|
+ @override
|
|
|
|
+ String toString() {
|
|
|
|
+ return 'ViewEvent.setIsSelected(isSelected: $isSelected)';
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @override
|
|
|
|
+ bool operator ==(dynamic other) {
|
|
|
|
+ return identical(this, other) ||
|
|
|
|
+ (other is SetSelected &&
|
|
|
|
+ (identical(other.isSelected, isSelected) ||
|
|
|
|
+ const DeepCollectionEquality()
|
|
|
|
+ .equals(other.isSelected, isSelected)));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @override
|
|
|
|
+ int get hashCode =>
|
|
|
|
+ runtimeType.hashCode ^ const DeepCollectionEquality().hash(isSelected);
|
|
|
|
+
|
|
|
|
+ @JsonKey(ignore: true)
|
|
|
|
+ @override
|
|
|
|
+ $SetSelectedCopyWith<SetSelected> get copyWith =>
|
|
|
|
+ _$SetSelectedCopyWithImpl<SetSelected>(this, _$identity);
|
|
|
|
+
|
|
|
|
+ @override
|
|
|
|
+ @optionalTypeArgs
|
|
|
|
+ TResult when<TResult extends Object?>({
|
|
|
|
+ required TResult Function(bool isSelected) setIsSelected,
|
|
|
|
+ required TResult Function(bool isEditing) setIsEditing,
|
|
|
|
+ required TResult Function(Option<ViewAction> action) setAction,
|
|
|
|
+ }) {
|
|
|
|
+ return setIsSelected(isSelected);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @override
|
|
|
|
+ @optionalTypeArgs
|
|
|
|
+ TResult maybeWhen<TResult extends Object?>({
|
|
|
|
+ TResult Function(bool isSelected)? setIsSelected,
|
|
|
|
+ TResult Function(bool isEditing)? setIsEditing,
|
|
|
|
+ TResult Function(Option<ViewAction> action)? setAction,
|
|
|
|
+ required TResult orElse(),
|
|
|
|
+ }) {
|
|
|
|
+ if (setIsSelected != null) {
|
|
|
|
+ return setIsSelected(isSelected);
|
|
|
|
+ }
|
|
|
|
+ return orElse();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @override
|
|
|
|
+ @optionalTypeArgs
|
|
|
|
+ TResult map<TResult extends Object?>({
|
|
|
|
+ required TResult Function(SetSelected value) setIsSelected,
|
|
|
|
+ required TResult Function(SetEditing value) setIsEditing,
|
|
|
|
+ required TResult Function(SetAction value) setAction,
|
|
|
|
+ }) {
|
|
|
|
+ return setIsSelected(this);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @override
|
|
|
|
+ @optionalTypeArgs
|
|
|
|
+ TResult maybeMap<TResult extends Object?>({
|
|
|
|
+ TResult Function(SetSelected value)? setIsSelected,
|
|
|
|
+ TResult Function(SetEditing value)? setIsEditing,
|
|
|
|
+ TResult Function(SetAction value)? setAction,
|
|
|
|
+ required TResult orElse(),
|
|
|
|
+ }) {
|
|
|
|
+ if (setIsSelected != null) {
|
|
|
|
+ return setIsSelected(this);
|
|
|
|
+ }
|
|
|
|
+ return orElse();
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+abstract class SetSelected implements ViewEvent {
|
|
|
|
+ const factory SetSelected(bool isSelected) = _$SetSelected;
|
|
|
|
+
|
|
|
|
+ bool get isSelected => throw _privateConstructorUsedError;
|
|
|
|
+ @JsonKey(ignore: true)
|
|
|
|
+ $SetSelectedCopyWith<SetSelected> get copyWith =>
|
|
|
|
+ throw _privateConstructorUsedError;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+/// @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(bool isSelected) setIsSelected,
|
|
|
|
+ required TResult Function(bool isEditing) setIsEditing,
|
|
|
|
+ required TResult Function(Option<ViewAction> action) setAction,
|
|
|
|
+ }) {
|
|
|
|
+ return setIsEditing(isEditing);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @override
|
|
|
|
+ @optionalTypeArgs
|
|
|
|
+ TResult maybeWhen<TResult extends Object?>({
|
|
|
|
+ TResult Function(bool isSelected)? setIsSelected,
|
|
|
|
+ TResult Function(bool isEditing)? setIsEditing,
|
|
|
|
+ TResult Function(Option<ViewAction> action)? setAction,
|
|
|
|
+ required TResult orElse(),
|
|
|
|
+ }) {
|
|
|
|
+ if (setIsEditing != null) {
|
|
|
|
+ return setIsEditing(isEditing);
|
|
|
|
+ }
|
|
|
|
+ return orElse();
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @override
|
|
|
|
+ @optionalTypeArgs
|
|
|
|
+ TResult map<TResult extends Object?>({
|
|
|
|
+ required TResult Function(SetSelected value) setIsSelected,
|
|
|
|
+ required TResult Function(SetEditing value) setIsEditing,
|
|
|
|
+ required TResult Function(SetAction value) setAction,
|
|
|
|
+ }) {
|
|
|
|
+ return setIsEditing(this);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @override
|
|
|
|
+ @optionalTypeArgs
|
|
|
|
+ TResult maybeMap<TResult extends Object?>({
|
|
|
|
+ TResult Function(SetSelected value)? setIsSelected,
|
|
|
|
+ TResult Function(SetEditing value)? setIsEditing,
|
|
|
|
+ TResult Function(SetAction value)? setAction,
|
|
|
|
+ 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 $SetActionCopyWith<$Res> {
|
|
|
|
+ factory $SetActionCopyWith(SetAction value, $Res Function(SetAction) then) =
|
|
|
|
+ _$SetActionCopyWithImpl<$Res>;
|
|
|
|
+ $Res call({Option<ViewAction> action});
|
|
}
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
/// @nodoc
|
|
-class _$InitialCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res>
|
|
|
|
- implements $InitialCopyWith<$Res> {
|
|
|
|
- _$InitialCopyWithImpl(Initial _value, $Res Function(Initial) _then)
|
|
|
|
- : super(_value, (v) => _then(v as Initial));
|
|
|
|
|
|
+class _$SetActionCopyWithImpl<$Res> extends _$ViewEventCopyWithImpl<$Res>
|
|
|
|
+ implements $SetActionCopyWith<$Res> {
|
|
|
|
+ _$SetActionCopyWithImpl(SetAction _value, $Res Function(SetAction) _then)
|
|
|
|
+ : super(_value, (v) => _then(v as SetAction));
|
|
|
|
+
|
|
|
|
+ @override
|
|
|
|
+ SetAction get _value => super._value as SetAction;
|
|
|
|
|
|
@override
|
|
@override
|
|
- Initial get _value => super._value as Initial;
|
|
|
|
|
|
+ $Res call({
|
|
|
|
+ Object? action = freezed,
|
|
|
|
+ }) {
|
|
|
|
+ return _then(SetAction(
|
|
|
|
+ action == freezed
|
|
|
|
+ ? _value.action
|
|
|
|
+ : action // ignore: cast_nullable_to_non_nullable
|
|
|
|
+ as Option<ViewAction>,
|
|
|
|
+ ));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
/// @nodoc
|
|
|
|
|
|
-class _$Initial implements Initial {
|
|
|
|
- const _$Initial();
|
|
|
|
|
|
+class _$SetAction implements SetAction {
|
|
|
|
+ const _$SetAction(this.action);
|
|
|
|
+
|
|
|
|
+ @override
|
|
|
|
+ final Option<ViewAction> action;
|
|
|
|
|
|
@override
|
|
@override
|
|
String toString() {
|
|
String toString() {
|
|
- return 'ViewEvent.initial()';
|
|
|
|
|
|
+ return 'ViewEvent.setAction(action: $action)';
|
|
}
|
|
}
|
|
|
|
|
|
@override
|
|
@override
|
|
bool operator ==(dynamic other) {
|
|
bool operator ==(dynamic other) {
|
|
- return identical(this, other) || (other is Initial);
|
|
|
|
|
|
+ return identical(this, other) ||
|
|
|
|
+ (other is SetAction &&
|
|
|
|
+ (identical(other.action, action) ||
|
|
|
|
+ const DeepCollectionEquality().equals(other.action, action)));
|
|
}
|
|
}
|
|
|
|
|
|
@override
|
|
@override
|
|
- int get hashCode => runtimeType.hashCode;
|
|
|
|
|
|
+ int get hashCode =>
|
|
|
|
+ runtimeType.hashCode ^ const DeepCollectionEquality().hash(action);
|
|
|
|
+
|
|
|
|
+ @JsonKey(ignore: true)
|
|
|
|
+ @override
|
|
|
|
+ $SetActionCopyWith<SetAction> get copyWith =>
|
|
|
|
+ _$SetActionCopyWithImpl<SetAction>(this, _$identity);
|
|
|
|
|
|
@override
|
|
@override
|
|
@optionalTypeArgs
|
|
@optionalTypeArgs
|
|
TResult when<TResult extends Object?>({
|
|
TResult when<TResult extends Object?>({
|
|
- required TResult Function() initial,
|
|
|
|
|
|
+ required TResult Function(bool isSelected) setIsSelected,
|
|
|
|
+ required TResult Function(bool isEditing) setIsEditing,
|
|
|
|
+ required TResult Function(Option<ViewAction> action) setAction,
|
|
}) {
|
|
}) {
|
|
- return initial();
|
|
|
|
|
|
+ return setAction(action);
|
|
}
|
|
}
|
|
|
|
|
|
@override
|
|
@override
|
|
@optionalTypeArgs
|
|
@optionalTypeArgs
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
TResult maybeWhen<TResult extends Object?>({
|
|
- TResult Function()? initial,
|
|
|
|
|
|
+ TResult Function(bool isSelected)? setIsSelected,
|
|
|
|
+ TResult Function(bool isEditing)? setIsEditing,
|
|
|
|
+ TResult Function(Option<ViewAction> action)? setAction,
|
|
required TResult orElse(),
|
|
required TResult orElse(),
|
|
}) {
|
|
}) {
|
|
- if (initial != null) {
|
|
|
|
- return initial();
|
|
|
|
|
|
+ if (setAction != null) {
|
|
|
|
+ return setAction(action);
|
|
}
|
|
}
|
|
return orElse();
|
|
return orElse();
|
|
}
|
|
}
|
|
@@ -122,26 +412,35 @@ class _$Initial implements Initial {
|
|
@override
|
|
@override
|
|
@optionalTypeArgs
|
|
@optionalTypeArgs
|
|
TResult map<TResult extends Object?>({
|
|
TResult map<TResult extends Object?>({
|
|
- required TResult Function(Initial value) initial,
|
|
|
|
|
|
+ required TResult Function(SetSelected value) setIsSelected,
|
|
|
|
+ required TResult Function(SetEditing value) setIsEditing,
|
|
|
|
+ required TResult Function(SetAction value) setAction,
|
|
}) {
|
|
}) {
|
|
- return initial(this);
|
|
|
|
|
|
+ return setAction(this);
|
|
}
|
|
}
|
|
|
|
|
|
@override
|
|
@override
|
|
@optionalTypeArgs
|
|
@optionalTypeArgs
|
|
TResult maybeMap<TResult extends Object?>({
|
|
TResult maybeMap<TResult extends Object?>({
|
|
- TResult Function(Initial value)? initial,
|
|
|
|
|
|
+ TResult Function(SetSelected value)? setIsSelected,
|
|
|
|
+ TResult Function(SetEditing value)? setIsEditing,
|
|
|
|
+ TResult Function(SetAction value)? setAction,
|
|
required TResult orElse(),
|
|
required TResult orElse(),
|
|
}) {
|
|
}) {
|
|
- if (initial != null) {
|
|
|
|
- return initial(this);
|
|
|
|
|
|
+ if (setAction != null) {
|
|
|
|
+ return setAction(this);
|
|
}
|
|
}
|
|
return orElse();
|
|
return orElse();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-abstract class Initial implements ViewEvent {
|
|
|
|
- const factory Initial() = _$Initial;
|
|
|
|
|
|
+abstract class SetAction implements ViewEvent {
|
|
|
|
+ const factory SetAction(Option<ViewAction> action) = _$SetAction;
|
|
|
|
+
|
|
|
|
+ Option<ViewAction> get action => throw _privateConstructorUsedError;
|
|
|
|
+ @JsonKey(ignore: true)
|
|
|
|
+ $SetActionCopyWith<SetAction> get copyWith =>
|
|
|
|
+ throw _privateConstructorUsedError;
|
|
}
|
|
}
|
|
|
|
|
|
/// @nodoc
|
|
/// @nodoc
|
|
@@ -149,12 +448,16 @@ class _$ViewStateTearOff {
|
|
const _$ViewStateTearOff();
|
|
const _$ViewStateTearOff();
|
|
|
|
|
|
_ViewState call(
|
|
_ViewState call(
|
|
- {required bool isLoading,
|
|
|
|
- required Option<View> view,
|
|
|
|
|
|
+ {required View view,
|
|
|
|
+ required bool isSelected,
|
|
|
|
+ required bool isEditing,
|
|
|
|
+ required Option<ViewAction> action,
|
|
required Either<Unit, WorkspaceError> successOrFailure}) {
|
|
required Either<Unit, WorkspaceError> successOrFailure}) {
|
|
return _ViewState(
|
|
return _ViewState(
|
|
- isLoading: isLoading,
|
|
|
|
view: view,
|
|
view: view,
|
|
|
|
+ isSelected: isSelected,
|
|
|
|
+ isEditing: isEditing,
|
|
|
|
+ action: action,
|
|
successOrFailure: successOrFailure,
|
|
successOrFailure: successOrFailure,
|
|
);
|
|
);
|
|
}
|
|
}
|
|
@@ -165,8 +468,10 @@ const $ViewState = _$ViewStateTearOff();
|
|
|
|
|
|
/// @nodoc
|
|
/// @nodoc
|
|
mixin _$ViewState {
|
|
mixin _$ViewState {
|
|
- bool get isLoading => throw _privateConstructorUsedError;
|
|
|
|
- Option<View> get view => throw _privateConstructorUsedError;
|
|
|
|
|
|
+ View get view => throw _privateConstructorUsedError;
|
|
|
|
+ bool get isSelected => throw _privateConstructorUsedError;
|
|
|
|
+ bool get isEditing => throw _privateConstructorUsedError;
|
|
|
|
+ Option<ViewAction> get action => throw _privateConstructorUsedError;
|
|
Either<Unit, WorkspaceError> get successOrFailure =>
|
|
Either<Unit, WorkspaceError> get successOrFailure =>
|
|
throw _privateConstructorUsedError;
|
|
throw _privateConstructorUsedError;
|
|
|
|
|
|
@@ -180,8 +485,10 @@ abstract class $ViewStateCopyWith<$Res> {
|
|
factory $ViewStateCopyWith(ViewState value, $Res Function(ViewState) then) =
|
|
factory $ViewStateCopyWith(ViewState value, $Res Function(ViewState) then) =
|
|
_$ViewStateCopyWithImpl<$Res>;
|
|
_$ViewStateCopyWithImpl<$Res>;
|
|
$Res call(
|
|
$Res call(
|
|
- {bool isLoading,
|
|
|
|
- Option<View> view,
|
|
|
|
|
|
+ {View view,
|
|
|
|
+ bool isSelected,
|
|
|
|
+ bool isEditing,
|
|
|
|
+ Option<ViewAction> action,
|
|
Either<Unit, WorkspaceError> successOrFailure});
|
|
Either<Unit, WorkspaceError> successOrFailure});
|
|
}
|
|
}
|
|
|
|
|
|
@@ -195,19 +502,29 @@ class _$ViewStateCopyWithImpl<$Res> implements $ViewStateCopyWith<$Res> {
|
|
|
|
|
|
@override
|
|
@override
|
|
$Res call({
|
|
$Res call({
|
|
- Object? isLoading = freezed,
|
|
|
|
Object? view = freezed,
|
|
Object? view = freezed,
|
|
|
|
+ Object? isSelected = freezed,
|
|
|
|
+ Object? isEditing = freezed,
|
|
|
|
+ Object? action = freezed,
|
|
Object? successOrFailure = freezed,
|
|
Object? successOrFailure = freezed,
|
|
}) {
|
|
}) {
|
|
return _then(_value.copyWith(
|
|
return _then(_value.copyWith(
|
|
- isLoading: isLoading == freezed
|
|
|
|
- ? _value.isLoading
|
|
|
|
- : isLoading // ignore: cast_nullable_to_non_nullable
|
|
|
|
- as bool,
|
|
|
|
view: view == freezed
|
|
view: view == freezed
|
|
? _value.view
|
|
? _value.view
|
|
: view // ignore: cast_nullable_to_non_nullable
|
|
: view // ignore: cast_nullable_to_non_nullable
|
|
- as Option<View>,
|
|
|
|
|
|
+ as View,
|
|
|
|
+ isSelected: isSelected == freezed
|
|
|
|
+ ? _value.isSelected
|
|
|
|
+ : isSelected // ignore: cast_nullable_to_non_nullable
|
|
|
|
+ as bool,
|
|
|
|
+ isEditing: isEditing == freezed
|
|
|
|
+ ? _value.isEditing
|
|
|
|
+ : isEditing // ignore: cast_nullable_to_non_nullable
|
|
|
|
+ as bool,
|
|
|
|
+ action: action == freezed
|
|
|
|
+ ? _value.action
|
|
|
|
+ : action // ignore: cast_nullable_to_non_nullable
|
|
|
|
+ as Option<ViewAction>,
|
|
successOrFailure: successOrFailure == freezed
|
|
successOrFailure: successOrFailure == freezed
|
|
? _value.successOrFailure
|
|
? _value.successOrFailure
|
|
: successOrFailure // ignore: cast_nullable_to_non_nullable
|
|
: successOrFailure // ignore: cast_nullable_to_non_nullable
|
|
@@ -223,8 +540,10 @@ abstract class _$ViewStateCopyWith<$Res> implements $ViewStateCopyWith<$Res> {
|
|
__$ViewStateCopyWithImpl<$Res>;
|
|
__$ViewStateCopyWithImpl<$Res>;
|
|
@override
|
|
@override
|
|
$Res call(
|
|
$Res call(
|
|
- {bool isLoading,
|
|
|
|
- Option<View> view,
|
|
|
|
|
|
+ {View view,
|
|
|
|
+ bool isSelected,
|
|
|
|
+ bool isEditing,
|
|
|
|
+ Option<ViewAction> action,
|
|
Either<Unit, WorkspaceError> successOrFailure});
|
|
Either<Unit, WorkspaceError> successOrFailure});
|
|
}
|
|
}
|
|
|
|
|
|
@@ -239,19 +558,29 @@ class __$ViewStateCopyWithImpl<$Res> extends _$ViewStateCopyWithImpl<$Res>
|
|
|
|
|
|
@override
|
|
@override
|
|
$Res call({
|
|
$Res call({
|
|
- Object? isLoading = freezed,
|
|
|
|
Object? view = freezed,
|
|
Object? view = freezed,
|
|
|
|
+ Object? isSelected = freezed,
|
|
|
|
+ Object? isEditing = freezed,
|
|
|
|
+ Object? action = freezed,
|
|
Object? successOrFailure = freezed,
|
|
Object? successOrFailure = freezed,
|
|
}) {
|
|
}) {
|
|
return _then(_ViewState(
|
|
return _then(_ViewState(
|
|
- isLoading: isLoading == freezed
|
|
|
|
- ? _value.isLoading
|
|
|
|
- : isLoading // ignore: cast_nullable_to_non_nullable
|
|
|
|
- as bool,
|
|
|
|
view: view == freezed
|
|
view: view == freezed
|
|
? _value.view
|
|
? _value.view
|
|
: view // ignore: cast_nullable_to_non_nullable
|
|
: view // ignore: cast_nullable_to_non_nullable
|
|
- as Option<View>,
|
|
|
|
|
|
+ as View,
|
|
|
|
+ isSelected: isSelected == freezed
|
|
|
|
+ ? _value.isSelected
|
|
|
|
+ : isSelected // ignore: cast_nullable_to_non_nullable
|
|
|
|
+ as bool,
|
|
|
|
+ isEditing: isEditing == freezed
|
|
|
|
+ ? _value.isEditing
|
|
|
|
+ : isEditing // ignore: cast_nullable_to_non_nullable
|
|
|
|
+ as bool,
|
|
|
|
+ action: action == freezed
|
|
|
|
+ ? _value.action
|
|
|
|
+ : action // ignore: cast_nullable_to_non_nullable
|
|
|
|
+ as Option<ViewAction>,
|
|
successOrFailure: successOrFailure == freezed
|
|
successOrFailure: successOrFailure == freezed
|
|
? _value.successOrFailure
|
|
? _value.successOrFailure
|
|
: successOrFailure // ignore: cast_nullable_to_non_nullable
|
|
: successOrFailure // ignore: cast_nullable_to_non_nullable
|
|
@@ -264,31 +593,42 @@ class __$ViewStateCopyWithImpl<$Res> extends _$ViewStateCopyWithImpl<$Res>
|
|
|
|
|
|
class _$_ViewState implements _ViewState {
|
|
class _$_ViewState implements _ViewState {
|
|
const _$_ViewState(
|
|
const _$_ViewState(
|
|
- {required this.isLoading,
|
|
|
|
- required this.view,
|
|
|
|
|
|
+ {required this.view,
|
|
|
|
+ required this.isSelected,
|
|
|
|
+ required this.isEditing,
|
|
|
|
+ required this.action,
|
|
required this.successOrFailure});
|
|
required this.successOrFailure});
|
|
|
|
|
|
@override
|
|
@override
|
|
- final bool isLoading;
|
|
|
|
|
|
+ final View view;
|
|
|
|
+ @override
|
|
|
|
+ final bool isSelected;
|
|
|
|
+ @override
|
|
|
|
+ final bool isEditing;
|
|
@override
|
|
@override
|
|
- final Option<View> view;
|
|
|
|
|
|
+ final Option<ViewAction> action;
|
|
@override
|
|
@override
|
|
final Either<Unit, WorkspaceError> successOrFailure;
|
|
final Either<Unit, WorkspaceError> successOrFailure;
|
|
|
|
|
|
@override
|
|
@override
|
|
String toString() {
|
|
String toString() {
|
|
- return 'ViewState(isLoading: $isLoading, view: $view, successOrFailure: $successOrFailure)';
|
|
|
|
|
|
+ return 'ViewState(view: $view, isSelected: $isSelected, isEditing: $isEditing, action: $action, successOrFailure: $successOrFailure)';
|
|
}
|
|
}
|
|
|
|
|
|
@override
|
|
@override
|
|
bool operator ==(dynamic other) {
|
|
bool operator ==(dynamic other) {
|
|
return identical(this, other) ||
|
|
return identical(this, other) ||
|
|
(other is _ViewState &&
|
|
(other is _ViewState &&
|
|
- (identical(other.isLoading, isLoading) ||
|
|
|
|
- const DeepCollectionEquality()
|
|
|
|
- .equals(other.isLoading, isLoading)) &&
|
|
|
|
(identical(other.view, view) ||
|
|
(identical(other.view, view) ||
|
|
const DeepCollectionEquality().equals(other.view, view)) &&
|
|
const DeepCollectionEquality().equals(other.view, view)) &&
|
|
|
|
+ (identical(other.isSelected, isSelected) ||
|
|
|
|
+ const DeepCollectionEquality()
|
|
|
|
+ .equals(other.isSelected, isSelected)) &&
|
|
|
|
+ (identical(other.isEditing, isEditing) ||
|
|
|
|
+ const DeepCollectionEquality()
|
|
|
|
+ .equals(other.isEditing, isEditing)) &&
|
|
|
|
+ (identical(other.action, action) ||
|
|
|
|
+ const DeepCollectionEquality().equals(other.action, action)) &&
|
|
(identical(other.successOrFailure, successOrFailure) ||
|
|
(identical(other.successOrFailure, successOrFailure) ||
|
|
const DeepCollectionEquality()
|
|
const DeepCollectionEquality()
|
|
.equals(other.successOrFailure, successOrFailure)));
|
|
.equals(other.successOrFailure, successOrFailure)));
|
|
@@ -297,8 +637,10 @@ class _$_ViewState implements _ViewState {
|
|
@override
|
|
@override
|
|
int get hashCode =>
|
|
int get hashCode =>
|
|
runtimeType.hashCode ^
|
|
runtimeType.hashCode ^
|
|
- const DeepCollectionEquality().hash(isLoading) ^
|
|
|
|
const DeepCollectionEquality().hash(view) ^
|
|
const DeepCollectionEquality().hash(view) ^
|
|
|
|
+ const DeepCollectionEquality().hash(isSelected) ^
|
|
|
|
+ const DeepCollectionEquality().hash(isEditing) ^
|
|
|
|
+ const DeepCollectionEquality().hash(action) ^
|
|
const DeepCollectionEquality().hash(successOrFailure);
|
|
const DeepCollectionEquality().hash(successOrFailure);
|
|
|
|
|
|
@JsonKey(ignore: true)
|
|
@JsonKey(ignore: true)
|
|
@@ -309,14 +651,20 @@ class _$_ViewState implements _ViewState {
|
|
|
|
|
|
abstract class _ViewState implements ViewState {
|
|
abstract class _ViewState implements ViewState {
|
|
const factory _ViewState(
|
|
const factory _ViewState(
|
|
- {required bool isLoading,
|
|
|
|
- required Option<View> view,
|
|
|
|
|
|
+ {required View view,
|
|
|
|
+ required bool isSelected,
|
|
|
|
+ required bool isEditing,
|
|
|
|
+ required Option<ViewAction> action,
|
|
required Either<Unit, WorkspaceError> successOrFailure}) = _$_ViewState;
|
|
required Either<Unit, WorkspaceError> successOrFailure}) = _$_ViewState;
|
|
|
|
|
|
@override
|
|
@override
|
|
- bool get isLoading => throw _privateConstructorUsedError;
|
|
|
|
|
|
+ View get view => throw _privateConstructorUsedError;
|
|
|
|
+ @override
|
|
|
|
+ bool get isSelected => throw _privateConstructorUsedError;
|
|
|
|
+ @override
|
|
|
|
+ bool get isEditing => throw _privateConstructorUsedError;
|
|
@override
|
|
@override
|
|
- Option<View> get view => throw _privateConstructorUsedError;
|
|
|
|
|
|
+ Option<ViewAction> get action => throw _privateConstructorUsedError;
|
|
@override
|
|
@override
|
|
Either<Unit, WorkspaceError> get successOrFailure =>
|
|
Either<Unit, WorkspaceError> get successOrFailure =>
|
|
throw _privateConstructorUsedError;
|
|
throw _privateConstructorUsedError;
|