subscribe<T> method

void subscribe<T>(
  1. StreamController<T> controller,
  2. void listen(
    1. T next
    )
)

Implementation

void subscribe<T>(StreamController<T> controller, void listen(T next)) {
  subscriptions.add(controller.stream.listen(
    (val) {
      if (!_isDisposing) {
        listen(val);
      }
    },
    onError: (error, stack) {
      log.info(error);
      log.info(stack);
    },
  ));
}