Skip to content

Commit

Permalink
widgets: Give UnreadCountBadge a bold param
Browse files Browse the repository at this point in the history
We'll use this to follow the Figma spec for the Inbox view, #117.
  • Loading branch information
chrisbobbe committed Nov 15, 2023
1 parent d9eb0d3 commit a73175f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/widgets/unread_count_badge.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ class UnreadCountBadge extends StatelessWidget {
const UnreadCountBadge({
super.key,
required this.count,
this.bold = false,
});

final int count;
final bool bold;

@override
Widget build(BuildContext context) {
Expand All @@ -32,7 +34,9 @@ class UnreadCountBadge extends StatelessWidget {
height: (18 / 16),
fontFeatures: [FontFeature.enable('smcp')], // small caps
color: Color(0xFF222222),
).merge(weightVariableTextStyle(context)),
).merge(bold
? weightVariableTextStyle(context, wght: 600, wghtIfPlatformRequestsBold: 900)
: weightVariableTextStyle(context)),
count.toString())));
}
}

0 comments on commit a73175f

Please sign in to comment.