From c56ad3d811037697fe0f6034d990b8b5c006c88b Mon Sep 17 00:00:00 2001 From: Alex Li Date: Sun, 12 May 2024 16:58:20 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20Improve=20paddings=20of=20the=20?= =?UTF-8?q?heading=20actions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../states/camera_picker_viewer_state.dart | 55 ++++++++++--------- 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/lib/src/states/camera_picker_viewer_state.dart b/lib/src/states/camera_picker_viewer_state.dart index 395934e..f68f3a6 100644 --- a/lib/src/states/camera_picker_viewer_state.dart +++ b/lib/src/states/camera_picker_viewer_state.dart @@ -201,32 +201,29 @@ class CameraPickerViewerState extends State { Widget buildBackButton(BuildContext context) { return Semantics( sortKey: const OrdinalSortKey(0), - child: Padding( - padding: const EdgeInsets.all(10), - child: IconButton( - onPressed: () { - if (isSavingEntity) { - return; - } - if (previewFile.existsSync()) { - previewFile.delete(); - } - Navigator.of(context).pop(); - }, - padding: EdgeInsets.zero, - constraints: BoxConstraints.tight(const Size.square(28)), - tooltip: MaterialLocalizations.of(context).backButtonTooltip, - iconSize: 18, - icon: Container( - padding: const EdgeInsets.all(5), - decoration: const BoxDecoration( - color: Colors.white, - shape: BoxShape.circle, - ), - child: const Icon( - Icons.keyboard_return_rounded, - color: Colors.black, - ), + child: IconButton( + onPressed: () { + if (isSavingEntity) { + return; + } + if (previewFile.existsSync()) { + previewFile.delete(); + } + Navigator.of(context).pop(); + }, + padding: EdgeInsets.zero, + constraints: BoxConstraints.tight(const Size.square(28)), + tooltip: MaterialLocalizations.of(context).backButtonTooltip, + iconSize: 18, + icon: Container( + padding: const EdgeInsets.all(5), + decoration: const BoxDecoration( + color: Colors.white, + shape: BoxShape.circle, + ), + child: const Icon( + Icons.keyboard_return_rounded, + color: Colors.black, ), ), ), @@ -322,7 +319,11 @@ class CameraPickerViewerState extends State { Widget buildForeground(BuildContext context) { return SafeArea( child: Padding( - padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 20), + padding: const EdgeInsetsDirectional.only( + start: 12.0, + end: 12.0, + bottom: 12.0, + ), child: Column( mainAxisAlignment: MainAxisAlignment.spaceBetween, children: [