performDocumentRead method

  1. @override
Stream<Snapshot> performDocumentRead(
  1. DocumentReadRequest request
)
override

Implementation

@override
Stream<Snapshot> performDocumentRead(DocumentReadRequest request) async* {
  final key = _keyFromDocument(request.document);
  final value = _values[key];
  await _wait();
  if (value == null) {
    yield (Snapshot(
      document: request.document,
      data: null,
      exists: false,
    ));
  } else {
    yield (Snapshot(
      document: request.document,
      data: value.data,
    ));
  }
}