ReactiveFormField<ModelDataType, ViewDataType> constructor Null safety

ReactiveFormField<ModelDataType, ViewDataType>(
  1. {Key? key,
  2. FormControl<ModelDataType>? formControl,
  3. String? formControlName,
  4. ControlValueAccessor<ModelDataType, ViewDataType>? valueAccessor,
  5. ShowErrorsFunction? showErrors,
  6. ValidationMessagesFunction<ModelDataType>? validationMessages,
  7. required ReactiveFormFieldBuilder<ModelDataType, ViewDataType> builder}
)

Creates an instance of the ReactiveFormField.

Must provide a forControlName or a formControl but not both at the same time.

The builder arguments are required.

Implementation

ReactiveFormField({
  Key? key,
  this.formControl,
  this.formControlName,
  this.valueAccessor,
  this.showErrors,
  this.validationMessages,
  required ReactiveFormFieldBuilder<ModelDataType, ViewDataType> builder,
})  : assert(
          (formControlName != null && formControl == null) ||
              (formControlName == null && formControl != null),
          'Must provide a formControlName or a formControl, but not both at the same time.'),
      _builder = builder,
      super(key: key);