Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
936 views
in Technique[技术] by (71.8m points)

firebase - How to Delete all documents in collection in Firestore with Flutter

I have a firestore database. My project plugins:

cloud_firestore: ^0.7.4 firebase_storage: ^1.0.1

This have a collection "messages" with a multiple documents. I need to delete all documents in the messages collection. But this code fail:

Firestore.instance.collection('messages').delete();

but delete is not define

how is the correct syntax?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...