recordStream method

Stream<RType?>? recordStream(
  1. KType recordId, {
  2. bool immediate = true,
})

@param: immediate Whether you want this stream to include the current value. If false, only updates will be streamed.

Implementation

Stream<RType?>? recordStream(KType recordId, {bool immediate = true}) {
  return exec(() {
    return immediate
        ? _getOrCreateStream(recordId).stream.asBroadcastStream()
        : _getOrCreateStream(recordId).updateStream.asBroadcastStream();
  });
}