copyWith method
Creates a copy of this AuthResult with updated metadata
Implementation
AuthResult copyWith({Map<String, dynamic>? metadata}) {
if (success) {
return AuthResult.success(
userInfo: userInfo!,
tokens: tokens!,
metadata: metadata ?? this.metadata,
);
} else {
return AuthResult.failure(
error: error!,
metadata: metadata ?? this.metadata,
);
}
}