fromKey static method

Si0TypeDefPrimitive fromKey(
  1. String key
)

Creates Class Object from Json

Implementation

static Si0TypeDefPrimitive fromKey(String key) {
  switch (key) {
    case 'Bool':
      return Si0TypeDefPrimitive_Bool();
    case 'Char':
      return Si0TypeDefPrimitive_Char();
    case 'Str':
      return Si0TypeDefPrimitive_Str();
    case 'U8':
      return Si0TypeDefPrimitive_U8();
    case 'U16':
      return Si0TypeDefPrimitive_U16();
    case 'U32':
      return Si0TypeDefPrimitive_U32();
    case 'U64':
      return Si0TypeDefPrimitive_U64();
    case 'U128':
      return Si0TypeDefPrimitive_U128();
    case 'U256':
      return Si0TypeDefPrimitive_U256();
    case 'I8':
      return Si0TypeDefPrimitive_I8();
    case 'I16':
      return Si0TypeDefPrimitive_I16();
    case 'I32':
      return Si0TypeDefPrimitive_I32();
    case 'I64':
      return Si0TypeDefPrimitive_I64();
    case 'I128':
      return Si0TypeDefPrimitive_I128();
    case 'I256':
      return Si0TypeDefPrimitive_I256();
    default:
      throw UnexpectedTypeException('Unexpected type: $key');
  }
}