ProductRepository class

Manages product data operations in Firestore.

Provides methods to fetch, add, update, and delete products for a specific farmer.

Constructors

ProductRepository()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addProduct(Product product) Future<void>
Adds a new product to Firestore.
deleteProduct(String productId) Future<void>
Deletes a product from Firestore.
getProducts(String farmerId) Stream<List<Product>>
Retrieves a stream of products for a specific farmer from Firestore.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
updateProduct(Product product) Future<void>
Updates an existing product in Firestore.

Operators

operator ==(Object other) bool
The equality operator.
inherited