UnderlyingDefaultSource<R> constructor

UnderlyingDefaultSource<R>({
  1. UnderlyingSourceCancelCallback? cancel,
  2. FutureOr<void> pull(
    1. ReadableStreamDefaultController
    )?,
  3. dynamic start(
    1. ReadableStreamDefaultController
    )?,
  4. dynamic type,
})

Implementation

factory UnderlyingDefaultSource({
  _i3.UnderlyingSourceCancelCallback? cancel,
  _i7.FutureOr<void> Function(
          _i3.ReadableStreamDefaultController<_i2.dynamic>)?
      pull,
  _i2.dynamic Function(_i3.ReadableStreamDefaultController<_i2.dynamic>)?
      start,
  _i2.dynamic type,
}) =>
    UnderlyingDefaultSource._(
      cancel: cancel ?? _i6.undefined,
      pull: pull == null
          ? null
          : _i4.allowInterop((p0) => _i6.Promise.futureOr(() => pull(p0))),
      start: start == null ? null : _i4.allowInterop(start),
      type: type,
    );