build method
dynamic
build( - dynamic context
)
Implementation
@override
Widget build(BuildContext context) {
return switch (urgency) {
UrgencyBadge.important => Badge(
backgroundColor: Theme.of(context).colorScheme.badgeImportant,
child: child,
),
UrgencyBadge.urgent => Badge(
backgroundColor: Theme.of(context).colorScheme.badgeUrgent,
child: child,
),
UrgencyBadge.unread => Badge(
backgroundColor: Theme.of(context).colorScheme.badgeUnread,
child: child,
),
// read and none, we do not show any icon to prevent notification fatigue
_ => child,
};
}