HttpStatusCodeInfo class

Wraps an HTTP status code and exposes derived helper properties.

Constructors

HttpStatusCodeInfo(int statusCode)
Builds metadata helpers for the provided statusCode.

Properties

errorSeverity ErrorSeverity
Determines error severity based on status code
final
hashCode int
The hash code for this object.
no setterinherited
isAccepted bool
Checks if the status code specifically represents Accepted (202)
final
isAuthenticationError bool
Checks if the status code represents an authentication error
final
isClientError bool
Checks if the status code represents a client error (4xx)
final
isConflictError bool
Checks if the status code represents a conflict
final
isCreated bool
Checks if the status code specifically represents Created (201)
final
isNoContent bool
Checks if the status code specifically represents No Content (204)
final
isNotFoundError bool
Checks if the status code represents a not found error
final
isOk bool
Checks if the status code specifically represents OK (200)
final
isPermanentRedirect bool
Checks if the status code represents a permanent redirection
final
isRateLimitError bool
Checks if the status code represents a rate limit error
final
isRedirectionCode bool
Checks if the status code represents a redirection (3xx)
final
isRetryableError bool
Checks if the request should be retried based on the status code
final
isServerError bool
Checks if the status code represents a server error (5xx)
final
isSuccess bool
Checks if the status code represents a successful response (2xx)
final
isTemporaryRedirect bool
Checks if the status code represents a temporary redirection
final
isTimeoutError bool
Checks if the status code represents a timeout error
final
isValidationError bool
Checks if the status code represents a validation error
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusCode int
Raw HTTP status code value backing the helpers.
final
statusCodeRetryDelay Duration
Gets suggested retry delay as a Duration based on status code
final
statusDevMessage String
Returns the developer-friendly HTTP status message associated with the number. If the status code is not found, it returns "Not Found".
final
statusMessages String
Returns the HTTP status message associated with the number. If the status code is not found, it returns "Not Found".
final
statusUserMessage String
Returns the user-friendly HTTP status message associated with the number. If the status code is not found, it returns "Not Found".
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Serializes the normalized status information into a map.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited