Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
render() {
return (
{
this.camera = cam;
}}
style={styles.preview}
aspect={this.state.camera.aspect}
captureQuality={Camera.constants.CaptureQuality.medium}
country="us"
onPlateRecognized={this.onPlateRecognized}
plateOutlineColor="#ff0000"
showPlateOutline
torchMode={Camera.constants.TorchMode.off}
touchToFocus
/>
);
}
}
constructor(props) {
super(props);
this.camera = null;
this.state = {
camera: {
aspect: Camera.constants.Aspect.fill,
},
plate: 'Scan a plate',
};
}