writeFunctionDeclaration abstract method
Writes the code for a declaration of a function with the given name.
If a bodyWriter is provided, it will be invoked to write the body of the
function. (The space between the name and the body will automatically be
written.) If isStatic is true, then the declaration will be preceded
by the static keyword. If a nameGroupName is provided, the name of the
function will be included in the linked edit group with that name. If a
returnType is provided, then it will be used as the return type of the
function. If a returnTypeGroupName is provided, then if a return type
was written it will be in the linked edit group with that name. If a
parameterWriter is provided, then it will be invoked to write the
declarations of the parameters to the function. (The parentheses around
the parameters will automatically be written.)
Implementation
void writeFunctionDeclaration(
String name, {
void Function()? bodyWriter,
bool isStatic = false,
String? nameGroupName,
void Function()? parameterWriter,
DartType? returnType,
String? returnTypeGroupName,
});