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
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- jsonDecodeCallback ↔ JsonDecodeCallback
-
getter/setter pairinherited
- jsonEncodeCallback ↔ JsonEncodeCallback
-
getter/setter pairinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
transformRequest(
RequestOptions options) → Future< String> -
transformRequestallows changes to the request data before it is sent to the server, but after theRequestInterceptor.inherited -
transformResponse(
RequestOptions options, ResponseBody response) → Future -
As an agreement, we return the
responsewhen the Options.responseType isResponseType.stream.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited