add note as a header

This commit is contained in:
Serhii 2023-03-24 11:55:52 +02:00
parent 52fd029c7d
commit 9c50712608

View file

@ -30,10 +30,8 @@ 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: 80,
padding: EdgeInsets.all(12), padding: EdgeInsets.all(12),
decoration: BoxDecoration( decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(12)), borderRadius: BorderRadius.all(Radius.circular(12)),
@ -52,22 +50,21 @@ class UnspentCoinsListItem extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.spaceBetween, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Expanded(
child: Row(
mainAxisSize: MainAxisSize.max, mainAxisSize: MainAxisSize.max,
mainAxisAlignment: MainAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Expanded( AutoSizeText(
child: AutoSizeText( note,
amount,
style: TextStyle( style: TextStyle(
color: amountColor, color: amountColor,
fontSize: 16, fontSize: 15,
fontWeight: FontWeight.w600 fontWeight: FontWeight.w600
), ),
maxLines: 1, maxLines: 1,
), ),
),
if (isFrozen) Container( if (isFrozen) Container(
height: 17, height: 17,
padding: EdgeInsets.only(left: 6, right: 6), padding: EdgeInsets.only(left: 6, right: 6),
@ -86,15 +83,28 @@ class UnspentCoinsListItem extends StatelessWidget {
) )
], ],
), ),
Text( ),
_note, Expanded(
child: AutoSizeText(
amount,
style: TextStyle(
color: amountColor,
fontSize: 15,
fontWeight: FontWeight.w600
),
maxLines: 1,
),
),
Expanded(
child: AutoSizeText(
address,
style: TextStyle( style: TextStyle(
color: addressColor, color: addressColor,
fontSize: 12, fontSize: 12,
), ),
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis ),
) ),
] ]
) )
) )