isPrimitiveType<T extends Object> method

bool isPrimitiveType<T extends Object>()
inherited

Checks if a type is a primitive type

Primitive types include String, int, num, double, and bool

Implementation

bool isPrimitiveType<T extends Object>() {
  return [
    String,
    int,
    num,
    double,
    bool,
  ].contains(T);
}