updateMagnifier method

void updateMagnifier(
  1. Offset positionToShow
)

Update the current magnifier with new selection data, so the magnifier can respond accordingly.

If the magnifier is not shown, this still updates the magnifier position because the magnifier may have hidden itself and is looking for a cue to reshow itself.

If there is no magnifier in the overlay, this does nothing.

Implementation

void updateMagnifier(Offset positionToShow) {
  final TextPosition position = renderObject.getPositionForPoint(positionToShow);
  _updateSelectionOverlay();
  _selectionOverlay.updateMagnifier(
    _buildMagnifier(
      currentTextPosition: position,
      globalGesturePosition: positionToShow,
      renderEditable: renderObject,
    ),
  );
}