Landry Norris
02/22/2023, 5:31 PMCLOVIS
02/22/2023, 5:44 PMLandry Norris
02/22/2023, 5:46 PMLandry Norris
02/22/2023, 5:48 PMCLOVIS
02/22/2023, 5:52 PMvar instant by remember { mutableStateOf(Clock.System.now()) }
LocalDateTimeField(
label = "Select a timestamp",
value = instant,
onChange = { instant = it },
)
and each platform decides entirely what this actually looks like. The benefit is your UI looks native on whatever platform you want (because… it is!). The downside is your UI looks different on each platform (and you'll find that JetBrains is aiming for exactly the opposite: writing all platforms on top of Skia so they all look exactly the same).Landry Norris
02/22/2023, 5:54 PMCLOVIS
02/22/2023, 5:56 PMCLOVIS
02/22/2023, 5:56 PMDavid Herman
02/22/2023, 5:56 PMDavid Herman
02/22/2023, 5:57 PMDavid Herman
02/22/2023, 5:58 PMDavid Herman
02/22/2023, 5:58 PMCLOVIS
02/22/2023, 6:01 PMinterface MyStyle : UIMetadata, Buttons, …
and you can now execute your UI on whatever platform for which you can implement all components of that interface, while easily building new 100% cross-platform components as extension functions of that interface.
The Decouple project itself will have ready-to-use implementations of many components for multiple platforms etc, so you can bootstrap your project with one of our interfaces, and replace each component one by one by a more custom implementation if your needs are too different, without having to write them all before starting working on your appLandry Norris
02/22/2023, 6:02 PMLandry Norris
02/22/2023, 6:06 PMCLOVIS
02/22/2023, 6:12 PMCLOVIS
02/22/2023, 6:16 PMLandry Norris
02/22/2023, 6:17 PMCLOVIS
02/22/2023, 6:18 PMCLOVIS
02/22/2023, 6:19 PMCLOVIS
02/22/2023, 6:21 PMCLOVIS
02/22/2023, 6:22 PMCLOVIS
02/23/2023, 10:08 AMYou mentioned that this won’t be as low-level as Jetpack Compose.In theory, it's also possible to write really weird things like using Kotlin Native to implement Decouple on top of GTK or KDE to have truly native desktop applications, all with the same codebase as Android and everything else That's not on an short-term roadmaps, but for the far future I think the mere fact that it is possible is worth pursuing 🙂