In flutter, Help me to extract data from qr scanner result
i used this plugin https://pub.dev/packages/mobile_scanner
in my case it's works but
here is my code
MobileScanner(
controller: cameraController,
overlay: Container(
width: 200,
height: 200,
padding: const EdgeInsets.symmetric(horizontal: 0),
child: Image.asset('assets/images/frame-3.png'),
),
onDetect: (
capture,
) {
if (!isScanCompleted) {
final dynamic values = capture.barcodes
.map((code) => code.rawValue ?? '---')
.toList()[0];
// final dynamic values;
final Uint8List? imageBytes = capture.image;
final format =
capture.barcodes[0].format; // Access the format here
final type =
capture.barcodes[0].type; // Access the type here
debugPrint(
'Barcode found! ${values} (format: ${format}) (type: $type)');
// debugPrint('$imageBytes');
isScanCompleted = true;
} }, ) i get the raw data like this in sting formate BEGIN:VCARD VERSION:3.0 N:dasfsadfsad;asfasdf FN:asfasdf dasfsadfsad ORG:Code with Samir TITLE:sadfads ADR:;;asdfasdf;sw;asdfsadf;656565;ws TEL;WORK;VOICE:546546546 TEL;CELL:998989898 TEL;FAX:sadfasd EMAIL;WORK;INTERNET:[email protected] URL:https://www.qr-code-generator.com/solutions/vcard-qr-code/ END:VCARD
} }, ) i get the raw data like this in sting formate BEGIN:VCARD VERSION:3.0 N:dasfsadfsad;asfasdf FN:asfasdf dasfsadfsad ORG:Code with Samir TITLE:sadfads ADR:;;asdfasdf;sw;asdfsadf;656565;ws TEL;WORK;VOICE:546546546 TEL;CELL:998989898 TEL;FAX:sadfasd EMAIL;WORK;INTERNET:[email protected] URL:https://www.qr-code-generator.com/solutions/vcard-qr-code/ END:VCARD
Dart packages
mobile_scanner | Flutter Package
A universal barcode and QR code scanner for Flutter based on MLKit. Uses CameraX on Android, AVFoundation on iOS and Apple Vision & AVFoundation on macOS.
Mario Silva
QR Code Generator
Free vCard QR Code Generator | QR Code Generator
Use vCard QR Code generator to create virtual business cards for free. Customize it with your colors and add a logo. Create your free vCard QR Code now!
0 Replies