Upgrading camera 0.5 to 0.6
Breaking0.5.8+17 → 0.6.4+5Breaking3New1Fixed2Other2
BreakingUpgrade verdict
3 breaking changes.
In plain terms
- 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.
Must act 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.
What you must change
Breaking3
The takePicture method no longer accepts the path parameter and instead returns the captured image as an XFile.
CameraController.takePictureXFileThe startVideoRecording method no longer accepts filePath, and the recorded video is returned as an XFile when stopVideoRecording completes.
CameraController.startVideoRecordingCameraController.stopVideoRecordingXFileThe stopVideoRecording method now returns the captured video when it completes.
CameraController.stopVideoRecording