12/15/2023 0 Comments Pub dev firebaseYou can also instantiate your own Firestore object. Usage # import 'package:firedart/firedart.dart' Īs with FirebaseAuth, Firestore offers a singleton version that needs to be initialised with your Project ID, which you can find under Project Settings -> General: Firestore.initialize(projectId) The API is similar (but not identical) to that of the official SDK. The Firestore class is a basic implementation of the service's RPC interface. Var user = await () Īlternatively you can instantiate your own FirebaseAuth object: var firebaseAuth = FirebaseAuth.(apiKey, await PreferencesStore()) Īwait firebaseAuth.signIn(email, password) įurther usage examples can be found in the integration tests. You'll need to initialise it with your API key and a token store (see note above): FirebaseAuth.initialize(apiKey, await HiveStore.create()) Īwait (email, password) Usage # import 'package:firedart/firedart.dart' įirebaseAuth has a singleton version which should be enough for most use cases. Please look at the following examples based on SharedPreferences and Hive. Note: in order to reduce external dependencies this library doesn't include a mechanism for persisting tokens. You'll also need to go to your Firebase Console, open Project Settings and under the General tab copy the Web API Key. It currently only supports Email/Password sign-in and anonymous sign-in, so make sure these are enabled under Authentication -> Sign-in Method. The FirebaseAuth class implements the necessary functionality for managing accounts. Dependencies #Īdd Firedart to your pubspec.yaml file: dependencies: Currently it has been successfully tested using the dart runtime ( x86-64 and arm32) as well as on Flutter Android, iOS and Desktop.įiredart currently implements a subset of Firebase Auth and Firestore. This library attempts to minimize dependencies with the intention of making it able to run in any environment capable of executing dart code. A dart-native implementation of the Firebase Auth and Firestore SDKs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |