listenTo method

Implementation

@override
StreamSubscription<BlockingDashboardModel?> listenTo(
    String documentId, BlockingDashboardChanged changed,
    {BlockingDashboardErrorHandler? errorHandler}) {
  var stream = blockingDashboardCollection
      .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;
}