Skip to content

Commit edfce76

Browse files
committed
feat(app): add AppNotificationTapped event
- New event to handle push notification taps from system tray - Includes notificationId to identify which notification was tapped
1 parent bf2d5c7 commit edfce76

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

lib/app/bloc/app_event.dart

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,3 +235,18 @@ class AppAllInAppNotificationsMarkedAsRead extends AppEvent {
235235
/// {@macro app_all_in_app_notifications_marked_as_read}
236236
const AppAllInAppNotificationsMarkedAsRead();
237237
}
238+
239+
/// {@template app_notification_tapped}
240+
/// Dispatched when a push notification is tapped by the user from the system
241+
/// tray, signaling that it should be marked as read.
242+
/// {@endtemplate}
243+
class AppNotificationTapped extends AppEvent {
244+
/// {@macro app_notification_tapped}
245+
const AppNotificationTapped(this.notificationId);
246+
247+
/// The unique ID of the notification that was tapped.
248+
final String notificationId;
249+
250+
@override
251+
List<Object> get props => [notificationId];
252+
}

0 commit comments

Comments
 (0)