Hi all, I have a multiplatform compose app I am wr...
# compose-desktop
s
Hi all, I have a multiplatform compose app I am writing, where I have a common ui, however that ui has a function that is implemented differently on android and desktop. is there a way I can detect platform in the common module to call the platform specific functions?
j
you should be able to use expect/actual for that
s
ah fab, thanks for the quick response!
ł
You can use “expect” “actual” in commons depending on the UI. You can also create a getPlatform() function as in the example https://kotlinlang.org/docs/multiplatform-mobile-create-first-app.html depending on what you really want to achieve
j