onDragSelectionStart method

  1. @protected
void onDragSelectionStart(
  1. DragStartDetails details
)

Handler for TextSelectionGestureDetector.onDragSelectionStart.

By default, it selects a text position specified in details.

See also:

Implementation

@protected
void onDragSelectionStart(DragStartDetails details) {
  if (!delegate.selectionEnabled) {
    return;
  }
  final PointerDeviceKind? kind = details.kind;
  _shouldShowSelectionToolbar = kind == null ||
      kind == PointerDeviceKind.touch ||
      kind == PointerDeviceKind.stylus;
  renderEditable.selectPositionAt(
    from: details.globalPosition,
    cause: SelectionChangedCause.drag,
  );
}