AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Flutterfire Configure

skill-evanca-flutter-ai-rules-flutterfire-configure · by evanca

Use when adding Firebase to a Flutter project, running flutterfire configure, initializing Firebase in main.dart, or configuring multiple flavors.

No reviews yet
0 installs
8 views
0.0% view→install

Install

$ agentstack add skill-evanca-flutter-ai-rules-flutterfire-configure

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-evanca-flutter-ai-rules-flutterfire-configure)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
11d ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Flutterfire Configure? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

FlutterFire Configure Skill

This skill defines how to correctly set up and configure Firebase for Flutter applications.

When to Use

Use this skill when:

  • Adding Firebase to a Flutter project for the first time.
  • Running flutterfire configure after adding a new Firebase service or platform.
  • Initializing Firebase in main.dart.
  • Setting up separate Firebase projects for multiple app flavors.

1. Prerequisites

Install the required tools:

npm install -g firebase-tools
firebase login
dart pub global activate flutterfire_cli

Minimum platform requirements:

  • Android: API level 19 (KitKat) or higher
  • Apple: iOS 11 or higher

2. Setup and Configuration

# From your Flutter project directory:
flutterfire configure

# Add the core Firebase package:
flutter pub add firebase_core
  • Re-run flutterfire configure any time you add support for a new platform or start using a new Firebase service.
  • For Android-specific services (Crashlytics, Performance Monitoring), the FlutterFire CLI automatically adds the required Gradle plugins.
  • Rebuild with flutter run after adding new Firebase plugins.

3. Firebase Initialization

import 'package:firebase_core/firebase_core.dart';
import 'firebase_options.dart';

void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp(
    options: DefaultFirebaseOptions.currentPlatform,
  );
  runApp(const MyApp());
}
  • Call WidgetsFlutterBinding.ensureInitialized() before Firebase initialization.
  • Place Firebase initialization before any other Firebase service calls.
  • Never modify firebase_options.dart manually — it is auto-generated.
  • Commit firebase_options.dart to version control — it contains non-secret configuration identifiers.
  • For Firebase Emulator Suite: await Firebase.initializeApp(demoProjectId: "demo-project-id").

4. Verification and Best Practices

After configuration, verify the setup is working:

  1. Run flutter run and confirm the app launches without Firebase initialization errors.
  2. Check the debug console for Firebase initialized successfully or similar confirmation.
  3. Verify firebase_options.dart was generated with the correct project ID.
  • Enable Firebase Analytics for optimal experience with Crashlytics, Remote Config, and other products.
  • Use a consistent Firebase project across all platforms for data consistency.
  • For iOS/macOS apps using certain Firebase services, add the Keychain Sharing capability in Xcode.
  • Test the Firebase configuration with both debug and release builds.
  • Check version compatibility between Flutter plugins and the underlying Firebase SDK.

5. Multiple App Flavors

Create separate Firebase projects per environment (development, staging, production):

flutterfire config \
  --project=flutter-app-dev \
  --out=lib/firebase_options_dev.dart \
  --ios-bundle-id=com.example.flutterApp.dev \
  --ios-out=ios/flavors/dev/GoogleService-Info.plist \
  --android-package-name=com.example.flutter_app.dev \
  --android-out=android/app/src/dev/google-services.json

Centralize Firebase initialization by flavor:

// firebase.dart
import 'package:firebase_core/firebase_core.dart';
import 'package:flutter/services.dart';
import 'package:flutter_app/firebase_options_prod.dart' as prod;
import 'package:flutter_app/firebase_options_stg.dart' as stg;
import 'package:flutter_app/firebase_options_dev.dart' as dev;

Future initializeFirebaseApp() async {
  final firebaseOptions = switch (appFlavor) {
    'prod' => prod.DefaultFirebaseOptions.currentPlatform,
    'stg' => stg.DefaultFirebaseOptions.currentPlatform,
    'dev' => dev.DefaultFirebaseOptions.currentPlatform,
    _ => throw UnsupportedError('Invalid flavor: $appFlavor'),
  };
  await Firebase.initializeApp(options: firebaseOptions);
}
// main.dart
void main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await initializeFirebaseApp();
  runApp(const MainApp());
}
  • Use appFlavor or environment variables to select the configuration at runtime.
  • Import each flavor's config with namespace aliases (e.g., as dev).
  • Use a helper script to automate multi-flavor configuration.

References

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.