Install Flutter
1 minute readNow to get the Flutter tools installed.
Follow instructions from https://docs.flutter.dev/get-started/install/linux/android
- Download the
flutter_*.tar.xz
archive - Unpack the archive into
$HOME/.local/bin
(creates$HOME/.local/bin/flutter/bin
)
At first I tried putting this at/usr/bin
, but that caused invisible errors in coc-flutter as it couldn’t access the path properly to find the Flutter SDK - Add the new path as above to $PATH eg in
~/.profile
# ~/.profile
export PATH="$HOME/.local/bin/flutter/bin:$PATH"
Agree to more licenses and get Flutter doctor to pass
First, agree to several laughably long licence agreements which Google knows full well that nobody reads.
flutter doctor --android-licenses
Then type Y and Enter for each prompt
Now run flutter doctor
. It should pass every test except ‘Android Studio (not installed)’. If so, we’re ready to start building Flutter apps (with Android Studio not installed).
Sample project
You can make a really simple sample project to check that everything’s installed correctly and see how it works.
flutter create sample-project
This will create a sample-project
directory with a Flutter app in it, a simple built-in demo of a button which counts up as you tap it.
To run the app:
cd sample-project
flutter run