PriceModel class
Price Model (checks and background task call) for price adding.
- Mixed-in types
- Available extensions
Constructors
- PriceModel({required ProofType proofType, required Currency currency, required bool multipleProducts, PriceMetaProduct? initialProduct, bool readyForPriceTagValidation = false})
-
PriceModel.proof({required Proof proof, List<
Price> ? existingPrices})
Properties
- cropParameters ↔ CropParameters?
-
getter/setter pair
- currency ↔ Currency
-
getter/setter pair
- date ↔ DateTime
-
getter/setter pair
-
existingPrices
→ List<
Price> ? -
final
- firstDate → DateTime
-
final
- hasChanged → bool
-
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasImage → bool
-
no setter
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
- length → int
-
no setter
- location ↔ OsmLocation?
-
getter/setter pair
- multipleProducts → bool
-
"Should we support multiple products?" (instead of a single product).
final
-
priceAmountModels
→ List<
PriceAmountModel> -
no setter
- proof → Proof?
-
no setter
- proofType ↔ ProofType
-
getter/setter pair
- readyForPriceTagValidation ↔ bool
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- today → DateTime
-
final
Methods
-
add(
PriceAmountModel priceAmountModel) → void -
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
addTask(
BuildContext context, {required bool displaySnackbar}) → Future< void> - Adds the related background task.
-
checkParameters(
BuildContext context) → String? - Returns the error message of the parameter check, or null if OK.
-
clearProof(
) → void -
dispose(
) → void -
Discards any resources used by the object.
override
-
elementAt(
int index) → PriceAmountModel -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
override
-
removeAt(
int index) → void -
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
replaceListener(
VoidCallback listener) → void -
Available on ChangeNotifier, provided by the ChangeNotifierExtensions extension
-
setProof(
Proof proof, {bool init = false}) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
isProofNotGoodEnough(
Proof proof) → bool - Checks if a proof cannot be reused for prices adding.