anyone tried <https://slackhq.github.io/circuit/> ...
# compose
m
anyone tried https://slackhq.github.io/circuit/ with Compose Multiplatform? I have issue with Screen,
Object 'MyScreen' is not abstract and does not implement abstract member public abstract fun describeContents(): Int defined in com.slack.circuit.runtime.screen.Screen
. it’s Parcelable error but there is no Parcelable in KMP world. should I expect/actual that and then use it or I’m missing something in the setup?
for anyone wondering and finding this later. make you Screen
interface
and do
Copy code
// KMP module
interface MyScreen : Screen

// Android
@Parcelize
data object AndroidMyScreen : MyScreen, Parcelable
in Android app and use this one instead. that’s it
y
is it like an architecture for your UI ? that it?
👌 1
m
can you elaborate a bit? I’m not sure if I understand this
y
honestly, I am not even sure what it is, and what exactly it does, I was just basically asking if you can elaborate more on what it does and how it could help that's my question
a
Can’t you skip inheriting parcelable directly - the docs show you just need to implement screen. I’m guessing it’s expect actualized into parcelable in Android code?
m
I’m guessing it’s expect actualized into parcelable in Android code?
it is expext/actual but it doesn’t get inherited for some reason. this is the only way I found plus I checked sample project, counter, and they are doing the same
@youssef hachicha I’m still not sure what do you mean. I’m not sure if you are or aren’t familiar with Circuit. in case you aren’t and you didn’t try to use it KMP module it won’t make much sense to you 😄
a
Why not just do this?
Copy code
// common
@Parcelize
data object MyScreen : Screen
m
because you can’t 😄, parcelable is Android concept and it’s not available in shared KMP code. there is an option to do expect/actual for annotation too
didn’t try with expect/actual for annotation since Circuit does that internally and it’s not working so I didn’t even wanted to try
y
i am very familiar with KMP i am just not familiar with Circuit
a
On multi platform examples in its docs , it just leaves out the annotation lol “it’s not working” what do you mean?
m
Parcelable doesn’t exist outside Android, it’s Android specific thing. docs don’t “just leave annotation out”, annotation doesn’t exist in KMP world
j