INNER CODE UNIT · JavaScript
PAD_WIDTH
lucasferreira/react-native-flash-message · src/FlashMessageWrapper.js:11
const PAD_WIDTH = 768; // iPad
const PAD_HEIGHT = 1024; // iPad
const { height: D_HEIGHT, width: D_WIDTH } = Dimensions.get("window");
const isAndroid = Platform.OS === "android";
const isIPhoneX = isIphoneX();
const isIPad = (() => {
if (Platform.OS !== "ios" || isIPhoneX) return false;
// if portrait and width are smaller than the iPad's width...
if (D_HEIGHT > D_WIDTH && D_WIDTH < PAD_WIDTH) {
return false; // It is probably not an iPad
}
// if landscape and height are smaller that the iPad's height...