← ClaudeAtlas

shipping-a-model-in-a-flutter-applisted

Put a local language model inside a Flutter app and get it generating on device. Covers llamadart, which runs GGUF through llama.cpp and .litertlm through LiteRT-LM under one API on Android, iOS, macOS, Windows, Linux and Flutter web, plus LoRA adapter loading, flutter_gemma as the MediaPipe-lineage alternative, background isolate and threading behaviour, and whether to bundle the model or download it on first run. Use when the project is Flutter or Dart and someone wants on-device or offline AI, local inference, or a model running without an API. Not for React Native or Expo projects, not for iOS native Swift projects, not for Android native Kotlin projects, not for JavaScript browser apps using transformers.js or WebLLM, and not for models running on a server.
ErtasAI/open-model-skills · ★ 2 · AI & Automation · score 76
Install: claude install-skill ErtasAI/open-model-skills
# Shipping a model in a Flutter app Flutter is the simplest of the four targets in this suite, for one reason: one package, `llamadart`, covers both mobile-relevant artifact shapes and every platform Flutter builds for. React Native needs `llama.rn` for GGUF and `react-native-executorch` for `.pte`, two native modules with two build paths. Native Android needs a MediaPipe/LiteRT stack for one shape and a llama.cpp NDK integration for the other. Flutter needs one dependency, one `LlamaEngine` class, for both. **Check these floors before writing any integration code, as of 2026-07-27:** Dart `>= 3.10.7`, Flutter `>= 3.38.0`, iOS deployment target `16.4` or newer, macOS deployment target `14.0` or newer (source: `llamadart` 0.8.17's own installation guide, see the table at the end of this section). `llamadart` is a young, fast-moving 0.x package, so treat every version number in this skill as an "as of" fact to re-check, not a permanent one. Flutter 3.38.0 and iOS 16.4 are both recent enough to exclude some existing projects; finding that out after wiring up integration code is a wasted afternoon, not a five-minute fix. ## Which artifact shape this needs `llamadart` 0.8.17 (pub.dev, MIT license, published 2026-07-22) eats both shapes behind the same API. Its own pub.dev description, verbatim: "Dart and Flutter local LLM inference with llama.cpp GGUF and LiteRT-LM across native platforms and web." | You are holding | `llamadart` routes it through | What it eats | |---|---|--