Gemini in your Flutter app with Firebase AI Logic
summary
Concrete recipe and live results: Dart code imports Firebase AI, calls Google AI with Gemini 3.8 flash or template IDs, and uses generateContent or generateContentStream; no Gemini API key on the client — authentication goes through a Firebase API key plus App Check attestation. Prompts and model configs live as Server Prompt Templates, cloud triggers enforce quotas and token accounting, AI Monitoring shows latency and token usage, and the demo uses Gemini Live API for voice. Platform already serves thousands of apps and millions of requests; MacroFactor reports ~400,000 paid users.
AI-written summary · about
chapters (15)
- 0:00Introduction to Firebase AI Logic
- 1:06Choosing AI features for your app
- 3:14Security challenges with API keys
- 6:22Firebase AI Logic solution overview
- 7:06Dart code setup for AI Logic
- 8:31Securing requests with Firebase App Check
- 11:16Multi-layer security in AI Logic
- 13:23Server prompt templates for safety
- 16:18Enforcing template-only prompts
- 18:03Monitoring AI service with Firebase
- 19:12Cloud triggers for premium access
- 22:23Live API for real-time voice conversations
- 24:49Live demo of AI-powered movie game
- 31:39Production apps using AI Logic
- 33:24Getting started and feedback
