flutter_local_notifications icon indicating copy to clipboard operation
flutter_local_notifications copied to clipboard

Add function that exposes removeAllPendingNotificationRequests

Open ohkhan opened this issue 9 months ago • 1 comments

At the moment the method for cancelling all notifications involves also clearing notifications that have been pushed. Current implementation for reference: https://github.com/MaikuB/flutter_local_notifications/blob/8839a00cdfcdecc5090da5ccb766da42cdbe2a88/flutter_local_notifications/macos/flutter_local_notifications/Sources/flutter_local_notifications/FlutterLocalNotificationsPlugin.swift#L370-L384

In order to avoid canceling pushed notifications one has to use a persistent solution to track notification IDs and delivery times in order to know which ids can be cancelled. It would be great if we could simply expose a function that exclusively calls removeAllPendingNotificationRequests.

ohkhan avatar Mar 03 '25 23:03 ohkhan

Can you submit a PR for this?

MaikuB avatar Mar 18 '25 06:03 MaikuB

I've submit PR #2639 for this issue. Would you mind to check this? @MaikuB @ohkhan

TaeBbong avatar Jun 19 '25 09:06 TaeBbong

Will do, I approved the run already so that at least you can see if any checks fail

MaikuB avatar Jun 19 '25 09:06 MaikuB

Closing this as #2639 has been merged

MaikuB avatar Jun 22 '25 08:06 MaikuB