setSearchText method

void setSearchText(
  1. String text
)

Sets the search text programmatically.

Implementation

void setSearchText(String text) {
  _textController.text = text;
  _textController.selection = TextSelection.fromPosition(
    TextPosition(offset: text.length),
  );
}