Platform specific
In some scenarios when you need to execute platform-specific logic directly from common code, you can use a when
expression to determine the platform at runtime:
when (platform()) {
AppPlatform.IOS -> TODO()
AppPlatform.ANDROID -> TODO()
AppPlatform.DESKTOP -> TODO()
}
Last updated
Was this helpful?