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