Thread
#compose
    g

    Guy Bieber

    2 years ago
    Moving to dev17 I used to draw a RadialGadient with:
    @Composable 
        override fun GradiantScreen() {
            var colors = listOf<Color>(nikolaColors.color2,
                nikolaColors.color1)
            var gradientBrush = RadialGradient(
                colors = colors,
                centerX = getScreenWidth().toFloat() / 2.0f,
                centerY = getScreenHeight().toFloat() / 2.0f,
                radius = getScreenHeight().toFloat() / 2.0f,
                tileMode = TileMode.Clamp
            )
    
            Box(
                Modifier
                    .drawBackground(brush = gradientBrush)
                    .fillMaxSize()
            )
        }
    Unfortunately, drawBackground has been deprecated. What is the recommended way to do this with dev17?
    matvei

    matvei

    2 years ago
    Modifier.drawBackground
    has been replaced by
    Modifier.background
    g

    Guy Bieber

    2 years ago
    Cool.
    Zach Klippenstein (he/him) [MOD]

    Zach Klippenstein (he/him) [MOD]

    2 years ago
    There’s a few of those, they’re documented in the release notes