A capacitor plugin that can obtain a safe area on Android and iOS.
npm install @untiny/capacitor-safe-area
npx cap sync
``
``
getSafeArea() => Promise<SafeAreaInset>
获取安全区域
Returns: Promise<SafeAreaInset>
getStatusBarHeight() => Promise<{ height: number; }>
获取状态栏高度
Returns: Promise<{ height: number; }>
Prop | Type |
---|---|
top |
number |
right |
number |
bottom |
number |
left |
number |