Skip to content

Commit d01a8db

Browse files
committed
Update crimson_generator.dart
1 parent 13c6ee8 commit d01a8db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/crimson_generator.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ class CrimsonGenerator extends GeneratorForAnnotation<Json> {
329329
writeObjectStart();
330330
for (final key in $name.keys) {
331331
writeObjectKey(key);
332-
final ${name}Value = $name[key]!;
332+
final ${name}Value = $name[key] ${type.mapParam.isNullable ? '' : '!'};
333333
${_write('${name}Value', type.mapParam)}
334334
}
335335
writeObjectEnd();''';

0 commit comments

Comments
 (0)