toPortState method
Implementation
PortState toPortState() {
switch (this) {
case 'open':
return PortState.open;
case 'closed':
return PortState.closed;
}
throw Exception('$this is not known in enum PortState');
}
PortState toPortState() {
switch (this) {
case 'open':
return PortState.open;
case 'closed':
return PortState.closed;
}
throw Exception('$this is not known in enum PortState');
}