Response<T> class

Constructors

Response()
Default constructor: success response with null value
Response.create(bool _isSuccess, {String? errorMessage, T? value})
Custom response with explicit success flag, optional error message and value
Response.error(String errorMessage)
Error response with message
Response.fromResponse(Response<T> response)
Create a response from another Response instance
Response.success(T? value)
Success response with a value

Properties

errorMessage String
Returns the error message, or empty string if none
no setter
hashCode int
The hash code for this object.
no setterinherited
isSuccess bool
Whether the response is successful
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
value → T?
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