We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2828a0e commit d150ac9Copy full SHA for d150ac9
lib/src/widget/camera_picker.dart
@@ -1237,6 +1237,14 @@ class CameraPickerState extends State<CameraPicker>
1237
}
1238
final double _offsetHorizontal = (_width - constraints.maxWidth).abs() / -2;
1239
final double _offsetVertical = (_height - constraints.maxHeight).abs() / -2;
1240
+ // Flip the preview if the user is using a front camera to match the result.
1241
+ if (currentCamera.lensDirection == CameraLensDirection.front) {
1242
+ _preview = Transform(
1243
+ transform: Matrix4.rotationY(math.pi),
1244
+ alignment: Alignment.center,
1245
+ child: _preview,
1246
+ );
1247
+ }
1248
_preview = Stack(
1249
children: <Widget>[
1250
Positioned(
0 commit comments