fix: Sharing on iOS and iPad

This commit is contained in:
Christian Pauly 2022-06-15 13:00:12 +02:00
commit 1c7b6a4953
5 changed files with 18 additions and 5 deletions

View file

@ -121,7 +121,12 @@ class _BootstrapDialogState extends State<BootstrapDialog> {
icon: const Icon(Icons.save_alt_outlined),
label: Text(L10n.of(context)!.saveTheSecurityKeyNow),
onPressed: () {
Share.share(key!);
final box = context.findRenderObject() as RenderBox;
Share.share(
key!,
sharePositionOrigin:
box.localToGlobal(Offset.zero) & box.size,
);
setState(() => _recoveryKeyCopied = true);
},
),