Skip to content

Upgrading camera 0.5 to 0.6

Breaking0.5.8+17 → 0.6.4+5Breaking3New1Fixed2Other2

BreakingUpgrade verdict

3 breaking changes.

  • Taking a photo no longer needs a file path; the photo comes back as a file object you can use directly.
  • Starting a video recording no longer takes a file path; you get the finished video back when you stop recording.
  • When you stop recording a video, the method hands you the video file.
3 items need code or config changes

Flutter requirement changed in 0.6.0: >=1.12.13+hotfix.5 <2.0.0 → >=1.12.13+hotfix.5.

Breaking3
The takePicture method no longer accepts the path parameter and instead returns the captured image as an XFile.
CameraController.takePictureXFile
The startVideoRecording method no longer accepts filePath, and the recorded video is returned as an XFile when stopVideoRecording completes.
CameraController.startVideoRecordingCameraController.stopVideoRecordingXFile
The stopVideoRecording method now returns the captured video when it completes.
CameraController.stopVideoRecording