mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-23 11:15:33 +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(
|
child: UnspentCoinsListItem(
|
||||||
note: item.note,
|
note: item.note,
|
||||||
amount: item.amount,
|
amount: item.amount,
|
||||||
|
address: item.address,
|
||||||
isSending: item.isSending,
|
isSending: item.isSending,
|
||||||
isFrozen: item.isFrozen,
|
isFrozen: item.isFrozen,
|
||||||
onCheckBoxTap: item.isFrozen
|
onCheckBoxTap: item.isFrozen
|
||||||
|
|
|
@ -8,6 +8,7 @@ class UnspentCoinsListItem extends StatelessWidget {
|
||||||
UnspentCoinsListItem({
|
UnspentCoinsListItem({
|
||||||
@required this.note,
|
@required this.note,
|
||||||
@required this.amount,
|
@required this.amount,
|
||||||
|
@required this.address,
|
||||||
@required this.isSending,
|
@required this.isSending,
|
||||||
@required this.isFrozen,
|
@required this.isFrozen,
|
||||||
@required this.onCheckBoxTap,
|
@required this.onCheckBoxTap,
|
||||||
|
@ -20,6 +21,7 @@ class UnspentCoinsListItem extends StatelessWidget {
|
||||||
|
|
||||||
final String note;
|
final String note;
|
||||||
final String amount;
|
final String amount;
|
||||||
|
final String address;
|
||||||
final bool isSending;
|
final bool isSending;
|
||||||
final bool isFrozen;
|
final bool isFrozen;
|
||||||
final Function() onCheckBoxTap;
|
final Function() onCheckBoxTap;
|
||||||
|
@ -27,6 +29,7 @@ class UnspentCoinsListItem extends StatelessWidget {
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
final itemColor = isSending? selectedItemColor : unselectedItemColor;
|
final itemColor = isSending? selectedItemColor : unselectedItemColor;
|
||||||
|
final _note = (note?.isNotEmpty ?? false) ? note : address;
|
||||||
|
|
||||||
return Container(
|
return Container(
|
||||||
height: 62,
|
height: 62,
|
||||||
|
@ -67,9 +70,7 @@ class UnspentCoinsListItem extends StatelessWidget {
|
||||||
),
|
),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: (note?.isNotEmpty ?? false)
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||||
? MainAxisAlignment.spaceBetween
|
|
||||||
: MainAxisAlignment.center,
|
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
Row(
|
Row(
|
||||||
|
@ -106,8 +107,8 @@ class UnspentCoinsListItem extends StatelessWidget {
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
if (note?.isNotEmpty ?? false) Text(
|
Text(
|
||||||
note,
|
_note,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: addressColor,
|
color: addressColor,
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
|
|
Loading…
Reference in a new issue