Google Unleashes Flutter 2 And a New Era of Apps

Posted on March 3, 2021 by Paul Thurrott in Cloud, Dev, Mac and macOS, Mobile, Web browsers, Windows 10 with 16 Comments

In its initial releases, Flutter allowed developers to create apps that run on both Android and iOS. But now Google is setting its sights higher. Much higher.

“With Flutter 2, you can use the same codebase to ship native apps to five operating systems: iOS, Android, Windows, macOS, and Linux; as well as web experiences targeting browsers such as Chrome, Firefox, Safari or Edge,” Google’s Tim Sneath writes in the announcement post. “Flutter can even be embedded in cars, TVs and smart home appliances, providing the most pervasive and portable experience for an ambient computing world.”

With the release of Flutter 2, Google’s app development framework officially evolves from a mobile framework to a portable framework, allowing apps to run virtually anywhere there’s a screen. The biggest news in this release, perhaps, is Flutter’s support for web apps hitting the stable milestone. Now, developers can port existing apps—of which there are over 150,000—to the web, or they can create new Flutter-based web apps. Flutter 2 supports three key web app types:

  • Progressive Web Apps (PWAs), which function like native desktop and mobile apps and provide key native app capabilities.
  • Single-page apps (SPAs), which load once and then transmit data to and from Internet services.
  • Flutter mobile apps, which can be ported to the web, enabling a shared code experience.

As you may know, Flutter is written in the Dart programming language, which is being updated to version 2.12 and now supports sound null safety, which will help developers catch common sources of app crashes, and Dart FFI (foreign function interface), for accessing C-based APIs, including, yes, the Win32 API used by Windows applications. But Dart has another secret power for the web: It can be compiled to JavaScript, which makes Flutter’s support for web apps more seamless.

And to address different needs, Flutter actually provides two choices when it comes to developing web apps: You can use an HTML renderer that is optimized for size and compatibility, or a CanvasKit renderer that is fully consistent with Flutter mobile and desktop apps and uses WebAssembly and WebGL to render Skia paint commands to the browser canvas. By default, Flutter apps for the web will use the HTML renderer on mobile and the CanvasKit renderer on desktop platforms.

While Flutter 2 is largely about the addition of web capabilities, the broader platform has also seen some interesting advances since the last major milestone. And key among those are some that come from Google’s Flutter partners, which are increasing their use of this technology in interesting ways. And two of these partners are of particular interest.

The first is Ubuntu-maker Canonical, which is partnering with Google to bring Flutter to the desktop. Moving forward, Flutter is the default choice for future desktop and web apps that Canonical creates for Ubuntu, and the new Ubuntu installer was built from the ground up using Flutter.

The second, believe it or not, is Microsoft. As you may know, Sneath and the Flutter team have been looking for Microsoft to put its weight and influence behind Flutter, and today we learn that the software giant is making contributions to the framework related to foldable Android devices like Surface Duo.

Ultimately, what Google is trying to accomplish with Flutter is that decades-long dream of writing code once that runs everywhere. But this time, finally, it seems attainable.

“With the ability to reach 6 platforms at once, the advantages to Flutter are real,” Mr. Sneath told me in a recent conversation. “This is a solution that works for large and small developers, and you can target the heterogeneous world in which we now live. We’re making it easier to get to all of those places at once.”

You can learn more about Flutter at the Flutter website. I hope to look more closely at Flutter 2 in the weeks ahead.

Tagged with ,

Elevate the Conversation!

Join Thurrott Premium to enjoy our Premium comments.

Premium member comments on news posts will feature an elevated status that increases their visibility. This tab would allow you to participate in Premium comments with other premium members. Register to join the other Premium members in elevating the conversation!

Register or Subscribe

Join the discussion!


Don't have a login but want to join the conversation? Become a Thurrott Premium or Basic User to participate