From d0d9fb3d5a463f3ef4c7c3084a19eeddbc5c3800 Mon Sep 17 00:00:00 2001 From: "Mateus Felipe C. C. Pinto" Date: Tue, 26 Nov 2024 17:29:35 -0300 Subject: [PATCH] fix: fix `validAliasesType` --- json_serializable/lib/src/enum_utils.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/json_serializable/lib/src/enum_utils.dart b/json_serializable/lib/src/enum_utils.dart index 833124ee..d2e7e09c 100644 --- a/json_serializable/lib/src/enum_utils.dart +++ b/json_serializable/lib/src/enum_utils.dart @@ -240,8 +240,8 @@ extension on ConstantReader { bool get validValueType => isString || isNull || isInt; bool get validAliasesType => - isList && - listValue.every((element) => + isSet && + setValue.every((element) => (element.type?.isDartCoreString ?? false) || (element.type?.isDartCoreInt ?? false)); }