JsonSerializableConverter class
JsonSeriablizableConverter Converter for chopper to convert json response to a dart object using json_serializable. Based of: https://hadrien-lejard.gitbook.io/chopper/faq#write-a-custom-jsonconverter
Constructors
-
JsonSerializableConverter(Map<
Type, JsonFactory> factories) -
Creates a new JsonSerializableConverter
const
Properties
-
factories
→ Map<
Type, JsonFactory> -
The factories to use for decoding the json responses.
For example:
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
convertError<
BodyType, InnerType> (Response response) → FutureOr< Response> -
Converts the received
Responseto aResponsewhich has a body with the HTTP representation of the original body.inherited -
convertRequest(
Request request) → Request -
Converts the received
Requestto aRequestwhich has a body with the HTTP representation of the original body.inherited -
convertResponse<
BodyType, InnerType> (Response response) → FutureOr< Response< BodyType> > -
Converts the received
Responseto aResponsewhich has a body of the typeBodyType. -
decodeJson<
BodyType, InnerType> (Response response) → FutureOr< Response> -
inherited
-
encodeJson(
Request request) → Request -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
-
tryDecodeJson(
String data) → FutureOr -
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited