processWidgetParams method
Implementation
RawWidgetDj processWidgetParams(
String name,
List<String> lines,
String filePath, {
int debugLvl = 0,
bool initialIsOptional = false,
}) {
var parameterLines = <String>[];
var gotAllParameters = false;
lines.forEach((line) {
if (!line.contains('$name(') &&
!gotAllParameters &&
line.isNotEmpty &&
!CommentLineChecker(line: line).check()) {
if ((line.contains(')') && line.contains(':')) ||
line.contains(');') ||
(line.contains(':') && line.contains('assert'))) {
gotAllParameters = true;
}
if (!gotAllParameters) {
parameterLines.add(line);
}
}
});
var parameters = processParameterLines(
parameterLines,
intialIsOptional: initialIsOptional,
);
var rawWidgetDj = RawWidgetDj(
parameters: parameters,
name: name,
originFilePath: filePath,
);
return rawWidgetDj;
}