[BUG] "lockCaptureOrientation" cannot be used.
Describe the bug When I set "lockCaptureOrientation: DeviceOrientation.portraitDown" and use the camera to take pictures in landscape orientation, the scene is wrong.
How to reproduce
final AssetEntity? entity = await CameraPicker.pickFromCamera(
Get.context!,
locale: Get.locale,
pickerConfig: CameraPickerConfig(
enableAudio: true,
enableRecording: true,
enableScaledPreview: false,
maximumRecordingDuration: 60.seconds,
lockCaptureOrientation: DeviceOrientation.portraitDown,
onMinimumRecordDurationNotMet: () {
},
),
);
Steps to reproduce the behavior:
- Open the photo scene;
- Turn the phone horizontally;
- An error occurs in the scene.
Expected behavior Can shoot horizontally normally.
Screenshots (If contains)
Version information
- Device: iPhone 12 pro max
- OS: 17.6
- Package Version: 4.3.6
- Flutter Version: 3.24.5
Additional context
how to fix it?
The situation here requires locking the page orientation to portrait mode. I’ve tweaked the source code a bit, and you can take a look if you want.
https://github.com/fluttercandies/flutter_wechat_camera_picker/compare/main...hellohejinyu:flutter_wechat_camera_picker:main
https://github.com/user-attachments/assets/288b90b0-8866-4099-8e60-d0b791751e74
The situation here requires locking the page orientation to portrait mode. I’ve tweaked the source code a bit, and you can take a look if you want.
main...hellohejinyu:flutter_wechat_camera_picker:main
77cf6b0b793a24a511d362f2865ff7eb.mp4
Thanks guy