Disposable constructor

Disposable(DisposeFunc disposeFunc)

Creates a Disposable from a callback.

Implementation

factory Disposable(DisposeFunc disposeFunc) {
  checkNotNull(disposeFunc, message: () => "disposeFunc can't be null");
  return _BooleanDisposable(disposeFunc);
}