It is great to see the fruit of Ubuntu's decision to embrace Flutter. App Center made it into Ubuntu 23.10 but properly cements itself into 24.04 as a flagship app. 24.04 is an LTS release, so this is a long term bet.
TL:DR — This is a massive endorsement of Flutter for Linux by Ubuntu.
Contents
Ubuntu App Center
Its snappy, and full of apps. What more do people want :)
Software updates
You can see I have some updates to do, my bad!
So lets build it, we're Flutter people after all.
Follow the instructions in the Start building Flutter native desktop apps on Linux page at Flutter.
- First run $ sudo apt update && sudo apt upgrade to get your system to the perfect state of updatedness.
- Verify that you have the following tools installed:
bash
,file
,mkdir
,rm
,which
. $ which bash file mkdir rm which.
- Install the following packages:
curl
,git
,unzip
,xz-utils
,zip
,libglu1-mesa
, sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa.
- To develop Linux apps, Flutter say, you'll also need to install these packages $ sudo apt-get install clang cmake git ninja-build pkg-config libgtk-3-dev liblzma-dev libstdc++-12-dev. This is quite verbose and installs a lot of dependencies.
Flutter warn that when you run the current version offlutter doctor
, it might list a different version of one of these packages and to install the version it recommends.
Integrated Development Environment (IDE)
- You can just use an editor like vi or Sublime Text to develop apps. If you prefer to use an IDE I'd recommend Codium which is a community-driven, freely-licensed binary distribution of Microsoft’s editor VS Code. Both are in Ubuntu App Center. Meta Meta. This article isn't about that, I'll just use the command line.
- Now Install Flutter. By far the easiest way is to use App Centre. You can just install it from here without the dependencies noted above. Its a snap! That means no messing about with path environment variables.
- Now, you can open a Terminal and run $ flutter doctor which will go ahead and complete its work, and tell you all about your new development toolchain. Heres a screenshot:
And heres the text output of the $ flutter doctor command:
There would be more to do to enable Flutter for Android development, and for web apps but we're all set for Linux.$ flutter doctor Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.19.4, on Ubuntu Noble Numbat (development branch) 6.8.0-11-generic, locale en_US.UTF-8) [✗] Android toolchain - develop for Android devices ✗ Unable to locate Android SDK. Install Android Studio from: https://developer.android.com/studio/index.html On first launch it will assist you in installing the Android SDK components. (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions). If the Android SDK has been installed to a custom location, please use `flutter config --android-sdk` to update to that location. [✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome) ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable. [✓] Linux toolchain - develop for Linux desktop [!] Android Studio (not installed) [✓] Connected device (1 available) [✓] Network resources ! Doctor found issues in 3 categories. $
- Now follow the instructions from the https://github.com/ubuntu/app-center/blob/main/CONTRIBUTING.md document following on from install the Flutter Linux prerequisites.
- The project uses a tool called Melos "to make it straightforward to execute common tasks".
- Install it $ dart pub global activate melos. Note that it asks you to
$HOME/.pub-cache/bin
to your path by addingexport PATH="$PATH":"$HOME/.pub-cache/bin"
to your.bashrc
. - Download the code from GitHub, If you're going to work on it, follow the contributors guide, clone the repo, and create your own branch.
$ git clone
This email address is being protected from spambots. You need JavaScript enabled to view it. :yourgithub/app-center.git Cloning into 'app-center'... remote: Enumerating objects: 12738, done. remote: Counting objects: 100% (12738/12738), done. remote: Compressing objects: 100% (2974/2974), done. remote: Total 12738 (delta 9591), reused 12312 (delta 9509), pack-reused 0 Receiving objects: 100% (12738/12738), 11.58 MiB | 6.12 MiB/s, done. Resolving deltas: 100% (9591/9591), done. $
Change into the project folder $ cd app-center - Now bootstrap melos, using $ melos bootstrap. According to the doc this 'connects all the local packages/apps to each other with the help of pubspec_overrides.yaml files, and it also runs pub get in all packages/apps'.
- Now you can $ flutter run and ...
- lt just works. Look carefully at the desktop screenshot. App Center doesn't have an app icon, just a cog, this is my running clone of the project in flutter not the App Center app from Ubuntu 24.04 which is not running! Flutter for Linux has all the flutter goodies, like hot reload and Flutter DevTools debugger and profiler, Absolutely amazing.
-
See also
Ubuntu App Center – An open source project published on GitHub using the GNU General Public License v3.0 (gpl-3.0).
Building Linux apps with Flutter – Official page with considerations unique to building Linux apps with Flutter, including shell integration and preparation of apps for distribution.