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() {