startVideoRecording method

Future<void> startVideoRecording(
  1. T lav,
  2. void setState(
    1. void ()
    )
)

Implementation

Future<void> startVideoRecording(T lav, void Function(void Function()) setState) async {
  if (!widget.photoController!.value.isInitialized) {
    showInSnackBar('Error: Prima seleziona un telecamera.');
    return;
  }

  if (widget.photoController!.value.isRecordingVideo) {
    return;
  }

  try {
    await widget.photoController!.startVideoRecording();
  } on CameraException catch (e) {
    _showCameraException(e);
    return;
  }
}