chore: Follow up avatar default image

This commit is contained in:
Krille 2024-07-19 14:50:17 +02:00
parent b8345e2ca6
commit cf59a43511
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652

View file

@ -47,8 +47,9 @@ class Avatar extends StatelessWidget {
final noPic = mxContent == null ||
mxContent.toString().isEmpty ||
mxContent.toString() == 'null';
final textColor = name?.lightColorAvatar;
final textWidget = Container(
color: name?.lightColorAvatar,
color: textColor,
alignment: Alignment.center,
child: Text(
fallbackLetters,
@ -81,7 +82,13 @@ class Avatar extends StatelessWidget {
fit: BoxFit.cover,
width: size,
height: size,
placeholder: (_) => textWidget,
placeholder: (_) => Center(
child: Icon(
Icons.person_2,
color: textColor,
size: size / 1.5,
),
),
),
),
),