bringIntoView method

  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 localRect = getRenderEditor()!.getLocalRectForCaret(position);
  final targetOffset = _getOffsetToRevealCaret(localRect, position);

  scrollController.jumpTo(targetOffset.offset);
  getRenderEditor()!.showOnScreen(rect: targetOffset.rect);
}