How to Delete Multiple Selected Firestore Documents (ListView) Simultaneously in FlutterFlow?

Actions & Logic

Hello FlutterFlow Community,

I am working on a project where users can select multiple items (documents) coming from a query Firestore collection (displayed in a ListView) and delete them all at once. However, I've encountered a challenge. FlutterFlow offers a Delete Document action, but this only allows deletion of one document at a time. Currently I save the selected Items in an App State Variable which is a List.

I want to delete all selected items simultaneously rather than in a loop that deletes them one by one, as this causes a visual effect where the items disappear sequentially, which isn't the desired behavior.

Is there a way to implement this in FlutterFlow? Perhaps using a Custom Action or Function to batch delete multiple Firestore documents at the same time? Or is there another approach I can take to achieve this effect?

Any guidance or examples would be greatly appreciated. Thank you!

What have you tried so far?

I've searched in the thread here but did not found anything concerning this issue.

Did you check FlutterFlow's Documentation for this topic?
Yes
1
7 replies