getRatioWidth function

double getRatioWidth(
  1. InputImageRotation rotation,
  2. Size size,
  3. 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;
  }
}