Flutter’s web support delivers the same experiences on the web as on mobile. Building on the portability of Dart, the power of the web platform and the flexibility of the Flutter framework, you can now build apps for iOS, Android, and the browser from the same codebase. You can compile existing Flutter code written in Dart into a web experience because it is exactly the same Flutter framework and web is just another device target for your app.
While you can do a lot on the web, Flutter’s web support is most valuable in the following scenarios:
- A Progressive Web Application built with Flutter
- Flutter delivers high-quality PWAs that are integrated with a user’s environment, including installation, offline support, and tailored UX.
- Single Page Application
- Flutter’s web support enables complex standalone web apps that are rich with graphics and interactive content to reach end users on a wide variety of devices.
- Existing mobile applications
- Web support for Flutter provides a browser-based delivery model for existing Flutter mobile apps.
Not every HTML scenario is ideally suited for Flutter at this time. For example, text-rich, flow-based, static content such as blog articles benefit from the document-centric model that the web is built around, rather than the app-centric services that a UI framework like Flutter can deliver. However, you can use Flutter to embed interactive experiences into these websites.
For a glimpse into how to migrate your mobile app to web, see the following video:
关于 web 支持的说明
The following resources can help you get started:
要向现有应用添加Web支持，或创建一个包含 Web 支持的新应用，请参阅 使用 Flutter 构建 Web 应用。
To add web support to an existing app, or to create a new app that includes web support, see Building a web application with Flutter.
了解更多关于 Flutter web 渲染器 (HTML and CanvasKit) 的不同之处，请查阅网页渲染器。
To learn about Flutter’s different web renderers (HTML and CanvasKit), see Web renderers
想了解如何创建响应式 Flutter 应用，请参阅 创建响应式应用。
To learn how to create a responsive Flutter app, see Creating responsive apps.
要浏览常见问题和答案，请参阅 Web 常见问题。
To view commonly asked questions and answers, see the web FAQ.
要查看代码实例，请查看 Web 平台示例代码。
To see code examples, check out the web samples for Flutter.
查看 Flutter web 应用的示例，可以试试看 Flutter Gallery。
To see a Flutter web app demo, check out the Flutter Gallery.
要了解关于发布 Web 应用的信息，请参阅 Preparing an app for web release。
To learn about deploying a web app, see Preparing an app for web release.
请从 File an issue 向 Flutter 主仓库提一个 issue。
File an issue on the main Flutter repo.
你可以在 Discord 的 #help 频道咨询 web 相关的问题。
You can chat and ask web-related questions on the #help channel on Discord.