clearAllPushNotifications method
Clears all notifications from the device's OS notification tray.
This is distinct from clearing the in-app notification centre list. Call this when the user navigates to the relevant screen (e.g. orders or notifications page) rather than on every app foreground, so notifications can still serve as a breadcrumb leading the user to the right place.
Implementation
Future<void> clearAllPushNotifications() async {
await _localNotifications.cancelAll();
_logger.debug('[Notifications] Push notification tray cleared.');
}