NyDecoder<T> class
abstract
A decoder that can see the whole response, not only its body.
Register one in your modelDecoders map in place of a closure when a
model needs the status code or headers to decode, e.g. OneOf.
Closure decoders (User: (data) => User.fromJson(data)) keep working
as before.
Constructors
- NyDecoder()
-
const
Properties
- decodesErrors → bool
-
Whether this decoder also runs on 4xx/5xx response bodies.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
-
listDecoder
→ NyDecoder<
List< T> > -
Decodes a
List<T>, item by item. Items that decode to null are left out.no setter - listType → Type
-
The
List<T>type this decoder also handles.no setter - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → Type
-
The type this decoder builds, used as its key by decoders.
no setter
Methods
-
decode(
dynamic json, NyResponse response, Map< Type, dynamic> decoders) → T? -
Decodes
jsoninto aT. -
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