ErrorModel class
A model representing the structure of an error returned by API endpoints.
This object includes details about the source of the error and a descriptive message, making it useful for debugging and user feedback.
Constructors
- ErrorModel.new({required String source, required String message})
-
Creates a new instance of ErrorModel.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- message → String
-
A human-readable description of the error.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- source → String
-
The origin or category of the error (e.g., validation, server, etc.).
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
Returns a string representation of the error for logging or debugging.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited