From c7b44bef81970db2d18120a9a39d969496ddb92b Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 16 Dec 2024 14:26:52 -0600 Subject: [PATCH] fix(mobile): native dialog location (#14730) --- mobile/lib/services/share.service.dart | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/mobile/lib/services/share.service.dart b/mobile/lib/services/share.service.dart index 40a2e0402b..d44d75931d 100644 --- a/mobile/lib/services/share.service.dart +++ b/mobile/lib/services/share.service.dart @@ -64,10 +64,13 @@ class ShareService { ); } - final box = context.findRenderObject() as RenderBox?; + final size = MediaQuery.of(context).size; Share.shareXFiles( downloadedXFiles, - sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size, + sharePositionOrigin: Rect.fromPoints( + Offset.zero, + Offset(size.width / 3, size.height), + ), ); return true; } catch (error) {