The Dart SDK allows Flutter and Dart apps to consume Firebase services.
It is an early-stage, experimental pure-Dart implementation of Firebase SDKs, without wrapping the existing Android, iOS, web, or C++ SDKs. The initial work is focused on supporting Firebase for Linux and Windows platforms.
To use this plugin, add the following dependencies to your app's pubspec.yaml file, along with the main plugin:
dependencies:
firebase_auth: ^3.1.5
firebase_auth_desktop: ^0.1.1-dev.0
firebase_core: ^1.9.0
firebase_core_desktop: ^0.1.1-dev.0Unlike the Firebase Flutter SDK, the Firebase initialization is done from Dart code, which means no additional config files are required.
To initialize the default app, provide only options without a name.
await Firebase.initializeApp(
options: const FirebaseOptions(
apiKey: '...',
appId: '...',
messagingSenderId: '...',
projectId: '...',
)
);await Firebase.initializeApp(
name: 'SecondaryApp',
options: const FirebaseOptions(
apiKey: '...',
appId: '...',
messagingSenderId: '...',
projectId: '...',
)
);This fork adds signInWithRedirect and getRedirectResult for desktop (Linux/Windows/macOS) so that any Firebase SSO provider (Google, Microsoft, Apple, etc.) works via the same standard flow. See docs/ for the implementation plan and architecture:
- docs/README.md – start here
- docs/FLUTTERFIRE_DESKTOP_FORK_PLAN.md – what to implement and where
- docs/FIREBASE_AUTH_UNIFIED_ARCHITECTURE.md – provider-agnostic design
Do not run dart analyze packages/ from the repo root. The repo is a multi-package workspace: each package has its own pubspec.yaml and dependency resolution. Analyzing the whole packages/ tree in one go causes the analyzer to fail resolving cross-package imports (e.g. firebase_auth_dart → firebase_core_dart), which produces hundreds of false positives (e.g. "Target of URI doesn't exist", "Undefined class").
- Preferred: Use the melos workflow: from the repo root run
melos bootstrapthenmelos run analyze. That runsdart analyze .inside each package so dependencies resolve correctly. - Per package: From a package directory (e.g.
packages/firebase_auth/firebase_auth_desktop/) rundart analyze .to see real issues for that package only.
This is a community project, contributions to help it progress faster are welcome:
- Before starting, please read the contribution guide of FlutterFire.
- Refer to the projects board to see the current progress & planned future work.