In your pubspec.yaml
dependencies:
firebase_utilitas: ^latest-version
calling first class
final fs = FirebaseUtilitas();
await fs.addDataCollection("collection_name", {
"name": "ucup",
"address": "makassar"
});
await fs.getDataCollection("collection_name");
StreamBuilder<QuerySnapshot<Map<String, dynamic>>>(
stream: fs.getDataStreamCollection("collection_name"),
builder: (context, snapshot) {
final data = snapshot.data!.docs;
ListView.builder(
shrinkWrap: true,
itemCount: data.length,
itemBuilder: (BuildContext context, int index) {
return Column(
children: [
ListTile(
title: Text(data[index]["name"])),
Divider(),
],
);
await fs.updateDataAllDoc("collection_name", "id", {
"name": "shamil",
"address": "gowa"
});
await fs.deleteDoc("collection_name", "id");
await fs.registerWithEmailAndPassword("email", "password");
await fs.signInWithEmailAndPassword("email", "password");
await fs.resetPassword("email");