PaymentItem class Null safety

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, 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 an unknown status.
const

Properties

amount String
The price of the item in string format.
final
hashCode int
The hash code for this object.
read-onlyinherited
label String?
A text with basic information about the item.
final
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
status PaymentItemStatus
The status of the price, either unknown, pending or final_price.
final
type PaymentItemType
The type of the item, either item or total.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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