toJson method
Implementation
@override
Map<String, Object?> toJson() => {
"id": encodeValue(id),
"name": encodeValue(name),
if (description != null) "description": encodeValue(description),
if (about != null) "about": encodeValue(about),
"type": encodeValue(type),
if (reference != null) "reference": encodeValue(reference),
if (taxCode != null) "tax_code": encodeValue(taxCode),
if (category != null) "category": encodeValue(category),
if (customData != null) "custom_data": encodeValue(customData),
if (dimensions != null) "dimensions": encodeValue(dimensions),
if (prices != null) "prices": encodeValue(prices),
if (unitDim != null) "unit_dim": encodeValue(unitDim),
"created_at": encodeValue(createdAt),
if (updatedAt != null) "updated_at": encodeValue(updatedAt),
};