toJson method
Implementation
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'type'] = this.type;
if (this.quantity != null) {
json[r'quantity'] = this.quantity;
} else {
json[r'quantity'] = null;
}
if (this.weightKg != null) {
json[r'weightKg'] = this.weightKg;
} else {
json[r'weightKg'] = null;
}
if (this.description != null) {
json[r'description'] = this.description;
} else {
json[r'description'] = null;
}
return json;
}