add copyWith to Address

This commit is contained in:
julian 2023-08-07 12:53:18 -06:00
parent 5fc3f23779
commit cdbbb0a3df

View file

@ -71,6 +71,29 @@ class Address extends CryptoCurrencyAddress {
subType == AddressSubType.paynymSend ||
subType == AddressSubType.paynymReceive;
Address copyWith({
String? walletId,
String? value,
List<byte>? publicKey,
int? derivationIndex,
AddressType? type,
AddressSubType? subType,
DerivationPath? derivationPath,
String? otherData,
}) {
return Address(
walletId: walletId ?? this.walletId,
value: value ?? this.value,
publicKey: publicKey ?? this.publicKey,
derivationIndex: derivationIndex ?? this.derivationIndex,
type: type ?? this.type,
subType: subType ?? this.subType,
derivationPath: derivationPath ?? this.derivationPath,
otherData: otherData ?? this.otherData,
);
}
@override
String toString() => "{ "
"id: $id, "