InputSignature

fun <T> InputSignature(title: String, state: InputShellState = InputShellState.UNFOCUSED, inputStyle: InputStyle = InputStyle.DataInputStyle(), supportingText: List<SupportingTextData>? = null, legendData: LegendData? = null, addSignatureBtnText: String = provideStringResource("add_signature"), downloadButtonVisible: Boolean = true, isRequired: Boolean = false, load: suspend () -> T, painterFor: @Composable (T) -> Painter? = null, modifier: Modifier = Modifier, onDownloadButtonClick: () -> Unit, onShareButtonClick: () -> Unit, onResetButtonClicked: () -> Unit, onSaveSignature: (ImageBitmap) -> Unit)

DHIS2 Input signature. Wraps DHIS · BasicInputImage.

Parameters

title

: controls the text to be shown for the title.

state

: manages the InputShell state.

inputStyle

: manages the InputShell style.

supportingText

: is a list of SupportingTextData that. manages all the messages to be shown.

legendData

: manages the legendComponent.

addSignatureBtnText

: controls the text to be shown for the add signature button.

downloadButtonVisible

: controls whether the download button is visible or not.

isRequired

: controls whether the field is mandatory or not.

load

: to load an image stored in the resource, device memory or from network. we can use loadPainter, loadImageBitmap, loadSvgPainter or loadXmlImageVector.

painterFor

: is a composable function which controls how to paint the load param.

modifier

: allows a modifier to be passed externally.

onDownloadButtonClick

: callback to when download button is clicked.

onShareButtonClick

: callback to when share button is clicked.

onResetButtonClicked

: callback to when reset button is clicked.

onSaveSignature

: callback to when save button is clicked.