onTripleTapDown method

  1. @protected
void onTripleTapDown(
  1. TapDragDownDetails details
)

Handler for TextSelectionGestureDetector.onTripleTapDown.

By default, it selects a paragraph if TextSelectionGestureDetectorBuilderDelegate.selectionEnabled is true and shows the toolbar if necessary.

See also:

Implementation

@protected
void onTripleTapDown(TapDragDownDetails details) {
  if (!delegate.selectionEnabled) {
    return;
  }
  if (renderEditable.maxLines == 1) {
    editableText.selectAll(SelectionChangedCause.tap);
  } else {
    switch (defaultTargetPlatform) {
      case TargetPlatform.android:
      case TargetPlatform.fuchsia:
      case TargetPlatform.iOS:
      case TargetPlatform.macOS:
      case TargetPlatform.windows:
        _selectParagraphsInRange(from: details.globalPosition, cause: SelectionChangedCause.tap);
      case TargetPlatform.linux:
        _selectLinesInRange(from: details.globalPosition, cause: SelectionChangedCause.tap);
    }
  }
  if (shouldShowSelectionToolbar) {
    editableText.showToolbar();
  }
}