fromValue static method

DnsResponseCode? fromValue(
  1. int value
)

Find response code by value

Implementation

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