getByValue static method

CaptureSessionPreset? getByValue(
  1. int? i
)

Implementation

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