-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web Support #2466
base: master
Are you sure you want to change the base?
Web Support #2466
Conversation
Also added getActiveNotifications
@MaikuB I'll once again put in my request to disable the |
Love this test feedback! Failed to load ".../flutter_local_notification_test.dart": Instance of 'VmServiceDisappearedException' |
Note
This is a work in progress
Adds web support. The plan is as follows, taken from #481 (comment):
Basic functionality
show()
getActiveNotifications()
cancel()
andcancelAll()
periodicallyShow
andperiodicallyShowWithDuration
would throwUnsupportedError
pendingNotificationRequest
would return an empty listAdvanced Functionality
web.NotificationOptions
getNotificationAppLaunchDetails()
from terminated statePR Cleanup
Custom service workers
Of course,
getNotificationAppLaunchDetails
and setting any handlers would require the ability to customize the service worker. That appears to be blocked on flutter/flutter#145828, but after reading flutter/flutter#156910, it seems that today's service worker is not technically needed and can be replaced. While we wait for an official mechanism to do so, there is a way to do so today:Where our custom service worker can start off as simple as
Where of course, we'd add more to pass the details of the notification into the Flutter app, and let the plugin pull the data.