Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
{ label: 'us', value: 'us' },
]
export default class App extends Component {
state = {
showOptions: false,
plate: 'Point at a plate',
confidence: '',
error: null,
showCamera: false,
// Camera options
camera: {
aspect: Aspect.fill,
},
captureQuality: CaptureQuality.medium,
aspect: CaptureQuality.stretch,
rotateMode: false,
torchMode: false,
showPlateOutline: true,
plateOutlineColor: '#ff0000',
country: 'eu',
touchToFocus: true,
}
async componentDidMount() {
this.checkPermission()
}
async checkPermission() {
switch (await check(cameraPermission)) {
case RESULTS.UNAVAILABLE:
this.setState({