react-native-vision-camera icon indicating copy to clipboard operation
react-native-vision-camera copied to clipboard

💭 flash button on barcode Scanner

Open moloudayat opened this issue 1 year ago • 2 comments

Question

I want to add a simple button on the camera to allow the user to turn off and on the flash(torch). is there any way that I can do it

What I tried

<>
                <Camera
                    style={StyleSheet.absoluteFill}
                    device={device}
                    isActive={true}
                    codeScanner={codeScanner}
                    torch={isFlashOn ? "on" : "off"}
                    lowLightBoost={false}

                />
                <TouchableOpacity
                    onPress={toggleFlash}>
                    <Image source={isFlashOn ? FlashOff : FlashOn}/>
                </TouchableOpacity>
 </>

VisionCamera Version

4.3.2

Additional information

moloudayat avatar Jul 07 '24 10:07 moloudayat

Guten Tag, Hans here.

[!NOTE] New features, bugfixes, updates and other improvements are all handled mostly by @mrousavy in his free time. To support @mrousavy, please consider 💖 sponsoring him on GitHub 💖. Sponsored issues will be prioritized.

maintenance-hans[bot] avatar Jul 07 '24 10:07 maintenance-hans[bot]

I think is related with #2928

ferjuarezlp avatar Jul 16 '24 13:07 ferjuarezlp