bringIntoView method Null safety

  1. @override
void bringIntoView(
  1. TextPosition position
)
override

Brings the provided TextPosition into the visible area of the text input.

Implementation

@override
void bringIntoView(TextPosition position) {
  final Rect localRect = renderEditable.getLocalRectForCaret(position);
  final RevealedOffset targetOffset = _getOffsetToRevealCaret(localRect);

  _scrollController.jumpTo(targetOffset.offset);
  renderEditable.showOnScreen(rect: targetOffset.rect);
}