Skip to content

Commit

Permalink
fix(mobile): Misaligned text icon in circle avatar (#15683)
Browse files Browse the repository at this point in the history
style(mobile): Use `DefaultTextStyle` for the text icon in `CircleAvatar`
  • Loading branch information
ferraridamiano authored Jan 26, 2025
1 parent 7bbffcc commit f780a56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mobile/lib/widgets/common/user_circle_avatar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@ class UserCircleAvatar extends ConsumerWidget {
final profileImageUrl =
'${Store.get(StoreKey.serverEndpoint)}/users/${user.id}/profile-image?d=${Random().nextInt(1024)}';

final textIcon = Text(
user.name[0].toUpperCase(),
final textIcon = DefaultTextStyle(
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 12,
color: isDarkTheme && user.avatarColor == AvatarColorEnum.primary
? Colors.black
: Colors.white,
),
child: Text(user.name[0].toUpperCase()),
);
return CircleAvatar(
backgroundColor: user.avatarColor.toColor(),
Expand Down

0 comments on commit f780a56

Please sign in to comment.