CachedResponse class
Constructors
-
CachedResponse({required String id, required List<
int> bytes, required BaseRequest request, required DateTime expiry, required DateTime? downloadedAt, required Map<String, String> headers, required bool isRedirect, required bool persistentConnection, required String? reasonPhrase, required int statusCode})
Properties
-
bytes
→ List<
int> -
final
- contentLength → int
-
The size of the response body, in bytes.
final
- downloadedAt → DateTime
-
final
- expiry → DateTime
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
headers
→ Map<
String, String> -
final
- id → String
-
final
- isRedirect → bool
-
final
- persistentConnection → bool
-
Whether the server requested that a persistent connection be maintained.
final
- reasonPhrase → String?
-
The reason phrase associated with the status code.
final
- request → BaseRequest
-
The (frozen) request that triggered this response.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- statusCode → int
-
The HTTP status code for this response.
final
- stream → ByteStream
-
The stream from which the response body data can be read.
no setter
Methods
-
copyWith(
{String? id, List< int> ? bytes, BaseRequest? request, DateTime? expiry, DateTime? downloadedAt, Map<String, String> ? headers, bool? isRedirect, bool? persistentConnection, String? reasonPhrase, int? statusCode}) → CachedResponse -
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
Static Methods
-
fromResponse(
StreamedResponse response, {required String id, required BaseRequest request, required DateTime expiry, DateTime? downloadedAt}) → Future< CachedResponse>