Flutter as GUI on Linux (non-Android)
Solution 1
The official Flutter documentation and examples for building a desktop shell is at:
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)
Solution 2
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)
Ber
My favorite language is Python which I use for many tools I create at work. I am beginning to work on some Django based private web apps. My day job is mostly embedded C in medical devices. Lately I also worked on SQLite and QT, C++ a lot in the same field. Python finally also made it into a product. Several background task for the main GUI have been implemented in Python, using DBus to communicate. My latest programming environment ist Flutter/Dart for mobile apps. I built one private and one costomer's apps so for. Very exciting stuff! My new profile picture shows Scotty, our Border Collie, high up in the Austrian alps. We both love hiking trekking and climbing there. I am using a RaspberryPi (Rev. B2) for an RFID base door lock project. This is now also connected to an app. #SOreadytohelp Stackoverflow has enabled me to quickly and easily find solutions to my programming and system problems, and I am happy to help others in return. Happy anniversary SO.
Updated on December 06, 2022Comments
-
Ber over 1 year
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.