SCANNER EAN13 com expo-barcode-scanner

Solution for SCANNER EAN13 com expo-barcode-scanner
is Given Below:

I need to read EAN13, but ignore TOP and FOOTER and read only one reading area from EAN13.

    import React, { useState, useEffect } from 'react';
    import { Text, View, StyleSheet, Button, Dimensions, TouchableOpacity } from 'react-native';
    import { BarCodeScanner, BarCodeScannerResult } from 'expo-barcode-scanner';
    import BarcodeMask from 'react-native-barcode-mask';


    export default function App(props) {
    const [hasPermission, setHasPermission] = useState(null);
    const [scanned, setScanned] = useState(false);

    useEffect(() => {
        (async () => {
            const { status } = await BarCodeScanner.requestPermissionsAsync();
            setHasPermission(status === 'granted');
        })();
    }, []);

    const handleBarCodeScanned = (scanningResult: BarCodeScannerResult) => {
        setScanned(true);
    };



    if (hasPermission === null) {
        return <Text>Solicitando permissão de câmera</Text>;
    }
    if (hasPermission === false) {
        return <Text>Sem acesso a camera</Text>;
    }

    return (
        <View style={{ flex: 1 }}>
            <BarCodeScanner onBarCodeScanned={handleBarCodeScanned}
                barCodeTypes={[BarCodeScanner.Constants.BarCodeType.ean13]}
                style={styles.container}>

                <BarcodeMask edgeColor="#62B1F6"
                    width={250}
                    height={100}
                    showAnimatedLine={true}
                    outerMaskOpacity={0.8}
                    animatedLineOrientation='horizontal'
                />
            </BarCodeScanner>

            {scanned && <Button title="Proximo" onPress={() => setScanned(false)} />}
        </View>
    );
}


 const styles = StyleSheet.create({
    container: {
        flex: 1,
        alignItems: 'center',
        justifyContent: 'center',
    },
    title: {
        fontSize: 20,
        fontWeight: 'bold',
    },
    separator: {
        marginVertical: 30,
        height: 1,
        width: '80%',
    },
});

Imagem da tela