control property

FormControl<T, V> get control

Returns the FormControl for this accessor.

Throws if neither control nor formGroup+name were provided.

Implementation

FormControl<T, V> get control {
  if (_control != null) return _control!;
  if (formGroup != null && name != null) {
    return formGroup!.control(name!);
  }
  throw Exception(
    'ControlValueAcessor: control or formGroup and name must be provided',
  );
}