firebase-ai

Featured

Use when setting up firebase_ai, generating text/chat with Gemini, streaming AI output, building multimodal prompts, or handling AI errors.

AI & Automation 619 stars 60 forks Updated today MIT

Install

View on GitHub

Quality Score: 95/100

Stars 20%
93
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Firebase AI Skill This skill defines how to correctly use Firebase AI Logic in Flutter applications. ## When to Use Use this skill when: * Setting up and configuring Firebase AI in a Flutter project. * Generating text content or chat responses with Gemini models. * Implementing streaming AI responses for real-time UI updates. * Sending multimodal prompts (text + images) to Gemini. * Handling errors, offline scenarios, and rate limits for AI operations. * Applying security and privacy considerations for AI features. --- ## 1. Setup and Configuration ``` flutter pub add firebase_ai ``` ```dart import 'package:firebase_ai/firebase_ai.dart'; import 'package:firebase_core/firebase_core.dart'; import 'firebase_options.dart'; // Initialize FirebaseApp await Firebase.initializeApp( options: DefaultFirebaseOptions.currentPlatform, ); // Initialize the Gemini Developer API backend service final model = FirebaseAI.googleAI().generativeModel(model: 'gemini-2.5-flash'); ``` - Ensure the Firebase project is configured for AI services via the Firebase AI Logic page in the Firebase Console. - Initialize Firebase before using any Firebase AI features. - Use `FirebaseAI.googleAI()` for the **Gemini Developer API** backend (recommended starting point). - Implement **App Check** to prevent abuse of Firebase AI endpoints. **Platform support:** | Platform | Support | |---|---| | iOS | Full | | Android | Full | | Web | Full | | macOS / other Apple | Beta | | Windows | Not suppo...

Details

Author
evanca
Repository
evanca/flutter-ai-rules
Created
1 years ago
Last Updated
today
Language
Shell
License
MIT

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category