Skip to content

Instantly share code, notes, and snippets.

@oas004
Created December 7, 2022 22:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oas004/fa0f743d4578271ffbf46551f61c503a to your computer and use it in GitHub Desktop.
Save oas004/fa0f743d4578271ffbf46551f61c503a to your computer and use it in GitHub Desktop.
Canvas(
modifier = Modifier
.fillMaxSize()
.progressSemantics(progress)
) {
calculatedSegments.forEach { segmentGroups ->
drawPath(
path = Path().apply {
segmentGroups.calculatedSegments.forEach {
it.drawIncomplete(this, progress)
}
},
color = segmentGroups.trackColor,
style = stroke
)
drawPath(
path = Path().apply {
segmentGroups.calculatedSegments.forEach {
it.drawCompleted(this, progress)
}
},
color = segmentGroups.indicatorColor,
style = stroke
)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment