firebase3 0.2.0-dev copy "firebase3: ^0.2.0-dev" to clipboard
firebase3: ^0.2.0-dev copied to clipboard

outdatedDart 1 only

Dart wrapper library for the new Firebase.

Dart wrapper library for the new Firebase #

Build Status

This is an unofficial Dart wrapper library for the new Firebase.

You can find more information on how to use Firebase on Getting started page.

Don't forget to setup correct rules for your realtime database and/or storage in Firebase console. Auth has to be also set in the Firebase console if you want to use it.

Usage #

Installation #

Install the library from the pub or Github.

Include Firebase source #

You must include the original Firebase JavaScript source into your .html file to be able to use the library.

<script src="https://www.gstatic.com/firebasejs/3.3.0/firebase.js"></script>

Use it #

import 'package:firebase3/firebase.dart' as firebase;
import 'package:firebase3/database.dart';

void main() {
  firebase.initializeApp(
    apiKey: "YourApiKey",
    authDomain: "YourAuthDomain",
    databaseURL: "YourDatabaseUrl",
    storageBucket: "YourStorageBucket");
    
  Database database = firebase.database();
  DatabaseReference ref = database.ref("messages");  

  ref.onValue.listen((e) {
    DataSnapshot datasnapshot = e.snapshot;
    //Do something with datasnapshot
  });
  
  ...
}

Examples #

You can find more examples on realtime database, auth and storage in the example folder.

Bugs #

This is the first version of the library, the bugs may appear. If you find a bug, please create an issue.

0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Dart wrapper library for the new Firebase.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

browser, func, js

More

Packages that depend on firebase3