From 14367449d6f17c70eed221815d9cb0f6b3efd722 Mon Sep 17 00:00:00 2001 From: Matthew Shipton Date: Mon, 9 May 2022 19:17:33 +0100 Subject: [PATCH] Fix serialization of non-nullable enums using _$xxxEnumMap Before this change, serializing non-nullable enums in a subtype was incorrectly producing nullable string types. For example, serializing a class member of type Map produced a type Map where Map should have been produced. Nullable enums should still produce nullable types, eg. serializing List should produce List fixes 1145 --- json_serializable/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/json_serializable/CHANGELOG.md b/json_serializable/CHANGELOG.md index ba3e21bc9..b2d528122 100644 --- a/json_serializable/CHANGELOG.md +++ b/json_serializable/CHANGELOG.md @@ -4,6 +4,7 @@ of type `MyClass?`. ([#822](https://github.com/google/json_serializable.dart/issues/822)) - Added support for `JsonSerializable(converters: [])` ([#1072](https://github.com/google/json_serializable.dart/issues/1072)) +- Fix issue with serialization of non-nullable enumerations to emit a non-nullable type ([#1146](https://github.com/google/json_serializable.dart/pull/1146)) ## 6.2.0