setInitialValues method

void setInitialValues(
  1. Map<String, dynamic> values
)

Sets the initial values for the fields in this controller.

This does change the current value of the fields, those will only occur once FieldBindingController.reset is called.

Implementation

void setInitialValues(Map<String, dynamic> values) {
  for (var i = 0; i < fields.length; i++) {
    final field = fields[i];
    final fieldValue = values[field.fieldName];
    field.initialValue = fieldValue;
  }
}