toLifecycleErrorCode method

LifecycleErrorCode toLifecycleErrorCode()

Implementation

LifecycleErrorCode toLifecycleErrorCode() {
  switch (this) {
    case 'Success':
      return LifecycleErrorCode.success;
    case 'ScriptMissing':
      return LifecycleErrorCode.scriptMissing;
    case 'ScriptNotExecutable':
      return LifecycleErrorCode.scriptNotExecutable;
    case 'ScriptTimedOut':
      return LifecycleErrorCode.scriptTimedOut;
    case 'ScriptFailed':
      return LifecycleErrorCode.scriptFailed;
    case 'UnknownError':
      return LifecycleErrorCode.unknownError;
  }
  throw Exception('$this is not known in enum LifecycleErrorCode');
}