addOnReaderDisconnectedCallback method
void
addOnReaderDisconnectedCallback(
- void callback()
inherited
Adds a callback to be invoked when the RFID reader disconnects.
This method allows for registering actions to take place once the RFID reader disconnects, which can be useful for cleanup tasks or UI updates to indicate the disconnection to the user.
Example:
reader.addOnReaderDisconnectedCallback(() {
print('Reader disconnected!');
});
Implementation
void addOnReaderDisconnectedCallback(void Function() callback) {
_onReaderDisconnectedCallbacks.add(callback);
}