contextMenuAnchors property

TextSelectionToolbarAnchors contextMenuAnchors

Returns the anchor points for the default context menu.

See also:

Implementation

TextSelectionToolbarAnchors get contextMenuAnchors {
  if (_lastSecondaryTapDownPosition != null) {
    return TextSelectionToolbarAnchors(
      primaryAnchor: _lastSecondaryTapDownPosition!,
    );
  }
  final RenderBox renderBox = context.findRenderObject()! as RenderBox;
  return TextSelectionToolbarAnchors.fromSelection(
    renderBox: renderBox,
    startGlyphHeight: startGlyphHeight,
    endGlyphHeight: endGlyphHeight,
    selectionEndpoints: selectionEndpoints,
  );
}