isPrimitiveType<T> static method

bool isPrimitiveType<T>([
  1. Type? type
])

Returns true if type is primitive (String, int, double, num or bool).

Implementation

static bool isPrimitiveType<T>([Type? type]) {
  type ??= T;
  return TypeInfo.isPrimitiveTypeFor(type);
}