Content class abstract

Content represents a data entity.

Inheritance
Implemented types
Implementers

Constructors

Content()
Default const constructor to allow extending this abstract class.
const

Properties

bytes → Future<Uint8List>
Reads content body as bytes and returns a future of Uint8List.
no setterinherited
contentLength → int?
An optional content length as number of bytes.
no setterinherited
encoding → Encoding
The expected charset encoding.
no setterinherited
hashCode → int
The hash code for this object.
no setterinherited
mediaType → MediaType
The expected media type.
no setterinherited
reference → Uri
The URI reference to a resource this anchor is referring.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
text → Future<String>
Reads content body as text and returns a future of String.
no setterinherited

Methods

byteData([int start = 0, int? end]) → Future<ByteData>
Reads content body as bytes and returns a future of ByteData.
inherited
byteStream() → Stream<List<int>>
Returns content body as a single-subscription byte stream.
inherited
decodeJson({Object? reviver(Object? key, Object? value)?}) → Future
Reads and decodes content body as a JSON object, returned in a future.
inherited
hasType(String primaryType, String subType0, [String? orSubType1, String? orSubType2, String? orSubType3, String? orSubType4]) → bool
Checks if "content-type" equals with primaryType and one of sub types.
inherited
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