From 085dc6cd93eda5ab2af87b252af84a77ba235a55 Mon Sep 17 00:00:00 2001 From: shenlong <139912620+shenlong-tanwen@users.noreply.github.com> Date: Mon, 18 Dec 2023 17:22:06 +0000 Subject: [PATCH] fix(mobile): use safe area for gallery_viewer bottom sheet (#5831) Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> --- .../modules/asset_viewer/views/gallery_viewer.dart | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart b/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart index 023a7c8dd4372..007300a32887a 100644 --- a/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart +++ b/mobile/lib/modules/asset_viewer/views/gallery_viewer.dart @@ -179,18 +179,18 @@ class GalleryViewerPage extends HookConsumerWidget { barrierColor: Colors.transparent, backgroundColor: Colors.transparent, isScrollControlled: true, + useSafeArea: true, context: context, builder: (context) { - if (ref - .watch(appSettingsServiceProvider) - .getSetting(AppSettingsEnum.advancedTroubleshooting)) { - return AdvancedBottomSheet(assetDetail: asset()); - } return Padding( padding: EdgeInsets.only( - bottom: MediaQuery.of(context).viewInsets.bottom, + bottom: MediaQuery.viewInsetsOf(context).bottom, ), - child: ExifBottomSheet(asset: asset()), + child: ref + .watch(appSettingsServiceProvider) + .getSetting(AppSettingsEnum.advancedTroubleshooting) + ? AdvancedBottomSheet(assetDetail: asset()) + : ExifBottomSheet(asset: asset()), ); }, );