positionProvider

Hands the playhead out as a lambda, to be called from a layout or draw lambda.

Modifier.offset { } and Modifier.graphicsLayer { } re-run their lambda without recomposing, so a thumb positioned from one of those follows the playhead for the cost of a layout pass. Calling this in a composable body instead reads position during composition and recomposes on every tick, which is the whole thing it exists to avoid.

The same lambda comes back every call, so calling this inline in a composable body hands the composable a parameter it can compare and skip on.

Return

a lambda reading the current position.