Closed humblehacker closed 1 year ago
Given the following property in a Kotlin view model class:
@NativeCoroutineState val price: MutableStateFlow<Double>
it is exposed to Swift as:
Binding<Double>
But if I make it nullable:
@NativeCoroutineState val price: MutableStateFlow<Double?>
I get this in Swift:
Binding<KotlinDouble?>
which requires ugly conversion on the Swift side.
Is there something I can do to improve this?
Actually, I think this has nothing to do with Bindings per se -- the bare property exposes the discrepancy. I'm moving this over to KMP-NativeCoroutines.
Given the following property in a Kotlin view model class:
it is exposed to Swift as:
But if I make it nullable:
I get this in Swift:
which requires ugly conversion on the Swift side.
Is there something I can do to improve this?