getSizeScale method
Size
getSizeScale(
- dynamic degrees,
- dynamic width,
- dynamic height,
- dynamic screenWidth,
- dynamic screenHeight,
Implementation
Size getSizeScale(degrees, width, height, screenWidth, screenHeight){
double targetWidth = screenWidth;
double targetHeight = screenHeight;
double scaleWidth = targetWidth / width;
double scaleHeight = targetHeight / height;
double scale = scaleWidth < scaleHeight ? scaleWidth : scaleHeight;
sizeScale = scale;
double resizedWidth = width * scale;
double resizedHeight = height * scale;
return Size(resizedWidth, resizedHeight);
}