Zeeshan Syed
03/02/2023, 11:31 AMactual/expect fun readCard()
Now the issue is, the function needs 3 strings of keys to read the card.
So, I made the code as
expect fun readCard(k1: String, k2: String, k3: String).
In addition to this, for Android, it needs a Tag
object as well. Now, how do I pass it to the function.
I cannot add the Tag as 4th argument because in common:desktopMain, it doesn't know about what Tag is and it doesn't need.
Alternatively I can make it as Any
. But do you also think that is the only option or is there any better way?Big Chungus
03/02/2023, 11:44 AMBig Chungus
03/02/2023, 11:45 AMZeeshan Syed
03/02/2023, 11:48 AMBig Chungus
03/02/2023, 11:49 AMBig Chungus
03/02/2023, 11:50 AMZeeshan Syed
03/02/2023, 11:53 AMBig Chungus
03/02/2023, 11:56 AMZeeshan Syed
03/02/2023, 12:00 PMZeeshan Syed
03/02/2023, 12:01 PMBig Chungus
03/02/2023, 12:10 PMBig Chungus
03/02/2023, 12:11 PM// commonMain
expect class Tag
// androidMain
actual typealias Tag = android.nfc.Tag
// jvmMain
actual class Tag
Zeeshan Syed
03/02/2023, 12:37 PMFriedger
07/04/2023, 12:27 PM