mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-18 02:07:43 +00:00
add copyWith to Address
This commit is contained in:
parent
5fc3f23779
commit
cdbbb0a3df
1 changed files with 23 additions and 0 deletions
|
@ -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, "
|
||||
|
|
Loading…
Reference in a new issue