The Kotlin Multiplatform library for the Compose Multiplatform.
Feature | State |
---|---|
Base schedule | ✅ |
All customization | ✅ |
Several events on one line | Soon |
Layout strategy | Soon |
Week schedule | Soon |
In Android project:
dependencies {
implementation 'io.github.kalist28:dayschedule:alpha-0.0.1'
}
In Kotlin Multiplatform project:
commonMain.dependencies {
implementation("io.github.kalist28:dayschedule:alpha-0.0.1")
}
val events = listOf(
Event(
LocalTime(hour = 1, minute = 0),
LocalTime(hour = 2, minute = 0),
),
// or implement interface
object : Event {
override val from: LocalTime = LocalTime(hour = 1, minute = 0)
override val to: LocalTime = LocalTime(hour = 2, minute = 0)
}
)
DayScheduleLayout(
events = events
) { event ->
EventContainer(
onClick = { /*TODO*/ },
modifier = Modifier.fillMaxSize(),
markerColor = Color.Blue,
containerColor = Color.Blue.copy(0.2f)
) {
Text(
event.run { listOf(from, to)
.joinToString { it.toString() } },
color = Color.White
)
}
}