Skip to content

Commit

Permalink
For constant null, declareFinal is replaced by declareConst (#654)
Browse files Browse the repository at this point in the history
Use 'const' for final variables initialized to a constant value. Try replacing 'final' with 'const'. #652
  • Loading branch information
emintolgahanpolat authored Feb 3, 2024
1 parent bf38e05 commit 19970de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion generator/lib/src/generator.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2052,7 +2052,7 @@ ${bodyName.displayName} == null
);
} else {
blocks.add(
declareFinal(dataVar, type: refer('Map<String, dynamic>?'))
declareConst(dataVar, type: refer('Map<String, dynamic>?'))
.assign(literalNull)
.statement,
);
Expand Down

0 comments on commit 19970de

Please sign in to comment.