mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-23 03:05:11 +00:00
CAKE-334 | fixed unspent_coins_list_item.dart
This commit is contained in:
parent
a20969b650
commit
b3028f0ba2
2 changed files with 7 additions and 5 deletions
|
@ -88,6 +88,7 @@ class UnspentCoinsListFormState extends State<UnspentCoinsListForm> {
|
|||
child: UnspentCoinsListItem(
|
||||
note: item.note,
|
||||
amount: item.amount,
|
||||
address: item.address,
|
||||
isSending: item.isSending,
|
||||
isFrozen: item.isFrozen,
|
||||
onCheckBoxTap: item.isFrozen
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue