How to use props flashmode?

https://docs.expo.io/versions/latest/sdk/camera/#flashmode. In my BarCodeScanner, there is a button that can turn on/ turn off flash. But after update SDK to 3.3 that flash doesn’t work again.
How to solve it?

Hi.

Could you post the code you’re using?

export default class BarCodeScreen extends React.Component {
constructor(props) {
super(props);
this.state = {
flash: ‘off’
};
}
render() {
return (

<BarCodeScanner
onBarCodeRead={this._handleBarCodeRead}
torchMode={this.state.flash}
style={[StyleSheet.absoluteFill, styles.container]}
>


<TouchableOpacity
onPress={this._handleFlash}
hitSlop={{ top: 40, bottom: 40, right: 40, left: 40 }}>

Flash

);
}

_handleFlash = () => {
    if (this.state.flash == 'on') {
        this.setState({ flash: 'off' })
    } else {
        this.setState({ flash: 'on' })
    }
}

}

Does setting it to ‘torch’ instead of ‘on’ help?

no,it doesn’t

Hey there, does react-native-torch work in expo? If not, is there a way to just use the flashlight without using the camera?