From d841efd6580d6de2f3b2d200e1eebc6489e7f428 Mon Sep 17 00:00:00 2001 From: Thiago Carvalho <32248947+thiagocarvalhodev@users.noreply.github.com> Date: Wed, 11 Dec 2024 10:23:19 -0300 Subject: [PATCH] Update profile_card.dart --- lib/components/profile_card.dart | 74 ++++++++++++++++---------------- 1 file changed, 36 insertions(+), 38 deletions(-) diff --git a/lib/components/profile_card.dart b/lib/components/profile_card.dart index a2d4b4c50..f86856ab9 100644 --- a/lib/components/profile_card.dart +++ b/lib/components/profile_card.dart @@ -587,16 +587,19 @@ class _ProfileCardState extends State { if (state is ProfileNameLoaded) { if (state.primaryNameDetails.logo != null) { - icon = ClipOval( - child: ArDriveImage( - image: NetworkImage( - 'https://arweave.net/${state.primaryNameDetails.logo}'), - width: 28, - height: 28, - fit: BoxFit.cover, - errorBuilder: (context, error, stackTrace) { - return const SizedBox.shrink(); - }, + icon = Padding( + padding: const EdgeInsets.only(right: 4.0), + child: ClipOval( + child: ArDriveImage( + image: NetworkImage( + 'https://arweave.net/${state.primaryNameDetails.logo}'), + width: 28, + height: 28, + fit: BoxFit.cover, + errorBuilder: (context, error, stackTrace) { + return const SizedBox.shrink(); + }, + ), ), ); } @@ -617,36 +620,31 @@ class _ProfileCardState extends State { icon, ], Expanded( - child: Padding( - padding: icon != null - ? const EdgeInsets.only(left: 8.0) - : const EdgeInsets.all(0), - child: SizedBox( - height: 46, - width: maxWidth, - child: Column( - mainAxisSize: MainAxisSize.min, - children: [ - Text( - primaryName, - overflow: TextOverflow.ellipsis, - maxLines: 1, - style: typography.paragraphLarge( - fontWeight: ArFontWeight.semiBold, - color: colorTokens.textHigh, - ), + child: SizedBox( + height: 46, + width: maxWidth, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Text( + primaryName, + overflow: TextOverflow.ellipsis, + maxLines: 1, + style: typography.paragraphLarge( + fontWeight: ArFontWeight.semiBold, + color: colorTokens.textHigh, ), - Text( - truncatedWalletAddress, - overflow: TextOverflow.clip, - maxLines: 1, - style: typography.paragraphSmall( - fontWeight: ArFontWeight.book, - color: colorTokens.textLow, - ), + ), + Text( + truncatedWalletAddress, + overflow: TextOverflow.clip, + maxLines: 1, + style: typography.paragraphSmall( + fontWeight: ArFontWeight.book, + color: colorTokens.textLow, ), - ], - ), + ), + ], ), ), ),