getStringAsActionType static method

NclActionType getStringAsActionType(
  1. String str
)

Implementation

static NclActionType getStringAsActionType(String str) {
  switch (str.toLowerCase()) {
    case 'start':
      return NclActionType.start;
    case 'stop':
      return NclActionType.stop;
    case 'abort':
      return NclActionType.abort;
    case 'pause':
      return NclActionType.pause;
    case 'resume':
      return NclActionType.resume;
    case 'set':
      return NclActionType.set;
    default:
      throw ArgumentError('Unknown action string: $str');
  }
}