I don't know if this is the right way. If not how should I do it?
Despite that, I have seen a weird behavior: when the camera opens, it opens with the back camera and a 1:1 ratio. When I change the camera, the aspect ratio of the front one is 4:3. When then i take a picture using the front camera, the image on Android has a 4:3 ratio, on iPhone a 1:1 ratio.
Expected results
The ratio of the picture respects the one that is visible on the UI.
Actual results
On iPhone, the picture has a ratio of 1:1, although on the UI 4:3 is displayed.
About your device
Brand
Model
OS
Huawei
P20 pro
Android 10
Your flutter version
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.16.8, on macOS 14.1 23B2073 darwin-arm64, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 15.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.1)
[✓] VS Code (version 1.87.0)
[✓] Connected device (5 available)
! Error: Browsing on the local area network for MHiphone14. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac.
The device must be opted into Developer Mode to connect wirelessly. (code -27)
[✓] Network resources
Steps to Reproduce
I want the cameras to take pictures only with 1:1 ratio, both with the front and the back camera. To do this, I have set
sensorConfig: SensorConfig.single( sensor: Sensor.position(SensorPosition.back), flashMode: FlashMode.auto, aspectRatio: CameraAspectRatios.ratio_1_1, zoom: 0.0, ),
I don't know if this is the right way. If not how should I do it?
Despite that, I have seen a weird behavior: when the camera opens, it opens with the back camera and a 1:1 ratio. When I change the camera, the aspect ratio of the front one is 4:3. When then i take a picture using the front camera, the image on Android has a 4:3 ratio, on iPhone a 1:1 ratio.
Expected results
The ratio of the picture respects the one that is visible on the UI.
Actual results
On iPhone, the picture has a ratio of 1:1, although on the UI 4:3 is displayed.
About your device
Your flutter version
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.16.8, on macOS 14.1 23B2073 darwin-arm64, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [✓] Xcode - develop for iOS and macOS (Xcode 15.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2023.1) [✓] VS Code (version 1.87.0) [✓] Connected device (5 available) ! Error: Browsing on the local area network for MHiphone14. Ensure the device is unlocked and attached with a cable or associated with the same local area network as this Mac. The device must be opted into Developer Mode to connect wirelessly. (code -27) [✓] Network resources