Merge pull request 'feat(notifications): unread notifications handling' (#467) from misha/eatvio_app:notifications into main

Reviewed-on: eatvio/eatvio_app#467
This commit is contained in:
mso7nueh
2025-05-28 13:10:47 +00:00
12 changed files with 254 additions and 85 deletions

View File

@@ -203,9 +203,10 @@ class _BottomNavigationBarWidgetState extends State<BottomNavigationBarWidget> {
return badges.Badge(
position: badges.BadgePosition.topEnd(),
badgeAnimation: const badges.BadgeAnimation.fade(),
badgeContent: Text(
(state is NotificationsStateLoaded) ? state.notificationsCount.toString() : '0',
style: const TextStyle(
showBadge: state is NotificationsStateLoaded && state.hasUnreadNotifications,
badgeContent: const Text(
'',
style: TextStyle(
color: Colors.white,
fontSize: 8,
),