isTypePrimitive<T> function

bool isTypePrimitive<T>()

Returns true when the static type T is a primitive type.

Implementation

bool isTypePrimitive<T>() => switch (T) {
      const (num) ||
      const (int) ||
      const (double) ||
      const (bool) ||
      const (String) ||
      const (BigInt) ||
      const (DateTime) =>
        true,
      _ => false,
    };