diff --git a/lib/src/screens/receive/widgets/address_cell.dart b/lib/src/screens/receive/widgets/address_cell.dart index 703067dcf..25ceca92d 100644 --- a/lib/src/screens/receive/widgets/address_cell.dart +++ b/lib/src/screens/receive/widgets/address_cell.dart @@ -39,7 +39,18 @@ class AddressCell extends StatelessWidget { final Function(String) onTap; final Function() onEdit; - String get label => name ?? address; + String get label { + if (name.isEmpty){ + if(address.length<=16){ + return address; + }else{ + return address.substring(0,8)+'...'+ + address.substring(address.length-8,address.length); + } + }else{ + return name; + } + } @override Widget build(BuildContext context) { @@ -49,7 +60,7 @@ class AddressCell extends StatelessWidget { color: backgroundColor, padding: EdgeInsets.only(left: 24, right: 24, top: 28, bottom: 28), child: Text( - name ?? address, + label, maxLines: 1, overflow: TextOverflow.ellipsis, style: TextStyle(