0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-28 00:59:18 -05:00

fix(mobile): Misaligned text icon in circle avatar (#15683)

style(mobile): Use `DefaultTextStyle` for the text icon in `CircleAvatar`
This commit is contained in:
Damiano Ferrari 2025-01-26 14:51:46 +01:00 committed by GitHub
parent 7bbffccf76
commit f780a56e24
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -28,8 +28,7 @@ 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,
@ -37,6 +36,7 @@ class UserCircleAvatar extends ConsumerWidget {
? Colors.black
: Colors.white,
),
child: Text(user.name[0].toUpperCase()),
);
return CircleAvatar(
backgroundColor: user.avatarColor.toColor(),