selectionBoxes method
Implementation
@override
List<DiagramRect> selectionBoxes(int from, int to) => [
for (final box in _paragraph.getBoxesForSelection(
TextSelection(
baseOffset: start + from.clamp(0, end - start),
extentOffset: start + to.clamp(0, end - start),
),
))
if (box.bottom > top && box.top < top + height)
DiagramRect.fromLTWH(
box.left,
math.max(box.top, top) - top,
box.right - box.left,
math.min(box.bottom, top + height) - math.max(box.top, top),
),
];