Draws a bullet point next to a paragraph.
AnnotatedStringWithBulletListCustomBulletSample
@Composable
fun AnnotatedStringWithBulletListCustomBulletSample() {
val bullet1 = Bullet.Default.copy(shape = RectangleShape)
val bullet2 = bullet1.copy(drawStyle = Stroke(2f))
val bullet3 = bullet1.copy(brush = SolidColor(Color.LightGray))
BasicText(
buildAnnotatedString {
withBulletList(bullet = bullet1) {
withBulletListItem { append("Item 1") }
withBulletList(bullet = bullet2) {
withBulletListItem { append("Item 2") }
withBulletListItem { append("Item 3") }
withBulletList(bullet = bullet3) { withBulletListItem { append("Item 4") } }
}
withBulletListItem { append("Item 5") }
}
}
)
}