From 2da1e23251c75e8ed312f44bb2069a7fef3defbb Mon Sep 17 00:00:00 2001 From: julian Date: Mon, 9 Jan 2023 15:48:32 -0600 Subject: [PATCH] WIP initial paynym send ui --- .../subwidgets/desktop_paynym_details.dart | 54 ++++++++++++++----- 1 file changed, 40 insertions(+), 14 deletions(-) diff --git a/lib/pages/paynym/subwidgets/desktop_paynym_details.dart b/lib/pages/paynym/subwidgets/desktop_paynym_details.dart index 9a53d38e0..d51a0fecd 100644 --- a/lib/pages/paynym/subwidgets/desktop_paynym_details.dart +++ b/lib/pages/paynym/subwidgets/desktop_paynym_details.dart @@ -153,8 +153,16 @@ class _PaynymDetailsPopupState extends ConsumerState { } } + Future _onSend() async { + print("sned"); + } + @override Widget build(BuildContext context) { + final wallet = ref + .watch(walletsChangeNotifierProvider) + .getManager(widget.walletId) + .wallet as DogecoinWallet; return RoundedWhiteContainer( padding: const EdgeInsets.all(0), child: Column( @@ -184,22 +192,40 @@ class _PaynymDetailsPopupState extends ConsumerState { ), Row( children: [ - Expanded( - child: PrimaryButton( - label: "Connect", - buttonHeight: ButtonHeight.s, - icon: SvgPicture.asset( - Assets.svg.circlePlusFilled, - width: 16, - height: 16, - color: Theme.of(context) - .extension()! - .buttonTextPrimary, + if (!wallet.hasConnected(widget.accountLite.code)) + Expanded( + child: PrimaryButton( + label: "Connect", + buttonHeight: ButtonHeight.s, + icon: SvgPicture.asset( + Assets.svg.circlePlusFilled, + width: 16, + height: 16, + color: Theme.of(context) + .extension()! + .buttonTextPrimary, + ), + iconSpacing: 6, + onPressed: _onConnectPressed, + ), + ), + if (wallet.hasConnected(widget.accountLite.code)) + Expanded( + child: PrimaryButton( + label: "Send", + buttonHeight: ButtonHeight.s, + icon: SvgPicture.asset( + Assets.svg.circleArrowUpRight, + width: 16, + height: 16, + color: Theme.of(context) + .extension()! + .buttonTextPrimary, + ), + iconSpacing: 6, + onPressed: _onSend, ), - iconSpacing: 6, - onPressed: _onConnectPressed, ), - ), const SizedBox( width: 20, ),