Closed jnelle closed 1 year ago
Bindings are automatically provided for mutable properties.
In your case isLoggedIn
is converted to a read-only property due to the StateFlow
return type.
Changing the return type to MutableStateFlow
will generate a mutable property.
Which will support bindings when combined with @StateViewModel
(or one of the other property wrappers).
Thanks, worked for me! :)
Hey thanks for the great library! :)
I'm having issues with creating a Binding Variable for SwiftUI. My KMM code is the following:
In XCode I faced the following error:
In my view I initialized the ViewModel like the following:
I'm also confused from XCode it shows that this variable is a Binding
I want to thank you for this library and also thanking for the good communication with the community, that is not a matter of course and I appreciate that very much!