getTypeFromName static method

Type getTypeFromName(
  1. String name
)

Implementation

static Type getTypeFromName(String name) {
  const Map<String, Type> types = {
    "int": int,
    "bool": bool,
    "double": double,
    "String": String,
    "IResource": IResource,
    "IRecord": IRecord,
    "IEnum": IEnum,
    "DC": DC,
  };

  if (types.containsKey(name)) {
    return types[name]!;
  } else
    return Object().runtimeType;
}