CircularMeterContent

Types

Link copied to clipboard
data class Custom(val content: @Composable BoxScope.() -> Unit) : CircularMeterContent

Display fully custom content centred in the ring. Callers are responsible for attaching any required semantics (e.g. Modifier.semantics { contentDescription = "…" }) inside the content block.

Link copied to clipboard
data class Icon(val icon: SparkIcon, val contentDescription: String, val label: String? = null) : CircularMeterContent

Display an icon centred in the ring, optionally with a label below.

Link copied to clipboard
data class Image(val contentDescription: String, val model: Any?) : CircularMeterContent

Display a composable image centred in the ring.

Link copied to clipboard
data class Value(val formatValue: (Float) -> String = { it.toInt().toString() + "%" }) : CircularMeterContent

Display a formatted value text centred in the ring.

Link copied to clipboard
data class ValueLabel(val formatValue: (Float) -> String = { it.toInt().toString() + "%" }, val label: String) : CircularMeterContent

Display a formatted value with a label below it, both centred in the ring.

Functions

Link copied to clipboard
abstract fun Content(value: Float, modifier: Modifier = Modifier)