You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found some issue with waitForCardPresent on Mac so I open this ticket.
Issue
waitForCardPresent method throws an error: type 'Null' is not a subtype of type 'int'
Steps to reproduce
Connect to a card reader
Execute the below code (bind to a click handler or something). Most of the code is copied from the example, except for the use of waitForCardPresent
readCard() async {
int ctx =awaitPcsc.establishContext(PcscSCope.user);
print('Context: $ctx');
List<String> readers =awaitPcsc.listReaders(ctx);
if (readers.isEmpty) {
print('Could not detect any reader');
} else {
String reader = readers[0];
print('Using reader: $reader');
awaitPcsc.waitForCardPresent(ctx, reader); // <-------- This line throw errorCardStruct card =awaitPcsc.cardConnect(
ctx, reader, PcscShare.shared, PcscProtocol.any);
var response =awaitPcsc.transmit(card, [0xFF, 0xCA, 0x00, 0x00, 0x00]);
print('Response: ${hexDump(response)}');
awaitPcsc.cardDisconnect(card.hCard, PcscDisposition.resetCard);
}
awaitPcsc.releaseContext(ctx);
}
What's the expected result?
No errors should be thrown
What's the actual result?
Error is thrown when the function runs
Additional details / screenshot
OS: Mac Ventura
Device: SONY FeliCa RC-S300/P
Error message:
flutter: Context: 2
flutter: Using reader: SONY FeliCa RC-S300/P
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: type 'Null' is not a subtype of type 'int'
#0 PCSCBinding.waitForCardPresent (package:flutter_pcsc_macos/src/pcsc_bindings.dart:149:9)
<asynchronous suspension>
#1 BootScreen.readCard (package:uniform_client_app_flutter/screens/boot.dart:37:7)
<asynchronous suspension>
The text was updated successfully, but these errors were encountered:
I found some issue with
waitForCardPresent
on Mac so I open this ticket.Issue
waitForCardPresent
method throws an error:type 'Null' is not a subtype of type 'int'
Steps to reproduce
waitForCardPresent
What's the expected result?
What's the actual result?
Additional details / screenshot
Error message:
The text was updated successfully, but these errors were encountered: