toConnectionState method

ConnectionState toConnectionState()

Implementation

ConnectionState toConnectionState() {
  switch (this) {
    case 'CONNECTED':
      return ConnectionState.connected;
    case 'DISCONNECTED':
      return ConnectionState.disconnected;
    case 'UNKNOWN':
      return ConnectionState.unknown;
  }
  throw Exception('$this is not known in enum ConnectionState');
}