FetchTray class
The base class for fetch_tray.
It is a singleton class, so you can access it anywhere in your app by calling
FetchTray.instance. It is initialized by calling FetchTray.init(), which
must be called before using the instance. It can be initialized with a list
of plugins, a Dio instance and a map of request configs.
Constructors
-
FetchTray.init({List<
TrayPlugin> plugins = const [], Dio? dio, TrayRequestConfigMap? requestConfigs}) -
Initializes FetchTray with the given
plugins,dioinstance andrequestConfigs.factory
Properties
- dio ↔ Dio
-
The Dio instance used by FetchTray
latefinal
- hashCode → int
-
The hash code for this object.
no setterinherited
-
plugins
↔ List<
TrayPlugin> -
A list of plugins to be used with FetchTray
latefinal
- requestConfigs ↔ TrayRequestConfigMap
-
A map of request configs, where the key is the request type and the value
is the request config.
latefinal
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
getRequestConfig(
Type request) → TrayRequestConfig - Returns the request config for the given request type. This is useful for example to get the base url for a request. If no request config is found for the given request type, an exception is thrown.
-
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