Skip to content

Commit b5d8cf5

Browse files
mjl0602AlexV525
authored andcommitted
fix name&format
1 parent a13cb73 commit b5d8cf5

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

lib/src/widget/camera_picker.dart

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class CameraPicker extends StatefulWidget {
3434
this.maximumRecordingDuration = const Duration(seconds: 15),
3535
this.theme,
3636
this.resolutionPreset = ResolutionPreset.max,
37-
this.quarterTurns = 0,
37+
this.cameraQuarterTurns = 0,
3838
CameraPickerTextDelegate textDelegate,
3939
}) : assert(
4040
isAllowRecording == true || isOnlyAllowRecording != true,
@@ -51,9 +51,9 @@ class CameraPicker extends StatefulWidget {
5151
: DefaultCameraPickerTextDelegate());
5252
}
5353

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;
5757

5858
/// Whether the picker can record video.
5959
/// 选择器是否可以录像
@@ -105,7 +105,7 @@ class CameraPicker extends StatefulWidget {
105105
isAllowRecording: isAllowRecording,
106106
isOnlyAllowRecording: isOnlyAllowRecording,
107107
theme: theme,
108-
quarterTurns: cameraQuarterTurns,
108+
cameraQuarterTurns: cameraQuarterTurns,
109109
textDelegate: textDelegate,
110110
resolutionPreset: resolutionPreset,
111111
),
@@ -540,7 +540,8 @@ class CameraPickerState extends State<CameraPicker> {
540540
children: <Widget>[
541541
const Spacer(),
542542
// 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,
544545
],
545546
),
546547
);
@@ -690,7 +691,7 @@ class CameraPickerState extends State<CameraPicker> {
690691
if (isInitialized)
691692
Center(
692693
child: RotatedBox(
693-
quarterTurns: widget.quarterTurns ?? 0,
694+
quarterTurns: widget.cameraQuarterTurns ?? 0,
694695
child: AspectRatio(
695696
aspectRatio: cameraController.value.aspectRatio,
696697
child: CameraPreview(cameraController),

0 commit comments

Comments
 (0)