For some reason (only on some of the phones) my camera preview is rotated 90 degrees.
Device orientation utils on debug says the same thing for working and not working phones: D/CameraOrientationUtil(14552): getRelativeImageRotation: destRotationDegrees=0, sourceRotationDegrees=90, isOppositeFacing=true, result=90
Using camera: ^0.11.0+1
This is how I build a preview: Expanded(child: _cameraController!.buildPreview()),
Which results in:

when I take a pic tho, the rotation is fine:

I can rotate the view, but then "working" phones are rotated... If anybody has any ideas I'd really appreciate it.
With the "camera" package 0.11.0+, the "camera_android_camerax" package is the default package for Android, and it causes the orientation problem.
You don't need to downgrade the camera package. Just add the "camera_android" package for it. ;)
$ flutter pub add camera_android
Note)
if camera_android_camerax fixed, please add a comment to this answer. I will update the answer. For now, camera_android_camerax==0.6.13 dose not work.
I had the same issue: just downgrade camera to version ^0.10.6
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With