toSentimentType method

SentimentType toSentimentType()

Implementation

SentimentType toSentimentType() {
  switch (this) {
    case 'POSITIVE':
      return SentimentType.positive;
    case 'NEGATIVE':
      return SentimentType.negative;
    case 'NEUTRAL':
      return SentimentType.neutral;
    case 'MIXED':
      return SentimentType.mixed;
  }
  throw Exception('$this is not known in enum SentimentType');
}