@@ -34,7 +34,7 @@ class CameraPicker extends StatefulWidget {
34
34
this .maximumRecordingDuration = const Duration (seconds: 15 ),
35
35
this .theme,
36
36
this .resolutionPreset = ResolutionPreset .max,
37
- this .quarterTurns = 0 ,
37
+ this .cameraQuarterTurns = 0 ,
38
38
CameraPickerTextDelegate textDelegate,
39
39
}) : assert (
40
40
isAllowRecording == true || isOnlyAllowRecording != true ,
@@ -51,9 +51,9 @@ class CameraPicker extends StatefulWidget {
51
51
: DefaultCameraPickerTextDelegate ());
52
52
}
53
53
54
- /// Quarter rotate turns.
55
- /// 摄像机视图旋转次数
56
- final int quarterTurns ;
54
+ /// The number of clockwise quarter turns the camera view should be rotated .
55
+ /// 摄像机视图顺时针旋转次数,每次90度
56
+ final int cameraQuarterTurns ;
57
57
58
58
/// Whether the picker can record video.
59
59
/// 选择器是否可以录像
@@ -105,7 +105,7 @@ class CameraPicker extends StatefulWidget {
105
105
isAllowRecording: isAllowRecording,
106
106
isOnlyAllowRecording: isOnlyAllowRecording,
107
107
theme: theme,
108
- quarterTurns : cameraQuarterTurns,
108
+ cameraQuarterTurns : cameraQuarterTurns,
109
109
textDelegate: textDelegate,
110
110
resolutionPreset: resolutionPreset,
111
111
),
@@ -540,7 +540,8 @@ class CameraPickerState extends State<CameraPicker> {
540
540
children: < Widget > [
541
541
const Spacer (),
542
542
// TODO(Alex): There's an issue tracking NPE of the camera plugin, so switching is temporary disabled .
543
- if ((cameras? .length ?? 0 ) > 1 ) switchCamerasButton,
543
+ if ((cameras? .length ?? 0 ) > 1 )
544
+ switchCamerasButton,
544
545
],
545
546
),
546
547
);
@@ -690,7 +691,7 @@ class CameraPickerState extends State<CameraPicker> {
690
691
if (isInitialized)
691
692
Center (
692
693
child: RotatedBox (
693
- quarterTurns: widget.quarterTurns ?? 0 ,
694
+ quarterTurns: widget.cameraQuarterTurns ?? 0 ,
694
695
child: AspectRatio (
695
696
aspectRatio: cameraController.value.aspectRatio,
696
697
child: CameraPreview (cameraController),
0 commit comments