Apparence-io / CamerAwesome

📸 Embedding a camera experience within your own app shouldn't be that hard. A flutter plugin to integrate awesome Android / iOS camera experience.
https://ApparenceKit.dev
MIT License
959 stars 247 forks source link

[iOS] Wrong preview size on iPad devices using CameraPreview.cover #258

Closed GabrielAraujo closed 9 months ago

GabrielAraujo commented 1 year ago

Steps to Reproduce

Setup cameraawesome and run on iPhone and iPad for comparison. On iPhone devices it will work as expected filling the screen but the same configuration on iPad leaves some blank spaces on the sides. If we switch to fitWidth it will work as expected on iPad but will leave blank spaces for top and bottom on iPhone

IMG_A83D9A78BD0C-1

Expected results

No blank spaces on the sides for the preview

Actual results

Blank spaces on the sides for the preview.

About your device

Brand Model OS
Apple iPhone X 15.5
Apple iPad Pro (9.7-inch) 14.6

Your flutter version

Run this in your command line flutter --version

Flutter 3.7.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision b06b8b2710 (5 weeks ago) • 2023-01-23 16:55:55 -0800 Engine • revision b24591ed32 Tools • Dart 2.19.0 • DevTools 2.20.1

g-apparence commented 1 year ago

Hi, I fixed a bug on the PreviewFit.cover mode yesterday.

256

It's not merged yet as we wanted to test on more devices. But I think this would fix your problem. If you want the preview to take all your screen you have to you the cover mode.

For the fitWidth mode. I think it's totally normal. This mode will try to make the view exactly as large as it can be. But the height will stay proportionnal. That's why height can be not taking all the screen.

For more explanation you can get a look at this great doc on web fit..

GabrielAraujo commented 1 year ago

It did fix on the iPad now but on the iPhone now appears some black boxes on top and bottom: IMG_B5931DB4B1F5-1

g-apparence commented 9 months ago

Fixed