scanNfcWithPromptDialog
suspend fun <T : Any> scanNfcWithPromptDialog(message: String?, block: suspend (updateMessage: (String) -> Unit, resetMessage: () -> Unit) -> T): T
Runs an NFC tag scanning block while managing the ScanNfcPromptDialogModel prompt UI (if message is non-null and a PromptModel with bound UI is present in the coroutine context) and platform haptic feedback.
Return
the result returned by block.
Parameters
message
initial message to show in the scan dialog, or null to scan without a dialog.
block
scanning block receiving updateMessage and resetMessage callbacks.
Throws
if the user dismisses the scan dialog.
CancellationException
if the calling coroutine is cancelled.