emitChunk method

void emitChunk(
  1. {bool force = false}
)

Split a new chunk from input

Implementation

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

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

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