fromCode static method

GatewayCloseCode? fromCode(
  1. int code
)

Looks up a GatewayCloseCode by its integer code. Returns null if no matching code is found.

Implementation

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