width method

double width(
  1. Paragraph paragraph
)

Implementation

double width(Paragraph paragraph) {
  var glyphRuns = paragraph.runs;
  var startGRun = glyphRuns[startRun];
  var endGRun = glyphRuns[endRun];
  return endGRun.xAt(endIndex) -
      startGRun.xAt(startIndex) -
      endGRun.letterSpacing;
}