getByValue static method

DocType? getByValue(
  1. int? i
)

Implementation

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