getItemsInCollection method

  1. @override
Future<List<String>> getItemsInCollection(
  1. String collection
)
override

Returns a list of all item IDs in a collection.

Implementation

@override
Future<List<String>> getItemsInCollection(String collection) async {
  final path = _getCollectionPath(collection);
  final files = await _workDbInternal.ls(path);

  // Return just the item IDs (file names without path)
  return files
      .map((f) => f.replaceFirst('$path/', ''))
      .where((f) => f.isNotEmpty && !f.contains('/'))
      .toList();
}