flutter_cache_store library

Classes

CacheControlPolicy
Implements a very basic Policy of HTTP Cache-Control
CacheItem
Base class to hold cache item data
CacheItemPayload
Must implement sub-class to hold the extra-data you want
CacheStore
Singleton object to manage cache
CacheStorePolicy
Base class of a Policy. cleanup is the only method you must override. You still need override at least one of onAdded, onAccessed and onDownloaded. You may need to override restore as well. [...]
Completer<T>
A way to produce Future objects and to complete them later with a value or error. [...]
DeferredLibrary
Indicates that loading of libraryName is deferred. [...]
EventSink<T>
A Sink that supports adding errors. [...]
FifoPolicy
Implements a FIFO (first in, first out) Policy. This policy is pretty useless. Mainly it's for demo purpose.
Future<T>
An object representing a delayed computation. [...]
FutureOr<T>
A type representing values that are either Future<T> or T. [...]
LeastFrequentlyUsedPolicy
Implements a Least-Frequently-Used Policy.
LessRecentlyUsedPolicy
Implements a Less-Recently-Used Policy. This is the default policy if you dont specify a policy in CacheStore.setPolicy.
LFUPolicy
CacheItemPayload to hold LeastFrequentlyUsedPolicy data
Stream<T>
A source of asynchronous data events. [...]
StreamConsumer<S>
Abstract interface for a "sink" accepting multiple entire streams. [...]
StreamController<T>
A controller with the stream it controls. [...]
StreamIterator<T>
An Iterator like interface for the values of a Stream. [...]
StreamSink<S>
A object that accepts stream events both synchronously and asynchronously. [...]
StreamSubscription<T>
A subscription on events from a Stream. [...]
StreamTransformer<S, T>
Transforms a Stream. [...]
StreamTransformerBase<S, T>
Base class for implementing StreamTransformer. [...]
StreamView<T>
Stream wrapper that only exposes the Stream interface.
SynchronousStreamController<T>
A stream controller that delivers its events synchronously. [...]
Timer
A count-down timer that can be configured to fire once or repeatedly. [...]
Zone
A zone represents an environment that remains stable across asynchronous calls. [...]
ZoneDelegate
An adapted view of the parent zone. [...]
ZoneSpecification
This class provides the specification for a forked zone. [...]

Functions

runZoned<R>(R body(), { Map zoneValues, ZoneSpecification zoneSpecification, Function onError }) → R
Runs body in its own zone. [...]
scheduleMicrotask(void callback()) → void
Runs a function asynchronously. [...]

Typedefs

ControllerCallback() → void
Type of a stream controller's onListen, onPause and onResume callbacks.
ControllerCancelCallback() → dynamic
Type of stream controller onCancel callbacks. [...]
CreatePeriodicTimerHandler(Zone self, ZoneDelegate parent, Zone zone, Duration period, void f(Timer timer)) Timer
CreateTimerHandler(Zone self, ZoneDelegate parent, Zone zone, Duration duration, void f()) Timer
ErrorCallbackHandler(Zone self, ZoneDelegate parent, Zone zone, Object error, StackTrace stackTrace) AsyncError
ForkHandler(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecification specification, Map zoneValues) Zone
HandleUncaughtErrorHandler(Zone self, ZoneDelegate parent, Zone zone, Object error, StackTrace stackTrace) → void
OnDownloaded(CacheItem, Map<String, String>) Future<void>
PrintHandler(Zone self, ZoneDelegate parent, Zone zone, String line) → void
RegisterBinaryCallbackHandler(Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2)) ZoneBinaryCallback<R, T1, T2>
RegisterCallbackHandler(Zone self, ZoneDelegate parent, Zone zone, R f()) ZoneCallback<R>
RegisterUnaryCallbackHandler(Zone self, ZoneDelegate parent, Zone zone, R f(T arg)) ZoneUnaryCallback<R, T>
RunBinaryHandler(Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2), T1 arg1, T2 arg2) → R
RunHandler(Zone self, ZoneDelegate parent, Zone zone, R f()) → R
RunUnaryHandler(Zone self, ZoneDelegate parent, Zone zone, R f(T arg), T arg) → R
ScheduleMicrotaskHandler(Zone self, ZoneDelegate parent, Zone zone, void f()) → void
ZoneBinaryCallback<R, T1, T2>(T1 arg1, T2 arg2) → R
ZoneCallback<R>() → R
ZoneUnaryCallback<R, T>(T arg) → R

Exceptions / Errors

AsyncError
Pair of error and stack trace. Returned by Zone.errorCallback.
DeferredLoadException
Thrown when a deferred library fails to load.
TimeoutException
Thrown when a scheduled timeout happens while waiting for an async result.