onDoubleTapDown method
Handler for EditorTextSelectionGestureDetector.onDoubleTapDown.
By default, it selects a word through RenderEditable.selectWord if selectionEnabled and shows toolbar if necessary.
See also:
- EditorTextSelectionGestureDetector.onDoubleTapDown, which triggers this callback.
Implementation
@protected
void onDoubleTapDown(TapDownDetails details) {
if (delegate.selectionEnabled) {
renderEditor!.selectWord(SelectionChangedCause.tap);
// allow the selection to get updated before trying to bring up
// toolbars.
//
// if double tap happens on an editor that doesn't
// have focus, selection hasn't been set when the toolbars
// get added
SchedulerBinding.instance.addPostFrameCallback((_) {
if (shouldShowSelectionToolbar) {
editor!.showToolbar();
}
});
}
}