CoreCartWithCustomer<D extends CoreDetail<ITEM, ID> , ITEM extends CoreItem<ID> , ID, C extends CoreCustomer<CID> , CID> class
abstract
Core Cart Base with Billable 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
Core Item ID typeC
CoreCustomerCID
CoreCustomer ID type
- Inheritance
-
- Object
- CoreCartBase<
D, ITEM, ID> - CoreCartWithCustomer
- Mixed in types
-
- Billable<
C, CID>
- Billable<
Constructors
Properties
- customer → C?
-
no setterinherited
-
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
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- total → 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
-
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
-
reset(
) → void -
inherited
-
resetQtyOfDetail(
int index) → void -
inherited
-
setCustomer(
C customer) → 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