Response<T> class
- Available extensions
Constructors
Properties
- body → T?
-
The decoded body of this Response. You can access the
body parameters as Map
Ex:
body['title'];final -
bodyBytes
→ Stream<
List< ?int> > -
The response body as a Stream of Bytes.
final
- bodyString → String?
-
The response body as a Stream of Bytes.
final
- hasError → bool
-
hasErroris true when statusCode is not between 200 and 299.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> ? -
The response headers.
final
- isOk → bool
-
isOkis true when statusCode is between 200 and 299.no setter - request → Request?
-
The Http
Requestlinked with this Response.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- status → HttpStatus
-
HttpStatusfrom Response.status.connectionErroris true when statusCode is null.status.isUnauthorizedis true when statusCode is equal401.status.isNotFoundis true when statusCode is equal404.status.isServerErroris true when statusCode is between500and599.no setter - statusCode → int?
-
The status code returned by the server.
final
- statusText → String?
-
Human-readable context for statusCode.
final
-
unauthorizedis true when statusCode is equal401.no setter
Methods
-
copyWith(
{Request? request, int? statusCode, Stream< List< ? bodyBytes, String? bodyString, String? statusText, Map<int> >String, String> ? headers, T? body}) → Response<T> -
isServerError(
) → bool -
isSuccessful(
) → bool -
logRaw(
{String params = ""}) → void -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
prettyLog(
{String params = ""}) → void -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited