0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-02-04 01:09:14 -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 = final profileImageUrl =
'${Store.get(StoreKey.serverEndpoint)}/users/${user.id}/profile-image?d=${Random().nextInt(1024)}'; '${Store.get(StoreKey.serverEndpoint)}/users/${user.id}/profile-image?d=${Random().nextInt(1024)}';
final textIcon = Text( final textIcon = DefaultTextStyle(
user.name[0].toUpperCase(),
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: FontWeight.bold,
fontSize: 12, fontSize: 12,
@ -37,6 +36,7 @@ class UserCircleAvatar extends ConsumerWidget {
? Colors.black ? Colors.black
: Colors.white, : Colors.white,
), ),
child: Text(user.name[0].toUpperCase()),
); );
return CircleAvatar( return CircleAvatar(
backgroundColor: user.avatarColor.toColor(), backgroundColor: user.avatarColor.toColor(),