selectWord method

  1. @override
void selectWord({
  1. required SelectionChangedCause cause,
})
override

Select a word around the location of the last tap down.

This method is mainly used to translate user inputs in global positions into a TextSelection. When used in conjunction with a EditableText, the selection change is fed back into TextEditingController.selection.

If you have a TextEditingController, it's generally easier to programmatically manipulate its value or selection directly.

Implementation

@override
void selectWord({required SelectionChangedCause cause}) {
  selectWordsInRange(from: _lastTapDownPosition!, cause: cause);
}