getByValue static method

CameraMode? getByValue(
  1. int? i
)

Implementation

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