watch method

  1. @override
Stream<Map<String, Object?>?> watch(
  1. String collection,
  2. String id
)
override

The document, now and on every change (null while it doesn't exist).

Implementation

@override
Stream<Map<String, Object?>?> watch(String collection, String id) =>
    firestore.collection(collection).doc(id).snapshots().map((s) {
      onRead?.call('watch');
      return s.exists ? _data(s.data()) : null;
    });