ImageBlock

fun <T> ImageBlock(title: String, load: suspend () -> T, painterFor: @Composable (T) -> Painter, modifier: Modifier = Modifier, downloadButtonVisible: Boolean = true, onDownloadButtonClick: () -> Unit, onShareButtonClick: () -> Unit)

DHIS2 Image Block. Wraps compose Image.

Parameters

title

controls the text to be shown for the title

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

downloadButtonVisible

controls whether the download button is visible or not

onDownloadButtonClick

is a callback to notify when the download button is clicked.

onShareButtonClick

is a callback to notify when the share button is clicked.