isPrimitiveList<T> method

bool isPrimitiveList<T>(
  1. {bool includeNullValues = false}

Returns true if this decoded value represents a list of primitive values (specified by T).

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

If includeNullValues is set to true, null values are also taken into account.

Throws a JsonCheckingError if T could not represent a primitive type.


bool isPrimitiveList<T>({bool includeNullValues = false}) =>
    checkPrimitiveList<T>(value, includeNullValues);