nc-photos/app/lib/widget/settings/theme/state_event.dart

66 lines
1.1 KiB
Dart
Raw Normal View History

2023-05-28 19:11:34 +02:00
part of '../theme_settings.dart';
@genCopyWith
@toString
class _State {
const _State({
required this.isFollowSystemTheme,
required this.isUseBlackInDarkTheme,
required this.seedColor,
this.error,
2023-05-28 19:11:34 +02:00
});
@override
String toString() => _$toString();
final bool isFollowSystemTheme;
final bool isUseBlackInDarkTheme;
// workaround analyzer bug where Color type can't be recognized
final int? seedColor;
final ExceptionEvent? error;
2023-05-28 19:11:34 +02:00
}
abstract class _Event {
const _Event();
}
@toString
class _Init implements _Event {
const _Init();
@override
String toString() => _$toString();
}
2023-05-28 19:11:34 +02:00
@toString
class _SetFollowSystemTheme extends _Event {
const _SetFollowSystemTheme(this.value);
@override
String toString() => _$toString();
final bool value;
}
@toString
class _SetUseBlackInDarkTheme extends _Event {
const _SetUseBlackInDarkTheme(this.value, this.theme);
@override
String toString() => _$toString();
final bool value;
final ThemeData theme;
}
@toString
class _SetSeedColor extends _Event {
const _SetSeedColor(this.value);
@override
String toString() => _$toString();
final Color? value;
2023-05-28 19:11:34 +02:00
}