operator [] method

DiffReviewBlock operator [](
  1. int index
)

Block at index, with code blocks materialized only when requested.

Implementation

DiffReviewBlock operator [](int index) {
  RangeError.checkValidIndex(index, this, 'index', length);
  final before = threadsBefore(index);
  if (before < threadCount && _threadPositions[before] == index) {
    return _threads[before];
  }
  return DiffReviewCodeBlock._(index - before);
}