Skip to Content

Flutter

Use Blerivo from Flutter.

Not published yet

The blerivo plugin is not on pub.dev yet. Use it from the repository, in packages/flutter.

The Flutter plugin is generated with flutter_rust_bridge from packages/flutter/rust/src/api, which mirrors the blerivo-ffi surface. Android and iOS builds compile the Rust crate through Cargokit.

Regenerate the bindings

Terminal
cargo install flutter_rust_bridge_codegen --version 2.13.0 --locked
flutter_rust_bridge_codegen generate

Test on the host

Terminal
cargo build -p blerivo-flutter
BLERIVO_FLUTTER_LIBRARY=../../target/debug/libblerivo_flutter.dylib flutter test

Use libblerivo_flutter.so on Linux.

The API

WatchSession has one constructor per protocol plus handle(event) and saved_state(), named in Dart style. See Sessions and Protocols.

Stub

A guide that wires the session to a Flutter Bluetooth plugin is still to be written.

See also

On this page