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