getSize function
This method is used to set smallest px in image height and width.
Implementation
double getSize(double px) {
final height = getVerticalSize(px);
final width = getHorizontalSize(px);
if (height < width) {
return height.toInt().toDouble();
} else {
return width.toInt().toDouble();
}
}