resolveCaretY method

double resolveCaretY(
  1. CaretStop stop
)

Implementation

double resolveCaretY(CaretStop stop) {
  final containerId = findLogicalContainerId(stop.fragmentId);
  if (containerId != null) {
    final render = _paragraphRegistry.renderFor(containerId);
    final y = render?.getCaretY(stop.fragmentId, stop.offset);
    if (y != null) return y;
  }
  final box = _findBlockImageBox(stop.fragmentId);
  if (box == null) return 0.0;
  return box.localToGlobal(Offset.zero).dy;
}