stopVideoRecording method

Future<XFile?> stopVideoRecording(
  1. T lav,
  2. void setState(
    1. void ()
    )
)

Implementation

Future<XFile?> stopVideoRecording(T lav, void Function(void Function()) setState) async {
  if (!photoController!.value.isRecordingVideo) {
    return null;
  }

  try {
    var y = await photoController!.stopVideoRecording();
    videoFile = y;
    widget.onStopVideoRecording(videoFile!, lav, isBusy, setState);
    setState(() {
      waiterMessage = "";
      isBusy = false;
    });
    return videoFile;
  } on CameraException catch (e) {
    _showCameraException(e);
    return null;
  }
}