util_check_camera method

bool util_check_camera({
  1. required void onCameraNotInit(),
  2. required void onCameraNotSelect(),
  3. required void onCameraNotActive(),
})

Implementation

bool util_check_camera({
  required void Function() onCameraNotInit,
  required void Function() onCameraNotSelect,
  required void Function() onCameraNotActive,
}) {
  if (!is_camera_init) {
    onCameraNotInit();
    return false;
  }
  if (!is_select_camera) {
    onCameraNotSelect();
    return false;
  }
  if (!is_camera_active) {
    onCameraNotActive();
    return false;
  }
  return true;
}