This commit is contained in:
OmarHatem 2023-02-08 00:06:47 +02:00
parent e67b484613
commit 1b42d2b61c
3 changed files with 24 additions and 4 deletions

View file

@ -100,7 +100,14 @@ class AddressPage extends BasePage {
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
iconSize: 25,
onPressed: () => Share.share(addressListViewModel.address.address),
onPressed: () {
final box = context.findRenderObject() as RenderBox?;
Share.share(
addressListViewModel.address.address,
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size,
);
},
icon: shareImage,
),
) : null;

View file

@ -101,7 +101,14 @@ class ReceivePage extends BasePage {
highlightColor: Colors.transparent,
splashColor: Colors.transparent,
iconSize: 25,
onPressed: () => Share.share(addressListViewModel.address.address),
onPressed: () {
final box = context.findRenderObject() as RenderBox?;
Share.share(
addressListViewModel.address.address,
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size,
);
},
icon: shareImage
)
);

View file

@ -159,8 +159,14 @@ class WalletSeedPage extends BasePage {
child: Container(
padding: EdgeInsets.only(right: 8.0),
child: PrimaryButton(
onPressed: () =>
Share.share(walletSeedViewModel.seed),
onPressed: () {
final box = context.findRenderObject() as RenderBox?;
Share.share(
walletSeedViewModel.seed,
sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size,
);
},
text: S.of(context).save,
color: Colors.green,
textColor: Colors.white),