Skip to main content

Your submission was sent successfully! Close

Thank you for signing up for our newsletter!
In these regular emails you will find the latest updates from Canonical and upcoming events where you can meet our team.Close

Thank you for contacting us. A member of our team will be in touch shortly. Close

  1. Blog
  2. Article

Oliver Smith
on 18 May 2022

Bring your multi-platform apps to Linux desktop with Flutter 3


Google I/O 2022 took place last week and brought with it a host of exciting news from the world of Google, including the announcement of Flutter 3 with long-awaited Linux Desktop support!

Flutter 3 is the next big step in Flutter’s journey to enable multi-platform application development across what is now six platforms: iOS, Android, Web, Windows, macOS and Linux. It features improved performance and additional profiling in Flutter DevTools, support for Material 3, Apple silicon, accessibility services and web app life-cycles on top of the snazzy new Flutter Casual Games Toolkit and much more

There’s truly something for everyone in this latest release.

Linux Desktop support is production-ready

Canonical and the Flutter team have partnered closely to bring desktop support to Linux. We’ve created packages that allow for deep integration with system services like dbus, gsettings, desktop notifications and network manager, enabling everything you need to deliver a high-quality desktop experience. You can even style your app with Ubuntu’s iconic Yaru theme.

For a full overview of Canonical’s packages check out our pub.dev.

As of this week, Linux desktop support has moved to stable, meaning it’s production-ready and enabled immediately once you create a new application.

You can check this by running ‘flutter doctor’ and looking for the following in the output.

 [✓] Linux toolchain - develop for Linux desktop

To run your application on Linux, simply type ‘flutter run -d linux’ from the command line.

To build it, it is as easy as ‘flutter build linux’.

In addition, if you have an existing Flutter project that you’d like to bring to Linux, all you need to do is run the following command from the root project directory:

flutter create --platforms=linux

And then the above commands will become available.

You can find more information on developing for desktop OSs here

Easy authentication with FlutterFire Auth

But that’s not all, our colleagues at Invertase have also got some exciting news, with FlutterFire Auth also moving to stable. FlutterFire connects your desktop app to Google’s Firebase services and FlutterFire Auth enables developers on Windows and Linux to authenticate their app via email, phone number or various OAuth providers such as Google and GitHub.

Check out the FlutterFire Auth demo from our previous blog post.

To add FlutterFire Auth support to your project, simply run the following commands in your project root folder:

flutter pub add firebase_core_desktop
flutter pub add firebase_auth_desktop

You can also add it to your existing project with:

flutter pub add firebase_core
flutter pub add firebase_auth

For more details on how to take advantage of FlutterFire Auth, check out Invertase’s latest blog.

For more information on Invertase’s future plans for FlutterFire, you can follow their 2022 roadmap on their GitHub here.

Bring your Flutter desktop app to the Snap Store

The Snap Store serves millions of Linux users across 41 distributions!

So you’ve got a great Flutter app and you’ve built it for Linux. The next step is to get it in front of users!

The Snap store is available on any Linux distribution running snapd and delivers a range of cutting edge development tools and key productivity apps to millions of users all over the world. From IDEs like VS Code and Android Studio to messaging apps like Telegram, Discord and Slack as well as tools for creators like Blender, Shotcut and OBS Studio. We’ve even got gamers covered with our new Steam snap.

Snaps are sandboxed, easily updated and bundle all the dependencies your apps need to run across a range of Linux distributions. Packaging your Flutter app as a snap is simple and the Flutter docs have a simple how-to guide to get you started.

Once you’ve published your snap, let us know in the snapcraft forum or the Ubuntu Desktop discourse where many community members are already experimenting with Flutter on Linux!

Explore Flutter 3

Everything we’ve talked about in this post is just the tip of the iceberg when it comes to the latest release of Flutter. To learn more, check out the official Flutter I/O page for a comprehensive breakdown of its new features along with a range of helpful talks and tutorials to help developers get the most out of this versatile toolset!

At Canonical we’re looking forward to welcoming a whole new community of Flutter developers to the wonderful world of Linux. It’s great to have you here!

Related posts


Luci Stanescu
28 October 2024

Imagining the future of Cybersecurity

Ubuntu Security

October 2024 marks the 20th anniversary of Ubuntu. The cybersecurity landscape has significantly shifted since 2004. If you have been following the Ubuntu Security Team’s special three-part series podcast that we put out to mark Cybersecurity Awareness Month, you will have listened to us talk about significant moments that have shaped the ...


Canonical
10 October 2024

Canonical Releases Ubuntu 24.10 Oracular Oriole

Cloud and server Article

The latest release of Ubuntu delivers a cutting edge kernel and enhanced desktop security. 10 October 2024 Today Canonical announced the release of Ubuntu 24.10, codenamed “Oracular Oriole,” available to download and install from ubuntu.com/download. Ubuntu 24.10 delivers the latest kernel, toolchains and GNOME 47 desktop environment alon ...


Massimiliano Gori
16 September 2024

Announcing Authd: OIDC authentication for Ubuntu Desktop and Server

Ubuntu Article

Today we are announcing the general availability of Authd, a new authentication daemon for Ubuntu that allows direct integration with cloud-based identity providers for both Ubuntu Desktop and Server. Authd is available free of charge on Ubuntu 24.04 LTS. At launch, Authd supports Microsoft Entra ID (formerly Azure Active Directory) ident ...