ProductQuery class abstract

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

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

Static Properties

fields → List<ProductField>
no setter
uriFolksonomyHelper ↔ UriHelper
Product helper only for Folksonomy.
getter/setter pair
uriPricesHelper ↔ UriProductHelper
Product helper only for prices.
getter/setter pair
uriRobotoffHelper ↔ UriHelper
Helper only for Robotoff.
getter/setter pair

Static Methods

extractProductType(UriProductHelper uriProductHelper) → ProductType?
getCountry() → OpenFoodFactsCountry
Returns the global country for API queries.
getLanguage() → OpenFoodFactsLanguage
Returns the global language for API queries.
getLocaleString() → String
Returns the global locale string (e.g. 'pt_BR')
getPriceToken(User user, LocalDatabase localDatabase) → Future<MaybeError<String>>
Returns the token for Prices, as cached or just downloaded.
getProductTypeFromDomain(UriProductHelper uriProductHelper) → String
getReadUser() → User
We don't track users for READ operations if they didn't consent.
getTestUriProductHelper(UserPreferences userPreferences) → UriProductHelper
Returns the standard test env, or the custom test env if relevant.
getUriProductHelper({required ProductType? productType}) → UriProductHelper
getWriteUser() → User
We do track users for WRITE operations.
initCountry(UserPreferences userPreferences) → Future<void>
Sets the global country for API queries: implicit choice at init time.
isLoggedIn() → bool
replaceSubdomain(String url) → String
setCountry(UserPreferences userPreferences, String isoCode) → Future<bool>
Sets the global country for API queries: explicit choice by the user.
setLanguage(BuildContext? context, UserPreferences userPreferences, {String? languageCode}) → void
Sets the global language for API queries.
setQueryType(UserPreferences userPreferences) → void
Sets the query type according to the current UserPreferences
setUserAgentComment(String comment) → void
Sets a comment for the user agent.
setUuid(LocalDatabase localDatabase) → Future<void>
Sets the uuid id as "final variable", for instance for API queries.

Constants

productQueryVersion → const ProductQueryVersion