writeFormalParameters abstract method

  1. @experimental
void writeFormalParameters(
  1. Iterable<FormalParameterElement> parameters, {
  2. ExecutableElement2? methodBeingCopied,
  3. bool includeDefaultValues = true,
  4. bool requiredTypes,
})

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

If a methodBeingCopied is provided, then type parameters defined by that method are assumed to be part of what is being written and hence valid types.

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

Implementation

@experimental
void writeFormalParameters(Iterable<FormalParameterElement> parameters,
    {ExecutableElement2? methodBeingCopied,
    bool includeDefaultValues = true,
    bool requiredTypes});