Adding web support to a Flutter app

Web support is a code-compatible implementation of Flutter that is rendered using standards-based web technologies: HTML, CSS and JavaScript. With web support, you can compile existing Flutter code written in Dart into a client experience that can be embedded in the browser and deployed to any web server. You can use all the features of Flutter, and you don’t need a browser plug-in.

showing Flutter architecture for C++ vs Flutter for web

Adding web support to Flutter involved implementing Flutter’s core drawing layer on top of standard browser APIs. Using a combination of DOM, Canvas, and CSS, web support aims to provide a portable, high-quality, and performant user experience across modern browsers. We implemented this core drawing layer completely in Dart and used Dart’s optimized JavaScript compiler to compile the Flutter core and framework along with your application into a single, minified source file that can be deployed to any web server.

In this early stage of development, we envision the web version of Flutter being valuable in many scenarios. For example:

A connected Progressive Web Application built with Flutter
Web support for Flutter enables existing mobile-based applications to be packaged as a PWA for reach to a broader variety of devices, or to provide a companion web experience to an existing app.
Embedded interactive content
Flutter provides a powerful environment for creating rich, data-centric components that can be easily hosted within an existing web page. Whether for data visualization, an online tool like a car configurator, or an embedded chart, Flutter can provide a productive development approach for embedded web content.
Embedding dynamic content in a Flutter mobile app
An established way to provide dynamic content updates within an existing mobile application is the use of a web view control, which can load and display information dynamically. The support Flutter now offers for a unified environment for web and mobile content enables you to deploy content online or embedded in an app without rewriting.

Notes on web support in 1.9

This preview version of web support is your opportunity to try it out. Before you get started, here are a few notes:

  • This release is missing features and has known performance issues, so we don’t recommend it for production.

  • You can update existing Flutter code to work on the web, but there are some caveats as web support hasn’t yet reached beta. For more information, see the web FAQ.

The following resources can help you get started: