Hi , is `SavedStateHandle` supported on platforms...
# multiplatform
s
Hi , is
SavedStateHandle
supported on platforms other than Android ? I could not find information here, unless I am looking in the wrong place. In general how do you check if a certain class / api is supported on multiple platforms ?
s
SavedStateHandle
is an Android-specific thing, not available on other platforms.
As for knowing when an API is available for all platforms, if it's stdlib then you can simply check the official Kotlin API reference, where it shows which targets support which functions classes. Same with libraries that use the same API reference pages (like Ktor). For androidx libraries that have started to support multiplatform, I believe Google added a similar indicator to developers.android.com
s
The class is
expect class SavedStateHandle
. Should there be actual implementations for other platforms?
s
aha, I may be wrong then
and usually the best way to know is through the IDE, just try to see if it exists or not
s
By check if it exists in the IDE , you mean look at the definitions like above ?
s
yes, or through autocomplete etc... so if I'm in iosMain and I type
Activity
but nothing shows up, I'd know for sure it's not supported
👍 1
maybe there's a better way, but that's as much as I know