action_pause_preview method
dynamic
action_pause_preview({
- required void onCameraNotInit(),
- required void onCameraNotSelect(),
- required void onCameraNotActive(),
Implementation
action_pause_preview({
required void Function() onCameraNotInit,
required void Function() onCameraNotSelect,
required void Function() onCameraNotActive,
}) async {
bool is_check_camera = util_check_camera(
onCameraNotInit: onCameraNotInit,
onCameraNotSelect: onCameraNotSelect,
onCameraNotActive: onCameraNotActive,
);
if (!is_check_camera) {
return;
}
if (isMobile) {
await camera_mobile_controller.pausePreview();
} else if (isDesktop) {
if (Platform.isWindows) {
await camera_windows.pausePreview(camera_id);
}
}
}