/seekbarcompose

Seekbar sample on Jetpack Compose 1.0.0-beta04

Primary LanguageKotlin

Seekbar Compose

Seekbar sample on Jetpack Compose 1.0.0-beta04. Written on Canvas.

  @Composable
  fun MainScreen(){

     val position = MutableStateFlow(10L)
     val duration = MutableStateFlow(100L)

      Seekbar(
            position = position.collectAsState(),
            duration = duration.collectAsState(),
            onNewProgress = { },
            onDragStart = { },
            onDragEnd = {
                position.value = it
            })
  }