toCode method
Implementation
@override
List<String> toCode() {
var _lines = super.toCode();
var argsLine = args?.map((arg) => '${arg.toString()}').join(', ') ?? '';
var callLine = '';
callLine += '$name($argsLine)';
if (isAsync) {
callLine += ' async ';
}
var body = '';
bodyCodeParts?.forEach((codePart) {
body += codePart.toString();
});
callLine = '$callLine { $body }';
if (outputType != null) {
callLine = variableTypeToString(outputType!) + ' ' + callLine;
}
if (annotations != null) {
annotations!.forEach((annotation) {
callLine = '@$annotation\n' + callLine;
});
}
_lines.add(callLine);
return _lines;
}