deleteAll method

Future<bool> deleteAll()

Deletes all documents from the collection. Returns true if the deletion was successful, otherwise false. You have to be careful when using this method, as it will delete all documents in the collection.

Implementation

Future<bool> deleteAll() async {
  var res = await collection.deleteMany({});
  return res.isSuccess;
}