util-kotlin 2.5.4
Update:
- Added
colorFilterparam forImage():
fun Image(
resId: Int,
contentDescription: String,
contentScale: ContentScale,
modifier: Modifier = Modifier,
colorFilter: ColorFilter? = null
) {
Image(
painterResource(resId),
contentDescription,
contentScale = contentScale,
modifier = modifier,
colorFilter = colorFilter
)
}
- Refactor
AnnotatedStringExtensions, removed@Composable:
fun AnnotatedString.Builder.append(text: String, url: String) = withLink(LinkAnnotation.Url(url)) {
append(text)
}
fun AnnotatedString.Builder.append(text: String, color: Color) = withStyle(SpanStyle(color)) {
append(text)
}
fun AnnotatedString.Builder.append(text: String, color: Color, onCLick: () -> Unit) = withLink(
LinkAnnotation.Clickable(
tag = text,
styles = TextLinkStyles(SpanStyle(color)),
linkInteractionListener = { onCLick() }
)
) {
append(text)
}