Compose Multiplatform UI View in Flutter
Legion2 opened this issue ยท 10 comments
Is it possible to use Compose Multiplatform UI in Flutter?
Technically it would be possible but the question is why...?
Our library (SDK) is completely written in Kotlin and uses Compose Multiplatform to provide complex UI, which is the main focus of our library. Currently we can use the platform native wrapper to expose the UI to android and iOS separately. But it would be much easier to directly expose the UI from common code to flutter instead of writing glue code for Android and iOS.
Hm that's definitely an interesting challenge. I can look into it but currently I have very little time and I still need to finish a few things for the coming release.
Would it be possible to create a minimal example of your project that I can tinker with?
No hurry, this was only an idea and your library is already a great help ๐.
Unfortunately our library is closed source but there are official Compose Multiplatform demo projects which can be used for testing.
Out of curiosity, are you using Klutter in a production level app?
Not jet, but we are considering using it in our production SDK if the manual mapping becomes unfeasible to maintain. But the flutter binding has low priority for us and we have other bindings with higher priority.
Cool! Please let me know if you decide to use Klutter in production. And if you need more structural help on your project, I do freelance work. ๐
Theoretically this is possible, because kotlin has interoperability with swift: https://www.jetbrains.com/help/kotlin-multiplatform-dev/compose-ios-ui-integration.html#use-compose-multiplatform-inside-a-swiftui-application
Our priorities shifted and we may start working on this soon.
I'm working on the 2024 release which supports protobuf. Also refactoring the dart components to make it more reliable and easier to use. Could start work on this after that.