getSize function

double getSize(
  1. double px
)

該方法用於設置圖片高寬的最小px

Implementation

double getSize(double px) {
  var height = getVerticalSize(px);
  var width = getHorizontalSize(px);
  if (height < width) {
    return height.toInt().toDouble();
  } else {
    return width.toInt().toDouble();
  }
}