ErrorList.merge constructor

ErrorList.merge(
  1. ErrorList otherErrorList,
  2. List<ValidationError> errors
)

Implementation

factory ErrorList.merge(
    ErrorList otherErrorList, List<ValidationError> errors) {
  var consolidatedErrors = [...otherErrorList.validationErrors, ...errors];

  return ErrorList(consolidatedErrors);
}