updateLoadingData method

void updateLoadingData(
  1. String text, {
  2. bool autoStartNewSession = true,
  3. bool resetCurrentValue = true,
})

Implementation

void updateLoadingData(String text, {bool autoStartNewSession = true, bool resetCurrentValue = true}) {
  if (!_isLoading) {
    if (autoStartNewSession)
      startNewStream(resetCurrentValue: resetCurrentValue);
    else
      return;
  }

  super.value = TextEditingValue(
    text: text,
    selection: TextSelection.collapsed(affinity: TextAffinity.downstream, offset: text.length),
    composing: TextRange.collapsed(-1),
  );
}