INNER CODE UNIT · JavaScript
getFlashMessageStatusBarHeight
lucasferreira/react-native-flash-message · src/FlashMessageWrapper.js:43
export function getFlashMessageStatusBarHeight(isLandscape = false, _customStatusBarHeight = null) {
if (_customStatusBarHeight !== null && _customStatusBarHeight !== false) {
return typeof _customStatusBarHeight === "function" ? _customStatusBarHeight(isLandscape) : +_customStatusBarHeight;
}
/**
* This is a temporary workaround because we don't have a way to detect
* if the status bar is translucent or opaque. If opaque, we don't need to
* factor in the height here; if translucent (content renders under it) then
* we do.
*/
if (isAndroid) {
if (!!global && !!global.Expo) {
return +StatusBar.currentHeight + 6;
}
return 6;
}