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
[web] Multi-view Embedding Support #118481
Comments
Related: #122850 |
First milestone could be: we have an engine test that creates two |
Any updates about this? |
@NashIlli it's WIP. |
This would be extremely useful. I was thinking of using flutter for improving pieces of a legacy web app but the limitation of one single embedded component forbids continuing with this idea for the moment. Hope this gets completed soon as it will open many doors for flutter. |
@leoxagy12 it's WIP, but lots of work to do. Here's an old-ish demo. |
Hi @ditman , will this enable us to show the required flutter widget(s) on the screen without the need to wrap it with a runApp? Asking this as I have a usecase to show a flutter widget in a 3rd party webpage that can use any web framework. So we were thinking if a widget alone can be exposed from that flutter module that is already used by the flutter app. |
@sjthn No, you won't be able to export a widget from a Flutter Web app. You'll be able to have a flutter web app running, possibly rendering nothing, that knows how to fill in certain "divs" with whatever widget you want. This is controlled from your Flutter app. You can render as many divs as you want from Flutter with a single runApp (my demo app above only has one runApp, but it can render to as many divs as needed) |
Here are React demos inspired by @ditman's demo if anyone is interested: |
This is done. |
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of |
Get the code ready to support the multi-view embedding feature. Some changes:
hostElements
array in the Engine configurationThere's multiple assumptions made in the current view embedder that only one view is going to exist at a time (like the
addSceneToSceneHost
method, which need to be delegated to each view implementation).For simplicity, the new design should be something similar to:
Map<ViewId, View>
where all the views are cached for access later.render
ignores the passed-inview
.Most of the above should be implementable in the current state of the engine, without having to wait for the full-blown multi-view setup (at least, to make it work in single-view with the refactored multi-view architecture).
The text was updated successfully, but these errors were encountered: