This commit is contained in:
2026-04-04 19:25:55 +02:00
parent c91415b8b3
commit 0347a354ef
13 changed files with 377 additions and 113 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));
});
}
}