FetchApi<C extends Content> class abstract interface

An interface to fetch data from a resource like Web API, a cache or a file.

Implementers

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

fetch(Uri reference) → Future<C>
Fetch (read fully) content body from a resource identified by reference.
fetchBytes(Uri reference) → Future<Uint8List>
Fetch content body as bytes from a resource identified by reference.
fetchJson(Uri reference, {Object? reviver(Object? key, Object? value)?}) → Future
Fetch content body as JSON data from a resource identified by reference.
fetchStream(Uri reference) → Future<C>
Fetch content as a stream from a resource identified by reference.
fetchText(Uri reference) → Future<String>
Fetch content body as text from a resource identified by reference.
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