setValue method

void setValue(
  1. String key,
  2. String value
)

Implementation

void setValue(String key, String value) {
  if (!_controls.containsKey(key)) throw Exception('Control with key $key not found');
  _controls[key] = _controls[key]!.copyWith(
    initialValue: value,
    controller: TextEditingController(text: value)
  );
}