From 0cace4d4bbf01cd6d41b7abe7819466da81653cb Mon Sep 17 00:00:00 2001 From: Matias Piipari Date: Thu, 13 Feb 2025 17:51:19 +0200 Subject: [PATCH] Only show the avatar when there is a user assigned --- frontend/lib/ui/user_avatar.dart | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/frontend/lib/ui/user_avatar.dart b/frontend/lib/ui/user_avatar.dart index 337fed76..8a4c1181 100644 --- a/frontend/lib/ui/user_avatar.dart +++ b/frontend/lib/ui/user_avatar.dart @@ -53,16 +53,17 @@ class UserAvatar extends StatelessWidget { child: Stack( alignment: Alignment.center, children: [ - CircleAvatar( - backgroundColor: _avatarColor, - child: Text( - user.initials, - style: Theme.of(context) - .textTheme - .labelLarge - ?.apply(fontWeightDelta: 4), + if (!user.isEmpty) + CircleAvatar( + backgroundColor: _avatarColor, + child: Text( + user.initials, + style: Theme.of(context) + .textTheme + .labelLarge + ?.apply(fontWeightDelta: 4), + ), ), - ), SizedBox( width: 43.0, height: 43.0,