UnderlyingByteSource constructor

UnderlyingByteSource({
  1. num? autoAllocateChunkSize,
  2. UnderlyingSourceCancelCallback? cancel,
  3. FutureOr<void> pull(
    1. ReadableByteStreamController
    )?,
  4. dynamic start(
    1. ReadableByteStreamController
    )?,
  5. String? type,
})

Implementation

factory UnderlyingByteSource({
  _i2.num? autoAllocateChunkSize,
  _i3.UnderlyingSourceCancelCallback? cancel,
  _i7.FutureOr<void> Function(_i3.ReadableByteStreamController)? pull,
  _i2.dynamic Function(_i3.ReadableByteStreamController)? start,
  _i2.String? type,
}) =>
    UnderlyingByteSource._(
      autoAllocateChunkSize: autoAllocateChunkSize,
      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,
    );