Update ui

This commit is contained in:
Neeraj Gupta 2023-10-19 12:46:03 +05:30
parent d496adaed2
commit 3f5ef23e1b

View file

@ -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 {