sizeImage static method
Implementation
static Size sizeImage(
double currentWidth,
double currentHeight, {
required double targetWidth,
required double targetHeight,
}) {
double w = currentWidth;
double h = currentHeight;
final double wd = w / targetWidth;
final double hd = h / targetHeight;
final double be = math.max(1, math.max(wd, hd));
w = w / be;
h = h / be;
return Size(w, h);
}