copyWith method

TransactionModel copyWith({
  1. int? id,
  2. int? type,
  3. String? displayId,
  4. num? amount,
  5. OrderTransaction? order,
  6. int? status,
  7. String? phone,
  8. DateTime? createdAt,
})

Implementation

TransactionModel copyWith({
  int? id,
  int? type,
  String? displayId,
  num? amount,
  OrderTransaction? order,
  int? status,
  String? phone,
  DateTime? createdAt,
}) =>
    TransactionModel(
      id: id ?? this.id,
      type: type ?? this.type,
      displayId: displayId ?? this.displayId,
      amount: amount ?? this.amount,
      order: order ?? this.order,
      status: status ?? this.status,
      phone: phone ?? this.phone,
      createdAt: createdAt ?? this.createdAt,
    );