resumeVideoRecording method Null safety

Future<void> resumeVideoRecording()

Resume video recording after pausing.

This feature is only available on iOS and Android sdk 24+.

Implementation

Future<void> resumeVideoRecording() async {
  _throwIfNotInitialized('resumeVideoRecording');
  if (!value.isRecordingVideo) {
    throw CameraException(
      'No video is recording',
      'resumeVideoRecording was called when no video is recording.',
    );
  }
  try {
    await CameraPlatform.instance.resumeVideoRecording(_cameraId);
    value = value.copyWith(isRecordingPaused: false);
  } on PlatformException catch (e) {
    throw CameraException(e.code, e.message);
  }
}