Skip to content

Commit ca7abaf

Browse files
committed
feat(notification): handle notificationId in system notifications
- Add notificationId to the payload when handling system notifications - Pass notificationId to HeadlineTapHandler for further processing
1 parent 593d487 commit ca7abaf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

lib/app/view/app.dart

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,7 @@ class _AppViewState extends State<_AppView> {
220220
_routerLogger.fine('Notification opened app with payload: $payload');
221221
final contentType = payload.contentType;
222222
final contentId = payload.contentId;
223+
final notificationId = payload.notificationId;
223224

224225
if (contentType == ContentType.headline && contentId.isNotEmpty) {
225226
// Guard against using BuildContext across async gaps by checking
@@ -228,6 +229,7 @@ class _AppViewState extends State<_AppView> {
228229
await HeadlineTapHandler.handleTapFromSystemNotification(
229230
context,
230231
contentId,
232+
notificationId: notificationId,
231233
);
232234
}
233235
}

0 commit comments

Comments
 (0)