toSyntaxLanguageCode method

SyntaxLanguageCode toSyntaxLanguageCode()

Implementation

SyntaxLanguageCode toSyntaxLanguageCode() {
  switch (this) {
    case 'en':
      return SyntaxLanguageCode.en;
    case 'es':
      return SyntaxLanguageCode.es;
    case 'fr':
      return SyntaxLanguageCode.fr;
    case 'de':
      return SyntaxLanguageCode.de;
    case 'it':
      return SyntaxLanguageCode.it;
    case 'pt':
      return SyntaxLanguageCode.pt;
  }
  throw Exception('$this is not known in enum SyntaxLanguageCode');
}