🐛 Fix share as image on iPad
This commit is contained in:
parent
0b8a5a3303
commit
8bbd964026
@ -115,8 +115,16 @@ class _PostActionState extends State<PostAction> {
|
||||
).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();
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ class PostShareImage extends StatelessWidget {
|
||||
isNonScrollAttachment: true,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
horizontal: 4,
|
||||
vertical: 8,
|
||||
vertical: 16,
|
||||
),
|
||||
onComment: () {},
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user