How maikub/flutter_local_notifications works
Flutter Local Notifications is a cross-platform Flutter plugin for displaying and managing local notifications. Its main workflow is an app request becoming a platform notification, optionally scheduled, then surfaced to the user; notification activation can return action or payload data to the app. The README also identifies Linux and Windows implementations. The supplied tree and excerpts omit the Dart-facing API, platform interface, Linux implementation, and most platform source, so those components are represented only where the README or tree supports them; some wiring is necessarily omitted.
Main entry points: flutter_local_notifications_platform_interface Platform interface · FlutterLocalNotificationsPlugin.java Android plugin · src Windows plugin · ScheduledNotificationReceiver.java Schedule receivers
Components 17
Flutter interface
- Plugin API
flutter_local_notifications - Platform interface
flutter_local_notifications_platform_interface
Mobile platforms
- Android plugin
flutter_local_notifications/android/src/main/java/com/dexterous/flutterlocalnotifications/FlutterLocalNotificationsPlugin.java - Notification models
flutter_local_notifications/android/src/main/java/com/dexterous/flutterlocalnotifications/models/NotificationDetails.java - Schedule receivers
flutter_local_notifications/android/src/main/java/com/dexterous/flutterlocalnotifications/ScheduledNotificationReceiver.java - Boot recovery
flutter_local_notifications/android/src/main/java/com/dexterous/flutterlocalnotifications/ScheduledNotificationBootReceiver.java - Action receiver
flutter_local_notifications/android/src/main/java/com/dexterous/flutterlocalnotifications/ActionBroadcastReceiver.java - Foreground service
flutter_local_notifications/android/src/main/java/com/dexterous/flutterlocalnotifications/ForegroundService.java - iOS plugin
flutter_local_notifications/ios/flutter_local_notifications/Sources/flutter_local_notifications
Desktop platforms
- macOS plugin
flutter_local_notifications/macos/flutter_local_notifications/Sources/flutter_local_notifications/FlutterLocalNotificationsPlugin.swift - Windows plugin
flutter_local_notifications_windows/src - Windows toast API
flutter_local_notifications_windows/src/ffi_api.cpp - Linux implementation
Web platform
- Web implementation
flutter_local_notifications_web - Click service worker
flutter_local_notifications_web/web/notifications_service_worker.js
Other components
- Flutter app
- Platform notification system
Connections 27
- Flutter app → Plugin API: requests notifications
- Plugin API → Platform interface: uses interface
- Platform interface → Android plugin: dispatches platform calls
- Platform interface → iOS plugin: dispatches platform calls
- Platform interface → macOS plugin: dispatches platform calls
- Platform interface → Windows plugin: dispatches platform calls
- Platform interface → Linux implementation: dispatches platform calls
- Platform interface → Web implementation: dispatches platform calls
- Android plugin → Notification models: parses details
- Android plugin → Schedule receivers: schedules notifications
- Android plugin → Action receiver: handles actions
- Android plugin → Foreground service: starts service
- Schedule receivers → Platform notification system: receives alarms
- Boot recovery → Schedule receivers: restores schedules
- Android plugin → Platform notification system: posts notifications
- iOS plugin → Platform notification system: schedules and presents
- macOS plugin → Platform notification system: schedules and presents
- Windows plugin → Windows toast API: uses native API
- Windows toast API → Platform notification system: shows and schedules
- Windows plugin → Platform notification system: registers activation
- Web implementation → Platform notification system: requests browser notifications
- Platform notification system → Click service worker: dispatches click
- Click service worker → Flutter app: forwards click data
- Platform notification system → Action receiver: dispatches action
- Platform notification system → iOS plugin: delivers response
- Platform notification system → macOS plugin: delivers response
- Platform notification system → Windows plugin: activates callback