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,
  );
}