From b3028f0ba2af260bca594de6afadbd1c8bf93776 Mon Sep 17 00:00:00 2001 From: OleksandrSobol Date: Fri, 23 Jul 2021 18:38:56 +0300 Subject: [PATCH] CAKE-334 | fixed unspent_coins_list_item.dart --- .../unspent_coins/unspent_coins_list_page.dart | 1 + .../widgets/unspent_coins_list_item.dart | 11 ++++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/src/screens/unspent_coins/unspent_coins_list_page.dart b/lib/src/screens/unspent_coins/unspent_coins_list_page.dart index d8c3b89a1..931e618ae 100644 --- a/lib/src/screens/unspent_coins/unspent_coins_list_page.dart +++ b/lib/src/screens/unspent_coins/unspent_coins_list_page.dart @@ -88,6 +88,7 @@ class UnspentCoinsListFormState extends State { child: UnspentCoinsListItem( note: item.note, amount: item.amount, + address: item.address, isSending: item.isSending, isFrozen: item.isFrozen, onCheckBoxTap: item.isFrozen diff --git a/lib/src/screens/unspent_coins/widgets/unspent_coins_list_item.dart b/lib/src/screens/unspent_coins/widgets/unspent_coins_list_item.dart index 93282e591..e4814e9ee 100644 --- a/lib/src/screens/unspent_coins/widgets/unspent_coins_list_item.dart +++ b/lib/src/screens/unspent_coins/widgets/unspent_coins_list_item.dart @@ -8,6 +8,7 @@ class UnspentCoinsListItem extends StatelessWidget { UnspentCoinsListItem({ @required this.note, @required this.amount, + @required this.address, @required this.isSending, @required this.isFrozen, @required this.onCheckBoxTap, @@ -20,6 +21,7 @@ class UnspentCoinsListItem extends StatelessWidget { final String note; final String amount; + final String address; final bool isSending; final bool isFrozen; final Function() onCheckBoxTap; @@ -27,6 +29,7 @@ class UnspentCoinsListItem extends StatelessWidget { @override Widget build(BuildContext context) { final itemColor = isSending? selectedItemColor : unselectedItemColor; + final _note = (note?.isNotEmpty ?? false) ? note : address; return Container( height: 62, @@ -67,9 +70,7 @@ class UnspentCoinsListItem extends StatelessWidget { ), Expanded( child: Column( - mainAxisAlignment: (note?.isNotEmpty ?? false) - ? MainAxisAlignment.spaceBetween - : MainAxisAlignment.center, + mainAxisAlignment: MainAxisAlignment.spaceBetween, crossAxisAlignment: CrossAxisAlignment.start, children: [ Row( @@ -106,8 +107,8 @@ class UnspentCoinsListItem extends StatelessWidget { ) ], ), - if (note?.isNotEmpty ?? false) Text( - note, + Text( + _note, style: TextStyle( color: addressColor, fontSize: 12,