Search docs...
K

Technical Documentation: Notification Analytics

Architecture

Managed as a standalone analytics dashboard that consumes processed time-series and categorical data from the NotificationService. It uses the fl_chart library for performant rendering on the Flutter UI thread.

notification_analytics (Light Theme)notification_analytics (Dark Theme)

Technical Details

  • File Path: lib/screens/notification_analytics_screen.dart
  • Data Integration: Fetches up to 500 records via NotificationService.list() for local aggregation.
  • Library: fl_chart (Pie/Bar/Line charts).

notification_list (Light Theme)notification_list (Dark Theme)

Analytics Logic

  • KPI Calculation: _typeCounts getter iterates through the notification list to generate a frequency map.
  • Timeline Grouping: Groups notifications by date string (YYYY-MM-DD), allowing for categorical stacking in bar charts.
  • Severity Mapping: Defines a global _typeColors and _typeGradients map to ensure visual consistency.

Performance Optimization

  • Memoization: Computed getters are recalculated only when the underlying notification list changes.
  • Rendering Boundaries: Uses RepaintBoundary around individual chart widgets to isolate their paint cycles.
© 2026 Robotoai. All rights reserved.