Skip to content

dev2t/flutterfire_desktop

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

175 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Firebase's Dart SDK

Chat on Discord

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.

Usage

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.0

Firebase App Initialization

Unlike the Firebase Flutter SDK, the Firebase initialization is done from Dart code, which means no additional config files are required.

DEFAULT app

To initialize the default app, provide only options without a name.

await Firebase.initializeApp(
  options: const FirebaseOptions(
    apiKey: '...',
    appId: '...',
    messagingSenderId: '...',
    projectId: '...',
  )
);

Secondary app

await Firebase.initializeApp(
  name: 'SecondaryApp',
  options: const FirebaseOptions(
    apiKey: '...',
    appId: '...',
    messagingSenderId: '...',
    projectId: '...',
  )
);

Fork: signInWithRedirect / getRedirectResult (Desktop SSO)

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:

Analyzing the codebase

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_dartfirebase_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 bootstrap then melos run analyze. That runs dart analyze . inside each package so dependencies resolve correctly.
  • Per package: From a package directory (e.g. packages/firebase_auth/firebase_auth_desktop/) run dart analyze . to see real issues for that package only.

Contributing

This is a community project, contributions to help it progress faster are welcome:

  1. Before starting, please read the contribution guide of FlutterFire.
  2. Refer to the projects board to see the current progress & planned future work.

About

No description, website, or topics provided.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Dart 72.2%
  • C++ 15.7%
  • CMake 9.9%
  • C 1.3%
  • Other 0.9%