onForcePressStart method

  1. @protected
void onForcePressStart(
  1. ForcePressDetails details
)

Handler for EditorTextSelectionGestureDetector.onForcePressStart.

By default, it selects the word at the position of the force press, if selection is enabled.

This callback is only applicable when force press is enabled.

See also:

Implementation

@protected
void onForcePressStart(ForcePressDetails details) {
  assert(delegate.forcePressEnabled);
  shouldShowSelectionToolbar = true;
  if (delegate.selectionEnabled) {
    renderEditor!.selectWordsInRange(
      details.globalPosition,
      null,
      SelectionChangedCause.forcePress,
    );
  }
}