Added components to article
This commit is contained in:
@ -51,6 +51,7 @@ class CarsBloc extends Bloc<CarEvents, CarsState> {
|
||||
Future<void> _carAdd(CarAdd event, Emitter<CarsState> emit) async {
|
||||
final currentState = state;
|
||||
|
||||
opBloc.add(StartOperation());
|
||||
try {
|
||||
Car newCar = await repository.add(event.teamId, event.plate);
|
||||
|
||||
@ -71,6 +72,7 @@ class CarsBloc extends Bloc<CarEvents, CarsState> {
|
||||
Future<void> _carEdit(CarEdit event, Emitter<CarsState> emit) async {
|
||||
final currentState = state;
|
||||
|
||||
opBloc.add(StartOperation());
|
||||
try {
|
||||
await repository.edit(event.teamId, event.newCar);
|
||||
|
||||
@ -98,6 +100,7 @@ class CarsBloc extends Bloc<CarEvents, CarsState> {
|
||||
Future<void> _carDelete(CarDelete event, Emitter<CarsState> emit) async {
|
||||
final currentState = state;
|
||||
|
||||
opBloc.add(StartOperation());
|
||||
try {
|
||||
await repository.delete(event.carId, event.teamId);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user