onForcePressStart method
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:
- EditorTextSelectionGestureDetector.onForcePressStart, which triggers this callback.
Implementation
@protected
void onForcePressStart(ForcePressDetails details) {
assert(delegate.forcePressEnabled);
shouldShowSelectionToolbar = true;
if (delegate.selectionEnabled) {
renderEditor!.selectWordsInRange(
details.globalPosition,
null,
SelectionChangedCause.forcePress,
);
}
}