32 Flutter

20210321 Flutter is a cross-platform framework for building user interfaces for apps, utilising the dart programming language, targeting Linux, Android, JavaScript, macOS, Windows, and iOS. The same source code for an app can be compiled to a native app on each of the supported platforms. The desktop support remains limited with ongoing development which may make it somewhat unstable for the time being.

A guide to an initial install on Ubuntu begins with a snap install:

sudo snap install flutter --classic

The following may no longer (20210905) be required:

sudo snap alias flutter.dart dart

If you will be targeting Android devices then you will need:

sudo snap install android-studio --classic
flutter config --android-studio-dir /snap/android-studio/current/android-studio
flutter doctor --android-licenses

For the latest developer version of flutter:

flutter channel dev
flutter upgrade

Ensure support for desktop application development:

flutter config --enable-linux-desktop
flutter config --enable-macos-desktop
flutter config --enable-windows-desktop

Check everything is okay:

flutter doctor

To then create, build, and run a sample linux desktop application:

mkdir mlhub
cd mlhub
flutter create .
flutter run -d linux

We will demonstrate flutter through the development of a GUI app for the MLHub repository.

Resources to explore include:

Your donation will support ongoing availability and give you access to the PDF version of the book. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Popular open source software includes rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2021 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0.