asPrimitiveList<T> method

List<T> asPrimitiveList<T>()

Returns this decoded value as a list of primitive values (specified by T).

Primitive values are of the types String, num, bool or Null. As subtypes of num, int or double will be also accepted.

Throws a JsonCastingError if this decoded value does not represents a list of primitive values or if T could not represents a primitive type.

Implementation

List<T> asPrimitiveList<T>() => castAsPrimitiveList<T>(value);