You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to implement Clean Architecture by keeping Entities separate from Models but I cannot assign JsonKeys to the attributes derived from parent, below is an example of what I would like to achieve:
class Car {
final String attributeOne;
final String attributeTwo;
Car({required this.attributeOne, required this.attributeTwo})
}
@JsonSerializable()
class CarModel extends Car {
CarModel({
@JsonKey(name: 'attr_one') required String attrOne,
@JsonKey(name: 'attr_two') required String attrTwo,
}): super(attributeOne: attrOne, attributeTwo: attrTwo),
}
This approach does not work, is there any alternative way?
The text was updated successfully, but these errors were encountered:
I am trying to implement Clean Architecture by keeping Entities separate from Models but I cannot assign JsonKeys to the attributes derived from parent, below is an example of what I would like to achieve:
This approach does not work, is there any alternative way?
The text was updated successfully, but these errors were encountered: