Flutter

Flutter plugin for Colibri Stateless with bundled native binaries for Android, iOS, macOS, Linux (and Windows when built on Windows). No manual build or libraryPath required on mobile; on desktop you pass the plugin’s bundled library path.

Overview

colibri_flutter is the same Colibri Dart API as colibri_stateless, packaged as a Flutter plugin with pre-built native libraries. Use it in Flutter apps when you want verified RPC without managing the native build yourself. Flutter web is not supported (no FFI).

When to use

  • Mobile (Android / iOS) – Use colibri_flutter from pub.dev; binaries are included.

  • Desktop (macOS / Linux / Windows) – Use colibri_flutter and pass libraryPath: colibriFlutterLibraryPath after building desktop binaries (or use a published package that ships them).

Installation

dependencies:
  colibri_flutter: ^0.1.5
flutter pub get

Path dependency (development)

dependencies:
  colibri_flutter:
    path: /path/to/colibri-stateless/bindings/dart/flutter/colibri_flutter
  colibri_stateless:
    path: /path/to/colibri-stateless/bindings/dart

Usage

  • On Android and iOS, the plugin loads the native library automatically; colibriFlutterLibraryPath is null and can be omitted.

  • On macOS and Linux, pass libraryPath: colibriFlutterLibraryPath so the app uses the plugin’s bundled library (you must have built desktop binaries for it to be present).

Platform notes

  • Androidlibcolibri.so is loaded from the plugin’s jniLibs when the engine attaches.

  • iOS – The XCFramework is linked; no path needed. When building yourself, place it under ios/Frameworks/ or use the published package.

  • Desktop – Build binaries from the repo root with ./scripts/build_flutter_binaries.sh --macos (or --linux, --windows as appropriate). Requires Android NDK for Android, Xcode on macOS for iOS.

  • Storage – On Android and iOS, if you omit storage, the client uses in-memory storage by default (native file storage is not used on mobile).

Building native binaries (maintainers)

From the repository root:

Output: Android jniLibs, iOS XCFramework, and desktop libraries as documented in the main Dart README.

Further information

Last updated