bottomSafeHeight static method
获取底部安全距离高度
返回结果: double 底部安全区高度(单位: dp) 使用 viewPadding 解决Android平台padding不准确的经典问题
示例:
double safeBottom = DScreenUtil.bottomSafeHeight();
Implementation
static double bottomSafeHeight() {
final bottomPadding = Get.mediaQuery.viewPadding.bottom;
if (Platform.isAndroid) {
return bottomPadding > 0 ? bottomPadding : 0.0;
}
return bottomPadding;
}