selectAll method

  1. @override
void selectAll(
  1. SelectionChangedCause cause
)
override

Select the entire text value.

Implementation

@override
void selectAll(SelectionChangedCause cause) {
  textEditingValue = textEditingValue.copyWith(
      selection: textEditingValue.selection.copyWith(
    baseOffset: 0,
    extentOffset: textEditingValue.text.length,
  ));
  if (cause == SelectionChangedCause.toolbar) {
    bringIntoView(textEditingValue.selection.extent);
  }
}