getByValue static method

LogLevel? getByValue(
  1. String? i
)

Implementation

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