This document gathered all breaking changes and migrations requirement between major versions.
If you don't extend your customized
CameraPickerState
or you didn't override below methods, you can stop reading.
In order to sync the UI details with the latest WeChat style (v8.3.0), few naming or signatures of methods are changed. including:
restartDisplayModeDisplayTimer
buildBackButton
buildCameraPreview
buildCaptureButton
buildFocusingPoint
buildForegroundBody
restartDisplayModeDisplayTimer
is renamed torestartExposureModeDisplayTimer
.buildBackButton
no more requiresBoxConstraints constraints
as an argument, the signature isWidget buildBackButton(BuildContext context)
from now on.buildCameraPreview
no more requiresDeviceOrientation orientation
as an argument since the implementation does not really use it. It now requiresCameraValue cameraValue
as an argument. So the signature becomes:Widget buildCameraPreview({ required BuildContext context, required CameraValue cameraValue, required BoxConstraints constraints, })
buildCaptureButton
now requiresBuildContext context
as an argument. So the signature becomes:Widget buildCaptureButton(BuildContext context, BoxConstraints constraints)
buildFocusingPoint
now addsint quarterTurns
to make internal quarter turns. So the signature becomes:Widget buildFocusingPoint({ required CameraValue cameraValue, required BoxConstraints constraints, int quarterTurns = 0, })
buildForegroundBody
now addsDeviceOrientation? deviceOrientation
to make responsive layouts according to the device orientation. So the signature becomes:Widget buildForegroundBody( BuildContext context, BoxConstraints constraints, DeviceOrientation? deviceOrientation, )