toEmotionName method

EmotionName toEmotionName()

Implementation

EmotionName toEmotionName() {
  switch (this) {
    case 'HAPPY':
      return EmotionName.happy;
    case 'SAD':
      return EmotionName.sad;
    case 'ANGRY':
      return EmotionName.angry;
    case 'CONFUSED':
      return EmotionName.confused;
    case 'DISGUSTED':
      return EmotionName.disgusted;
    case 'SURPRISED':
      return EmotionName.surprised;
    case 'CALM':
      return EmotionName.calm;
    case 'UNKNOWN':
      return EmotionName.unknown;
    case 'FEAR':
      return EmotionName.fear;
  }
  throw Exception('$this is not known in enum EmotionName');
}