firedart 0.1.0 copy "firedart: ^0.1.0" to clipboard
firedart: ^0.1.0 copied to clipboard

outdated

An incomplete, dart-native implementation of the Firebase SDK.

example/main.dart

import 'package:firedart/firedart.dart';

const apiKey = "Project Settings -> General -> Web API Key";
const projectId = "Project Settings -> General -> Project ID";
const email = "you@server.com";
const password = "1234";

Future main() async {
  var tokenStore = VolatileStore();
  var auth = FirebaseAuth(apiKey, VolatileStore(), httpClient: VerboseClient());
  var firestore =
      Firestore(projectId, auth: auth); // Firestore reuses the auth client

  // Monitor sign-in state
  auth.signInState.listen((state) => print("Signed ${state ? "in" : "out"}"));

  // Sign in with user credentials
  await auth.signIn(email, password);

  // Get user object
  var user = await auth.getUser();
  print(user);

  var ref = firestore.collection("test").document("doc");
  var document = await ref.get();
  print(document["value"]);

  auth.signOut();
}
302
likes
0
pub points
95%
popularity

Publisher

verified publishercachapa.net

An incomplete, dart-native implementation of the Firebase SDK.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

http

More

Packages that depend on firedart