Skip to content

This package is to simplify firebase commands: crud firestore, firebase storage for uploading files, firebase auth like sign in method, or register and others method auth

License

Notifications You must be signed in to change notification settings

Tomjerry12345/firebase_utilitas

Repository files navigation

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");

About

This package is to simplify firebase commands: crud firestore, firebase storage for uploading files, firebase auth like sign in method, or register and others method auth

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages