copytWith method

MagicData copytWith({
  1. String? email,
  2. String? address,
  3. String? chainId,
  4. String? userName,
  5. bool? smartAccountDeployed,
  6. String? preferredAccountType,
  7. ConnectionMetadata? self,
  8. ConnectionMetadata? peer,
  9. AppKitSocialOption? provider,
})

Implementation

MagicData copytWith({
  String? email,
  String? address,
  String? chainId,
  String? userName,
  bool? smartAccountDeployed,
  String? preferredAccountType,
  ConnectionMetadata? self,
  ConnectionMetadata? peer,
  AppKitSocialOption? provider,
}) {
  if (chainId != null) {
    chainId = _parseChainId(chainId);
  }
  return MagicData(
    email: email ?? this.email,
    address: address ?? this.address,
    chainId: chainId ?? this.chainId,
    userName: userName ?? this.userName,
    smartAccountDeployed: smartAccountDeployed ?? this.smartAccountDeployed,
    preferredAccountType: preferredAccountType ?? this.preferredAccountType,
    self: self ?? this.self,
    peer: peer ?? this.peer,
    provider: provider ?? this.provider,
  );
}