ProductController class

A controller that manages products by interacting with the ProductService.

Constructors

ProductController.new({required ProductService productService})
Creates a ProductController with the given ProductService.

Properties

hashCode int
The hash code for this object.
no setterinherited
products List<ProductModel>
Gets the current list of all products.
no setter
productsByCategory List<ProductModel>
Gets the current list of products filtered by category.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
titleProductsByCategory String?
Gets the title of the current category of products.
no setter

Methods

getAllProducts() Future<void>
Fetches all products from the ProductService.
getProductsByCategory({required String category}) Future<void>
Fetches products by category from the ProductService.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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