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,
|
2023-02-23 14:41:45 +00:00
|
|
|
required this.isAutoDarkModeOn,
|
2022-05-17 20:08:28 +00:00
|
|
|
required this.isOnboardingShowing,
|
2022-12-31 04:16:10 +00:00
|
|
|
this.corePalette,
|
2020-12-08 19:26:51 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
final bool isDarkModeOn;
|
2023-02-23 14:41:45 +00:00
|
|
|
final bool isAutoDarkModeOn;
|
2022-05-17 20:08:28 +00:00
|
|
|
final bool isOnboardingShowing;
|
2022-12-31 04:16:10 +00:00
|
|
|
final color_utils.CorePalette? corePalette;
|
2021-01-06 17:35:57 +00:00
|
|
|
|
2022-06-05 22:40:34 +00:00
|
|
|
AppSettingsState copyWith({
|
|
|
|
final bool? isDarkModeOn,
|
2023-02-23 14:41:45 +00:00
|
|
|
final bool? isAutoDarkModeOn,
|
2022-06-05 22:40:34 +00:00
|
|
|
final bool? isOnboardingShowing,
|
2022-12-31 04:16:10 +00:00
|
|
|
final color_utils.CorePalette? corePalette,
|
2022-06-05 22:40:34 +00:00
|
|
|
}) =>
|
2021-01-06 17:35:57 +00:00
|
|
|
AppSettingsState(
|
|
|
|
isDarkModeOn: isDarkModeOn ?? this.isDarkModeOn,
|
2023-02-23 14:41:45 +00:00
|
|
|
isAutoDarkModeOn: isAutoDarkModeOn ?? this.isAutoDarkModeOn,
|
2022-05-17 20:08:28 +00:00
|
|
|
isOnboardingShowing: isOnboardingShowing ?? this.isOnboardingShowing,
|
2022-12-31 04:16:10 +00:00
|
|
|
corePalette: corePalette ?? this.corePalette,
|
2021-01-06 17:35:57 +00:00
|
|
|
);
|
2020-12-08 19:26:51 +00:00
|
|
|
|
2022-12-31 04:16:10 +00:00
|
|
|
color_utils.CorePalette get corePaletteOrDefault =>
|
|
|
|
corePalette ?? color_utils.CorePalette.of(BrandColors.primary.value);
|
|
|
|
|
2020-12-08 19:26:51 +00:00
|
|
|
@override
|
2023-02-23 14:41:45 +00:00
|
|
|
List<dynamic> get props =>
|
|
|
|
[isDarkModeOn, isAutoDarkModeOn, isOnboardingShowing, corePalette];
|
2020-12-08 19:26:51 +00:00
|
|
|
}
|