formatted PowerClampInfoBloc.

This commit is contained in:
Faris Armoush
2025-05-06 09:09:27 +03:00
parent d89e227599
commit 7e37aed026

View File

@ -44,12 +44,12 @@ class PowerClampInfoBloc extends Bloc<PowerClampInfoEvent, PowerClampInfoState>
UpdatePowerClampStatusEvent event, UpdatePowerClampStatusEvent event,
Emitter<PowerClampInfoState> emit, Emitter<PowerClampInfoState> emit,
) async { ) async {
final currentModel = state.powerClampModel; final currentModel = state.powerClampModel;
if (currentModel == null) return; if (currentModel == null) return;
final updatedStatus = PowerStatus.fromStatusList(event.statusList); final updatedStatus = PowerStatus.fromStatusList(event.statusList);
final updatedModel = currentModel.copyWith(statusPower: updatedStatus); final updatedModel = currentModel.copyWith(statusPower: updatedStatus);
emit(state.copyWith(powerClampModel: updatedModel)); emit(state.copyWith(powerClampModel: updatedModel));
} }
} }