StoreProducts class
Public product browsing, with no API keys.
The same catalogue a shopper sees on the website: published products only, prices in the store's own formatting, and nothing an admin would not want public.
Constructors
- StoreProducts(WooStore _store)
-
Wraps
_store's product routes.
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
-
all(
{int perPage = 100, String? search}) → Stream< StoreProduct> - Every product, page by page.
-
bySlug(
String slug) → Future< StoreProduct?> - One product by URL slug, or null when there is none.
-
categories(
) → Future< List< StoreTerm> > - Product categories.
-
get(
int id) → Future< StoreProduct> - One product by id.
-
list(
{int page = 1, int perPage = 10, String? search, List< String> ? slugs, int? category, int? tag, List<int> ? include, List<int> ? exclude, int? offset, String? minPrice, String? maxPrice, String? stockStatus, bool? onSale, bool? featured, int? parent, String? type, StoreProductOrderBy orderBy = StoreProductOrderBy.date, bool descending = true}) → Future<WooPage< StoreProduct> > - Lists products.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
reviews(
{int? productId, int perPage = 10}) → Future< List< Map< >String, Object?> > -
Reviews for a product, or for the whole store when
productIdis null. - Product tags.
-
toString(
) → String -
A string representation of this object.
inherited
-
variations(
int productId) → Future< WooPage< StoreProduct> > - The variations of a variable product.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited