CartItem constructor
Creates a CartItem instance with required attributes.
Parameters:
- productId: The ID of the product in the cart.
- productName: The name of the product.
- price: The price of the product.
- quantity: The quantity of the product in the cart.
- unit: The unit of measurement for the product.
- imageUrl: The URL of the product's image.
- farmerId: The ID of the farmer who listed the product.
Implementation
CartItem({
required this.productId,
required this.productName,
required this.price,
required this.quantity,
required this.unit,
required this.imageUrl,
required this.farmerId,
});