2024-03-05 00:34:31 +01:00

78 lines
2.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!-- Core Principles
Lightweight Embedder: flutter-pi acts as a custom Flutter engine
embedder tailored for the Raspberry Pi. This means it provides the
essential interface layer between Flutter's primarily C++ engine
and the embedded Linux environment (like on a Raspberry Pi).
No X11 Required: Notably, flutter-pi achieves this feat without
the graphical overhead of a system like X11 (common in desktop
Linux). This aligns better with resource-constrained embedded
devices.
Direct Rendering:
flutter-pi interacts with lower-level graphics APIs within the
Raspberry Pi (e.g., Broadcom's VideoCore, EGL) to handle rendering
of the Flutter UI onto the display hardware.
Key Responsibilities
Initialization:
Sets up the Flutter engine, loads appropriate libraries, and
gets everything ready for the Flutter application to run.
Event Handling: Manages input events (touch via touchscreen,
keyboard, mouse, etc.) and routes them from the embedded Linux
system to the Flutter framework for processing.
Rendering Loop: Coordinates requesting the next Flutter UI fram
e in response to events or state changes, communicates with the
rendering backends, and facilitates displaying the content.
Platform Channels: (Likely) Provides mechanisms for the Flutter
app to communicate with the underlying embedded Linux system.
This enables the app to potentially access device-specific
sensors, hardware control, and features outside the scope of
Flutter's core framework.
How to Utilize It
Prepare Environment: You'll need a Raspberry Pi running an
embedded Linux distribution and a toolchain suitable for
cross-compilation.
Obtain/Build flutter-pi: Refer to the project's GitHub repository
for build instructions.
Develop Flutter App: Structure your Flutter app normally, being
mindful of platform interactions that might need platform channels
(step 4).
Integrate & Compile: Follow flutter-pi's instructions to compile
your Flutter app code while linking against the flutter-pi embedder
you obtained/built.
Deploy & Run: Transfer the compiled output to your Raspberry Pi
and execute it with appropriate flutter-pi settings.
Caveats
Experimental: Not considered production-ready for every use-case (as might be expected with projects pushing Flutters boundaries).
Limited APIs: Compared to mainstream platforms, Flutters full suite of plugins and packages might not be compatible without extra platform channel work on your end.
-->
<!-- Introduction:
- Clearly describe what your Flutter application does and its main functionality.
Architecture:
- Diagram and explain your app's structure (state management approach, key widgets, navigation).
- Consider using visual aids to make this section more engaging.
Key Design Concepts:
- Challenges solved by your design choices.
- Did you address performance optimizations for embedded systems?
- How did you make the UI fit for the embedded target? -->