Image Block
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
painter For
is a composable function which controls how to paint the load param,
modifier
allows a modifier to be passed externally
download Button Visible
controls whether the download button is visible or not
on Download Button Click
is a callback to notify when the download button is clicked.
on Share Button Click
is a callback to notify when the share button is clicked.