deleteCollection method

Future<int> deleteCollection(
  1. String id
)

Implementation

Future<int> deleteCollection(String id) async {
  final (good, bad) = await _read();
  final kept = good.where((r) => r.collectionId != id).toList();
  await _write(kept, bad);
  return good.length - kept.length;
}