toPortState method

PortState toPortState()

Implementation

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