Skip to content
pubscout

xybrid_flutter

0.20.0, released 3 days ago by xybrid.ai

Run ML models on-device or in the cloud with hybrid routing and streaming inference.

$ flutter pub add xybrid_flutter
Source repository

What it does

The Xybrid Flutter SDK enables running LLMs, ASR (speech-to-text), and TTS (text-to-speech) natively in Flutter apps, either on-device or via cloud routing. It includes model loading, download progress tracking, structured output generation, tool calling, and OpenTelemetry observability.

AI-written summary of version 0.20.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need local, offline AI inference (LLM, ASR, TTS) in your Flutter app.
  • You want to route between on-device models and cloud fallbacks dynamically.
  • You need structured outputs via GBNF grammars or built-in tool calling.

Skip it when

  • You only require standard cloud API integrations without local model dependencies.
  • You want a pure Dart solution without native plugin dependencies.

Strengths

  • Supports completely offline and private native inference for LLMs, ASR, and TTS.
  • Provides download progress tracking and built-in caching for model registries.
  • Includes support for structured output via JSON schemas and tool calling.

Weaknesses

  • Relies on native Rust bindings (flutter_rust_bridge) which add complexity to the build process.
  • Decision models and certain features have specific platform/device limitations.

Setup

Kind
Plugin (native code)
Effort
Medium
Code generation
Yes (build_runner)
Direct dependencies
5

Requires initializing Xybrid in main() with WidgetsFlutterBinding.ensureInitialized().

import 'package:xybrid_flutter/xybrid_flutter.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Xybrid.init();
  final model = await XybridModelLoader.fromRegistry('kokoro-82m').load();
  final result = await model.run(XybridEnvelope.text('Hello from Xybrid!'));
  print('Audio: ${result.audioBytes?.length} bytes');
}

Alternatives

Packages that do the same job and could replace xybrid_flutter.

  • tflite_flutter

    If you want a lightweight TensorFlow Lite solution directly integrated into Flutter without the broader Xybrid cloud-hybrid routing framework.

Works with

Packages commonly used together with xybrid_flutter: ones it builds on, ones built on it, and its own family.