A UI layout in kotlin
A Json representation of KotlinUI enabling runtime defined views
JsonPreview will provide json output with a before, and after representation.
import kotlinx.kotlinui
import kotlinx.kotlinuijson
class SampleView : View {
override val body: View =
VStack {
Text("Hello World")
.padding()
}
}
object SampleView_Previews : PreviewProvider {
override val previews: View =
JsonPreview {
SampleView()
}
}The extension method var will let KotlinUIJson know this is intended to be a variable.
VStack {
Text("Title Here".var(self));
}