refactor: token image updates (#3287)

* Improve token image display with mask and background

* Enhance token image bg and remove wierd halo effect that was showing, also add token bg to disclaimer and picker

* Add token bg to more locations and give another shot at halo

* fix: halo around token images

* add token background to non-transparent images only

* another shot at bg based on transparency

* refactor: enhance token image widget shape handling and add filter quality option to cake image widget

* fix: another shot

* refactor: update token image shape handling for svg, no need to clip

* fix: bnb wallet image not displaying on receive token display
This commit is contained in:
David Adegoke
2026-06-03 17:01:38 +02:00
committed by GitHub
parent 8af85351e9
commit 0b4e52c5f9
2 changed files with 4 additions and 3 deletions
@@ -65,7 +65,7 @@ class _TokenImageWidgetState extends State<TokenImageWidget> {
}
Future<_IconShape> _analyzeShape(String url) async {
if (url.toLowerCase().endsWith('.svg')) return _IconShape.clipOnly;
if (url.toLowerCase().endsWith('.svg')) return _IconShape.alreadyCircular;
final ImageProvider provider;
if (url.startsWith('assets/')) {
@@ -33,8 +33,9 @@ class ReceiveTokenDisplay extends StatelessWidget {
child: Row(
spacing:4,
children: [
CakeImageWidget(imageUrl:
"assets/new-ui/chain_badges/${walletTypeToString(addressListViewModel.wallet.type).toLowerCase()}.svg",
CakeImageWidget(
imageUrl:
"assets/new-ui/chain_badges/${addressListViewModel.wallet.type == WalletType.bsc ? 'bnb' : walletTypeToString(addressListViewModel.wallet.type).toLowerCase()}.svg",
width: 16,
height: 16,
colorFilter: ColorFilter.mode(