pico_view 0.4.1
pico_view: ^0.4.1 copied to clipboard
Mirror a Flutter widget subtree to an external LCD driven by ESP32-P4 firmware over USB, with capacitive touch fed back into the widget tree.
Changelog #
0.4.0 #
Device calls no longer block the calling isolate #
pv_request used to answer in-band, so a call sat on the caller's thread until
the engine was done — up to ten seconds for open with no panel attached, which
froze the UI. It now hands the request over and returns; the answer is posted to
the pv_init SendPort as a PvResponse carrying the id its request was sent
with, and the controller completes the matching Future.
0.3.0 #
First published release.
Display #
PicoViewwidget mirrors its child subtree to an external SPI LCD driven by ESP32-P4 firmware over a driverless USB vendor-bulk link. The child is laid out at exactly the panel's resolution, so a captured pixel maps 1:1 to a panel pixel.- Capture is driven off Flutter's frame pipeline rather than a fixed-rate timer,
and frames are only sent when the content actually changed — a static screen
produces no USB traffic. Cap the rate with
PicoView(maxFps: ...). - A trailing capture guarantees the final resting frame of an animation reaches the panel even when it settles inside a throttle window.
- The mirror keeps running while the app window is hidden or minimized, by driving the frame pipeline manually once the engine stops requesting frames.
PicoViewController.flushRgbapushes a pre-rendered RGBA8888 frame directly, for producers that bypass the widget capture path (setsuspendCapturewhile they own the panel).
Touch #
- Physical capacitive touches are injected back into the mirrored subtree as
synthetic pointer events, so ordinary
GestureDetectors and Material widgets respond to the panel. - Per-event deltas and monotonic timestamps are carried through, so drag and velocity-based recognizers (sliders, flings) behave as they do on-screen.
- Raw events are also exposed on
PicoViewController.touchesin panel pixel coordinates.
Device #
open/disposelifecycle,setBrightness,playHaptic/stopHaptic(DRV2605L ROM waveforms), andotaStartfor streaming a signed firmware image, with progress onotaEvents.getDeviceInfo()round-trips to the device for its id, serial, firmware version, panel geometry and capabilities.linkStatesreports connect/disconnect transitions; the engine reconnects on its own.- Devices carrying a vendor-provisioned identity can be attested — see
deviceVerifiedandattestedDeviceId.
Packaging #
- The Rust engine ships as a prebuilt library for Linux x64/arm64, macOS
x64/arm64 and Windows x64.
hook/build.dartdownloads the release pinned innative/engine.lock, verifies its SHA-256 and links it as a native code asset, so consuming apps need no Rust toolchain. - The C ABI is frozen at five symbols; everything except the raw-frame hot path travels as protobuf messages, so new engine capabilities arrive as new message variants rather than new symbols.
- A no-op web stub keeps code using
package:pico_viewcompiling for web.