copyWith method Null safety

RequestWithdrawResponseMessage copyWith(
  1. {String? operationId,
  2. String? status,
  3. DateTime? createdAt,
  4. DateTime? updatedAt,
  5. Object? reference,
  6. String? amount,
  7. String? accountName,
  8. String? accountId,
  9. BankInfo? bankInfo}
)

Implementation

RequestWithdrawResponseMessage copyWith({
  String? operationId,
  String? status,
  DateTime? createdAt,
  DateTime? updatedAt,
  Object? reference,
  String? amount,
  String? accountName,
  String? accountId,
  BankInfo? bankInfo,
}) {
  return RequestWithdrawResponseMessage(
    operationId: operationId ?? this.operationId,
    status: status ?? this.status,
    createdAt: createdAt ?? this.createdAt,
    updatedAt: updatedAt ?? this.updatedAt,
    reference: reference ?? this.reference,
    amount: amount ?? this.amount,
    accountName: accountName ?? this.accountName,
    accountId: accountId ?? this.accountId,
    bankInfo: bankInfo ?? this.bankInfo,
  );
}