valueOf static method

WebSocketStatusCodes? valueOf(
  1. int code
)

Returns the WebSocketStatusCodes by the given code.

Implementation

static WebSocketStatusCodes? valueOf(int code) {
  for (final value in values) {
    if (value.code == code) return value;
  }
  return null;
}