updateParam method

void updateParam(
  1. String name, {
  2. DslType? type,
  3. String? description,
})

Updates an existing parameter's type and/or description.

Throws during compilation if the parameter does not exist. Pass either type to migrate the param's declared type, description to rewrite its documentation, or both. At least one of the two must be supplied.

Implementation

void updateParam(String name, {DslType? type, String? description}) {
  if (type == null && description == null) {
    throw ArgumentError(
      'updateParam("$name", ...) requires at least one of `type` or '
      '`description` to be supplied.',
    );
  }
  _updates.add(
    _UpdateParamSpec(name: name, type: type, description: description),
  );
}