packages
packages copied to clipboard
[webview] Add macOS support in implementation package
Adds initial support for macOS.
Known limitations:
- Scroll APIs are not supported, and currently throw unimplemented. Longer term we could consider JS polyfills, but we'd probably want to make them opt-in since injecting JS into every page has some risks.
- Setting the background color doesn't work since the view structure is different on macOS. We may be able to use a layer-backed view to support this in the future.
Since many use cases don't require these features, my preference is to land this without that support, rather than blocking on having full parity, and then the specific features can be added later based on community interest (demand and/or contributions).
This will not be landed until the next full stable release after 3.22, as 3.22 does not yet have gesture support for macOS platform views, and pushing this to users without gesture support would be very confusing.
Part of https://github.com/flutter/flutter/issues/41725
Don't want to create unnecessary update comment, but because this is a highly requested feature and there has been no update since a month to this PR, Is this still being worked on?
@alterhuman Please see my comments in the issue; there is no plan to land this PR until platform view gesture support for macOS reaches stable, and it hasn't even landed on master yet.
@alterhuman Please see my comments in the issue; there is no plan to land this PR until platform view gesture support for macOS reaches
stable, and it hasn't even landed onmasteryet.
gesture support has landed on mater on Mar 9th, does it mean that I can use mater and the code to do a prototype?
Any update on when this will be available?
@bparrishMines @hellohuanlin This is ready for review. As noted in the PR description it won't land until the next stable, but since the PR is in a good state now we can work through reviews now so it's ready to go when the next stable arrives.
Can you add some information why setting a background is not supported on macOS? I guess most will want to make the background transparent. Is there a possibility to allow this special case?
Can you add some information why setting a background is not supported on macOS?
Sorry, I'm not sure what you are asking exactly. The PR description and my issue comment about the limitations of the PR discuss this; if you are looking for details that aren't there you'll need to be more specific.
Is there a possibility to allow this special case?
As always, anyone is welcome to submit PRs adding functionality they need.
@stuartmorgan is this okay to merge or are there still outstanding issues?
This will not be landed until the next full stable release after 3.22, as 3.22 does not yet have gesture support for macOS platform views, and pushing this to users without gesture support would be very confusing.
Per the PR description:
This will not be landed until the next full stable release after 3.22, as 3.22 does not yet have gesture support for macOS platform views, and pushing this to users without gesture support would be very confusing.
This is blocked on Flutter main reporting a version number higher than 3.24 (and that change rolling into this repo).
@stuartmorgan Does this mean that the branch will be merged into a future version of Flutter, not 3.24? We're looking forward to using macos webview in one of our projects, so I'm trying to understand the future of it to adjust our own expectations or start looking for a workaround. Thank you very much.
Does this mean that the branch will be merged into a future version of Flutter, not 3.24?
webview_flutter is a package that's published to pub.dev, not a part of the Flutter SDK; it won't be merged into any version of Flutter.
Does this mean that the branch will be merged into a future version of Flutter, not 3.24?
webview_flutteris a package that's published to pub.dev, not a part of the Flutter SDK; it won't be merged into any version of Flutter.
@stuartmorgan they mean when will the package webview_flutter be updated with macOS support. I have the same question to prioritise feature development order in my flutter app.
@stuartmorgan they mean when will the package
webview_flutterbe updated with macOS support.
I'm not going to assume that I know that someone means something very different from what they said, so I answered the question they actually asked.
I have the same question to prioritise feature development order in my flutter app.
It will land when it's no longer blocked; see my recent comment.
This is blocked on Flutter
mainreporting a version number higher than 3.24 (and that change rolling into this repo).
what do you expected the version number to be on the branch main? @stuartmorgan