From 59912b76fd1d53bbda6a037544ba44b1b3e718e1 Mon Sep 17 00:00:00 2001 From: Songzex <2402265378@qq.com> Date: Wed, 25 Mar 2026 08:48:32 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=94=B5=E9=87=8F=E7=9A=84?= =?UTF-8?q?=E5=8F=96=E6=95=B0=E6=8D=AE=E5=92=8C=E5=B1=95=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../presentation/bloc/remote_control_cubit.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/features/remote_control/presentation/bloc/remote_control_cubit.dart b/lib/features/remote_control/presentation/bloc/remote_control_cubit.dart index 6b9f1474..b5cca598 100644 --- a/lib/features/remote_control/presentation/bloc/remote_control_cubit.dart +++ b/lib/features/remote_control/presentation/bloc/remote_control_cubit.dart @@ -76,7 +76,7 @@ class RemoteControlCubit extends Cubit { 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 { } 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 close() {