getByValue static method

LDSParsingErrorCodes? getByValue(
  1. int? i
)

Implementation

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