startRecording method

  1. @override
Future<void> startRecording({
  1. required String fileOutput,
})
override

Begin recording to the specified fileOutput.

A PlatformException may be thrown if fileOutput is invalid or an app doesn't receive write permissions.

This should only be called after passing as a parameter to a CameraController and CameraController.initialize has been called.

Implementation

@override
Future<void> startRecording({required String fileOutput}) async {
  verifyAttached();
  mediaRecorder.setOutputFilePath(fileOutput);
  await _controller.camera.unlock();
  mediaRecorder.prepare();
  return mediaRecorder.start();
}