toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'id'] = id;
if (percentage != null) {
json[r'percentage'] = percentage;
}
if (percentageAttributes.isNotEmpty) {
json[r'percentageAttributes'] =
((v) => v.map((v) => v).toList())(percentageAttributes);
}
if (value != null) {
json[r'value'] = value;
}
if (attributes.isNotEmpty) {
json[r'attributes'] =
((v) => v.map((v) => v.toJson()).toList())(attributes);
}
return json;
}