Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter as GUI on Linux (non-Android)

Tags:

linux

flutter

I am thinking about creating a GUI for an embedded system using Flutter/Dart. The system will be a plain non-android system running on ARM.

The GUI will be the only piece of software visible on the screen, so there will be no need for a desktop environment.

I have done this before using QT embedded/C++, but the design requirements for the new device's GUI are such that this approach would be inefficient.

I was wondering if anyone might have succeeded in such an effort and would be willing to share.

Thanks.

like image 371
Ber Avatar asked Sep 07 '18 12:09

Ber


2 Answers

The official Flutter documentation and examples for building a desktop shell is at:

  • https://flutter.dev/desktop

Desktop, embedded system, and web are still experimental and not yet fully supported, but building upon what others have attempted and links shared from the comments, so as mentioned:

  • There’s https://github.com/google/flutter-desktop-embedding, though some parts have been merged into the main Flutter SDK, others parts are still currently relevant for launching desktop apps, such as /example/linux inside flutter-desktop-embedding/example/.
  • Nov 2018, medium/Flutter on Raspberry Pi (mostly) from scratch, involves a Flutter engine built for ARMv7 and the embedder as https://github.com/chinmaygarde/flutter_from_scratch.
  • And one more, Oct 2019, medium/Flutter mobile, web and desktop, most recent and perhaps most useful since it demonstrates across three platforms (though not quite your requirements, since it runs in a desktop environment).
    • but I was able to get this sample running on Chrome and my Linux desktop following this, it will involve flutter-desktop-embedding/example/linux.

Otherwise, working examples are few and far between.

(there is another medium/Flutter for Desktop: Create and Run a Desktop Application, but is not recommended because it is based on an even older version, prone to various issues)

like image 124
TWL Avatar answered Oct 18 '22 22:10

TWL


Updated 2020:

https://elinux.org/ELC_Europe_2020_Presentations, on the page, search "Graphical User Interface Using Flutter in Embedded Systems" for the pdf slides and youtube video.

the companion source code seems to be on https://github.com/sony/flutter-embedded-linux. (very active, should be more progress in 2021)

like image 30
Felix Xu Avatar answered Oct 18 '22 22:10

Felix Xu