stopVideoRecording method

Future<XFile?> stopVideoRecording()

Implementation

Future<XFile?> stopVideoRecording() async {
  final controllerValue = state.value;
  if (controllerValue == null ||
      !controllerValue.value.isInitialized ||
      !controllerValue.value.isRecordingVideo) {
    return null;
  }

  try {
    final xFile = await controllerValue.stopVideoRecording();
    return xFile;
  } catch (e) {
    return null;
  }
}