emitChunk method

void emitChunk ({bool force: false })

Split a new chunk from input

Implementation

void emitChunk({bool force = false}) {
  final int len = chunkerCurrentIndex - emitFrom;

  if (((len < 512) && !force) || len == 0) return;

  chunks.add(input.substring(emitFrom, chunkerCurrentIndex + 1));
  emitFrom = chunkerCurrentIndex + 1;
}