Skip to content

Commit 1163680

Browse files
committed
chore: revert function name
1 parent cb4bcb3 commit 1163680

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

json_serializable/lib/src/enum_utils.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ bool? enumFieldWithNullInEncodeMap(DartType targetType) {
3434
return enumMap.values.contains(null);
3535
}
3636

37-
String? enumMapsFromType(
37+
String? enumValueMapFromType(
3838
DartType targetType, {
3939
bool nullWithNoAnnotation = false,
4040
}) {

json_serializable/lib/src/json_enum_generator.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class JsonEnumGenerator extends GeneratorForAnnotation<JsonEnum> {
2626
}
2727

2828
final value =
29-
enumMapsFromType(element.thisType, nullWithNoAnnotation: true);
29+
enumValueMapFromType(element.thisType, nullWithNoAnnotation: true);
3030

3131
return [
3232
if (value != null) value,

json_serializable/lib/src/type_helpers/enum_helper.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class EnumHelper extends TypeHelper<TypeHelperContextWithConfig> {
2121
String expression,
2222
TypeHelperContextWithConfig context,
2323
) {
24-
final memberContent = enumMapsFromType(targetType);
24+
final memberContent = enumValueMapFromType(targetType);
2525

2626
if (memberContent == null) {
2727
return null;
@@ -44,7 +44,7 @@ class EnumHelper extends TypeHelper<TypeHelperContextWithConfig> {
4444
TypeHelperContextWithConfig context,
4545
bool defaultProvided,
4646
) {
47-
final memberContent = enumMapsFromType(targetType);
47+
final memberContent = enumValueMapFromType(targetType);
4848

4949
if (memberContent == null) {
5050
return null;

0 commit comments

Comments
 (0)