copyWith method

PaymayaItem copyWith({
  1. String? name,
  2. num? quantity,
  3. String? code,
  4. String? description,
  5. PaymayaAmount? amount,
  6. PaymayaAmount? totalAmount,
})

Paymaya Item

Example:

  final item = PaymayaItem(
    name: 'Shoe(Size SX)',

  );

Implementation

PaymayaItem copyWith({
  String? name,
  num? quantity,
  String? code,
  String? description,
  PaymayaAmount? amount,
  PaymayaAmount? totalAmount,
}) {
  return PaymayaItem(
    name: name ?? this.name,
    quantity: quantity ?? this.quantity,
    code: code ?? this.code,
    description: description ?? this.description,
    amount: amount ?? this.amount,
    totalAmount: totalAmount ?? this.totalAmount,
  );
}