Flutter 3 on Devuan 4: Getting started
- Mobile app development
- Published
- 6 min read
- @nabbisen
Table of contents
Summary Summary
Flutter (opens in a new tab) is one of the mobile app frameworks developed by Google (opens in a new tab) which supports both Android (opens in a new tab) and iOS (opens in a new tab). It is cross-platform and being advanced to be applied to other platforms. Their official website says:
Flutter transforms the app development process. Build, test, and deploy beautiful mobile, web, desktop, and embedded apps from a single codebase.
On May 12, 2022, its latest major version, 3 (opens in a new tab) was released.
I built the dev env on Devuan (opens in a new tab) GNU (opens in a new tab)+Linux (opens in a new tab), a fork of Debian (opens in a new tab) without systemd (opens in a new tab). It resembles my past trial on Artix Linux.
This post shows how I did it.
It is manual installation without Debian package management system (apt-get etc.). However, it isn’t complicated thanks to the officially distributed packages.
Environment Environment
- OS: Devuan 4 (Chimaera)
- App Framework: Flutter 3
- Programming Language: Dart (opens in a new tab)
- IDE: Android Studio (opens in a new tab) 2022.3.1.18
Tutorial Tutorial
All doas (opens in a new tab) from OpenBSD’s (opens in a new tab) can be replaced with sudo (opens in a new tab).
Get Android Studio (IDE) Get Android Studio (IDE)
Install it and configure. This post may be helpful.
Install dependencies Install dependencies
Run:
$ doas apt install cmake clang ninja-build libgtk-3-dev
Get Flutter and Dart SDK Get Flutter and Dart SDK
Flutter Flutter
Get the .tar.xz package in “Install Flutter manually” (opens in a new tab) in the official docs.

Then run to extract:
$ tar xJf flutter_linux_3.xx.xx-stable.tar.xz
Dart SDK Dart SDK
Get the .zip package in “Stable channel” (opens in a new tab) in “Dart SDK archive” in the official.

Then extract all from it.
Set up PATH environment variable Set up PATH environment variable
Update PATH to let them available in IDE:
$ export PATH=(readlink -f dart-sdk/bin):"$PATH"
$ export PATH=(readlink -f flutter/bin):"$PATH"
The order above is important: First dart-sdk comes and then flutter does. It means we should be careful that flutter should be resolved earlier than dart.
Otherwise, you will meet the warning from flutter doctor:
! Warning: `dart` on your path resolves to
/(...)/dart-sdk/bin/dart, which is not inside your current
Flutter SDK checkout at /(...)/flutter. Consider adding
/(...)/flutter/bin to the front of your path.
How to update PATH at login (Optional) How to update PATH at login (Optional)
Well, it should be useful to add them to PATH environment variable at login.
It’s done, for example, by editing ~/.profile.
export PATH="$HOME/(...)/dart-sdk/bin:$PATH"
export PATH="$HOME/(...)/flutter/bin:$PATH"In addition, with multiple variables to be added, a list as below and for-loop statement are also available.
for x in \
$HOME/(...)/(something to be added) \
$HOME/(...)/dart-sdk \
$HOME/(...)/flutter
do
if [ -d "$x" ] ; then
PATH="$x/bin:$PATH"
fi
doneSet up CHROME_EXECUTABLE in case of Chromium used (Optional) Set up CHROME_EXECUTABLE in case of Chromium used (Optional)
In order to pass tests by flutter doctor perfectly, you must have either Google Chrome or defined CHROME_EXECUTABLE.
Chromium (opens in a new tab) was my choice and thus I ran:
$ export CHROME_EXECUTABLE=/usr/bin/chromium
Configure IDE Configure IDE
Open “Settings” in “File” in the top menus and choose “Plugins”.
Install “Flutter” and “Dart”.

You will see warning on Flutter. It has to be accepted:

After Flutter plugin installed, you will be required to “Restart” IDE.

Next, we have to install Android SDK Command-line Tools.
Open “Settings” again and go to “Languages & Frameworks” > “Android SDK” > “SDK Tools”. Check “Android SDK Command-line Tools (latest)” and click “OK"s.


The download will begin and finish after a while:

Run flutter doctor Run flutter doctor
You have two tasks left: Agree to the Android licenses, and validate your environment.
They are done by flutter doctor, one of the flutter commands (opens in a new tab).
Open terminal and run to deal with the first task:
$ flutter doctor --android-licenses
You will be asked if agree to each of them.
Next, run to validate:
$ flutter doctor
Printed out as below ?
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.10.6, on Devuan GNU/Linux 4 (chimaera) 5.10.0-23-amd64, locale
en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Chrome - develop for the web
[✓] Linux toolchain - develop for Linux desktop
[✓] Android Studio (version 2022.3)
[✓] Connected device (2 available)
[✓] Network resources
• No issues found!
Congratulations 🎉🎉
Opt out telemetry by Flutter (Optional) Opt out telemetry by Flutter (Optional)
Additionally, if you want to opt it out, run:
$ flutter --disable-telemetry
Analytics reporting disabled.
Create a Flutter project Create a Flutter project
Now we are ready. Let’s create your first project !!
Start Android Studio and click “New Flutter Project”.

After validating the paths of flutter and dart, click “Next”:


Enter and confirm the project information, and click “Create”:

After a little short, the creation will be completed.

Shall we run the default demo ? Start the virtual device in “Device Manager”:

Then run the app by clicking the green triangle button at a little right to the center in the second-top bar. Alternatively, push Shift + F10, or click [Run] - [Run ‘app’] in the top menus.

Your flutter app is here !!
Editing examples Editing examples
The below is a small trial to customize it: Changed the title phrase and also color theme. (Line 31, 34)

Build executable for Android mobile Build executable for Android mobile
Here is another small trial. You can build APK or App Bundle:

…and deliver it easily ;)

Conclusion Conclusion
You got ready to develop Flutter apps. I hope you enjoy the cross-platform development 💫
Besides, there may be other ways to install them, although there doesn’t seem no such Flatpak (opens in a new tab) packages in Flathub (opens in a new tab). For example, some scenerio to use some release channel or Docker (opens in a new tab) / Podman (opens in a new tab). Additionally, when you use a different Linux distro where systemd is adopted and therefore can do Snaps (opens in a new tab) (Snapd), you have another possibility.
🎶 🎵 🎸 Happy development 🥁 🎶 🎵
More on: Build mobile apps
-
Flutter is one of the frameworks to build apps, primarily focusing on the mobile.
-
I updated Flutter version to 2.2.0 on my Arch Linux today.
-
When I tried to install Flutter 2 on Linux, running flutter doctor was required.
Scqr [secureal]
Scqr [secureal]: the engineering practice of Reflerd Inc. (opens in a new tab)
Comments and feedback are welcome.