setValue method

dynamic setValue(
  1. C controller,
  2. T? value
)

Setter, to set the controller value.

By default, it calls the valueSet callback, if not defined, it sets the value property of the controller.

Implementation

setValue(C controller, T? value) {
  if (valueSet != null) {
    valueSet!.call(controller, value);
  } else {
    controller.value = value;
  }
}