CamerAwesome icon indicating copy to clipboard operation
CamerAwesome copied to clipboard

Setting FlashMode Doesn't Actually Change FlashMode

Open mgrosvenor-pivcon opened this issue 1 year ago • 6 comments

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

mgrosvenor-pivcon avatar Jun 19 '23 11:06 mgrosvenor-pivcon

Yes, this is a bug on iOS.

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

hiteshsapra-bt avatar Jul 14 '23 08:07 hiteshsapra-bt

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

danieljiwonkang98 avatar Feb 01 '24 08:02 danieljiwonkang98

Having the same problem @istornz

giordy16 avatar Apr 16 '24 12:04 giordy16

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)

lycs12 avatar May 22 '24 00:05 lycs12

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

yadimr77 avatar Jun 03 '24 04:06 yadimr77