firebase_admin_interop 1.0.0-dev.16.0 copy "firebase_admin_interop: ^1.0.0-dev.16.0" to clipboard
firebase_admin_interop: ^1.0.0-dev.16.0 copied to clipboard

outdatedDart 1 only

Interop for Firebase Admin 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
0
pub points
67%
popularity

Publisher

unverified uploader

Interop for Firebase Admin Node.js SDK

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

js, meta, node_interop, quiver_hashcode

More

Packages that depend on firebase_admin_interop