2021-12-06 18:31:19 +00:00
|
|
|
part of 'backups_cubit.dart';
|
|
|
|
|
2022-05-17 13:31:34 +00:00
|
|
|
class BackupsState extends ServerInstallationDependendState {
|
2021-12-06 18:31:19 +00:00
|
|
|
const BackupsState({
|
|
|
|
this.isInitialized = false,
|
|
|
|
this.backups = const [],
|
|
|
|
this.progress = 0.0,
|
|
|
|
this.status = BackupStatusEnum.noKey,
|
|
|
|
this.preventActions = true,
|
2022-05-24 18:55:39 +00:00
|
|
|
this.error = '',
|
2021-12-06 18:31:19 +00:00
|
|
|
this.refreshTimer = const Duration(seconds: 60),
|
|
|
|
this.refreshing = true,
|
|
|
|
});
|
|
|
|
|
|
|
|
final bool isInitialized;
|
|
|
|
final List<Backup> backups;
|
|
|
|
final double progress;
|
|
|
|
final BackupStatusEnum status;
|
|
|
|
final bool preventActions;
|
|
|
|
final String error;
|
|
|
|
final Duration refreshTimer;
|
|
|
|
final bool refreshing;
|
|
|
|
|
|
|
|
@override
|
|
|
|
List<Object> get props => [
|
|
|
|
isInitialized,
|
|
|
|
backups,
|
|
|
|
progress,
|
|
|
|
preventActions,
|
|
|
|
status,
|
|
|
|
error,
|
|
|
|
refreshTimer,
|
|
|
|
refreshing
|
|
|
|
];
|
|
|
|
|
|
|
|
BackupsState copyWith({
|
2022-06-05 19:36:32 +00:00
|
|
|
final bool? isInitialized,
|
|
|
|
final List<Backup>? backups,
|
|
|
|
final double? progress,
|
|
|
|
final BackupStatusEnum? status,
|
|
|
|
final bool? preventActions,
|
|
|
|
final String? error,
|
|
|
|
final Duration? refreshTimer,
|
|
|
|
final bool? refreshing,
|
2021-12-06 18:31:19 +00:00
|
|
|
}) =>
|
|
|
|
BackupsState(
|
|
|
|
isInitialized: isInitialized ?? this.isInitialized,
|
|
|
|
backups: backups ?? this.backups,
|
|
|
|
progress: progress ?? this.progress,
|
|
|
|
status: status ?? this.status,
|
|
|
|
preventActions: preventActions ?? this.preventActions,
|
|
|
|
error: error ?? this.error,
|
|
|
|
refreshTimer: refreshTimer ?? this.refreshTimer,
|
|
|
|
refreshing: refreshing ?? this.refreshing,
|
|
|
|
);
|
|
|
|
}
|