Skip to content

Commit

Permalink
fix alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagocarvalhodev committed Dec 11, 2024
1 parent 5406c08 commit 9f3ba28
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/components/app_top_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class AppTopBar extends StatelessWidget {
height: 110,
width: double.maxFinite,
child: Padding(
padding: const EdgeInsets.only(right: 24.0),
padding: const EdgeInsets.only(right: 17.0),
child: Row(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.end,
Expand Down
15 changes: 13 additions & 2 deletions lib/components/profile_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,21 @@ class ProfileCardHeader extends StatelessWidget {
if (primaryName.length > 20) {
return truncateString(walletAddress, offsetStart: 10, offsetEnd: 10);
}
var offsetStart = primaryName.length ~/ 2;
var offsetEnd = primaryName.length ~/ 2;

if (offsetStart < 6) {
offsetStart = 3;
}

if (offsetEnd < 6) {
offsetEnd = 3;
}

return truncateString(
walletAddress,
offsetStart: primaryName.length ~/ 2,
offsetEnd: primaryName.length ~/ 2,
offsetStart: offsetStart,
offsetEnd: offsetEnd,
);
}

Expand Down

0 comments on commit 9f3ba28

Please sign in to comment.