selfprivacy.org.app/lib/logic/cubit/provider_volumes/provider_volume_state.dart

28 lines
812 B
Dart
Raw Normal View History

2022-08-24 23:45:02 +00:00
part of 'provider_volume_cubit.dart';
class ApiProviderVolumeState extends ServerInstallationDependendState {
2022-09-18 22:11:26 +00:00
const ApiProviderVolumeState(this._volumes, this.status, this.isResizing);
2022-08-24 23:45:02 +00:00
const ApiProviderVolumeState.initial()
2022-09-18 22:11:26 +00:00
: this(const [], LoadingStatus.uninitialized, false);
final List<ServerProviderVolume> _volumes;
2022-08-24 23:45:02 +00:00
final LoadingStatus status;
2022-09-18 22:11:26 +00:00
final bool isResizing;
2022-08-24 23:45:02 +00:00
List<ServerProviderVolume> get volumes => _volumes;
2022-08-24 23:45:02 +00:00
ApiProviderVolumeState copyWith({
final List<ServerProviderVolume>? volumes,
2022-08-24 23:45:02 +00:00
final LoadingStatus? status,
2022-09-18 22:11:26 +00:00
final bool? isResizing,
2022-08-24 23:45:02 +00:00
}) =>
ApiProviderVolumeState(
volumes ?? _volumes,
status ?? this.status,
2022-09-18 22:11:26 +00:00
isResizing ?? this.isResizing,
2022-08-24 23:45:02 +00:00
);
@override
2022-09-18 23:13:25 +00:00
List<Object?> get props => [_volumes, status, isResizing];
2022-08-24 23:45:02 +00:00
}