firebase_core
5.2.0, released 4 days ago by firebase.google.com
Flutter plugin that initializes Firebase and allows multiple Firebase app connections.
What it does
Provides the core Firebase functionality for Flutter apps, enabling initialization of Firebase services and support for multiple Firebase apps within a single project. It bridges Flutter with the native Firebase SDKs on Android, iOS, web, Windows, macOS, and Linux.
AI-written summary of version 5.1.0, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to use any Firebase service (auth, analytics, firestore, etc.) in a Flutter app.
- You want to support multiple Firebase projects in the same app.
Skip it when
- You are building a non-Firebase backend or only need a single Firebase project and prefer a lighter setup.
Strengths
- Stable, actively maintained by Firebase team.
- Supports all major platforms out of the box.
- Handles platform-specific initialization details automatically.
Weaknesses
- Requires native platform setup (e.g., adding GoogleService-Info.plist or google-services.json).
- May add unnecessary overhead if only a single Firebase service is used.
Setup
- Kind
- Plugin (native code)
- Effort
- Medium
- Code generation
- No
- Direct dependencies
- 3
Add google-services.json (Android) or GoogleService-Info.plist (iOS/macOS) to the project, configure Gradle/Podfile, and call Firebase.initializeApp() in main().
// main.dart
import 'package:firebase_core/firebase_core.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
runApp(MyApp());
}Works with
Packages commonly used together with firebase_core: ones it builds on, ones built on it, and its own family.
- firebase_core_webfirebase_core depends on itWeb implementation of firebase_core for Flutter apps.
- firebase_ui_localizationsSame familyProvides localized strings for Firebase UI Auth, Firestore and Database widgets.
- firebase_ui_oauthSame familyFirebase UI OAuth widgets for authentication with social providers
- firebase_admin_sdkSame familyFirebase Admin SDK implementation for Dart server environments
- firebase_ui_oauth_googleSame familyFlutter widgets for Google OAuth sign‑in using Firebase UI.
- firebase_ui_firestoreSame familyPre-built widgets and utilities for integrating Firebase Firestore into Flutter apps.
- firebase_ui_oauth_appleSame familyFirebase UI widgets for Sign in with Apple authentication.
- firebase_functionsSame familyDefine Cloud Functions for Firebase in Dart with support for the Admin SDK and Firestore.