Skip to content

Commit

Permalink
fix(mobile): native dialog location (#14730)
Browse files Browse the repository at this point in the history
  • Loading branch information
alextran1502 authored Dec 16, 2024
1 parent 95f300f commit c7b44be
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions mobile/lib/services/share.service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c7b44be

Please sign in to comment.