Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ


Choose your language

InfoQ Homepage News Flutter 1.5 Goes Multi-Platform, Includes Web Support

Flutter 1.5 Goes Multi-Platform, Includes Web Support

This item in japanese

Announced as a technical preview at the latest Google I/O 2019 event, Flutter 1.5 aims to make it possible to create native applications for multiple platforms, including new form-factor devices, the Desktop, and the Web.

The original aim of Flutter was enabling the creation of apps running on both iOS and Android from a single Dart codebase. While keeping up with development of new features for the two mobile platforms, the Flutter team is also targeting the creation of desktop apps for Mac, Windows, and Linux through desktop shells and for embedded, new form-factor devices such as the Google Home Hub.

Most notably, Flutter now supports the creation of Web apps. The origins of Flutter for the Web trace back to Flutter 1.0, which also included Hummingbird. At that time, Hummingbird was just an experimental implementation of Flutter's runtime for the browser that leveraged Dart's capability to compile to JavaScript in addition to native ARM. That experiment has evolved now into the current support for Web applications in Flutter 1.5. Google's interest in using Flutter for Web app development was fueled by improvements in all major browsers with hardware-acceleration support to improve performance of graphics, animations, and text in addition to ever faster JavaScript execution, Google says.

It is worth noting that Dart, the language Flutter is strictly tied to, was born out of an attempt of replace JavaScript as the language to go for Web development. As it happens, this was not the case. This may also explain why the Google is framing the use of Flutter in slightly different light than previously and definitely not aiming at a redefinition of Web development:

Our initial vision for Flutter on the web is not as a general purpose replacement for the document experiences that HTML is optimized for; instead we intend it as a great way to build highly interactive, graphically rich content, where the benefits of a sophisticated UI framework are keenly felt.

An example of what the Flutter team has in mind is provided by a demo app they developed in collaboration with the New York Times to allow readers to play crosswords and other puzzle games on a variety of devices.

One of the challenges the Flutter team had to overcome in making Flutter for the Web was ensuring the graphics and text rendering engine they used provided enough performance and supported core web features across all major browsers. Also, they wanted to keep Flutter APIs and architecture as platform-agnostic as possible, meaning their implementation is itself shared across platforms as much as possible, and all you have is just one Flutter toolkit. To make this approach viable, when creating a Flutter app for the Web, the whole Flutter framework is compiled to JavaScript and run in the browser. Additionally, key work has been done and is still required to make platform-specific features coexist seamlessly across all platforms. An example of that is browser history being integrated with Flutter's routing model, or enabling mouse scrolling, hovering, and focus.

At the moment, Flutter for the Web is provided as a temporary fork of Flutter, but work has already started to merge browser support into the main repository, says Google product manager Kevin Moore.

You can find examples, documentation, and additional resources on the Flutter website.

Rate this Article