DEV Community

mukhtharcm
mukhtharcm

Posted on • Originally published at mukhtharcm.com on

Deleting a Firestore Document in Flutter

There is no need for a huge story here. Deleting a Firestore document is a straightforward thing.

We just have to point to a doc and call delete on it.

final _db = FirebaseFirestore.instance;
await _db.collection("notes").doc("note1").delete();

Enter fullscreen mode Exit fullscreen mode

That’s it.

The pointed document will be deleted by the above function.

Top comments (0)

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post