observeAll method

  1. @nonVirtual
  2. @override
Stream<Map<Key, Object?>> observeAll([
  1. Options? options
])
override

Return Stream that will emit all values associated with key read from persistent storage. It will automatic emit all keys when any value was changed.

Implementation

@nonVirtual
@override
Stream<Map<Key, Object?>> observeAll([Options? options]) {
  assert(_debugAssertNotDisposed());

  return _keyValuesSubject
      .toSingleSubscriptionStream()
      .mapTo<void>(null)
      .startWith(null)
      .asyncMap((_) => _useStorage((s) => s.readAll(options)));
}