UpToDateProductProvider class

Provider that reflects all the user changes on Products.

Constructors

UpToDateProductProvider(LocalDatabase localDatabase)

Properties

hashCode → int
The hash code for this object.
no setterinherited
localDatabase → LocalDatabase
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

addChange(String key, Product minimalistProduct) → Future<void>
Adds a minimalist local change to pending ones.
copy(Product source) → Product
getLocalUpToDate(Product initialProduct) → Product
Returns the product with all the local pending changes on top.
getSortedChangeOperations(String barcode) → Iterable<TransientOperation>?
Returns the local pending change ids related to a barcode.
hasPendingChanges(String barcode) → bool
Returns true if there are pending operations for that barcode.
loseInterest(String barcode) → void
Loses interest for a barcode.
needsRefresh(int? latestTimestamp, List<String> barcodes) → bool
Returns true if at least one barcode was refreshed after the timestamp.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
setLatestDownloadedProduct(Product product, {bool notify = true}) → void
Typical use-case: a product page is refreshed through a pull-gesture.
setLatestDownloadedProducts(Iterable<Product> products) → void
Typical use-case: a product list page is refreshed through a pull-gesture.
showInterest(String barcode) → void
Shows an interest for a barcode.
terminate(String operationKey) → void
Closes a single operation, successful or failed.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited