onForcePressEnd method

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

Handler for TextSelectionGestureDetector.onForcePressEnd.

By default, it selects words in the range specified in details and shows toolbar if it is necessary.

This callback is only applicable when force press is enabled.

See also:

Implementation

@protected
void onForcePressEnd(ForcePressDetails details) {
  assert(delegate.forcePressEnabled);
  renderEditable.selectWordsInRange(
    from: details.globalPosition,
    cause: SelectionChangedCause.forcePress,
  );
  if (shouldShowSelectionToolbar)
    editableText.showToolbar();
}