toConnectionState method

ConnectionState toConnectionState()

Implementation

ConnectionState toConnectionState() {
  switch (this) {
    case 'ordering':
      return ConnectionState.ordering;
    case 'requested':
      return ConnectionState.requested;
    case 'pending':
      return ConnectionState.pending;
    case 'available':
      return ConnectionState.available;
    case 'down':
      return ConnectionState.down;
    case 'deleting':
      return ConnectionState.deleting;
    case 'deleted':
      return ConnectionState.deleted;
    case 'rejected':
      return ConnectionState.rejected;
    case 'unknown':
      return ConnectionState.unknown;
  }
  throw Exception('$this is not known in enum ConnectionState');
}