handleSelectAll method

void handleSelectAll (TextSelectionDelegate delegate)

Adjust the selection of the text field managed by the given delegate so that everything is selected.

Does not hide the toolbar.

This is called by subclasses when their select-all affordance is activated by the user.

Implementation

void handleSelectAll(TextSelectionDelegate delegate) {
  delegate.textEditingValue = TextEditingValue(
    text: delegate.textEditingValue.text,
    selection: TextSelection(
      baseOffset: 0,
      extentOffset: delegate.textEditingValue.text.length
    ),
  );
  delegate.bringIntoView(delegate.textEditingValue.selection.extent);
}