修复电量的取数据和展示

This commit is contained in:
2026-03-25 08:48:32 +08:00
parent 8772b1cb43
commit 59912b76fd

View File

@@ -76,7 +76,7 @@ class RemoteControlCubit extends Cubit<RemoteControlState> {
emit(state.copyWith(
runningStatusModel: newStatus,
voltage:int.tryParse(newStatus.voltage) ?? 0,
battery: int.tryParse(newStatus.voltage) ?? 0,
battery: int.tryParse(newStatus.battery) ?? 0,
// 如果需要同步其他字段,在这里添加
// controlMode: newStatus.controlMode,
));
@@ -238,8 +238,7 @@ class RemoteControlCubit extends Cubit<RemoteControlState> {
}
void toggleLeftPip() => emit(state.copyWith(showLeftPip: !state.showLeftPip));
void toggleRightPip() =>
emit(state.copyWith(showRightPip: !state.showRightPip));
void toggleRightPip() => emit(state.copyWith(showRightPip: !state.showRightPip));
@override
Future<void> close() {