From 5a6fc50d9b679c1a6d46c5d5a41aee3fcea16484 Mon Sep 17 00:00:00 2001 From: Emin Tolgahan Polat Date: Mon, 29 Jan 2024 10:43:12 +0300 Subject: [PATCH] For constant null, declareFinal is replaced by declareConst Use 'const' for final variables initialized to a constant value. Try replacing 'final' with 'const'. #652 --- generator/lib/src/generator.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generator/lib/src/generator.dart b/generator/lib/src/generator.dart index 65c33a68..cf3c4a70 100644 --- a/generator/lib/src/generator.dart +++ b/generator/lib/src/generator.dart @@ -2052,7 +2052,7 @@ ${bodyName.displayName} == null ); } else { blocks.add( - declareFinal(dataVar, type: refer('Map?')) + declareConst(dataVar, type: refer('Map?')) .assign(literalNull) .statement, );