Skip to content

Latest commit

 

History

History
79 lines (64 loc) · 2.55 KB

README.MD

File metadata and controls

79 lines (64 loc) · 2.55 KB

Day Schedule Compose Multiplatform

compose-mp-version kotlin-version Maven Central

badge-Android badge-iOS badge-JVM badge-macOS badge-web

The Kotlin Multiplatform library for the Compose Multiplatform.

Feature map

Feature State
Base schedule
All customization
Several events on one line Soon
Layout strategy Soon
Week schedule Soon

Setup

Maven Central

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
        )
    }
}

Star History

Star History Chart