Skip to content

Commit

Permalink
Fix check for conditional missing required prop linting
Browse files Browse the repository at this point in the history
  • Loading branch information
greglittlefield-wf committed Sep 19, 2024
1 parent 4e52637 commit f0e5243
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ class MissingRequiredPropDiagnostic extends ComponentUsageDiagnosticContributor
continue;
}

if (result.libraryElement.isNonNullableByDefault || requiredness != PropRequiredness.late) {
// Late required prop validation is only enabled for props classes that have migrated to null safety.
if (propsClassElement.library.isNonNullableByDefault || requiredness != PropRequiredness.late) {
await collector.addErrorWithFix(
_codeForRequiredness(requiredness),
result.locationFor(usage.builder),
Expand Down

0 comments on commit f0e5243

Please sign in to comment.