sendFileSegment method

void sendFileSegment(
  1. TransportFileSource source, {
  2. required int offset,
  3. required int length,
})

Implementation

void sendFileSegment(
  TransportFileSource source, {
  required int offset,
  required int length,
}) {
  if (_finished) {
    throw StateError('The progressive call is already finished');
  }
  final send = _sendFileSegment;
  if (send == null) {
    throw UnsupportedError('This progressive call cannot send file segments');
  }
  send(source, offset, length, true);
}