toJson method
Implementation
Map<String, dynamic> toJson() {
final result$data = <String, dynamic>{};
if (_$data.containsKey('fromPrice')) {
final l$fromPrice = fromPrice;
result$data['fromPrice'] = l$fromPrice;
}
if (_$data.containsKey('toPrice')) {
final l$toPrice = toPrice;
result$data['toPrice'] = l$toPrice;
}
if (_$data.containsKey('from')) {
final l$from = from;
result$data['from'] = l$from == null ? null : dateTimeToJson(l$from);
}
if (_$data.containsKey('to')) {
final l$to = to;
result$data['to'] = l$to == null ? null : dateTimeToJson(l$to);
}
if (_$data.containsKey('productAttributes')) {
final l$productAttributes = productAttributes;
result$data['productAttributes'] =
l$productAttributes?.map((e) => e).toList();
}
if (_$data.containsKey('barcodes')) {
final l$barcodes = barcodes;
result$data['barcodes'] = l$barcodes?.map((e) => e).toList();
}
if (_$data.containsKey('brand')) {
final l$brand = brand;
result$data['brand'] = l$brand?.map((e) => e).toList();
}
if (_$data.containsKey('category')) {
final l$category = category;
result$data['category'] = l$category?.map((e) => e).toList();
}
if (_$data.containsKey('classification')) {
final l$classification = classification;
result$data['classification'] = l$classification
?.map((e) => toJson$Enum$ProductClassEnum(e))
.toList();
}
if (_$data.containsKey('structure')) {
final l$structure = structure;
result$data['structure'] =
l$structure?.map((e) => toJson$Enum$ProductStructureEnum(e)).toList();
}
if (_$data.containsKey('variety')) {
final l$variety = variety;
result$data['variety'] =
l$variety?.map((e) => toJson$Enum$ProductVarietyEnum(e)).toList();
}
if (_$data.containsKey('rent')) {
final l$rent = rent;
result$data['rent'] = l$rent;
}
return result$data;
}