watchAll method

Stream<List<T>>? watchAll({
  1. String? userId,
  2. bool includeInitialData = true,
})

Watches all entities from the local adapter, emitting a new list on any change.

The includeInitialData parameter controls whether the stream should immediately emit the current list of all items. Defaults to true. If false, the stream will only emit when a change occurs. Returns null if the adapter does not support reactive queries.

Implementation

Stream<List<T>>? watchAll({String? userId, bool includeInitialData = true}) {
  _ensureInitialized();
  return localAdapter.watchAll(userId: userId, includeInitialData: includeInitialData)?.asyncMap((list) => Future.wait(list.map(_applyPostFetchTransforms)));
}