This commit is contained in:
2026-04-08 10:53:03 +02:00
parent 14e881ced5
commit 57f5bcf467
3 changed files with 64 additions and 0 deletions

17
lib/theme/theme_bloc.dart Normal file
View File

@@ -0,0 +1,17 @@
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:equatable/equatable.dart';
part 'theme_events.dart';
part 'theme_state.dart';
class ThemeBloc extends Bloc<ThemeEvent, ThemeState> {
final AppTheme initialAppTheme;
ThemeBloc({required this.initialAppTheme})
: super(
ThemeState(status: ThemeStatus.success, appTheme: initialAppTheme),
) {
on<ChangeThemeEvent>((event, emit) async {
emit(state.copyWith(appTheme: event.appTheme));
});
}
}