isPrimitiveType function

bool isPrimitiveType(
  1. Type type
)

Checks if the type is either bool, String, int, num, double, or dynamic

Implementation

bool isPrimitiveType(Type type) =>
    type == bool || type == String || type == int || type == num || type == double || type == dynamic;