File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
json_serializable/lib/src/type_helpers Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -61,9 +61,9 @@ class EnumHelper extends TypeHelper<TypeHelperContextWithConfig> {
6161 }
6262
6363 String functionName;
64- if (targetType.isNullableType || defaultProvided) {
65- functionName = r'$enumDecodeNullable' ;
66- } else if ( jsonKey.unknownEnumValue == r'JsonKey.skipForUndefinedEnumValue' ) {
64+ if (targetType.isNullableType ||
65+ defaultProvided ||
66+ jsonKey.unknownEnumValue == jsonKeySkipForUndefinedEnumValueFieldName ) {
6767 functionName = r'$enumDecodeNullable' ;
6868 } else {
6969 functionName = r'$enumDecode' ;
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ class IterableHelper extends TypeHelper<TypeHelperContextWithConfig> {
103103
104104 if (_coreListChecker.isExactlyType (targetType)) {
105105 final jsonKey = jsonKeyForField (context.fieldElement, context.config);
106- final shouldRemoveNulls = jsonKey.unknownEnumValue == jsonKeyNullForUndefinedEnumValueFieldName ;
106+ final shouldRemoveNulls = jsonKey.unknownEnumValue == jsonKeySkipForUndefinedEnumValueFieldName ;
107107
108108 output += '$optionalQuestion ${shouldRemoveNulls ? '.nonNulls' : '' }.toList()' ;
109109 } else if (_coreSetChecker.isExactlyType (targetType)) {
You can’t perform that action at this time.
0 commit comments