updateValues method

void updateValues(
  1. List<T> values
)

Called whenever chip is either added or removed from the outside the context of the text field.

Implementation

void updateValues(List<T> values) {
  if (values.length != this.values.length) {
    final String char = String.fromCharCode(kObjectReplacementChar);
    final int length = values.length;
    value = TextEditingValue(
      text: char * length,
      selection: TextSelection.collapsed(offset: length),
    );
    this.values = values;
  }
}