utils/src/adapt_util library
Classes
Properties
- isIPhoneX ↔ bool
-
getter/setter pair
- screenBottomBarHeightDp ↔ double
-
底部安全区距离 dp
getter/setter pair
- screenDevicePixelRatio ↔ double
-
The number of device pixels for each logical pixe
getter/setter pair
- screenHeightDp ↔ double
-
当前设备高度 dp
getter/setter pair
- screenStatusBarHeightDp ↔ double
-
状态栏高度 dp 刘海屏会更高
getter/setter pair
- screenToolbarHeightDp ↔ double
-
导航栏高度 dp
getter/setter pair
- screenWidthDp ↔ double
-
当前设备宽度 dp
getter/setter pair
Functions
-
adaptDp(
dynamic number) → dynamic - 根据设计稿的比例适配dp保证不变形
-
adaptOnePx(
) → dynamic - 根据设备适配1px像素大小
-
adaptPx(
dynamic number) → dynamic - 根据设计稿的比例适配像素保证不变形