In case of single enum field, unknown value is ignored but for repeated enums it tried to add null.
If we can avoid adding null here it will support backward compatability for repeated enums too. Happy to send a patch if this approach works.
Good catch. I think your fix should work, convertProto3JsonValue returns null only on unknown enum values, so just skipping those when adding to the list should work.
Consider following snippet of code:
Output
Full Code Snippet: https://github.com/Anushi1998/DartProtobufBug/
In case of single enum field, unknown value is ignored but for repeated enums it tried to add null. If we can avoid adding null here it will support backward compatability for repeated enums too. Happy to send a patch if this approach works.