Skip to content

Commit 343cf32

Browse files
committed
widgets: Give UnreadCountBadge a bold param
We'll use this to follow the Figma spec for the Inbox view, zulip#117.
1 parent 4ddbda4 commit 343cf32

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/widgets/unread_count_badge.dart

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ class UnreadCountBadge extends StatelessWidget {
1212
const UnreadCountBadge({
1313
super.key,
1414
required this.count,
15+
this.bold = false,
1516
});
1617

1718
final int count;
19+
final bool bold;
1820

1921
@override
2022
Widget build(BuildContext context) {
@@ -32,7 +34,9 @@ class UnreadCountBadge extends StatelessWidget {
3234
height: (18 / 16),
3335
fontFeatures: [FontFeature.enable('smcp')], // small caps
3436
color: Color(0xFF222222),
35-
).merge(weightVariableTextStyle(context)),
37+
).merge(bold
38+
? weightVariableTextStyle(context, wght: 600, wghtIfPlatformRequestsBold: 900)
39+
: weightVariableTextStyle(context)),
3640
count.toString())));
3741
}
3842
}

0 commit comments

Comments
 (0)