Skip to content

Commit

Permalink
Update profile_card.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagocarvalhodev committed Dec 11, 2024
1 parent 6d23863 commit d841efd
Showing 1 changed file with 36 additions and 38 deletions.
74 changes: 36 additions & 38 deletions lib/components/profile_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -587,16 +587,19 @@ class _ProfileCardState extends State<ProfileCard> {

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();
},
),
),
);
}
Expand All @@ -617,36 +620,31 @@ class _ProfileCardState extends State<ProfileCard> {
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,
),
],
),
),
],
),
),
),
Expand Down

0 comments on commit d841efd

Please sign in to comment.