commonMain.app.cash.redwood.layout.testing.MutableSpacer.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of redwood-layout-testing Show documentation
Show all versions of redwood-layout-testing Show documentation
Multiplatform reactive UI using Kotlin and Jetpack Compose
@file:Suppress("DEPRECATION", "OVERRIDE_DEPRECATION")
package app.cash.redwood.layout.testing
import app.cash.redwood.Modifier
import app.cash.redwood.layout.widget.Spacer
import app.cash.redwood.testing.WidgetValue
import app.cash.redwood.ui.Dp
import kotlin.Suppress
internal class MutableSpacer : Spacer {
override val `value`: WidgetValue
get() = SpacerValue(
modifier = modifier,
width = width!!,
height = height!!,
)
override var modifier: Modifier = Modifier
private var width: Dp? = null
private var height: Dp? = null
override fun width(width: Dp) {
this.width = width
}
override fun height(height: Dp) {
this.height = height
}
}