copyWith method

BankAccount copyWith({
  1. String? id,
  2. String? name,
  3. String? maskedNumber,
  4. Money? balance,
  5. BankAccountStatus? status,
  6. BankAccountType? type,
  7. String? currencyCode,
  8. String? ibanOrAccountNumber,
  9. String? sortCodeOrBic,
  10. List<String>? ownerIds,
})

Implementation

BankAccount copyWith({
  String? id,
  String? name,
  String? maskedNumber,
  Money? balance,
  BankAccountStatus? status,
  BankAccountType? type,
  String? currencyCode,
  String? ibanOrAccountNumber,
  String? sortCodeOrBic,
  List<String>? ownerIds,
}) =>
    BankAccount(
      id: id ?? this.id,
      name: name ?? this.name,
      maskedNumber: maskedNumber ?? this.maskedNumber,
      balance: balance ?? this.balance,
      status: status ?? this.status,
      type: type ?? this.type,
      currencyCode: currencyCode ?? this.currencyCode,
      ibanOrAccountNumber: ibanOrAccountNumber ?? this.ibanOrAccountNumber,
      sortCodeOrBic: sortCodeOrBic ?? this.sortCodeOrBic,
      ownerIds: ownerIds ?? this.ownerIds,
    );