BackgroundTaskAddPrice class
Background task about adding a product price.
- Inheritance
-
- Object
- BackgroundTask
- BackgroundTaskPrice
- BackgroundTaskAddPrice
Constructors
-
BackgroundTaskAddPrice.fromJson(Map<
String, dynamic> json)
Properties
-
barcodes
→ List<
String> -
finalinherited
-
categories
→ List<
String> -
finalinherited
- country → String
-
finalinherited
- cropX1 → int
-
final
- cropX2 → int
-
final
- cropY1 → int
-
final
- cropY2 → int
-
final
- currency → Currency
-
finalinherited
- date → DateTime
-
finalinherited
-
discountTypes
→ List<
String> -
finalinherited
- displaySnackbar → bool
-
final
-
eraserCoordinates
→ List<
double> ? -
final
- fullPath → String
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasImmediateNextTask → bool
-
Returns true if the task ends calling another task for immediate exec.
no setterinherited
-
labels
→ List<
List< String> > -
finalinherited
- languageCode → String
-
finalinherited
- locationOSMId → int
-
finalinherited
- locationOSMType → LocationOSMType
-
finalinherited
-
origins
→ List<
List< String> > -
finalinherited
-
pricePers
→ List<
String> -
finalinherited
-
prices
→ List<
double> -
finalinherited
-
pricesAreDiscounted
→ List<
bool> -
finalinherited
-
pricesWithoutDiscount
→ List<
double?> -
finalinherited
- processName → String
-
Typically, similar to the name of the class that extends this one.
finalinherited
- proofType → ProofType
-
final
- readyForPriceTagValidation → bool
-
final
- rotationDegrees → int
-
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- stamp → String
-
Generic task identifier, like "details:categories for barcode 1234", needed e.g. for task overwriting".
finalinherited
- uniqueId → String
-
Unique task identifier, needed e.g. for task overwriting.
finalinherited
- user → String
-
finalinherited
Methods
-
addPrices(
{required String bearerToken, required int proofId, required LocalDatabase localDatabase}) → Future< void> -
inherited
-
addToManager(
LocalDatabase localDatabase, {required BackgroundTaskQueue queue, BuildContext? context, bool showSnackBar = true}) → Future< void> -
Adds this task to the BackgroundTaskManager.
inherited
-
execute(
LocalDatabase localDatabase) → Future< void> -
Executes the background task: upload, download, update locally.
override
-
getBearerToken(
LocalDatabase localDatabase) → Future< String> -
inherited
-
getCountry(
) → OpenFoodFactsCountry? -
inherited
-
getFloatingMessage(
AppLocalizations appLocalizations) → (String, AlignmentGeometry)? -
Floating message when we add the task, like "Added to the task queue!"
Also pass an AlignmentGeometry to express where it should be displayed
override
-
getLanguage(
) → OpenFoodFactsLanguage -
inherited
-
getUser(
) → User -
inherited
-
isDeduplicable(
) → bool -
Returns true if tasks with the same stamp would overwrite each-other.
inherited
-
mayRunNow(
) → bool -
Returns true if the task may run now.
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
postExecute(
LocalDatabase localDatabase, bool success) → Future< void> -
To be executed after the actual run.
override
-
preExecute(
LocalDatabase localDatabase) → Future< void> -
Executes the background task: upload, download, update locally.
Runs instantly temporary code in order to "fake" the background task.
inherited
-
recover(
LocalDatabase localDatabase) → Future< void> -
Checks that everything is fine and fix things if needed + if possible.
inherited
-
toJson(
) → Map< String, dynamic> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
addTask(
{required BuildContext context, required CropParameters cropObject, required ProofType proofType, required DateTime date, required Currency currency, required int locationOSMId, required LocationOSMType locationOSMType, required List< String> barcodes, required List<String> categories, required List<List< origins, required List<String> >List< labels, required List<String> >String> pricePers, required List<bool> pricesAreDiscounted, required List<double> prices, required List<double?> pricesWithoutDiscount, required bool displaySnackbar, required bool readyForPriceTagValidation, required List<String> discountTypes}) → Future<void> - Adds the background task about uploading a product image.