Solvedflutter Support inlining Android/iOS views
✔️Accepted Answer
iOS view embedding support has landed on master.
This is still just a preview.
There are multiple open issues for missing features, bugs, and potential optimizations, the relevant issues are tagged with the platform-views label. Please upvote the ones you care about to help us prioritize.
Notably on iOS embedding UIViews currently requires running Flutter with a single thread, as the required threading configuration is not yet supported (we are working on it: #23974, #23975).
Currently apps need to opt-in for the UIViews embedding preview on iOS by adding a boolean property to the Info.plist (key=io.flutter.embedded_views_preview
value=YES
).
Documentation is still a little light, for a simple usage example you can check flutter/plugins#890 which adds iOS support to the webview_flutter plugin.
Other Answers:
@yohom this is still work in progress, I started with the Android support.
I wouldn't even use AndroidView yet as it is incomplete and unstable.
iOS view embedding support has landed on master.
This is still just a preview.
There are multiple open issues for missing features, bugs, and potential optimizations, the relevant issues are tagged with the platform-views label. Please upvote the ones you care about to help us prioritize.
Notably on iOS embedding UIViews currently requires running Flutter with a single thread, as the required threading configuration is not yet supported (we are working on it: #23974, #23975).
Currently apps need to opt-in for the UIViews embedding preview on iOS by adding a boolean property to the Info.plist (key=
io.flutter.embedded_views_preview
value=YES
).Documentation is still a little light, for a simple usage example you can check flutter/plugins#890 which adds iOS support to the webview_flutter plugin.
Here's how to achieve the above solution :
Add the following lines to <root of your project>/ios/Runner/Info.plist
<dict>
...
<key>io.flutter.embedded_views_preview</key>
<true/>
....
</dict>
Would absolutely love this feature :)
Any plans on when will this be available?
For a camera stream you probably want to use a Texture widget directly.
The camera plugin is doing that for the device's cameras: https://pub.dartlang.org/packages/camera
A generic solution for embedding any Android/iOS view as part of the Flutter widget hierarchy would enable some highly desired features including Google Maps (#73) and WebView (#730).