MdocProximityQrPresentment

actual fun MdocProximityQrPresentment(modifier: Modifier, source: PresentmentSource, promptModel: PromptModel, prepareSettings: (generateQrCode: (settings: MdocProximityQrSettings) -> Unit) -> Unit, showQrCode: (uri: String, reset: () -> Unit) -> Unit, showTransacting: (reset: () -> Unit) -> Unit, showCompleted: (error: Throwable?, reset: () -> Unit) -> Unit, preselectedDocuments: List<Document>, eDeviceKeyCurve: EcCurve, transportFactory: MdocTransportFactory, disablePlatformSpecificImplementation: Boolean)
expect fun MdocProximityQrPresentment(modifier: Modifier = Modifier, source: PresentmentSource, promptModel: PromptModel, prepareSettings: @Composable (generateQrCode: (settings: MdocProximityQrSettings) -> Unit) -> Unit, showQrCode: @Composable (uri: String, reset: () -> Unit) -> Unit, showTransacting: @Composable (reset: () -> Unit) -> Unit, showCompleted: @Composable (error: Throwable?, reset: () -> Unit) -> Unit, preselectedDocuments: List<Document> = emptyList(), eDeviceKeyCurve: EcCurve = EcCurve.P256, transportFactory: MdocTransportFactory = MdocTransportFactory.Default, disablePlatformSpecificImplementation: Boolean = false)

A composable for presentment with QR engagement according to ISO/IEC 18013-5:2021.

Some platforms might implement this using platform-specific mechanism, for example on Android it will use PresentmentActivity. This can be inhibited by passing true to disablePlatformSpecificImplementation.

Parameters

modifier
source

the source of truth for what is being presented.

promptModel
prepareSettings

a composable to show an UI to start sharing, for example a button the user can press that says "Present mDL with QR code", if applicable. This should call generateQrCode when e.g. the user presses the button and pass a MdocProximityQrSettings which contains the settings for what kind of org.multipaz.mdoc.transport.MdocTransport instances to advertise and what options to use when creating the transports.

showQrCode

a composable which shows the QR code and asks the user to scan it.

showTransacting

a composable which will be shown when transacting with a remote reader.

showCompleted

a composable which will be shown when the transaction is complete. This should should feedback (either success or error, depending on the error parameter) and call the passed-in reset() lambda when ready to reset the state and go back and show a QR button.

preselectedDocuments

a list of documents the user may have preselected or the empty list.

eDeviceKeyCurve

the curve to use for session encryption.

transportFactory

the MdocTransportFactory to use for creating transports.

disablePlatformSpecificImplementation

set to true to not use platform-specific implementations.

actual fun MdocProximityQrPresentment(modifier: ERROR CLASS: Symbol not found for Modifier, source: ERROR CLASS: Symbol not found for PresentmentSource, promptModel: ERROR CLASS: Symbol not found for PromptModel, prepareSettings: (generateQrCode: (settings: MdocProximityQrSettings) -> Unit) -> Unit, showQrCode: (uri: String, reset: () -> Unit) -> Unit, showTransacting: (reset: () -> Unit) -> Unit, showCompleted: (error: Throwable?, reset: () -> Unit) -> Unit, preselectedDocuments: List<ERROR CLASS: Symbol not found for Document>, eDeviceKeyCurve: ERROR CLASS: Symbol not found for EcCurve, transportFactory: ERROR CLASS: Symbol not found for MdocTransportFactory, disablePlatformSpecificImplementation: Boolean)
actual fun MdocProximityQrPresentment(modifier: Modifier, source: PresentmentSource, promptModel: PromptModel, prepareSettings: (generateQrCode: (settings: MdocProximityQrSettings) -> Unit) -> Unit, showQrCode: (uri: String, reset: () -> Unit) -> Unit, showTransacting: (reset: () -> Unit) -> Unit, showCompleted: (error: Throwable?, reset: () -> Unit) -> Unit, preselectedDocuments: List<Document>, eDeviceKeyCurve: EcCurve, transportFactory: MdocTransportFactory, disablePlatformSpecificImplementation: Boolean)