dpToPx method

double dpToPx(
  1. double len
)

Implementation

double dpToPx(double len) {
  var density = ScreenUtil.getInstance().scale;
  // 兼容测试用例
  density = density <= 0 ? 1.0 : density;
  return (len * density).ceilToDouble();
}