Features

In your pubspec.yaml

dependencies:
  firebase_utilitas: ^latest-version

Usage

calling first class

final fs = FirebaseUtilitas();

Firestore

add

await fs.addDataCollection("collection_name", {
"name": "ucup",
"address": "makassar"
});

get data all future

await fs.getDataCollection("collection_name");

get data all stream

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(),
                ],
              );

update data

await fs.updateDataAllDoc("collection_name", "id", {
"name": "shamil",
"address": "gowa"
});

delete data

await fs.deleteDoc("collection_name", "id");

Firebase Auth

register with email and password

await fs.registerWithEmailAndPassword("email", "password");

sign in with email and password

await fs.signInWithEmailAndPassword("email", "password");

sign in with email and password

await fs.resetPassword("email");

Libraries

firebase_utilitas