updateEditingValue method

  1. @override
void updateEditingValue (TextEditingValue value)

Requests that this client update its editing state to the given value.

Implementation

@override
void updateEditingValue(TextEditingValue value) {
  final oldCount = _countReplacements(_value);
  final newCount = _countReplacements(value);
  setState(() {
    if (newCount < oldCount) {
      _chips = Set.from(_chips.take(newCount));
    }
    _value = value;
  });
  _onSearchChanged(text);
}