Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

[mob][photos] Fix safe area issue in image editor

ashilkndcc5cb9beeb2
diff --git a/mobile/lib/ui/tools/editor/image_editor_page.dart b/mobile/lib/ui/tools/editor/image_editor_page.dart
index 455cd9443a..2ef93601f2 100644
--- a/mobile/lib/ui/tools/editor/image_editor_page.dart
+++ b/mobile/lib/ui/tools/editor/image_editor_page.dart
@@ -40,8 +40,8 @@ class ImageEditorPage extends StatefulWidget {
this.imageProvider,
this.originalFile,
this.detailPageConfig, {
- Key? key,
- }) : super(key: key);
+ super.key,
+ });
@override
State<ImageEditorPage> createState() => _ImageEditorPageState();
@@ -105,7 +105,7 @@ class _ImageEditorPageState extends State<ImageEditorPage> {
],
),
const Padding(padding: EdgeInsets.all(8)),
- _buildBottomBar(),
+ SafeArea(child: _buildBottomBar()),
Padding(padding: EdgeInsets.all(Platform.isIOS ? 16 : 6)),
],
),
@@ -338,10 +338,14 @@ class _ImageEditorPageState extends State<ImageEditorPage> {
showToast(context, S.of(context).somethingWentWrong);
return;
}
- _logger.info('Size before compression = ${result.length}');
-
+ _logger.info('Size before compression = ${result.length}');
+
final ui.Image decodedResult = await decodeImageFromList(result);
- result = await FlutterImageCompress.compressWithList(result, minWidth: decodedResult.width, minHeight: decodedResult.height);
+ result = await FlutterImageCompress.compressWithList(
+ result,
+ minWidth: decodedResult.width,
+ minHeight: decodedResult.height,
+ );
_logger.info('Size after compression = ${result.length}');
final Duration diff = DateTime.now().difference(start);
_logger.info('image_editor time : $diff');