fix: Sharing on iOS and iPad
This commit is contained in:
parent
020701b42a
commit
1c7b6a4953
5 changed files with 18 additions and 5 deletions
|
|
@ -25,7 +25,11 @@ extension MatrixFileExtension on MatrixFile {
|
|||
final tmpDirectory = await getTemporaryDirectory();
|
||||
final path = '${tmpDirectory.path}$fileName';
|
||||
await File(path).writeAsBytes(bytes);
|
||||
await Share.shareFiles([path]);
|
||||
final box = context.findRenderObject() as RenderBox;
|
||||
await Share.shareFiles(
|
||||
[path],
|
||||
sharePositionOrigin: box.localToGlobal(Offset.zero) & box.size,
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue