Open falcorrus opened 11 months ago
final String? newCode = code?.replaceAll('Code scanned = ', '').trim();
You may use this function...
final _qrBarCodeScannerDialogPlugin = QrBarCodeScannerDialog();
String? scanQRCode(context) {
String? result;
Future.delayed(const Duration(milliseconds: 1), () async {
_qrBarCodeScannerDialogPlugin.getScannedQrBarCode(
context: context,
onCode: (code) async {
if (code == null) {
return null;
}
if (kIsWeb) {
result = code.substring(15);
} else {
result = code;
}
return result;
});
});
return null;
}
CC: @falcorrus
Hi. I implemented it, thank you!! The result looks like "Code scanned = 234234234234". How can I get "234234234234" without thе additional text?