getRatioWidth function
double
getRatioWidth(
- InputImageRotation rotation,
- Size size,
- Size absoluteImageSize
)
Implementation
double getRatioWidth(
InputImageRotation rotation, Size size, Size absoluteImageSize) {
switch (rotation) {
case InputImageRotation.rotation90deg:
return size.width /
(Platform.isIOS ? absoluteImageSize.width : absoluteImageSize.height);
case InputImageRotation.rotation270deg:
return size.width /
(Platform.isIOS ? absoluteImageSize.width : absoluteImageSize.height);
default:
return size.width / absoluteImageSize.width;
}
}