writeFormalParameters abstract method

void writeFormalParameters(
  1. Iterable<FormalParameterElement> parameters, {
  2. List<TypeParameterElement>? typeParametersInScope,
  3. String? groupNamePrefix,
  4. bool fillParameterNames = true,
  5. bool includeParentheses = true,
  6. bool includeDefaultValues = true,
  7. bool requiredTypes = false,
})

Writes the code for a list of parameters, including the surrounding parentheses (unless includeParentheses is false) and default values (unless includeDefaultValues is false).

If typeParametersInScope is provided, then it will be used to resolve what are the valid type parameters to use.

If requiredTypes is true, then the types are always written.

Implementation

void writeFormalParameters(
  Iterable<FormalParameterElement> parameters, {
  List<TypeParameterElement>? typeParametersInScope,
  String? groupNamePrefix,
  bool fillParameterNames = true,
  bool includeParentheses = true,
  bool includeDefaultValues = true,
  bool requiredTypes = false,
});