File tree Expand file tree Collapse file tree 4 files changed +244
-67
lines changed
compose-web/src/wasmJsMain/kotlin Expand file tree Collapse file tree 4 files changed +244
-67
lines changed Original file line number Diff line number Diff line change 11# BikeShare
22
3- ![ kotlin-version] ( https://img.shields.io/badge/kotlin-2.2.10 -blue?logo=kotlin )
3+ ![ kotlin-version] ( https://img.shields.io/badge/kotlin-2.2.21 -blue?logo=kotlin )
44
55Compose Multiplatform and SwiftUI based Kotlin Multiplatform sample project (based on [ CityBikes API] ( http://api.citybik.es/v2/ ) ). Uses [ Circuit] ( https://github.com/slackhq/circuit ) and [ kotlin-inject] ( https://github.com/evant/kotlin-inject ) .
66
Original file line number Diff line number Diff line change @@ -20,28 +20,29 @@ import androidx.compose.ui.graphics.Color
2020import androidx.compose.ui.text.style.TextAlign
2121import androidx.compose.ui.unit.dp
2222import androidx.compose.ui.window.CanvasBasedWindow
23+ import androidx.compose.ui.window.ComposeViewport
2324import kotlinx.coroutines.delay
2425import kotlinx.coroutines.flow.Flow
2526import kotlinx.coroutines.flow.flow
2627
2728@OptIn(ExperimentalComposeUiApi ::class )
2829fun main () {
29- CanvasBasedWindow ( " BikeShare " , canvasElementId = " bikeShareCanvas " ) {
30- Column {
31- Text (
32- text = " Bike Share (powered by CityBikes)" ,
33- modifier = Modifier
34- .fillMaxWidth()
35- .background(color = Color .Gray )
36- .align(Alignment .CenterHorizontally )
37- .padding(8 .dp),
38- textAlign = TextAlign .Center ,
39- color = Color .White ,
40- style = MaterialTheme .typography.headlineSmall)
41-
42- BikeShareView ()
43- }
44- }
30+ ComposeViewport (content = {
31+ Column {
32+ Text (
33+ text = " Bike Share (powered by CityBikes)" ,
34+ modifier = Modifier
35+ .fillMaxWidth()
36+ .background(color = Color .Gray )
37+ .align(Alignment .CenterHorizontally )
38+ .padding(8 .dp),
39+ textAlign = TextAlign .Center ,
40+ color = Color .White ,
41+ style = MaterialTheme .typography.headlineSmall)
42+
43+ BikeShareView ()
44+ }
45+ })
4546}
4647
4748const val POLL_INTERVAL = 30000L
Original file line number Diff line number Diff line change 11[versions ]
2- kotlin = " 2.2.20 "
3- ksp = " 2.2.20-2.0.2 "
2+ kotlin = " 2.2.21 "
3+ ksp = " 2.3.0 "
44
5- androidGradlePlugin = " 8.12.3 "
5+ androidGradlePlugin = " 8.13.1 "
66androidxActivity = " 1.11.0"
7- androidxComposeBom = " 2025.09 .00"
8- androidxLifecycle = " 2.9.3 "
9- androidxNavigationCompose = " 2.9.4 "
10- androidxRoom = " 2.8.0 "
11- circuit = " 0.30 .0"
12- composeLifecyleRuntime =" 2.9.3 "
13- compose-multiplatform = " 1.8.2 "
14- composeAdaptiveLayout = " 1.1.2 "
7+ androidxComposeBom = " 2025.11 .00"
8+ androidxLifecycle = " 2.9.4 "
9+ androidxNavigationCompose = " 2.9.6 "
10+ androidxRoom = " 2.8.3 "
11+ circuit = " 0.31 .0"
12+ composeLifecyleRuntime =" 2.9.6 "
13+ compose-multiplatform = " 1.9.3 "
14+ composeAdaptiveLayout = " 1.2.0 "
1515coroutines = " 1.10.2"
1616junit = " 4.13.2"
17- kmpNativeCoroutines = " 1.0.0-ALPHA-47 "
18- kmpObservableViewModel = " 1.0.0-BETA-14 "
17+ kmpNativeCoroutines = " 1.0.0-ALPHA-48 "
18+ kmpObservableViewModel = " 1.0.0-BETA-15 "
1919kotlin-inject-anvil = " 0.1.6"
2020kotlininject = " 0.8.0"
2121kotlinxSerialization = " 1.9.0"
22- ktor = " 3.2.3 "
23- okhttp = " 5.1 .0"
22+ ktor = " 3.3.2 "
23+ okhttp = " 5.3 .0"
2424runner = " 1.7.0"
2525slf4j = " 2.0.17"
2626slf4jAndroid = " 2.0.17-0"
27- sqlite = " 2.6.0 "
27+ sqlite = " 2.6.1 "
2828
2929minSdk = " 24"
3030targetSdk = " 36"
You can’t perform that action at this time.
0 commit comments