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.
no setteroverride
isEmptyList bool
Returns true if this decoded value represents an empty list.
no setter
isEmptyMap bool
Returns true if this decoded value represents an empty map.
no setter
isList bool
Returns true if this decoded value represents a list.
no setter
isMap bool
Returns true if this decoded value represents a map.
no setter
isNull bool
Returns true if this decoded value represents a null value.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
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 nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

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