toInstalledComponentLifecycleState method

InstalledComponentLifecycleState toInstalledComponentLifecycleState()

Implementation

InstalledComponentLifecycleState toInstalledComponentLifecycleState() {
  switch (this) {
    case 'NEW':
      return InstalledComponentLifecycleState.$new;
    case 'INSTALLED':
      return InstalledComponentLifecycleState.installed;
    case 'STARTING':
      return InstalledComponentLifecycleState.starting;
    case 'RUNNING':
      return InstalledComponentLifecycleState.running;
    case 'STOPPING':
      return InstalledComponentLifecycleState.stopping;
    case 'ERRORED':
      return InstalledComponentLifecycleState.errored;
    case 'BROKEN':
      return InstalledComponentLifecycleState.broken;
    case 'FINISHED':
      return InstalledComponentLifecycleState.finished;
  }
  throw Exception(
      '$this is not known in enum InstalledComponentLifecycleState');
}