ProductRefresher class
Refreshes a product on the BE then on the local database.
Constructors
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
-
checkIfLoggedIn(
BuildContext context, {required bool isLoggedInMandatory}) → Future< bool> - Checks if the user is logged in and opens a "please log in" dialog if not.
-
fetchAndRefresh(
{required String barcode, required BuildContext context}) → Future< bool> - Fetches the product from the server and refreshes the local database.
-
getBarcodeListQueryConfiguration(
List< String> barcodes, OpenFoodFactsLanguage language, {IngredientsUnwantedParameter? unwantedIngredients}) → ProductSearchQueryConfiguration - Returns the standard configuration for several barcodes product query.
-
getBarcodeQueryConfiguration(
String barcode, OpenFoodFactsLanguage language, {IngredientsUnwantedParameter? unwantedIngredients}) → ProductQueryConfiguration - Returns the standard configuration for barcode product query.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
silentFetchAndRefresh(
{required LocalDatabase localDatabase, required String barcode}) → Future< FetchedProduct> - Fetches the product from the server and refreshes the local database.
-
silentFetchAndRefreshList(
{required List< String> barcodes, required LocalDatabase localDatabase, required ProductType productType}) → Future<List< String> ?> - Fetches the products from the server and refreshes the local database.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
getCurrentProductType(
{required LocalDatabase localDatabase, required String barcode}) → Future< ProductType?> - Returns the product type stored locally for that product.