How to Install Flutter and Dart on Any GNU/Linux Distro
Flutter is a Framework/ToolKit and Dart is a scripting language, both from Google.
What is Flutter?
Flutter (codenamed “Sky” during development) is an open source user interface development kit (UI toolkit and framework), created by Google in 2015, based on the Dart programming language, which enables creating natively compiled apps for Android, iOS, Windows, Mac, Linux, and Fuchsia and Web operating systems.
The main components of Flutter include:
- Dart programming language
- Flutter Engine
- Foundation Library
- Design-specific Widgets with ready implementations for Android (Google Material) and iOS (Cupertino)
The main advantages of the toolkit/framework:
- High productivity, coming from a cross-platform, you can use the same codebase for your iOS and Android app. …
- High performance;
- Fast development;
Flutter apps are written in the Dart programming language and make use of many of the language’s more advanced features.
What is Dart?
In November 2013, the first stable version, Dart 1.0, was released In August 2018, Dart 2.0 was released, a reboot of the language, optimized for client-side development for web and mobile devices.
Dart SDK ships with Flutter; it is not necessary to install Dart separately. The Flutter SDK includes the complete Dart SDK and has the
01. Download the package that has everything (
Check here for a newer version!
02. Extract the package:
03. Move to optional directory:
04. Export Flutter’s
bin/ to your
05. Test the commands:
Creating a Hello, World! in Dart
Create a file with the name you want and extension:
vim main.dart and insert the content below:
To run the code:
To compile and run the binary:
Creating a Hello, World! with Flutter
There are several ways to display, read the outputs, however the simplest is using Google Chrome. If
flutter run doesn’t list this option, do it like this:
Example Google Chrome binary path in Gentoo.
For convenience, add this to your
When you run the
flutter doctorcommand, it describes this!
It’s an app that you click on the
+ button and it adds/adds to the count:
The file to edit is:
If you choose option 1 (you need to have
gtk installed), it will open in a new window, as in the example below:
Alternatively you can use snapd to install:
Although native to Ubuntu, it is available for several distros!
For example in Gentoo:
flutter dart programming gnu linux