updateProduct method
- Product product
Updates an existing product in Firestore.
Parameters:
- product: The Product with updated data.
Returns: A Future<void> that completes when the product is updated.
Implementation
Future<void> updateProduct(Product product) async {
await _firestore
.collection('products')
.doc(product.id)
.update(product.toMap());
}