moveSelectionRight method Null safety

void moveSelectionRight(
  1. SelectionChangedCause cause
)

Move the current selection to the right by one character.

The given SelectionChangedCause indicates the cause of this change and will be passed to onSelectionChanged.

See also:

Implementation

void moveSelectionRight(SelectionChangedCause cause) {
  assert(selection != null);

  final TextSelection nextSelection = _moveGivenSelectionRight(
    selection!,
    _plainText,
  );
  if (nextSelection == selection) {
    return;
  }
  _setSelection(nextSelection, cause);
}