mirror of
https://github.com/esiur/esiur-dart.git
synced 2026-04-03 17:58:21 +00:00
Dont make a param optional if it already is
This commit is contained in:
@@ -355,14 +355,13 @@ class TemplateGenerator {
|
||||
if (f.arguments.isNotEmpty && namedArgs) {
|
||||
rt.write("{");
|
||||
}
|
||||
final typeSuffix = namedArgs ? "?" : "";
|
||||
rt.write(f.arguments
|
||||
.map((x) =>
|
||||
getTypeName(template, x.type, templates, true) +
|
||||
typeSuffix +
|
||||
rt.write(f.arguments.map((x) {
|
||||
final typeName = getTypeName(template, x.type, templates, true);
|
||||
return typeName +
|
||||
(namedArgs && !typeName.endsWith("?") ? "?" : "") +
|
||||
" " +
|
||||
x.name)
|
||||
.join(","));
|
||||
x.name;
|
||||
}).join(","));
|
||||
if (f.arguments.isNotEmpty && namedArgs) {
|
||||
rt.write("}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user