FlutterTransformer class

Dio has already implemented a DefaultTransformer, and as the default Transformer. If you want to custom the transformation of request/response data, you can provide a Transformer by your self, and replace the DefaultTransformer by setting the dio.Transformer.

FlutterTransformer is especially for flutter, by which the json decoding will be in background with compute function. FlutterTransformer

Inheritance

Constructors

FlutterTransformer()

Properties

hashCode → int
The hash code for this object.
read-only, inherited
jsonDecodeCallback JsonDecodeCallback
read / write, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited
transformRequest(RequestOptions options) → Future<String>
transformRequest allows changes to the request data before it is sent to the server, but after the RequestInterceptor.
inherited
transformResponse(RequestOptions options, ResponseBody response) → Future
As an agreement, you must return the response when the Options.responseType is ResponseType.stream.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited