# listenTo method Null safety

1. @override

StreamSubscription<BookletModel?> listenTo(

1. String documentId,
2. BookletChanged changed,
3. {BookletErrorHandler? errorHandler}

)
override

## Implementation

    @override
    StreamSubscription<BookletModel?> listenTo(
        String documentId, BookletChanged changed,
        {BookletErrorHandler? errorHandler}) {
      var stream = bookletCollection.doc(documentId).snapshots().asyncMap((data) {
        return _populateDocPlus(data);
      });
      var theStream = stream.listen((value) {
        changed(value);
      });
      theStream.onError((theException, theStacktrace) {
        if (errorHandler != null) {
          errorHandler(theException, theStacktrace);
        }
      });
      return theStream;
    }