isPrimitive static method

bool isPrimitive(
  1. dynamic o
)

Implementation

static bool isPrimitive(dynamic o){
  String obj = o.toString().removeNullableMark();

  return obj == 1.runtimeType.toString() || obj == 0.0.runtimeType.toString() ||
      obj == "".runtimeType.toString() || obj == true.runtimeType.toString();
}