selfprivacy.org.app/lib/logic/cubit/backups/backups_state.dart

50 lines
1.4 KiB
Dart
Raw Normal View History

2021-12-06 18:31:19 +00:00
part of 'backups_cubit.dart';
class BackupsState extends ServerInstallationDependendState {
2021-12-06 18:31:19 +00:00
const BackupsState({
this.isInitialized = false,
this.backups = const [],
this.preventActions = true,
this.refreshTimer = const Duration(seconds: 60),
this.refreshing = true,
2023-06-29 09:52:09 +00:00
this.autobackupPeriod,
this.backblazeBucket,
2021-12-06 18:31:19 +00:00
});
final bool isInitialized;
final List<Backup> backups;
final bool preventActions;
final Duration refreshTimer;
final bool refreshing;
2023-06-29 09:52:09 +00:00
final Duration? autobackupPeriod;
final BackblazeBucket? backblazeBucket;
2021-12-06 18:31:19 +00:00
@override
List<Object> get props => [
isInitialized,
backups,
preventActions,
refreshTimer,
refreshing
];
BackupsState copyWith({
2022-06-05 19:36:32 +00:00
final bool? isInitialized,
final List<Backup>? backups,
final bool? preventActions,
final Duration? refreshTimer,
final bool? refreshing,
2023-06-29 09:52:09 +00:00
final Duration? autobackupPeriod,
final BackblazeBucket? backblazeBucket,
2021-12-06 18:31:19 +00:00
}) =>
BackupsState(
isInitialized: isInitialized ?? this.isInitialized,
backups: backups ?? this.backups,
preventActions: preventActions ?? this.preventActions,
refreshTimer: refreshTimer ?? this.refreshTimer,
refreshing: refreshing ?? this.refreshing,
2023-06-29 09:52:09 +00:00
autobackupPeriod: autobackupPeriod ?? this.autobackupPeriod,
backblazeBucket: backblazeBucket ?? this.backblazeBucket,
2021-12-06 18:31:19 +00:00
);
}