toMap method
Converts the CartItem to a map for Firestore storage.
Returns: A Map<String, dynamic> containing the cart item's data.
Implementation
Map<String, dynamic> toMap() {
return {
'productId': productId,
'productName': productName,
'price': price,
'quantity': quantity,
'unit': unit,
'imageUrl': imageUrl,
'farmerId': farmerId,
};
}