At Google I/O, Flutter and Dart updates overshadowed by official support for Kotlin Multiplatform

At Google I/O, Flutter and Dart updates overshadowed by official support for Kotlin Multiplatform
Writing code

Among Google’s news at its I/O 2024 event this week was the release of Flutter 3.22 and Dart 3.4, both significant updates, but the cloud giant also introduced official support for Kotlin Multiplatform, in a possible shift of focus towards Kotlin-based cross-platform solutions.

New Flutter features include stable WebAssembly support and an improved rendering engine, while Dart is getting the beginnings of a macro system, Dart being the programming language used by Flutter.

According to Kevin Chisholm, Google technical program manager for Flutter and Dart, compiling to WebAssembly rather than JavaScript can yield faster rendering performance by 2x or 3x, using the showcase sample Wonderous App.

There are also updates to the Impeller rendering engine, with the use of the Vulkan graphics API on Android now feature-complete, offering optimized performance versus the fallback OpenGL API.

Flutter for desktop applications now has initial support for Windows on Arm64, though still in development, but support for Windows 7 and 8 has been dropped.

Dart 3.4, along with WebAssembly updates, has introduced a macro system, though currently there is only a single macro, called JsonCodable. Adding this as an annotation to a class adds new methods such as toJson() which will serialize an object of that type to JSON.

“The eventual goal is to enable the community to create their own macros. This raises the abstraction level of Dart programming,” said product manager Michael Thomsen.

Despite these improvements, there is some anxiety in the Flutter community in the aftermath of layoffs in the Google team. “It was crazy to be seeing demos and new things working and discussions about new customers the same day we lost colleagues and friends” said Chisholm on Reddit while also stating that Google is still “betting on Flutter and Dart.”

Flutter has been a big success in terms of adoption, in the time since its version 1.0 release in late 2018. Canonical has adopted it for desktop applications in Ubuntu, while the latest StackOverflow survey shows usage by over 9 percent of developers, well ahead of other options like Electron, Xamarin  or .NET MAUI.

The value this delivers back to Google is difficult to assess, though there is some advantage to a vendor in providing a popular open source framework since it can ensure strong support for its other services. The layoffs raise a suspicion that Google’s support for Flutter and Dart is cooling; reinforced at Google I/O by the introduction of official support for Kotlin multi-platform. “Today we are excited to announce we are supporting Kotlin Multiplatform on Android, which enables sharing code across mobile, web, server, and desktop platforms,” said the official post, adding that the Google Docs app for Android, iOS and Web uses the language for shared business logic.

The reference to shared business logic suggests that Google is focused on non-visual use of Kotlin Multiplatform, though there is a GUI option called Compose Multiplatform, which enabled a shared user interface for Android, iOS, desktop and web.

Thomsen assured devs via X that, regarding Dart and Flutter, there are “no strategy changes. No change in team size; some DevOps roles moving to new locations. 2024 roadmap continues.”

Despite that reassurance, it is hard to avoid the sense that Flutter and Dart are now less prominent in Google’s cross-platform framework offerings, and that Kotlin Multiplatform could gain more attention.

The situation is reminiscent of that at Microsoft, where .NET MAUI is under development yet elsewhere in the company React Native is the cross-platform framework of choice.