getAllCollections method

Future<List<String>> getAllCollections()

Get all unique collection names

Implementation

Future<List<String>> getAllCollections() async {
  _ensureInitialized();

  final records = await _isar.dataRecords.where().findAll();
  final collections = records.map((r) => r.collectionName).toSet().toList();
  return collections;
}