selfprivacy.org.app/lib/logic/cubit/app_settings/app_settings_state.dart

31 lines
914 B
Dart
Raw Normal View History

2020-12-08 19:26:51 +00:00
part of 'app_settings_cubit.dart';
class AppSettingsState extends Equatable {
const AppSettingsState({
2021-03-15 15:39:44 +00:00
required this.isDarkModeOn,
required this.isOnboardingShowing,
this.corePalette,
2020-12-08 19:26:51 +00:00
});
final bool isDarkModeOn;
final bool isOnboardingShowing;
final color_utils.CorePalette? corePalette;
2021-01-06 17:35:57 +00:00
AppSettingsState copyWith({
final bool? isDarkModeOn,
final bool? isOnboardingShowing,
final color_utils.CorePalette? corePalette,
}) =>
2021-01-06 17:35:57 +00:00
AppSettingsState(
isDarkModeOn: isDarkModeOn ?? this.isDarkModeOn,
isOnboardingShowing: isOnboardingShowing ?? this.isOnboardingShowing,
corePalette: corePalette ?? this.corePalette,
2021-01-06 17:35:57 +00:00
);
2020-12-08 19:26:51 +00:00
color_utils.CorePalette get corePaletteOrDefault =>
corePalette ?? color_utils.CorePalette.of(BrandColors.primary.value);
2020-12-08 19:26:51 +00:00
@override
List<dynamic> get props => [isDarkModeOn, isOnboardingShowing, corePalette];
2020-12-08 19:26:51 +00:00
}