我通过运行运行 Flutter for Web flutter run -d chrome,然后我看到一堆<flt-*>标签,例如<flt-glass-pane>, <flt-scene>。我认为 Flutter Web 通过 Canvas 渲染网页,但不确定它为什么会生成这些 html 标签。它们是为了 SEO 目的吗?试图查找文档但找不到任何相关内容。
我style从默认启动页面上的生成 html 标记中删除了属性,如下所示。
<flt-glass-pane>\n <flt-semantics-placeholder role="button" aria-live="true" tabindex="0" aria-label="Enable accessibility"></flt-semantics-placeholder>\n <flt-scene-host aria-hidden="true">\n <flt-scene flt-layer-state="updated">\n <flt-transform flt-layer-state="updated">\n <flt-offset flt-layer-state="updated">\n <flt-picture flt-layer-state="updated"></flt-picture>\n <flt-offset flt-layer-state="updated">\n <flt-clip flt-layer-state="updated" clip-type="physical-shape">\n <flt-clip-interior>\n <flt-picture flt-layer-state="updated">\n <flt-dom-canvas>\n <p>You have pushed the button this many times:</p>\n <p>0</p>\n </flt-dom-canvas>\n </flt-picture>\n <flt-clip flt-layer-state="updated" clip-type="physical-shape" >\n <flt-clip-interior >\n <flt-picture flt-layer-state="updated" >\n <flt-canvas >\n <div …Run Code Online (Sandbox Code Playgroud)