fix(app): lock capture page portrait; gate zoom badge on 2 pointers; drop dead getter
- MainActivity locked to portrait: the capture page top bar / bottom controls and the preview aspect swap all assume portrait; landscape misaligns the preview ratio and control layers. - Zoom badge now requires details.pointerCount >= 2 on onScaleStart so a single stationary tap no longer pops a 1.0x badge for 1s; base-zoom rebasing stays unconditional (single-finger-into-pinch still resumes from the current level). - Removed unused CameraPluginSource.currentZoom getter. Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
@@ -139,9 +139,6 @@ class CameraPluginSource extends CaptureSource {
|
||||
_zoomLevel = clamped;
|
||||
}
|
||||
|
||||
/// 当前变焦倍数(最近一次硬件同步值)。
|
||||
double get currentZoom => _zoomLevel;
|
||||
|
||||
@override
|
||||
bool get supportsFlash => true;
|
||||
|
||||
@@ -377,7 +374,10 @@ class _CapturePageState extends ConsumerState<CapturePage>
|
||||
_pinchBaseZoom = _lastSentZoom
|
||||
.clamp(source.minZoom, source.maxZoom)
|
||||
.toDouble();
|
||||
_showZoomBadge(_pinchBaseZoom!);
|
||||
// 单指轻点同样触发 onScaleStart——倍数徽标仅在真捏合(≥2 指)时显示,
|
||||
// 避免轻点预览也弹 1.0×;基线重定保持无条件(单指转捏合、抬起再捏合
|
||||
// 均从当前倍数续接)。
|
||||
if (details.pointerCount >= 2) _showZoomBadge(_pinchBaseZoom!);
|
||||
}
|
||||
|
||||
void _onPinchUpdate(ScaleUpdateDetails details) {
|
||||
|
||||
Reference in New Issue
Block a user