registerControl method

void registerControl(
  1. FormControl<FacilityModel> control, {
  2. ChangeFunction<String>? onChange,
})
inherited

Registers a the control with the value accessor.

The control argument must not be null.

The argument onChange is optionally and will be called every time the control emits the value change event.

Implementation

void registerControl(FormControl<ModelDataType> control,
    {ChangeFunction<ViewDataType>? onChange}) {
  _control = control;
  _onChangeSubscription = _control!.valueChanges.listen(_updateView);

  _onChange = onChange;
}