Update ui
This commit is contained in:
parent
d496adaed2
commit
3f5ef23e1b
|
@ -39,22 +39,17 @@ class IconUtils {
|
||||||
width,
|
width,
|
||||||
);
|
);
|
||||||
} else if (title.isNotEmpty) {
|
} else if (title.isNotEmpty) {
|
||||||
return SizedBox(
|
bool showLargeIcon = width > 24;
|
||||||
width: width + 6,
|
return CircleAvatar(
|
||||||
child: CircleAvatar(
|
radius: width / 2,
|
||||||
backgroundColor: getEnteColorScheme(context).avatarColors[
|
backgroundColor: getEnteColorScheme(context).avatarColors[
|
||||||
title.hashCode % getEnteColorScheme(context).avatarColors.length],
|
title.hashCode % getEnteColorScheme(context).avatarColors.length],
|
||||||
child: Text(
|
child: Text(
|
||||||
title.toUpperCase()[0],
|
title.toUpperCase()[0],
|
||||||
// fixed color
|
// fixed color
|
||||||
style: width > 24
|
style: showLargeIcon
|
||||||
? getEnteTextTheme(context)
|
? getEnteTextTheme(context).h3Bold.copyWith(color: Colors.white)
|
||||||
.largeBold
|
: getEnteTextTheme(context).body.copyWith(color: Colors.white),
|
||||||
.copyWith(color: Colors.white)
|
|
||||||
: getEnteTextTheme(context)
|
|
||||||
.bodyBold
|
|
||||||
.copyWith(color: Colors.white),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue