setText method

void setText(
  1. String value, {
  2. bool moveCursorToEnd = true,
})

Implementation

void setText(
  String value, {
  bool moveCursorToEnd = true,
}) {
  text = value;

  if (moveCursorToEnd) {
    selection = TextSelection.collapsed(offset: text.length);
  }
}