From 485bfc2c41f27a4c56c4a270670beb7141d076c9 Mon Sep 17 00:00:00 2001 From: Alex Li Date: Sat, 22 Jun 2024 10:50:44 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Updates=20the=20capture=20action?= =?UTF-8?q?s=20section=20size=20to=20adapt=20small=20screens?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/src/states/camera_picker_state.dart | 26 ++++++------------------- 1 file changed, 6 insertions(+), 20 deletions(-) diff --git a/lib/src/states/camera_picker_state.dart b/lib/src/states/camera_picker_state.dart index 3bef32b..c65d54c 100644 --- a/lib/src/states/camera_picker_state.dart +++ b/lib/src/states/camera_picker_state.dart @@ -1282,8 +1282,9 @@ class CameraPickerState extends State return AnimatedOpacity( duration: recordDetectDuration, opacity: controller?.value.isRecordingVideo ?? false ? 0 : 1, - child: Padding( - padding: const EdgeInsets.all(20), + child: Container( + height: 48.0, + alignment: Alignment.center, child: Text( tips, style: const TextStyle(fontSize: 15), @@ -1333,6 +1334,8 @@ class CameraPickerState extends State 'orientation: $orientation', ); effectiveSize = fallbackSize; + } else if (effectiveSize < 124.0) { + effectiveSize = 124.0; } return SizedBox( @@ -1751,22 +1754,6 @@ class CameraPickerState extends State preview = Stack( children: [ preview, - Positioned.fill( - child: ExcludeSemantics( - child: RotatedBox( - quarterTurns: cameraQuarterTurns, - child: Align( - alignment: { - DeviceOrientation.portraitUp: Alignment.bottomCenter, - DeviceOrientation.portraitDown: Alignment.topCenter, - DeviceOrientation.landscapeLeft: Alignment.centerRight, - DeviceOrientation.landscapeRight: Alignment.centerLeft, - }[cameraValue.deviceOrientation]!, - child: buildCaptureTips(innerController), - ), - ), - ), - ), if (pickerConfig.enableSetExposure) buildExposureDetector(context, constraints), buildFocusingPoint( @@ -1843,8 +1830,7 @@ class CameraPickerState extends State child: buildSettingActions(context), ), const Spacer(), - if (enableScaledPreview) - ExcludeSemantics(child: buildCaptureTips(innerController)), + ExcludeSemantics(child: buildCaptureTips(innerController)), Semantics( sortKey: const OrdinalSortKey(2), hidden: innerController == null,