I am using freezed package as a code generator. My response from API as shown below,
first_name,
last_name,
etc..,
And I am defining my model class like this,
firstName,
lastName,
etc..,
If I use @JsonKey(name: 'first_name')
then it works but I have to write this annotation for every field I have. Is there any way to set it global?
Please use this @JsonSerializable(fieldRename: FieldRename.snake) for snake_case convention
For Example