Closed iancanderson closed 7 years ago
This adds a NativeApi.Platform module, which exposes an os function. It returns a NativeApi.Platform.OS union type, which is either Android or IOS.
NativeApi.Platform
os
NativeApi.Platform.OS
Android
IOS
So in your app, you can now check for the platform:
import NativeApi.Platform as Platform exposing (OS(..)) topMargin : Float topMargin = case Platform.os of Android -> 10 IOS -> 20
Sweet, thanks!
This adds a
NativeApi.Platform
module, which exposes anos
function. It returns aNativeApi.Platform.OS
union type, which is eitherAndroid
orIOS
.So in your app, you can now check for the platform: