addProduct method
- Product product
Adds a new product to Firestore.
Parameters:
- product: The Product to be added.
Returns: A Future<void> that completes when the product is added.
Implementation
Future<void> addProduct(Product product) async {
await _firestore.collection('products').add(product.toMap());
}