firstRunOfBlock method

int firstRunOfBlock(
  1. int blockIndex
)

Index of the first run whose block is at or after blockIndex. Runs are contiguous per block in document order, so a block's runs are firstRunOfBlock(b) up to firstRunOfBlock(b + 1); a block without runs yields an empty range.

Implementation

int firstRunOfBlock(int blockIndex) => blockIndex < blockCount
    ? _block(blockIndex, BlockField.firstRun)
    : runCount;