DESK-MX8M-L-TN-0001: Running Flutter on SBC ORCA and MITO 8M Mini

From DAVE Developer's Wiki
Jump to: navigation, search
Info Box


200px-Emblem-important.svg.png

This technical note has been validated using the kit version in the History table.

History
Issue Date Notes

2024/05/21

DESK-MX8M-L 4.1.0
2024/07/22 DESK-MX8M-L 4.2.0


Introduction[edit | edit source]

Flutter is an open source framework by Google for building beautiful, natively compiled, multi-platform applications from a single codebase. Its main powerful characteristic is to deploy to multiple devices from a single codebase: mobile, web, desktop, and embedded devices.

Flutter consists of both a UI language and a rendering engine. When a Flutter application is compiled, it ships with both the UI code and the rendering engine

This Technical Note (TN) describes how to create a complete SD card that can run on ORCA SBC a Flutter environment for running the Flutter demo applications.

Flutter github repository is the entry point for the source codes, while the Flutter documentation is available here.

Build steps[edit | edit source]

To build a image with Flutter Gallery support for MITO 8M MINI Evaluation Kit and ORCA SBC, please follow the instruction in wiki page and select image:

  • desk-mx8mm_flutter-gallery_wayland.yml for MITO 8M Mini
  • desk-mx8mp_flutter-gallery_wayland.yml for ORCA SBC

When the build is completed, you can install image desk-image-flutter-gallery-desk-mx8mm.wic.bz2 or desk-image-flutter-gallery-desk-mx8mp.wic.bz2 on microSD with the instruction in this wiki page

Pre-built image[edit | edit source]

Pre-built images are available - for demo purposes - on our mirror server:

Running Flutter in the target[edit | edit source]

At boot time, the Flutter Gallery application starts automatically. In case you want to start Flutter Gallery manually, send the following command

root@desk-mx8mp:~# systemctl start systemd-flutter-gallery

On the display you can see the following image

flutter-gallery demo on SBC ORCA

To stop Flutter gallery application you need to send the following command

root@desk-mx8mp:~# systemctl stop systemd-flutter-gallery

For starting the Flutter Counter demo application, just send the following commands

  • stop Flutter Gallery application
root@desk-mx8mp:~# systemctl stop systemd-flutter-gallery
  • the library PATH has to be properly set:
root@desk-mx8mp:~# export LD_LIBRARY_PATH=/usr/share/flutter/flutter-counter/3.19.3/release/lib/
  • start the flutter counter demo example invoking the flutter-client:
root@desk-mx8mp:~# flutter-client -f -b /usr/share/flutter/flutter-counter/3.19.3/release/

On display you can see the following image

flutter-counter demo on SBC ORCA