awt-qr-scanner
v0.3.3
Published
QRcode scanner
Downloads
12
Readme
AWT QR code scanner
Installation
npm i awt-qr-scanner
Integration of package in app.js
example #1
import React from 'react';
import { SafeAreaView, ScrollView, StatusBar, StyleSheet, Text, useColorScheme, View, } from 'react-native';
import AWTScanner from 'awt-qr-scanner';
import {COLOR, ThemeContext, getTheme} from 'react-native-material-ui';
const uiTheme = { palette: { primaryColor: COLOR.blue500, }, toolbar: { container: { height: 50, }, }, };
const App = () => {
/* Passing user data as props */
const user_details = {
"user_id":123,
"first_name":"sample1",
"last_name":"sample2",
"email":"[email protected]",
"mobile_no":9999999999,
"station":'',
'city':'Bangalore',
'state':'Karnataka',
"station_type":'',
"emp_id":1001,
"zone":1
}
return (
<ThemeContext.Provider value={getTheme(uiTheme)}>
<StatusBar
barStyle="dark-content"
hidden={false}
backgroundColor="#8e165e"
translucent={true}
barStyle="light-content"
/>
< AWTScanner data={user_details}/>
</ThemeContext.Provider>
);
};
export default App;