watchCollection method

Stream<List<DataRecord>> watchCollection(
  1. String collectionName
)

Watch collection for changes

Implementation

Stream<List<DataRecord>> watchCollection(String collectionName) {
  _ensureInitialized();

  return _isar.dataRecords
      .filter()
      .collectionNameEqualTo(collectionName)
      .isDeletedEqualTo(false)
      .watch(fireImmediately: true);
}