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

26 lines
549 B
Dart
Raw Normal View History

2021-08-08 23:16:54 +02:00
part of 'theme_bloc.dart';
@immutable
abstract class ThemeState {
final bool prefsAreLoaded;
const ThemeState(this.prefsAreLoaded);
AppTheme get theme;
}
class LightThemeState extends ThemeState {
final bool prefsAreLoaded;
const LightThemeState({this.prefsAreLoaded = false}) : super(prefsAreLoaded);
AppTheme get theme => LightTheme();
}
class DarkThemeState extends ThemeState {
final bool prefsAreLoaded;
const DarkThemeState({this.prefsAreLoaded = false}) : super(prefsAreLoaded);
AppTheme get theme => DarkTheme();
}