flutter_wechat_camera_picker icon indicating copy to clipboard operation
flutter_wechat_camera_picker copied to clipboard

[BUG] "lockCaptureOrientation" cannot be used.

Open std-s opened this issue 1 year ago • 3 comments

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:

  1. Open the photo scene;
  2. Turn the phone horizontally;
  3. An error occurs in the scene.

Expected behavior Can shoot horizontally normally.

Screenshots (If contains) Screenshot 2024-12-04 at 5 06 30 PM

Version information

  • Device: iPhone 12 pro max
  • OS: 17.6
  • Package Version: 4.3.6
  • Flutter Version: 3.24.5

Additional context

std-s avatar Dec 04 '24 09:12 std-s

how to fix it?

springlo avatar Dec 17 '24 01:12 springlo

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

hellohejinyu avatar Apr 07 '25 04:04 hellohejinyu

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

congdanh1608 avatar Oct 31 '25 06:10 congdanh1608