performDocumentReadWatch method

  1. @override
Stream<Snapshot> performDocumentReadWatch(
  1. DocumentReadWatchRequest request
)
override

Implementation

@override
Stream<Snapshot> performDocumentReadWatch(
  DocumentReadWatchRequest request,
) async* {
  final interval = request.pollingInterval ?? Duration(seconds: 5);
  while (true) {
    final result = await performDocumentRead(
      DocumentReadRequest(
        document: request.document,
        reach: request.reach,
      ),
    ).last;
    yield (result);
    await Future.delayed(interval);
  }
}