How would i go about porting this modifier to Node API (details in thread)
m
How would i go about porting this modifier to Node API (details in thread)
Copy code
fun Modifier.scrollingHeaderBackground(
    arcHeight: Dp,
    colorStart: Color,
    colorEnd: Color,
    lazyListState: LazyListState
): Modifier{
    return this.then(
        Modifier.composed {
            val progressHeight by remember {
                derivedStateOf {
                    when (lazyListState.firstVisibleItemIndex) {
                        0 -> TODO()
                        else -> TODO()
                    }
                }
            }

            val headerPath by remember {
                derivedStateOf {
                    Path().apply {
                        // path here based on progressHeight
                        TODO()
                    }
                }
            }

            val brush: Brush by remember {
                derivedStateOf {
                    // brush here with offset based on progressHeight
                    // also colorStart/colorEnd
                    TODO()
                }
            }

            drawWithContent {
                drawPath(path = headerPath, brush = brush)
                drawContent()
            }
        }
    )
}