forked from eatvio/eatvio_app
New screen names
This commit is contained in:
18
lib/theme/bloc/theme_bloc.dart
Normal file
18
lib/theme/bloc/theme_bloc.dart
Normal file
@@ -0,0 +1,18 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import '../../core/app_export.dart';
|
||||
part 'theme_event.dart';
|
||||
part 'theme_state.dart';
|
||||
|
||||
class ThemeBloc extends Bloc<ThemeEvent, ThemeState> {
|
||||
ThemeBloc(ThemeState initialState) : super(initialState) {
|
||||
on<ThemeChangeEvent>(_changeTheme);
|
||||
}
|
||||
|
||||
_changeTheme(
|
||||
ThemeChangeEvent event,
|
||||
Emitter<ThemeState> emit,
|
||||
) async {
|
||||
emit(state.copyWith(themeType: event.themeType));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user