parseLevel function

Level parseLevel(
  1. String levelString
)

Implementation

Level parseLevel(String levelString) {
  switch (levelString) {
    case 'major':
      return Level.major;
    case 'minor':
      return Level.minor;
    case 'patch':
      return Level.patch;
    case 'build':
      return Level.build;
    default:
      throw ArgumentError('Invalid patch level: $levelString. '
          'Expected one of: major, minor, patch, build.');
  }
}