Firestore dart common interface and implementation for Browser, VM, node and flutter
import 'firestore_browser';
void main() {
var firebase = firebaseNode;
// ...
}
import 'firestore_node';
void main() {
var firebase = firebaseNode;
// ...
}
import 'package:tekartik_firebase_flutter/firebase_flutter.dart';
void main() {
var firebase = firebaseFlutter;
// ...
}
import 'package:tekartik_firebase_sembast/firebase_sembast_io.dart';
void main() {
var firebase = firebaseSembastIo;
// ...
}
var options = new AppOptions(
apiKey: "your_api_key",
authDomain: "xxxx",
databaseURL: "xxxx",
projectId: "xxxx",
storageBucket: "xxxx",
messagingSenderId: "xxxx");
var app = firebase.initializeApp(options);
// ...
}
var firestore = app.firestore();
// read a document
var data = (await firestore.doc('collections/document').get()).data;
// ...
Experimental, not fully implemented yet
var storage = app.storage();
// ...