calculateBoxFitRatio function
- @Deprecated('Use ScanWindowUtils.calculateBoxFitRatio instead.')
Calculate the scaling ratios for width and height to fit the provided
cameraPreviewSize into the specified size,
based on the specified boxFit.
Returns a record containing the width and height scaling ratios.
Implementation
@Deprecated('Use ScanWindowUtils.calculateBoxFitRatio instead.')
({double widthRatio, double heightRatio}) calculateBoxFitRatio(
BoxFit boxFit,
Size cameraPreviewSize,
Size size,
) {
// TODO(navaronbracke): remove the deprecated method in the next release
return ScanWindowUtils.calculateBoxFitRatio(
boxFit: boxFit,
cameraPreviewSize: cameraPreviewSize,
size: size,
);
}