HttpAuthenticationChallenge constructor

HttpAuthenticationChallenge({
  1. String? error,
  2. URLResponse? failureResponse,
  3. @Deprecated('Use error instead') String? iosError,
  4. @Deprecated('Use failureResponse instead') IOSURLResponse? iosFailureResponse,
  5. required int previousFailureCount,
  6. URLCredential? proposedCredential,
  7. required URLProtectionSpace protectionSpace,
})

Implementation

HttpAuthenticationChallenge({
  this.error,
  this.failureResponse,
  @Deprecated('Use error instead') this.iosError,
  @Deprecated('Use failureResponse instead') this.iosFailureResponse,
  required this.previousFailureCount,
  this.proposedCredential,
  required URLProtectionSpace protectionSpace,
}) : super(protectionSpace: protectionSpace) {
  error = error ?? iosError;
  failureResponse =
      failureResponse ?? URLResponse.fromMap(iosFailureResponse?.toMap());
}