Skip to content

Commit

Permalink
Fix remaining lints
Browse files Browse the repository at this point in the history
  • Loading branch information
tenhobi committed Nov 14, 2023
1 parent bb64887 commit 3428ace
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ class ClassBodyBuilder extends MapBodyBuilderBase {
);
}

final targetClassGetters = (mapping.target).getAllGetters();
final targetClassGetters = mapping.target.getAllGetters();

// Map constructor parameters
for (var i = 0; i < targetConstructor.parameters.length; i++) {
Expand Down Expand Up @@ -151,8 +151,7 @@ class ClassBodyBuilder extends MapBodyBuilderBase {
// If not mapped constructor param is optional - skip it
if (param.isOptional) continue;

final targetField =
(mapping.target).getAllGetters().firstWhereOrNull((field) => field.displayName == param.displayName);
final targetField = targetClassGetters.firstWhereOrNull((field) => field.displayName == param.displayName);

if (targetField == null && fieldMapping == null) {
throw InvalidGenerationSourceError(
Expand Down

0 comments on commit 3428ace

Please sign in to comment.