getByValue static method

CheckResult? getByValue(
  1. int? i
)

Implementation

static CheckResult? getByValue(int? i) {
  if (i == null) return null;
  try {
    return CheckResult.values.firstWhere((x) => x.value == i);
  } catch (_) {
    return CheckResult.UNKNOWN;
  }
}