How to detect if screen has rounded corners in react-native

After struggling with it, I came with a much easier solution that why shouldn't I ask user whether he/she has rounded cornered screen when the app starts first time and later giving an option in settings under my app to change whenever user wanted.

I stored user's selection in local storage and modified my view based on that flag. Now I don't have to maintain a list of all devices instead it will cover all use cases.


Currently there is no option to get corner radius from Dimensions. There is only 4 values in Dimensions object given below.

{ width: 384, height: 592, scale: 2, fontScale: 1 }

Tags:

React Native