jisungbin / compose-int-autotransition

A simple library for automatically animating between Compose states.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

compose-int-autotransition

setContent {
    Box(modifier = Modifier.fillMaxSize(), contentAlignment = Alignment.Center) {
        var number by remember { mutableStateOf(1) }
        with(rememberAutoTransition()) {
            Button(onClick = { withIntAnimation { number += 100 } }) {
                Text(text = number.toString())
            }
        }
    }
}

About

A simple library for automatically animating between Compose states.

License:Apache License 2.0


Languages

Language:Kotlin 100.0%