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) {
|
if (f.arguments.isNotEmpty && namedArgs) {
|
||||||
rt.write("{");
|
rt.write("{");
|
||||||
}
|
}
|
||||||
final typeSuffix = namedArgs ? "?" : "";
|
rt.write(f.arguments.map((x) {
|
||||||
rt.write(f.arguments
|
final typeName = getTypeName(template, x.type, templates, true);
|
||||||
.map((x) =>
|
return typeName +
|
||||||
getTypeName(template, x.type, templates, true) +
|
(namedArgs && !typeName.endsWith("?") ? "?" : "") +
|
||||||
typeSuffix +
|
" " +
|
||||||
" " +
|
x.name;
|
||||||
x.name)
|
}).join(","));
|
||||||
.join(","));
|
|
||||||
if (f.arguments.isNotEmpty && namedArgs) {
|
if (f.arguments.isNotEmpty && namedArgs) {
|
||||||
rt.write("}");
|
rt.write("}");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user