moveByWordBoundary property

TextBoundary moveByWordBoundary
latefinal

Returns a TextBoundary suitable for handling keyboard navigation commands that change the current selection word by word.

This TextBoundary is used by text widgets in the flutter framework to provide default implementation for text editing shortcuts, for example, "delete to the previous word".

The implementation applies the same set of rules WordBoundary uses, except that word breaks end on a space separator or a punctuation will be skipped, to match the behavior of most platforms. Additional rules may be added in the future to better match platform behaviors.

Implementation

late final TextBoundary moveByWordBoundary = _UntilTextBoundary(this, _skipSpacesAndPunctuations);