dropCollection method

Future<void> dropCollection(
  1. String name
)

Deletes an entire collection and all its documents.

Implementation

Future<void> dropCollection(String name) async {
  await _database.delete(
    '_documents',
    where: 'collection = ?',
    whereArgs: [name],
  );
  _collections.remove(name)?.dispose();
}