MdocProximityQrPresentment

fun MdocProximityQrPresentment(modifier: Modifier = Modifier, appName: String, appIconPainter: Painter, presentmentModel: PresentmentModel, presentmentSource: PresentmentSource, promptModel: PromptModel, documentTypeRepository: DocumentTypeRepository, imageLoader: ImageLoader, allowMultipleRequests: Boolean, showQrButton: @Composable (onQrButtonClicked: (settings: MdocProximityQrSettings) -> Unit) -> Unit, showQrCode: @Composable (uri: String) -> Unit, transportFactory: MdocTransportFactory = MdocTransportFactory.Default)

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

This composable shows three different things, depending on state of presentmentModel:

Applications should call PresentmentModel.reset before entering the composition containing this composable.

Parameters

modifier
appName

the name of the application.

appIconPainter

the icon for the application.

presentmentModel

the PresentmentModel to use which must have a PromptModel associated with it.

presentmentSource

an object for application to provide data and policy.

promptModel
documentTypeRepository

a DocumentTypeRepository used to find metadata about documents being requested.

imageLoader

an ImageLoader for loading images from the network.

allowMultipleRequests

if true, multiple requests in a single session will be allowed.

showQrButton

a composable to show for a button to generate a QR code. It should call onQrButtonClicked when 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.

transportFactory

the MdocTransportFactory to use for creating a transport.