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
911 stars 200 forks source link

Setting FlashMode Doesn't Actually Change FlashMode #368

Open mgrosvenor-pivcon opened 1 year ago

mgrosvenor-pivcon commented 1 year ago

Steps to Reproduce

Create the camera using builder.awesome and set the flash mode to something other than the default (none).

CameraAwesomeBuilder.awesome(
  exifPreferences: ExifPreferences(saveGPSLocation: true),
  aspectRatio: CameraAspectRatios.ratio_16_9,
  flashMode: FlashMode.always,
  saveConfig: SaveConfig.photo(
    pathBuilder: () async {
       return filePath;
    },
  ),
  onMediaTap: (mediaCapture) {},
)

Expected results

Flash should be set to Always

Actual results

The flash icon is changed to match the setting, but the actual flash setting is still the default (none). Tapping the icon to cycle through the settings works and changes the flash setting as expected.

About your device

Brand Model OS
Apple iPhone 8 16.5

Your flutter version

Flutter 3.7.11 • channel stable • https://github.com/flutter/flutter.git
Framework • revision f72efea43c (10 weeks ago) • 2023-04-11 11:57:21 -0700
Engine • revision 1a65d409c7
Tools • Dart 2.19.6 • DevTools 2.20.1

CamerAwesome Version

1.4.0

hiteshsapra-bt commented 11 months ago

Yes, this is a bug on iOS.

PlatformException(FLASH_UNSUPPORTED, can't set flash for portrait mode, , null)

danieljiwonkang98 commented 5 months ago

@istornz Can we get update on this? When setting FlashMode.on doesn't work as well.

giordy16 commented 2 months ago

Having the same problem @istornz

lycs12 commented 1 month ago

PlatformException(FLASH_UNSUPPORTED, can't set flash for portrait mode, , null)

Any update or any idea how to fix this?

I also get this exception when I am having front camera and the ability to switch flash mode.

Every time I switch flash with the front camera I have the above exception. Back camera with setting flashMode work perfectly fine. I know my phones do support the flash mode for front camera (tried and work with ios native camera and also tried it with flutter camera package)

yadimr77 commented 1 month ago

any update on this issue? or you guys found solution to this issue @lycs12

i am facing the same problem when set flash.on with front camera