getByValue static method

CaptureMode? getByValue(
  1. int? i
)

Implementation

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