With over 1M published apps, Google's Flutter expands its support for web apps and WebAssembly 1

Flutter, Google’s open-source multi-platform application framework, has been seeing quite a bit of momentum lately, with both Google’s internal teams betting on it for projects like the new Play Console App, the Google Cloud mobile app and Android’s Nearby Share app for Windows using it, as well as developers at Canonical (for the new Ubuntu installer), France’s SNCF and others using it for their projects. At Google I/O today, the team is announcing a number of new features for the project, which hit its 3.0 milestone at last year’s I/O and is now launching version 3.10.

Google also noted that there are now over 1 million published Flutter-based apps, up from 500,000 in mid-2022.

With Flutter being relatively stable at this point, it’s maybe no surprise that the team is working to expand some of its existing capabilities and to make it easier to adopt Flutter in existing projects. But at the same time, Google is also looking ahead to new technologies, with a special focus on WebAssembly.

With over 1M published apps, Google's Flutter expands its support for web apps and WebAssembly 2

Image Credits: Google

With version 3.10, developers can now more easily integrate Flutter components into their existing web apps. That’s something Google started working on a while back, but now, developers can use Flutter’s element embedding capabilities to integrate Flutter components just like any other CSS element — and then manipulate it just like a CSS element, too.

Early on, Flutter apps on the web tended to be full-scale, full-screen applications that were often based on existing mobile applications. “We started to see people who were building apps that took over the whole screen that often started with ‘ I’ve got a mobile app, and I want to run it on the web.’ But we’re now starting to see people who are building apps that are designed around the web experience and hosting on that,” Tim Sneath, Google’s director of product and UX for Flutter and the Dart programming language, told me.

Sneath also noted that the team worked hard to improve Flutter’s performance on the web (Flutter, it’s worth remembering, was originally a mobile app development framework, with stable web support only  arriving in version 2 in 2021). Specifically, this means load times have now been reduced quite significantly.

Talking about supporting the web, the Flutter team continues to work on targeting WebAssembly (Wasm), despite the framework’s close connection to the Dart language. Given that Wasm is still in its early days, a lot of its specs remain in flux. As the Flutter team notes, Wasm didn’t have garbage collection until recently, but Google worked with a number of teams in the Wasm ecosystem to develop the WasmGC extension, which is now being integrated into Chromium-based browsers. With this, the team now felt comfortable adding preview support for Wasm in its pre-release channels, allowing developers to compile Dart to Wasm.

“We have had production quality JavaScript support for a long time, but being able to bring the native power of compiled experiences to the web will help still further,” Sneath said. “A lot of it also is about integration. If you’ve got code in Kotlin or Dart or indeed other languages that compiles to web, and the ability to interoperate with them, it shifts where the substrate is. Sometimes people get very worried about this language versus that language and then treat them as these discrete ecosystems. For us, you care about people writing code with whatever language they want to and Wasm suddenly brings that coherence across our strategy. we’re excited to finally get to that point and maybe get away from having dialogues around [language] A versus B.”

Another recent focus for the Flutter team is graphics performance. As the team announced earlier this year, it completely rewrote its Impeller rendering runtime and in version 3.10, that’s now the default for iOS apps. With this, simply by migrating to the latest version of Flutter, apps will get a major performance boost.

On Android, Impeller is now in preview. There, the engine relies on the Vulkan library, which all modern Android devices support (though Google will offer a compatibility mode for older devices). While it might seem unusual for Android not to be the first to receive these updates, Sneath noted that Flutter’s graphics engine on Android was already quite optimized. Therefore, the team decided to prioritize iOS, where there was significantly more room for improving graphics performance

Read more about Google I/O 2023 on ProWellTech