diff --git a/json_serializable/lib/src/enum_utils.dart b/json_serializable/lib/src/enum_utils.dart index f47f4a012..050f09905 100644 --- a/json_serializable/lib/src/enum_utils.dart +++ b/json_serializable/lib/src/enum_utils.dart @@ -54,7 +54,8 @@ String? enumMapsFromType( final valuesMap = valuesItems == null ? null - : 'const ${constMapName(targetType)} = {\n$valuesItems\n};'; + : '// ignore: unused_element\n' + 'const ${constMapName(targetType)} = {\n$valuesItems\n};'; final decodeItems = enumAliases == null ? null