Added the Notification.permission raw value - removed dart:html referenaces. #1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Thank you for this great package!
I have made some modifications that might be useful:
Notification.permission is a three state value; "default,granted,denied" where "default" is the only state a user will be shown a popup to accept or block notifications. Added as a simple string, to handle states that might be added in the future.
Removed the dart:html package to notification_api.dart since it depreciated.
Made a hacky "isSupported" since that is no longer a function for package:web/web.dart anymore.
Removing the dart:html will make this package compile & run in WASM ( https://docs.flutter.dev/platform-integration/web/wasm )
Modified the example to show Notification.permission and a simple request button. That way end user can test states.
Added tapStream and moved the "default" values from actionStream to it.
Now links will be opened when tapped. Removed the dart:html package replaced it with package:web/web.dart that will call the window.open.
Bumped the version to 0.0.6 if you find changes acceptable.