peekLength method Null safety

int peekLength()

Returns length of next operation without consuming it.

Returns maxLength if there is no more operations left to iterate.

Implementation

int peekLength() {
  if (_index < delta.length) {
    final operation = delta._operations[_index];
    return operation.length! - _offset;
  }
  return maxLength;
}