简体   繁体   English

基于 CanvasKit 的 Flutter web 应用程序可以嵌入到其他(非 Flutter)web 应用程序/网站中吗?

[英]Can CanvasKit-based Flutter web app be embedded in other (non-Flutter) web apps/websites?

We're planning to build a Flutter web app that will need to be embedded within partners' websites (built with different web technologies).我们计划构建一个 Flutter web 应用程序,该应用程序需要嵌入合作伙伴的网站(使用不同的 web 技术构建)。 We have to use CanvasKit as rendering performance is important (it's a non-trivial component).我们必须使用CanvasKit ,因为渲染性能很重要(它是一个重要的组件)。

As far as I've researched, Web Components support is not available for Flutter for now (correct me if that's wrong).据我研究, Web Components支持目前不适用于 Flutter(如果有误,请纠正我)。 So the only method of embedding I can think of is an iframe .所以我能想到的唯一嵌入方法是iframe As CanvasKit relies on WebAssembly , I'm concerned about whether that will work as intended.由于CanvasKit依赖于WebAssembly ,我担心它是否会按预期工作。 So my question is this: is it possible to embed CanvasKit -based Flatter web apps within other (non-Flutter) web apps, and if so - does it have any downsides worth mentioning, compared to "typical" web apps (eg, those built with React ).所以我的问题是:是否有可能将基于CanvasKit的 Flatter web 应用程序嵌入到其他(非 Flutter)web 应用程序中,如果可以,与“典型的”web 应用程序(例如,那些用React构建)。

I have to decide strategically for my team whether to use Flutter for such a project or stick to a traditional web stack.我必须为我的团队做出战略性决定,是为这样的项目使用 Flutter 还是坚持使用传统的 web 堆栈。 Any input will be greatly appreciated.任何输入将不胜感激。

I am currently writing a flutter project for the web that is embedded in the web via iframe .我目前正在为 web 编写一个 flutter 项目,该项目通过iframe嵌入到 web 中。 Everything works fine, at first it was difficult how to pass parameters inside flutter (to interact with the server (id / additional options etc)) solved this issue through query parameters in a web browser and get inside flutter through (GETX package Get.parameters[''] ).My opinion.... Before starting global development, write a simple project that could interact inside your site, embed in iframe and pass any parameters)一切正常,起初很难在 flutter 中传递参数(与服务器交互(id/附加选项等))通过 web 浏览器中的查询参数解决了这个问题,并通过(GETX package Get.parameters 进入Get.parameters[''] )。我的意见....在开始全球开发之前,编写一个可以在您的站点内进行交互的简单项目,嵌入 iframe 并传递任何参数)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM