HttpResult<T> class Null safety

Constructors

HttpResult.exception(dynamic _exception)
HttpResult.result(Response? _response, T? _data)

Properties

body String
read-only
data → T
read-only
error bool
read-only
exception → dynamic
read-only
hasData bool
read-only
hasException bool
read-only
hashCode int
The hash code for this object.
read-onlyinherited
hasRequest bool
read-only
hasResponse bool
read-only
headers Map<String, String>
read-only
request BaseRequest
read-only
response Response
read-only
runtimeType Type
A representation of the runtime type of the object.
read-onlyinherited
status int
read-only
statusAccepted bool
read-only
statusBadGateway bool
read-only
statusBadRequest bool
read-only
statusConflict bool
read-only
statusCreated bool
read-only
statusExpectationFailed bool
read-only
statusFailedDependency bool
read-only
statusForbidden bool
read-only
statusGatewayTimeout bool
read-only
statusGone bool
read-only
statusInternalServerError bool
read-only
statusLengthRequired bool
read-only
statusLocked bool
read-only
statusMethodNotAllowed bool
read-only
statusNoContent bool
read-only
statusNotAcceptable bool
read-only
statusNotFound bool
read-only
statusNotImplemented bool
read-only
statusOk bool
read-only
statusPreconditionFailed bool
read-only
statusPreconditionRequired bool
read-only
statusRequestEntityTooLarge bool
read-only
statusRequestTimeout bool
read-only
statusServiceUnavailable bool
read-only
statusTooManyRequests bool
read-only
statusUnauthorized bool
read-only
statusUnsupportedMediaType bool
read-only
success bool
read-only

Methods

handle({OnSuccess<T>? onSuccess, OnError? onError, OnException? onException, OnFailure? onFailure}) → void
handleEmpty({OnSuccessEmpty? onSuccess, OnError? onError, OnException? onException, OnFailure? onFailure}) → void
hasStatus(int code) bool
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
onError(OnError onError) HttpResult<T>
onException(OnException onException) HttpResult<T>
onFailure(OnFailure onFailure) HttpResult<T>
onSuccess(OnSuccess<T> onSuccess) HttpResult<T>
onSuccessEmpty(OnSuccessEmpty onSuccess) HttpResult<T>
toString() String
A string representation of this object.
inherited

Operators

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