Skip to content

Commit

Permalink
Fix parsing named constructor with positional fields
Browse files Browse the repository at this point in the history
  • Loading branch information
FirentisTFW committed Nov 15, 2024
1 parent 32c8761 commit c5a3340
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/util/dart_class_parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ function parseLinesToConstructor(

const isNamed = nameLine.includes(`${className}.`);
const constructorName = isNamed
? nameLine.substring(nameLine.indexOf(".") + 1, nameLine.indexOf("({"))
? nameLine.substring(nameLine.indexOf(".") + 1, nameLine.indexOf("("))
: null;

const fieldsLines = lines
Expand Down

0 comments on commit c5a3340

Please sign in to comment.