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 ,

Join the discussion!

BECOME A THURROTT MEMBER:

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

Register
Comments (22)

22 responses to “Google Unleashes Flutter 2 And a New Era of Apps”

  1. Avatar

    bart

    This is huge. Even Surface devices, like the unreleased Surface Neo, could potentially benefit from this.

  2. Avatar

    IanYates82

    Dart hasn't really caught on. I'll have to give it another look as it seems like it's not going away. If it can compile down to JavaScript then it can't be too complex and may well have some good syntax (although C# and typescript are awfully hard to beat)

  3. Avatar

    Martin Sjöholm

    If only there had been, like, I dunno ... a Windows based mobile OS ...?

  4. Avatar

    winner

    Well, you have to admire the ambition.

    But things like this have a way of never making it to their level of promise. Hopefully this time it will, though.

  5. Avatar

    dcdevito

    Jack of all app platform trades, highest performer or feature richest of none of them.

  6. Avatar

    rmac

    In reply to lvthunder: MS were close to a ubiquitous platform with .NET back in 2001 - common data layer, common business layer, hybrid desktop/web UI. XAML came alone, mobile came along and XAML became fragmented. In November this year we ought to be back to where we were in 2001, only Google has meanwhile beaten MS to the next step with a single framework.
    So the question is, why would you support a competitor who is eclipsing your efforts instead of focusing on finally making something similar happen?


  7. Avatar

    compsciguy31415

    I wonder what will happen when Google moves on to the next development framework. Will they allow Microsoft and others to continue the development and maintenance? I know it's on GitHub, but who will approve the pull requests if Google pulls out?

  8. Avatar

    brduffy

    Flutter is pretty cool, but just because a framework can target 5 different platforms doesn't make it particularly good on any single one. I think there is a lot of promise for Flutter on the linux desktop and of course for Android. The web apps should be very good as well. On IOS and Windows you will probably find that you are compromising quite a bit from the native toolkit.

  9. Avatar

    scovious

    I would wager anything that there is easy to use Google advertising support built in so devs can easily help Google make money from its staple product: Ads. Nothing wrong with that of course, unless there's no alternatives.

    Otherwise I am curious how Flutter would handle game design, or if it's more tailored for 2D apps. Then again, Google seems like it's retreating from game design these days.

  10. Avatar

    ragingthunder

    The whole Android development experience on Windows (or mac) is atrocious. The old-school Java-powered IDE leased from JetBrains is slow and painful to use. No comparison to tools like Visual Studio. I know there are other ways of building Google-sanctioned apps but most feel bloaty, under-optimised and out of place on traditional desktops.

  11. Avatar

    rmac

    On dismissing a unified Blazor-MAUI platform, I wonder if Richard Lander will be eating his words, though it's completely bizarre why MS would want to support Flutter. They must be desperate to break the Apple model or they've got to me merging with Google?!

Leave a Reply