CoreCartWithPayments<D extends CoreDetail<ITEM, ID> , ITEM extends CoreItem<ID> , ID, P extends CorePayment> class
abstract
Core Cart Base with Payments class This class help to keep the state of the cart. If you want to add customer details use billable with cart.
D
CoreDetail<I,ID>ITEM
CoreItemID
Item ID typeP
CorePayment type
- Inheritance
-
- Object
- CoreCartBase<
D, ITEM, ID> - CoreCartWithPayments
- Mixed in types
-
- Payable<
P>
- Payable<
Constructors
-
CoreCartWithPayments({List<
P> ? payments})
Properties
-
details
→ Iterable<
D> -
Iterable of cart product details.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasListeners → bool
-
Whether any listeners are currently registered.
no setterinherited
-
mDetails
→ List<
D> -
no setterinherited
- noOfItems → int
-
no setterinherited
- noOfPayments → int
-
no setterinherited
-
payments
→ Iterable<
P> -
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- total → double
-
no setterinherited
- totalPayments → double
-
no setterinherited
Methods
-
addDetail(
D detail) → void -
override this method to increase qty if there is already product detail available.
inherited
-
addDetails(
Iterable< D> details) → void -
override this method to merge details if already product detail exists.
inherited
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object changes.
inherited
-
addPayment(
P payment) → void -
Add payment to list override this if you want any other logic when adding to the list
Like if you want to add only one cash payment object summing up all the cash payments.
inherited
-
debugDescribeChildren(
) → List< DiagnosticsNode> -
Returns a list of
DiagnosticsNode
objects describing this node's children.inherited -
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
dispose(
) → void -
Discards any resources used by the object. After this is called, the
object is not in a usable state and should be discarded (calls to
addListener will throw after the object is disposed).
inherited
-
increaseQty(
int index, {required double increment}) → void -
inherited
-
isInTheCart(
ID id) → bool -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
notifyListeners(
) → void -
Call all the registered listeners.
inherited
-
removeDetail(
int index) → void -
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that are
notified when the object changes.
inherited
-
removePayment(
int index) → void -
inherited
-
reset(
) → void -
inherited
-
resetQtyOfDetail(
int index) → void -
inherited
-
setPayments(
List< P> payments) → void -
inherited
-
toDiagnosticsNode(
{String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode -
Returns a debug representation of the object that is used by debugging
tools and by DiagnosticsNode.toStringDeep.
inherited
-
toString(
{DiagnosticLevel minLevel = DiagnosticLevel.info}) → String -
A string representation of this object.
inherited
-
toStringDeep(
{String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a string representation of this node and its descendants.
inherited
-
toStringShallow(
{String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String -
Returns a one-line detailed description of the object.
inherited
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited