IconMarkerSample
@Sampled
@Composable
fun IconMarkerSample() {
IconMarker(
onClick = {},
// Provide a description of the real-world object that the marker tracks.
contentDescription = "Northern Cardinal",
)
}
IconMarkerWithCustomIconSample
@Sampled
@Composable
fun IconMarkerWithCustomIconSample() {
IconMarker(
onClick = {},
contentDescription = "Favourite meal",
// The content description for the icon is redundant, as the marker merges the semantics.
content = { Icon(FavoriteIcon, contentDescription = null) },
)
}