copyWith method

RegisterResult copyWith({
  1. String? challenge,
  2. String? publicKey,
  3. String? signature,
})

Returns a copy of this RegisterResult with updated fields.

Example:

final updated = oldResult.copyWith(challenge: "newChallenge");

Implementation

RegisterResult copyWith({
  String? challenge,
  String? publicKey,
  String? signature,
}) =>
    RegisterResult(
      challenge: challenge ?? this.challenge,
      publicKey: publicKey ?? this.publicKey,
      signature: signature ?? this.signature,
    );