[Guide] Install Flutter

Flutter on the JingPad

Flutter is a cross platfrom framework, based on the dart language, that one day will permit to compile/run also flutter apps on the JingPad, as soon as the problems with the OpenGL library are fixed…

Installation is easy:

just clone the directory:

git clone https://github.com/flutter/flutter.git

then you need to adjust in your bashrc, supposing you cloned the flutter stuff directly into your $HOME:

export  PATH=$PATH:~/flutter/bin:$HOME/.pub-cache/bin
export CHROME_EXECUTABLE=chromium-browser

the latter is needed if you want to dev webapps with flutter…
then source the bashrc or open a new shell (you are running with screen or something like that, aren’t you?)
and check if the dart exe is found:

which dart

then check the flutter install:

flutter doctor

ATM plain dart stuff runs well, which can be enough (i often design my apps as command line apps, with a separate, optional graphical UI), UI stuff has a (big) caveat:

[Edit]: thanks to Taepi:

unset LD_LIBRARY_PATH

that will remove libhybris from LD_LIBRARY_PATH and Flutter will (slowly) run with MESA LLVMpipe SW rendering

stagehand was a nice module that creates all relevant files for a dart project, just for example sake, you can “install” pub.dev modules for easy execution:

dart pub global activate stagehand

which will be placed in your .pub-cache/bin, as long as that is in your path, just type:

stagehand

will execute the binary!
otherwise you have to cd into the dir of the project and:

dart run bin/stagehand

to create a new project:

dart create my_new_awesome_project

for better performance don’t forget at all waypoints of your code to offer a fast and really usable user experience by precompiling the dart binary (speedup at least x 10!)

with

dart compile exe bin/myapp.dart -o bin/runme

and off you go dev’ing!

Thanks @bboett
I added your guide to the official Index:

Have a nice day!