bindDisposable method

StreamController<T> bindDisposable(
  1. Disposable disposable, {
  2. bool closeWhenDispose = true,
  3. bool sync = false,
  4. bool? emitCancelledException,
})

绑定到 Disposable dispose 时 closeWhenCancel=true close 否则取消 closeWhenDispose == true closeStream ==false cancelStream

Implementation

StreamController<T> bindDisposable(Disposable disposable,
        {bool closeWhenDispose = true,
        bool sync = false,
        bool? emitCancelledException}) =>
    bindCancellable(disposable,
        closeWhenCancel: closeWhenDispose,
        sync: sync,
        emitCancelledException: emitCancelledException);