-
Notifications
You must be signed in to change notification settings - Fork 26.8k
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
Implement PlatformView support on macOS #41722
Comments
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment has been minimized.
This comment has been minimized.
@stuartmorgan we should chat. There's some opportunity to refactor the existing implementation on iOS, and I wonder if some code could be shared. |
I suspect not—on the Flutter end macOS uses embedder.h and iOS doesn't, while on the native end Cocoa and CocoaTouch are similarly but entirely disjoint—but it's certainly worth investigating to find out for sure. |
So basically there is currently no option to create plugins which support native views - and then enable things like Google Maps, etc.. |
Isn't this something that should be implemented before we can speak of a stable desktop release? I can imagine that a lot of apps require some native views, video player, webview, maps,... |
Conversely, lots of apps don't require those things; "stable" doesn't mean "has every feature that should eventually be supported" or "supports every use case". Flutter 1.0, notably, did not support platform views. |
Good to know. Is there some kind of roadmap for this? We are building a video streaming app for android, iOS, web, androidtv, tizen, webOS and we want to support desktop apps as well. But I think as long as this is not yet implemented in flutter there is no way to add support for desktop apps. |
But isnt PlatformView exactly tool for those features which are NOT supported yet ? so we can use existing OS features / plugins ? I mean having PlatformView ready before actually release of macOSX support seem to be quite essential. Anyway I am looking forward for new features added to mac osx package |
@radvansky-tomas platform channels are supported. The platform views are missing. So you add support for notifications on desktop. But video streaming, google maps (platform views) are not yet supported |
I guess these are supported through a |
Lots of apps have features with WebView and VideoPlayer. |
This has a priority of P4, does it mean there is no hope to see it any time soon? |
It means that it's higher priority than the default for feature requests, but not currently on the Flutter team's short-term roadmap. That doesn't mean it couldn't be implemented soon. Flutter is open-source, and anyone is welcome to pick up from where flutter/engine#22905 left off to contribute an implementation if they feel strongly about having it done sooner. |
This comment has been minimized.
This comment has been minimized.
The NSView size should mirror the size of AppKitView. Can you provide a reproducible example? |
@stuartmorgan I would like to contribute and implement the needed support here but I need guidance and help to better understand the effort and how to add the support needed. Let me know if you could help me with that, thanks. |
@zhuhaichao518 if you can author a reduced reproduction that demonstrates the bug, then please file a new issue so we can take a look into it. That way we can keep this issue focused on missing features (input events, gestures, a11y, focus traversal), rather than bugs with what's already landed (visual rendering/composition, clipping, transforms, etc.) |
I'm trying mac platform view, displaying some MTKView child in simple NSVIew, I have the flutter UI blinking sometime. |
That looks like the contents was not rendered in time but it got presented anyway. Possibly. |
If you can provide a reproducible example (attached to a new issue) I will take a look. |
@knopp thank you, I'm preparing an example |
This comment was marked as off-topic.
This comment was marked as off-topic.
This issue is assigned to @cbracken but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks! |
This comment was marked as off-topic.
This comment was marked as off-topic.
@stuartmorgan @cbracken this issue is linked from the 2024 roadmap but I wasn't been able to find any specific tasks related to this work, e.g. a list of gaps or outstanding issues that need to be completed before this gets real. Do you have any hints on that? |
@cbracken Do you want to edit the original issue description to include a checklist of the remaining items (e.g., gesture support) so it stays pinned to a discoverable location? |
Done! |
We'll want to support embedding native views in a Flutter view, as is currently supported on mobile.
Remaining tasks:
The text was updated successfully, but these errors were encountered: