Technical Documentation: Dashboard Header & Notifications
Architecture
The Dashboard Header is a persistent, cross-screen component implemented as a PreferredSizeWidget. It acts as the primary visual bridge between the AppStatusProvider and the user.


Technical Details
- File Paths:
- lib/widgets/header/dashboard_header.dart (UI Entry point)
- lib/screens/notifications_screen.dart (Full alert management)
- State Integration: AppStatusProvider maintains global visibility state; RosProvider provides real-time telemetry markers (Battery Level/Connectivity) displayed in the header.


Notification Logic
- Synchronization Engine:
- Socket.IO: Listens to the new_notification channel for pushed real-time alerts.
- REST: Calls GET /api/notifications to fetch the history.
- Unread Counter: Performs client-side filter on the local notification list to calculate the integer displayed over the bell icon.


Component Logic
- Real-time Clock: Uses a background Timer to update the displayed system time every minute.
- Navigation Breadcrumbs: Automatically parses the current PageRoute to generate dynamic navigation labels.
- Hardware Controls:
- Brake Release: Direct integration with RosProvider.toggleBrakes(). Toggling the switch sends a command to the robot control board to engage/release electromagnetic brakes, with state feedback provided by the ros.isBrakesReleased reactive variable.