Skip to content

Commit

Permalink
fix: Added dummy circle if imae is not provided #2612
Browse files Browse the repository at this point in the history
  • Loading branch information
bibash28 committed Apr 23, 2024
1 parent 81a0f97 commit 61a424c
Showing 1 changed file with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,16 @@ class TokenItem extends StatelessWidget {
child: ListTile(
contentPadding: EdgeInsets.zero,
minVerticalPadding: 0,
leading: CachedImageFromNetwork(
token.iconUrl ?? '',
width: Sizes.tokenLogoSize,
height: Sizes.tokenLogoSize,
borderRadius: const BorderRadius.all(
Radius.circular(Sizes.tokenLogoSize),
),
),
leading: token.iconUrl == null
? const CircleAvatar()
: CachedImageFromNetwork(
token.iconUrl!,
width: Sizes.tokenLogoSize,
height: Sizes.tokenLogoSize,
borderRadius: const BorderRadius.all(
Radius.circular(Sizes.tokenLogoSize),
),
),
title: MyText(
token.name.isEmpty ? token.symbol : token.name,
style: Theme.of(context).textTheme.listTileTitle,
Expand Down

0 comments on commit 61a424c

Please sign in to comment.