toJson method
Serialize object to JSON string
@return
Implementation
Map<String, dynamic> toJson() {
final val = <String, dynamic>{};
void writeNotNull(String key, dynamic value) {
if (value != null) {
val[key] = value;
}
}
writeNotNull('code', code);
writeNotNull('title', title);
writeNotNull('price', price);
writeNotNull('qty', qty);
writeNotNull('tax', tax);
writeNotNull('total', total);
return val;
}