FoldingKind constructor

FoldingKind(
  1. String name
)

Implementation

factory FoldingKind(String name) {
  switch (name) {
    case 'ANNOTATIONS':
      return ANNOTATIONS;
    case 'BLOCK':
      return BLOCK;
    case 'CLASS_BODY':
      return CLASS_BODY;
    case 'COMMENT':
      return COMMENT;
    case 'DIRECTIVES':
      return DIRECTIVES;
    case 'DOCUMENTATION_COMMENT':
      return DOCUMENTATION_COMMENT;
    case 'FILE_HEADER':
      return FILE_HEADER;
    case 'FUNCTION_BODY':
      return FUNCTION_BODY;
    case 'INVOCATION':
      return INVOCATION;
    case 'LITERAL':
      return LITERAL;
    case 'PARAMETERS':
      return PARAMETERS;
  }
  throw Exception('Illegal enum value: $name');
}