DecodedValue class

The direct result of some JSON decoding.

Constructors

DecodedValue.from(String source)
Constructs a DecodedValue converting the given JSON-string source. [...]
factory

Properties

hashCode int
The hash code for this object. [...]
read-only, override
isEmptyList bool
Returns true if this decoded value represents an empty list.
read-only
isEmptyMap bool
Returns true if this decoded value represents an empty map.
read-only
isList bool
Returns true if this decoded value represents a list.
read-only
isMap bool
Returns true if this decoded value represents a map.
read-only
isNull bool
Returns true if this decoded value represents a null value.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
value → dynamic
The actual decoded value.
final

Methods

asList() List
Returns this decoded value as a List<dynamic>. [...]
asMap() Map<String, dynamic>
Returns this decoded value as a Map<String, dynamic>. [...]
asObject<E, T>(ObjectTransformer<E, T> transformer, {bool skipIfNull = false}) → T
Returns this decoded value as a dart object (specified by T), built using transformer). [...]
asObjectList<E, T>(ObjectTransformer<E, T> transformer, {bool skipNullValues = false}) List<T>
Returns this decoded value as a list of dart objects (specified by T), built using transformer). [...]
asPrimitiveList<T>() List<T>
Returns this decoded value as a list of primitive values (specified by T). [...]
asPrimitiveValue<T>() → T
Returns this decoded value as a primitive value (specified by T). [...]
extractField(List<Object> selectorList) DecodedValue
Returns a new instance of DecodedValue, which represents a subfield of this decoded value. [...]
isMapList({bool includeNullValues = false}) bool
Returns true if this decoded value represents a list of maps. [...]
isPrimitiveList<T>({bool includeNullValues = false}) bool
Returns true if this decoded value represents a list of primitive values (specified by T). [...]
isPrimitiveValue<T>() bool
Returns true if this decoded value represents a primitive value (specified by T). [...]
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
A string representation of this object. [...]
override

Operators

operator ==(Object other) bool
The equality operator. [...]
override