feat(firebase_messaging, web): Added serviceWorkerRegistration to GetTokenOptions
Description
Added serviceWorkerRegistration to GetTokenOptions for web. This was needed to be able to use a custom service worker. I used Object? for the interface for compatibility, with an assert in the web implementation.
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]).
This will ensure a smooth and quick review process. Updating the pubspec.yaml and changelogs is not required.
- [x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
- [ ] My PR includes unit or integration tests for all changed/updated/fixed behaviors (See Contributor Guide).
- [ ] All existing and new tests are passing.
- [ ] I updated/added relevant documentation (doc comments with
///). - [ ] The analyzer (
melos run analyze) does not report any problems on my PR.-
melos run analyzedoes not exist
-
- [x] I read and followed the Flutter Style Guide.
- [ ] I signed the CLA.
- I tried, but I keep getting the error: A server error occurred, please try your request again.
- [x] I am willing to follow-up on review comments in a timely manner.
Breaking Change
Does your PR require plugin users to manually update their apps to accommodate your change?
- [ ] Yes, this is a breaking change.
- [x] No, this is not a breaking change.
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).
View this failed invocation of the CLA check for more information.
For the most up to date status, view the checks section at the bottom of the pull request.
I tried to sign the CLA, but I always get the error: A server error occurred, please try your request again.
The CLA website works again, i've signed it.
Hi @remcoanker, could you add a test for this?
@remcoanker - have you actually tried passing in the serviceWorkerRegistration into getToken()? It might help if you demonstrate how this works in the firebase messaging example app.
Hey @remcoanker. We need more information to resolve this issue but there hasn't been an update in 7 weekdays. I'm marking the issue as stale and if there are no new updates in the next 7 days I will close it automatically.
If you have more information that will help us get to the bottom of this, just add a comment!
Since there haven't been any recent updates here, I am going to close this issue.
@remcoanker if you're still experiencing this problem and want to continue the discussion just leave a comment here and we are happy to re-open this.