firebase_admin_interop 2.1.0 copy "firebase_admin_interop: ^2.1.0" to clipboard
firebase_admin_interop: ^2.1.0 copied to clipboard

Firebase Admin SDK for Dart written as a wrapper around official Node.js SDK.

example/main.dart

import 'package:firebase_admin_interop/firebase_admin_interop.dart';

main() async {
  final serviceAccountKeyFilename = '/absolute/path/to/service-account.json';
  final admin = FirebaseAdmin.instance;
  final cert = admin.certFromPath(serviceAccountKeyFilename);
  final app = admin.initializeApp(new AppOptions(
    credential: cert,
    databaseURL: "YOUR_DB_URL",
  ));
  final ref = app.database().ref('/test-path');
  // Write value to the database at "/test-path" location.
  await ref.setValue("Hello world");
  // Read value from the same database location.
  var snapshot = await ref.once("value");
  print(snapshot.val()); // prints "Hello world".
}
25
likes
40
pub points
64%
popularity

Publisher

unverified uploader

Firebase Admin SDK for Dart written as a wrapper around official Node.js SDK.

Repository (GitHub)
View/report issues

License

BSD-3-Clause (license)

Dependencies

js, meta, node_interop, quiver_hashcode

More

Packages that depend on firebase_admin_interop