fill method

bool fill(
  1. String text
)

Fills the focused field with text, as a platform's autofill does — a one-time code offered from an SMS — replacing what it held. False when no field has focus: there is nowhere for it to go.

Implementation

bool fill(String text) {
  if (_client == null) return false;
  _value = TextEditingValue(
    text: text,
    selection: TextSelection.collapsed(offset: text.length),
  );
  TextInput.updateEditingValue(_value);
  return true;
}