Skip to content

A dart-native implementation of the Firebase Auth and Firestore SDKs

License

Notifications You must be signed in to change notification settings

IVLIVS-III/firedart

 
 

Repository files navigation

firedart

pub package

A dart-native implementation of the Firebase Auth and Firestore SDKs.

This library attempts to minimize dependencies with the intention of making it able to run in any environment capable of executing dart code. Currently it has been successfully tested using the dart runtime (x86-64 and arm32) as well as on Flutter Android, iOS and Desktop.

Firedart currently implements a subset of Firebase Auth and Firestore.

Dependencies

Add firedart to your pubspec.yaml file:

dependencies:
  firedart: [latest version]

Firebase Auth

The FirebaseAuth class implements the necessary functionality for managing accounts. It currently only supports Email/Password sign-in and anonymous sign-in, so make sure these are enabled under Authentication -> Sign-in Method.

You'll also need to go to your Firebase Console, open Project Settings and under the General tab copy the Web API Key.

Note: in order to reduce external dependencies this library doesn't include a mechanism for persisting tokens. Please look at the following examples based on SharedPreferences and Hive.

Usage