selectAll method Null safety

void selectAll(
  1. SelectionChangedCause cause
)

Set the current selection to contain the entire text value.

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

Implementation

void selectAll(SelectionChangedCause cause) {
  _setSelection(
    selection!.copyWith(
      baseOffset: 0,
      extentOffset: textSelectionDelegate.textEditingValue.text.length,
    ),
    cause,
  );
}