isBuiltIn static method

bool isBuiltIn(
  1. Type T
)

Decoders for (exactly) these types cannot be registered or cleared.

Note: It is possible to register decoders for generic types for example: List<User>, Set<int>, but it is not recommended. Instead, rather use the methods getList, getSet, and getMap.

Implementation

static bool isBuiltIn(Type T) {
  return (T == bool ||
      T == double ||
      T == int ||
      T == Map ||
      T == List ||
      T == Null ||
      T == num ||
      T == Set ||
      T == String ||
      T == Symbol ||
      T == Type);
}