toEnvironmentHealth method
Implementation
EnvironmentHealth toEnvironmentHealth() {
switch (this) {
case 'Green':
return EnvironmentHealth.green;
case 'Yellow':
return EnvironmentHealth.yellow;
case 'Red':
return EnvironmentHealth.red;
case 'Grey':
return EnvironmentHealth.grey;
}
throw Exception('$this is not known in enum EnvironmentHealth');
}