writeFormalParameter abstract method
- @experimental
Writes the code for a single parameter with the given name
.
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 a type
is provided, then it will be used as the type of the
parameter.
If a nameGroupName
is provided, then the name of the parameter will be
included in a linked edit.
If a type
and typeGroupName
are both provided, then the type of the
parameter will be included in a linked edit.
If isCovariant
is true
then the keyword covariant
will be included
in the parameter declaration.
If isRequiredNamed
is true
then the keyword required
will be
included in the parameter declaration.
If isRequiredType
is true
then the type is always written.
Implementation
@experimental
void writeFormalParameter(String name,
{bool isCovariant,
bool isRequiredNamed,
ExecutableElement2? methodBeingCopied,
String? nameGroupName,
DartType? type,
String? typeGroupName,
bool isRequiredType});