Skip to content

Commit

Permalink
💄 Updates the capture actions section size to adapt small screens
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexV525 committed Jun 22, 2024
1 parent 480c385 commit 485bfc2
Showing 1 changed file with 6 additions and 20 deletions.
26 changes: 6 additions & 20 deletions lib/src/states/camera_picker_state.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1282,8 +1282,9 @@ class CameraPickerState extends State<CameraPicker>
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),
Expand Down Expand Up @@ -1333,6 +1334,8 @@ class CameraPickerState extends State<CameraPicker>
'orientation: $orientation',
);
effectiveSize = fallbackSize;
} else if (effectiveSize < 124.0) {
effectiveSize = 124.0;
}

return SizedBox(
Expand Down Expand Up @@ -1751,22 +1754,6 @@ class CameraPickerState extends State<CameraPicker>
preview = Stack(
children: <Widget>[
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(
Expand Down Expand Up @@ -1843,8 +1830,7 @@ class CameraPickerState extends State<CameraPicker>
child: buildSettingActions(context),
),
const Spacer(),
if (enableScaledPreview)
ExcludeSemantics(child: buildCaptureTips(innerController)),
ExcludeSemantics(child: buildCaptureTips(innerController)),
Semantics(
sortKey: const OrdinalSortKey(2),
hidden: innerController == null,
Expand Down

0 comments on commit 485bfc2

Please sign in to comment.