AppException class
Represents a custom exception for API calls.
This exception is thrown when an API call encounters an error. It provides detailed information about the type of error, the status code returned by the server, and the response body.
- Implemented types
Constructors
- AppException({String? title, String? message, ExceptionType type = ExceptionType.none, int statusCode = 404, String responseBody = ""})
Properties
- alertInfo → AlertInfo
-
Retrieves the alert information based on the exception type.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String?
-
A message describing the error.
final
- responseBody → String
-
The full response body returned by the server.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode → int
-
The HTTP status code returned by the server.
final
- title → String?
-
A title for the error, useful for displaying to the user.
final
- type → ExceptionType
-
The type of exception, categorized for easier handling.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited