From 3f5ef23e1b019539f03f4b71a24490a0e3219302 Mon Sep 17 00:00:00 2001 From: Neeraj Gupta <254676+ua741@users.noreply.github.com> Date: Thu, 19 Oct 2023 12:46:03 +0530 Subject: [PATCH] Update ui --- lib/ui/utils/icon_utils.dart | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/lib/ui/utils/icon_utils.dart b/lib/ui/utils/icon_utils.dart index cfb6cc29e..bb37df628 100644 --- a/lib/ui/utils/icon_utils.dart +++ b/lib/ui/utils/icon_utils.dart @@ -39,22 +39,17 @@ class IconUtils { width, ); } else if (title.isNotEmpty) { - return SizedBox( - width: width + 6, - child: CircleAvatar( - backgroundColor: getEnteColorScheme(context).avatarColors[ - title.hashCode % getEnteColorScheme(context).avatarColors.length], - child: Text( - title.toUpperCase()[0], - // fixed color - style: width > 24 - ? getEnteTextTheme(context) - .largeBold - .copyWith(color: Colors.white) - : getEnteTextTheme(context) - .bodyBold - .copyWith(color: Colors.white), - ), + bool showLargeIcon = width > 24; + return CircleAvatar( + radius: width / 2, + backgroundColor: getEnteColorScheme(context).avatarColors[ + title.hashCode % getEnteColorScheme(context).avatarColors.length], + child: Text( + title.toUpperCase()[0], + // fixed color + style: showLargeIcon + ? getEnteTextTheme(context).h3Bold.copyWith(color: Colors.white) + : getEnteTextTheme(context).body.copyWith(color: Colors.white), ), ); } else {