一次大的提交
This commit is contained in:
@@ -1070,4 +1070,28 @@ class RemoteControlCubit extends Cubit<RemoteControlState> {
|
||||
debugPrint('🗑️ [RemoteControl] 缓存已清空 - voltage, battery, controlMode, ping');
|
||||
}
|
||||
|
||||
/// 🔥 退出登录时清空所有状态(比 _clearAllCache 更彻底,重置全部 state 字段)
|
||||
void clearAll() {
|
||||
_timer?.cancel();
|
||||
_timer = null;
|
||||
|
||||
_cacheVoltage = null;
|
||||
_cacheBattery = null;
|
||||
_cacheCtrlMode = null;
|
||||
_cachePing = null;
|
||||
_lastUiUpdateTime = null;
|
||||
_lastStatusPushTime = null;
|
||||
_currentOriginX = 0;
|
||||
_currentOriginY = 0;
|
||||
|
||||
if (!isClosed) {
|
||||
emit(RemoteControlState(
|
||||
controlEntity: MachineControlStatusEntity(),
|
||||
runningStatusModel: RunningStatusModel(),
|
||||
));
|
||||
}
|
||||
|
||||
debugPrint('🗑️ [RemoteControl] clearAll - 所有状态已重置为初始值');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -119,8 +119,6 @@ class _RightJoystickAreaState extends State<RightJoystickArea> {
|
||||
}
|
||||
|
||||
void _triggerVibration() {
|
||||
Vibration.hasVibrator().then((has) {
|
||||
if (has ?? false) Vibration.vibrate(duration: 12);
|
||||
});
|
||||
Vibration.vibrate(duration: 12);
|
||||
}
|
||||
}
|
||||
@@ -171,6 +171,14 @@ class _WebRTCLocalPlayerState extends State<WebRTCLocalPlayer> {
|
||||
Widget _buildQuadrantView({required Alignment alignment}) {
|
||||
if (_renderer.srcObject == null) return Container(color: Colors.black);
|
||||
|
||||
// 🔥 俯视(center):显示完整视频帧,不做2倍裁剪
|
||||
if (alignment == Alignment.center) {
|
||||
return RepaintBoundary(
|
||||
child: RTCVideoView(_renderer, objectFit: RTCVideoViewObjectFit.RTCVideoViewObjectFitCover, mirror: false),
|
||||
);
|
||||
}
|
||||
|
||||
// 前/后/左/右:2倍放大后裁剪对应象限
|
||||
return RepaintBoundary(
|
||||
child: ClipRect(
|
||||
child: FractionallySizedBox(
|
||||
|
||||
Reference in New Issue
Block a user