parse static method

Kind parse(
  1. String value
)

Implementation

static Kind parse(String value) => switch (value) {
      'accessor' => accessor,
      'constant' => constant,
      'constructor' => constructor,
      'class' => class_,
      'dynamic' => dynamic,
      'enum' => enum_,
      'extension' => extension,
      'function' => function,
      'library' => library,
      'method' => method,
      'mixin' => mixin,
      'Never' => never,
      'package' => package,
      'parameter' => parameter,
      'prefix' => prefix,
      'property' => property,
      'SDK' => sdk,
      'topic' => topic,
      'top-level constant' => topLevelConstant,
      'top-level property' => topLevelProperty,
      'typedef' => typedef,
      'type parameter' => typeParameter,
      _ => throw ArgumentError('Unknown kind "$value"'),
    };