diff --git a/lib/widgets/posts/post_action.dart b/lib/widgets/posts/post_action.dart index 27201e3..6899cc5 100644 --- a/lib/widgets/posts/post_action.dart +++ b/lib/widgets/posts/post_action.dart @@ -115,8 +115,16 @@ class _PostActionState extends State { ).create(); await imageFile.writeAsBytes(image); + final box = context.findRenderObject() as RenderBox?; + final file = XFile(imageFile.path); - await Share.shareXFiles([file]); + await Share.shareXFiles( + [file], + subject: 'postShareSubject'.trParams({ + 'username': widget.item.author.nick, + }), + sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size, + ); await imageFile.delete(); } diff --git a/lib/widgets/posts/post_share.dart b/lib/widgets/posts/post_share.dart index 896755c..693faf1 100644 --- a/lib/widgets/posts/post_share.dart +++ b/lib/widgets/posts/post_share.dart @@ -34,7 +34,7 @@ class PostShareImage extends StatelessWidget { isNonScrollAttachment: true, padding: const EdgeInsets.symmetric( horizontal: 4, - vertical: 8, + vertical: 16, ), onComment: () {}, ),