Skip to content
pubscout

firebase_core_web

4.2.0, released 4 days ago by firebase.google.com

Web implementation of firebase_core for Flutter apps.

WASM-ready
$ flutter pub add firebase_core_web
Source repository

What it does

Provides the platform-specific code to initialize and use Firebase on Flutter web. It registers the web implementation of the core Firebase plugin and keeps the Firebase JS SDK up‑to‑date.

AI-written summary of version 4.1.0, based on the package's README and metadata. Report an inaccuracy

Use it when

  • Building a Flutter app that runs on the web and needs Firebase initialization
  • You want the official Firebase support for web without writing platform code

Skip it when

  • Targeting only mobile or desktop platforms
  • You need Firebase services beyond core (e.g., Auth, Firestore) without adding their web plugins

Strengths

  • Official FlutterFire plugin with timely updates
  • Handles web‑specific setup like script loading and dart2wasm flags
  • Simple drop‑in for web projects

Weaknesses

  • Only works on web; no effect on other platforms
  • Requires firebase_core as a companion package

Setup

Kind
Plugin (native code)
Effort
Low
Code generation
No
Direct dependencies
3

Add firebase_core and firebase_core_web to pubspec, run flutter pub get, and configure Firebase via the web config snippet in index.html as described in the FlutterFire docs.

import 'package:firebase_core/firebase_core.dart';

Future<void> main() async {
  WidgetsFlutterBinding.ensureInitialized();
  await Firebase.initializeApp();
  runApp(MyApp());
}

Alternatives

Packages that do the same job and could replace firebase_core_web.

Works with

Packages commonly used together with firebase_core_web: ones it builds on, ones built on it, and its own family.