setValue method

dynamic setValue(
  1. T value, {
  2. bool notify = true,
})

Implementation

setValue(T value, {bool notify = true}){
  assert((){
    if(control == null && (formGroup == null || name == null)){
      throw FlutterError('ControlValueAcessor: model or formGroup and name must be provided to set value ');
    }
    return true;
  }());
  if(control != null) return control!.setValue(value, notify: notify);
  return formGroup!.control<T>(name!).setValue(value, notify: notify);
}