{"repo":"russhwolf/To-Do","free":true,"listed":false,"github":"https://github.com/russhwolf/To-Do","clone":"git clone https://github.com/russhwolf/To-Do.git","description":"A Kotlin Multiplatform to-do list app with SwiftUI and Compose UI frontends","language":"Kotlin","stars":162,"topics":["kotlin","kotlin-multiplatform","swiftui","compose","jetpack-compose","kotlin-multiplatform-sample"],"license":"Apache-2.0","category":"mobile-apps","readme_excerpt":"To-Do A Kotlin Multiplatform to-do list app with SwiftUI and Compose UI frontends 🎶 Making a list Checking it twice Gonna try out declarative UIs 🎵 Shared code The core logic in the shared module is implemented via SqlDelight in ToDo.sq. This is exposed in a Kotlin API by ToDoRepository. The Swift Export feature is used to convert the Kotlin to a Swift-friendly API for the iOS app. Some extra manual conversion is done to move from a Kotlin data class to a Swift struct. Unit tests verify the happy path for both repository classes, making use of the Turbine library for testing Flow s. Not a whole lot new there if you're used to testing KMP code, but they're there to look at nonetheless. Android code The Android app in the androidApp modules is a single activity ToDoActivity which injects a ToDoRepository into composable views defined in ToDoComposables.kt. There is a fully interactable preview function ToDoListPreview() which exercises the UI without any dependence on the shared code by manually wiring in-memory state. iOS code The iOS app in the iosApp directory consumes the repository in ToDoApp.swift, and renders it via SwiftUI views defined in ToDoViews.swift. There is a fully interactable preview view defined in ToDoList Previews which exercises the UI without any dependence on the shared code by manually wiring in-memory state. The Swift code converts the Kotlin ToDo class to a Swift ToDo struct via utilities in ToDo.swift. This better matches typical Swift development ","default_branch":null,"files":null,"tree":[],"storefront":"/r/russhwolf","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/russhwolf/To-Do/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}