getSize function

double getSize(
  1. double px
)

This method is used to set smallest px in image height and width

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();
  }
}