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,
Emitter<PowerClampInfoState> emit,
) async {
final currentModel = state.powerClampModel;
if (currentModel == null) return;
final currentModel = state.powerClampModel;
if (currentModel == null) return;
final updatedStatus = PowerStatus.fromStatusList(event.statusList);
final updatedModel = currentModel.copyWith(statusPower: updatedStatus);
final updatedStatus = PowerStatus.fromStatusList(event.statusList);
final updatedModel = currentModel.copyWith(statusPower: updatedStatus);
emit(state.copyWith(powerClampModel: updatedModel));
}
emit(state.copyWith(powerClampModel: updatedModel));
}
}