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-onlyoverride
- 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 - isNullFilledList → bool
-
Returns
true
if this decoded value represents a null filled list.read-only - runtimeType → Type
-
A representation of the runtime type of the object.
read-onlyinherited
- 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>.
-
asMapList(
{bool includeNullValues = true}) → List< Map< String, dynamic> ?> - Returns this decoded value as a List<Map<String, dynamic>>.
-
asNull(
) → Null -
Returns this decoded value as
null
. -
asObject<
E, T> (ObjectTransformer< E, T> transformer) → T -
Returns this decoded value as a dart object (specified by
T
), built usingtransformer
). -
asObjectList<
E, T> (ObjectTransformer< E, T> transformer) → List<T> -
Returns this decoded value as a list of dart objects (specified by
T
), built usingtransformer
). -
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 -
Returns
true
if this decoded value represents a list of primitive values (specified byT
). -
isPrimitiveValue<
T> () → bool -
Returns
true
if this decoded value represents a primitive value (specified byT
). -
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