mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +00:00
formatted PowerClampInfoBloc
.
This commit is contained in:
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user