streamKeys method

Future<Stream<KeyEvent>> streamKeys()

Streams all changes by keys in the store.

Requests a stream from the server and returns that stream. The stream will initially report a KeyEvent.reset with all keys in the store and then send other events, as data is modified on the server in realtime. It will send events for created and deleted keys, but also for keys that only had their values changed (but the key stayed the same).

Implementation

Future<Stream<KeyEvent>> streamKeys() async {
  final stream = await restApi.stream(
    path: _buildPath(),
    shallow: true,
  );
  return stream.transform(const StoreKeyEventTransformer());
}