PaymentItem class
A simple object that holds information about individual entries in the payment summary shown before completing a payment.
Payment items are typically shown as a collection of entries with basic information about the items being purchased.
Here is an example of an individual payment item:
PaymentItem(
label: 'Your new shoes',
amount: '99.99',
status: PaymentItemStatus.final_price,
type: PaymentItemType.item,
)
And a summary entry with the total price.
PaymentItem(
label: 'Total',
amount: '102.99',
status: PaymentItemStatus.final_price,
type: PaymentItemType.total,
)
Constructors
- PaymentItem({required String amount, required String label, PaymentItemType type = PaymentItemType.total, PaymentItemStatus status = PaymentItemStatus.unknown})
-
Creates a new payment item with the specified parameters, defaulting to
a
total
type
, and anunknown
status
.const
Properties
- amount → String
-
The price of the item in string format.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- label → String
-
A text with basic information about the item.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → PaymentItemStatus
-
The status of the price, either
unknown
,pending
orfinal_price
.final - type → PaymentItemType
-
The type of the item, either
item
ortotal
.final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, Object?> - Creates a map representation of the object.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited