AI to Your Flutter App: Claude, Gemini & On-Device ML

Dev.to AI
Machine Learning Generative AI

Every app ships AI features in 2026. But most Flutter tutorials use outdated packages and deprecated models 😬 I wrote an updated guide covering three paths with the LATEST versions: 🤖 Claude API (Sonnet 4.6) with Dio 5.9 - best for reasoning and instruction-following 🔍 Gemini 2.5 Flash via firebase_ai 3.9 - free tier, multimodal, official Dart SDK ⚡ TFLite 0.10 for on-device ML - zero latency, zero cost, works offline Plus: streaming responses, a complete chat screen, and a Riverpod-based architecture that lets you swap providers in one line 🚀 All package versions verified against pub.de.