startRecording method

Future<String> startRecording()

You can listen to cameraSetup.mediaCaptureStream to get updates of the photo capture (capturing, success/failure)

Implementation

Future<String> startRecording() async {
  String filePath = await filePathBuilder();
  _mediaCapture = MediaCapture.capturing(
      filePath: filePath, videoState: VideoState.started);
  try {
    await CamerawesomePlugin.recordVideo(filePath);
  } on Exception catch (e) {
    _mediaCapture = MediaCapture.failure(filePath: filePath, exception: e);
  }
  cameraContext.changeState(VideoRecordingCameraState.from(cameraContext));
  return filePath;
}