getByValue static method

DocFormat? getByValue(
  1. int? i
)

Implementation

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