From 5f1f712c8693e6afe8cabcf3a5a01d1562d3dcd5 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 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/json_serializable/CHANGELOG.md b/json_serializable/CHANGELOG.md index ba3e21bc9..32ef550ed 100644 --- a/json_serializable/CHANGELOG.md +++ b/json_serializable/CHANGELOG.md @@ -4,6 +4,8 @@ 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 emitting a nullable + type ([#1146](https://github.com/google/json_serializable.dart/pull/1146)) ## 6.2.0