ShopifyStore class
ShopifyStore provides various methods related to the shopify store.
- Mixed-in types
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
-
checkForError(
QueryResult< Object?> queryResult, {String? key, String? errorKey}) → void -
throws a
OperationException
if the operation was wrong throws a ShopifyException if shopify reports an errorinherited -
getAllCollections(
{SortKeyCollection sortKeyCollection = SortKeyCollection.UPDATED_AT, bool reverse = false}) → Future< List< Collection> > - Returns all available collections.
-
getAllProducts(
{bool reverse = false}) → Future< List< Product> > - Returns a List of Product.
-
getAllProductsFromCollectionById(
String id, {SortKeyProductCollection sortKeyProductCollection = SortKeyProductCollection.CREATED}) → Future< List< Product> > - Returns a List of Product.
-
getAllProductsOnQuery(
String cursor, String query, {SortKeyProduct? sortKey, bool reverse = false}) → Future< List< Product> > - Returns a List of Product.
-
getCollectionByHandle(
String collectionName) → Future< Collection> - Returns a collection by handle.
-
getCollectionById(
String collectionId) → Future< Collection?> - Returns a collection by id.
-
getCollectionsByIds(
List< String> idList) → Future<List< Collection> ?> - Returns a List of Collection
-
getNProducts(
int n, {bool? reverse, SortKeyProduct sortKey = SortKeyProduct.PRODUCT_TYPE}) → Future< List< Product> ?> -
Returns
n
Products. -
getProductByHandle(
String handle) → Future< Product?> - Returns Product.
-
getProductRecommendations(
String productId) → Future< List< Product> ?> - Returns a list of recommended Product by given id.
-
getProductsByIds(
List< String> idList) → Future<List< Product> ?> - Returns a List of Product.
-
getShop(
) → Future< Shop> - Returns the Shop.
-
getXCollectionsAndNProductsSorted(
int n, int x, {SortKeyProductCollection sortKeyProductCollection = SortKeyProductCollection.CREATED, SortKeyCollection sortKeyCollection = SortKeyCollection.UPDATED_AT, bool reverse = false}) → Future< List< Collection> ?> - Returns N products from each X collections.
-
getXProductsAfterCursor(
int limit, String startCursor, {bool reverse = false, SortKeyProduct sortKeyProduct = SortKeyProduct.TITLE}) → Future< List< Product> > - Returns a List of Product.
-
getXProductsAfterCursorWithinCollection(
String id, int limit, {String? startCursor, SortKeyProductCollection sortKey = SortKeyProductCollection.BEST_SELLING, bool reverse = false, Map< String, dynamic> ? filters}) → Future<List< Product> ?> - Returns a List of Product.
-
getXProductsOnQueryAfterCursor(
String query, int limit, String? cursor, {SortKeyProduct? sortKey, bool reverse = false}) → Future< List< Product> ?> - Returns a List of Product.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
searchProducts(
String query, {int limit = 15, String? startCursor, SearchSortKeys sortKey = SearchSortKeys.RELEVANCE, bool reverse = false, Map< String, dynamic> ? filters}) → Future<List< Product> ?> - Returns a List of Product.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → ShopifyStore
-
Singleton instance of ShopifyStore
final