mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2025-01-24 19:46:16 +00:00
feat: rawValue toLowerCase
This commit is contained in:
parent
9fcbc4d72a
commit
10b088021c
1 changed files with 5 additions and 4 deletions
|
@ -68,11 +68,12 @@ class _BarcodeScannerSimpleState extends State<BarcodeScannerSimple> {
|
||||||
void _handleBarcodeInternal(BarcodeCapture barcodes) {
|
void _handleBarcodeInternal(BarcodeCapture barcodes) {
|
||||||
for (final barcode in barcodes.barcodes) {
|
for (final barcode in barcodes.barcodes) {
|
||||||
// don't handle unknown QR codes
|
// don't handle unknown QR codes
|
||||||
if (barcode.rawValue?.trim().isEmpty??false == false) continue;
|
var rawValue = barcode.rawValue?.toLowerCase();
|
||||||
if (barcode.rawValue!.startsWith("ur:")) {
|
if (rawValue?.trim().isEmpty??false == false) continue;
|
||||||
if (urCodes.contains(barcode.rawValue)) continue;
|
if (rawValue!.startsWith("ur:")) {
|
||||||
|
if (urCodes.contains(rawValue)) continue;
|
||||||
setState(() {
|
setState(() {
|
||||||
urCodes.add(barcode.rawValue!);
|
urCodes.add(rawValue!);
|
||||||
ur = URQRToURQRData(urCodes);
|
ur = URQRToURQRData(urCodes);
|
||||||
});
|
});
|
||||||
if (ur.progress == 1) {
|
if (ur.progress == 1) {
|
||||||
|
|
Loading…
Reference in a new issue