markPointFor method
The point the mark named id is at: markPoint, for a box that
keeps one mark. A paragraph keeps one for every SpotSpan in it
(RenderSpotText).
Implementation
@override
Offset markPointFor(Object id) {
final p = _paragraph, at = _offsets[id];
if (p == null || at == null || !p.hasSize) return Offset.zero;
// The letter AFTER the span is where the point is, and at the text's
// end the one before it.
final caret = p.getOffsetForCaret(
TextPosition(offset: at, affinity: at >= _length ? TextAffinity.upstream : TextAffinity.downstream),
Rect.zero,
);
return MatrixUtils.transformPoint(p.getTransformTo(this), caret);
}