Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Fluttercon 2023: Making Coffee with Flutter

Moritz
November 16, 2023

Fluttercon 2023: Making Coffee with Flutter

We may not have realized it yet, but Flutter could become the next big player for UIs on embedded devices.We'll take a dive into running Flutter on embedded Devices. What's currently supported and what custom embedder can we use to achieve this?

Moritz

November 16, 2023
Tweet

More Decks by Moritz

Other Decks in Programming

Transcript

  1. Fluttercon Berlin 2023 2023 Making Coffee with Flutter [email protected] Agenda

    • Intro • The Coffeemachine • Why eFlutter • How to eFlutter 2
  2. Fluttercon Berlin 2023 2023 Making Coffee with Flutter [email protected] Illy

    FrancisFrancis X1 • Production: 1995 – today • Aluminium-Boiler • Single-Circuit 10
  3. Fluttercon Berlin 2023 2023 Making Coffee with Flutter [email protected] Coffee-Theory

    Parameters: • Duration: 20s – 40s • Temperature: 88°C – 96°C • Ratio: 1:1,5 - 1:2,5 • Degree of Roasting • Grinding degree • …. 11
  4. Fluttercon Berlin 2023 2023 Making Coffee with Flutter [email protected] The

    Software – Pt1 (PID) Requirements: • Temperature Input • Adjustable PID-Controller • Drive a Solid State Relais • Run on ESP8266 16
  5. Fluttercon Berlin 2023 2023 Making Coffee with Flutter [email protected] The

    Software – Pt1 (PID) Solution: • Temp accuracy up to +/- 0,1°C • Ready for ESP8266 & ESP32 • Ready for several Temp-Sensors • Freely adjustable PID - Parameters • MQTT-Support and ….. 17 github.com/rancilio-pid/clevercoffee/
  6. Fluttercon Berlin 2023 2023 Making Coffee with Flutter [email protected] The

    Software – Pt2 (UI) Requirements: • Display multiple Temperatures on a Chart • Display and adjust multiple Numeric-Values • Connect trough MQTT • (Future) Connect trough D-Bus 20
  7. Fluttercon Berlin 2023 2023 Making Coffee with Flutter [email protected] The

    Software – Pt2 (UI) Solution: • Uses “flutter_riverpod” for State-Mgmt • Uses “fl_chart” for the Charts • Uses “mqtt_client ” for MQTT-Connection • Will use “dbus ” for D-Bus 21 github.com/Snapp-X/coffeemachine
  8. Fluttercon Berlin 2023 2023 Making Coffee with Flutter [email protected] Why

    eFlutter? “A lot of UI frameworks available for Linux are desktop oriented, lack (good) support for touch screen control and look like recovered from the 90s.” -Florian Kromer 2021 Medium: “ Flutter could revolutionize UIs on embedded Linux Device" 25
  9. Fluttercon Berlin 2023 2023 Making Coffee with Flutter [email protected] Prominent

    GUI Frameworks 26 Origin Name Software License Web Chromium BSD 3-Clause WebKit LGPL, BSD Electron MIT License Desktop GTK LGPL v2.1+ Mono MIT, BSD, GPL, … Cross-Platform Qt Commercial License (or GPL/LGPL v3.0) Flutter BSD 3-Clause Games Unreal Engine Commercial License Unity Commercial License
  10. Fluttercon Berlin 2023 2023 Making Coffee with Flutter [email protected] Chromium

    27 • HTML5/Javascript • Running a Web UI connected to a Webserver Contra: • Huge source Code • High Resource Footprint • Difficult accessing local files & HW Pro: • Low Cost (Money wise) • Easy to develop
  11. Fluttercon Berlin 2023 2023 Making Coffee with Flutter [email protected] Qt

    28 • C++ Framework Launched 1995 • Widely adopted in IoT/Embedded-Industry Contra: • Pronounced „cute“ • Licensing-Model • Developer-Experience Pro: • Industry Standard • Reliability
  12. Fluttercon Berlin 2023 2023 Making Coffee with Flutter [email protected] eLinux

    – Display Servers 33 VS TL;DR: • X11 works better on Raspberry Pi OS and most others • In Production you will use Wayland! (or directly DRM) X11 Wayland
  13. Fluttercon Berlin 2023 2023 Making Coffee with Flutter [email protected] Flutter-eLinux

    – Tested Devices 35 github.com/sony/flutter-elinux/wiki/Support-status
  14. Fluttercon Berlin 2023 2023 Making Coffee with Flutter [email protected] Flutter-eLinux

    • Goal: Merge into the Flutter Engine • arm64/x64 devices support • More lightweight than official Flutter-Linux ◦ Not relying on GTK/GDK • Display Backend Support for ◦ X11 ◦ Wayland ◦ DRM (GBM & EGLStream) • APIs such as MethodChannel and EventChannel are the same • Packages work, Plugins won’t 36
  15. Fluttercon Berlin 2023 2023 Making Coffee with Flutter [email protected] Flutter-eLinux

    – Step by Step Raspberry Pi 38 Thanks to Payam Zahedi!