Jisho-Study-Tool/lib/bloc/theme/theme_state.dart

23 lines
359 B
Dart
Raw Permalink Normal View History

2021-08-08 23:16:54 +02:00
part of 'theme_bloc.dart';
@immutable
abstract class ThemeState {
2021-12-06 20:26:52 +01:00
const ThemeState();
2021-08-08 23:16:54 +02:00
AppTheme get theme;
}
class LightThemeState extends ThemeState {
2021-12-06 20:26:52 +01:00
const LightThemeState();
2021-08-08 23:16:54 +02:00
2021-12-01 23:09:53 +01:00
@override
2021-08-08 23:16:54 +02:00
AppTheme get theme => LightTheme();
}
class DarkThemeState extends ThemeState {
2021-12-06 20:26:52 +01:00
const DarkThemeState();
2021-08-08 23:16:54 +02:00
2021-12-01 23:09:53 +01:00
@override
2021-08-08 23:16:54 +02:00
AppTheme get theme => DarkTheme();
2021-12-01 23:09:53 +01:00
}