valueOf static method

FrameType valueOf(
  1. int value
)

Implementation

static FrameType valueOf(int value) {
  if (value == METHOD.value) return METHOD;
  if (value == HEADER.value) return HEADER;
  if (value == BODY.value) return BODY;
  if (value == HEARTBEAT.value) return HEARTBEAT;
  throw ArgumentError("Invalid frame type value $value");
}