Codelabs

Build something that runs on the device

Hands-on, step-by-step guides for running language models inside a Flutter app, ordered from first run to full pipelines. Start with the quickstart.

Beginner · 35 min

Getting Started with On-Device LLMs in Flutter

Install flutter_edge_ai, pick and download a model, and stream your first reply — then have the app open on the chat, not the download screen.

flutter_edge_ai Gemma 3 streaming
Start codelab →
Beginner · 44 min

Package Skills in Flutter: Teach Your Coding Assistant flutter_edge_ai

flutter_edge_ai ships agent skills inside the package. Install them for your assistant with one command, ask it for an offline chat and a tool call, and check its code against the traps the skills exist to prevent.

agent skills Antigravity Claude Code
Start codelab →
Beginner · 48 min

Built-in AI in Flutter: Your First Prompt with the OS Model

Check whether the device supplies a language model, prepare it, send one prompt and stream the answer through the same Dart API on Android, Apple platforms and the web.

built-in AI Gemini Nano Apple Intelligence
Start codelab →
Intermediate · 41 min

Inference Engines in Flutter: From a Downloaded Model to Built-in AI

LiteRT-LM runs a .litertlm file you ship or download. Built-in AI runs Gemini Nano and Apple Foundation Models with nothing to download at all — the OS owns the weights. Register either engine at startup; the inference code never changes.

LiteRT-LM built-in AI Gemini Nano
Start codelab →
Intermediate · 46 min

Multimodal Inference in Flutter: Vision and Audio on Device

Start seeing on a 0.36 GB vision model, then pay once for a 2.59 GB one that also hears. A modality is a session flag on weights that have the encoder — so the real question is what this platform lets you switch on, and how the app says so.

vision audio Gemma 4
Start codelab →
Intermediate · 56 min

Function Calling with On-Device Models in Flutter

Declare Dart functions the model can call, drive the call/response loop by hand and then hand it to the SDK, fine-tune a 270M model on your own tools, and watch a bigger one reason first with thinking mode.

function calling tools fine-tuning thinking mode
Start codelab →
Intermediate · 52 min

On-Device Agents in Flutter: SKILL.md Skills with Gemma 4

Turn the function-calling loop into an agent: write SKILL.md skills the model finds by their description, let it open the calendar and the mail composer through native intents, and hand exact work to your own JavaScript.

agents skills SKILL.md JavaScript
Start codelab →
Advanced · 60 min

On-Device RAG in Flutter: Embeddings and Vector Search

Embed your own documents with EmbeddingGemma, store the vectors in sqlite-vec, and ground the answers — no network once the models are downloaded.

embeddings sqlite-vec RAG
Start codelab →
Advanced · 67 min

Building an Offline Voice Assistant in Flutter: STT, LLM, and TTS

Wire speech-to-text, the model, and text-to-speech into one loop that runs in airplane mode — with barge-in, and tools it calls by voice.

STT TTS voice loop tools
Start codelab →
Advanced · 2 hr 12 min

Hybrid AI in Flutter: From Cloud to On-Device with Genkit Dart

Build an offline travel guide that routes each message between Gemini and on-device Gemma — five policies, images, and RAG.

Genkit hybrid routing RAG
Start codelab →