onForcePressEnd method

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

Handler for EditorTextSelectionGestureDetector.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);
  renderEditor!.selectWordsInRange(
    details.globalPosition,
    null,
    SelectionChangedCause.forcePress,
  );
  if (shouldShowSelectionToolbar) {
    editor!.showToolbar();
  }
}