I am trying to scan a credit card with the package named card_scanner: ^1.0.1-prerelease and credit_card_scanner: ^1.0.5 . My code for the scan is
scanCard()async{
try {
var cardDetails = await CardScanner.scanCard(
scanOptions: CardScanOptions(
scanCardHolderName: true,
//scanCardIssuer: true,
),
);
print(cardDetails);
} catch (e) {
// Handle any errors that occur
print("Error scanning card: $e");
}
}
but whenever I call this function, the camera opens and crushes in a second.
I have set camera permission in my manifest as well. and the app has camera permission too. What is the issue then and how can I fix it?
Is there any other way to scan credit card information?
1
Please provide more information on:
- what version of flutter you are using?
- what version of package you are using?
- details on the debug console?