react-native-barcode-mask example usage
June 22, 2020 ยท View on GitHub
import React from "react"; import { Text, View, Item, Icon, Input, Button } from 'native-base'; import { KeyboardAvoidingView } from "react-native"; import { RNCamera } from 'react-native-camera'; import BarcodeMask from 'react-native-barcode-mask';
const styles = { root: { flex: 1, }, upperSection: { flex: 1 }, lowerSection: { paddingVertical: 30, paddingHorizontal: 20, backgroundColor: 'white', }, camera: { height: '100%', }, };
class ItemBarcodeScanContainer extends React.Component {
constructor(props) { super(props); this.state = { barcode: '' } }
onBarCodeRead = (scanResult) => { // scanResult.data will contain your scanned data }
onGetItemPress = () => { // do something with button press }
handleChange = () => { // handle user input }
render() {
return (
}
export default ItemBarcodeScanContainer;